ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

There is a third parameter to write that holds the time, set it to header.stamp.

http://docs.ros.org/api/rosbag/html/python/

rosbag play will use that time during playback, it doesn't use the header time because many messages don't have headers.

The tutorial example should be changed to show that if it doesn't.

There is a third parameter to write that holds the time, set it to header.stamp.

http://docs.ros.org/api/rosbag/html/python/

(I can't link straight to it because the html prevents it: click rosbag.bag on the left, then Bag on the right, then write() appears)

rosbag play will use that time during playback, it doesn't use the header time because many messages don't have headers.headers. Not supplying the time results in the current time being used.

The tutorial example should be changed to show that if it doesn't.