@@ -0,0 +1,1219 @@
+#!/usr/bin/env python%0A%0A'''%0ACopyright 2016 William Baskin%0A%0A/*****************************************%0A LICENSE SUMMARY%0A%0A This package is licensed under the%0A    MIT License. Please see the LICENSE.md%0A    file in the root folder for the%0A    complete license.%0A%0A *****************************************/%0A%0A Odom Trace%0A%0A Records all published odom/ground truth poses and performs a rolling publish of%0A the recieved positions to /replay.%0A%0A Interface:%0A msg/replay - publishes the past Odometry positions%0A '''%0A%0Aimport rospy%0Afrom nav_msgs.msg import Odometry%0A%0Aclass OdomTrace(object):%0A    def __init__(self):%0A        rospy.init_node('odom_trace')%0A        rospy.loginfo('Trace Running.')%0A        self.rcvd = %5B%5D%0A        self.index = 0%0A        self.odom = rospy.Subscriber('/odom', Odometry, self.process_position)%0A        self.replay = rospy.Publisher('/replay', Odometry, queue_size=1)%0A        sleep_rate = rospy.Rate(50)%0A        while not rospy.is_shutdown():%0A            for position in self.rcvd:%0A                self.replay.publish(position)%0A                sleep_rate.sleep()%0A            sleep_rate.sleep()%0A%0A    def process_position(self, msg):%0A        self.rcvd.append(msg)%0A%0Aif __name__ == '__main__':%0A    ot = OdomTrace()%0A

Create a ros node for storing, replaying a robot's position