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

rosbag playback speed [closed]

asked 2012-11-13 22:00:33 -0500

ChickenSoup gravatar image

updated 2016-05-17 02:40:15 -0500

Hi all,

We have some sensor data that are saved as .csv files (data+timestamp) from a robot, which does not run ROS. To run some algorithms, I converted once such file into a ROS bag file using a python script.

After setting the /use_sim_time parameter and when playback this bag file with rosbag play --clock abc.bag, all the data seems to be flushed at once.

I need to know what determines the natural play speed of a bag file. I thought it is done using the header.stamp

Thank you in advance


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Martin Günther
close date 2016-05-17 03:26:40.305996

1 Answer

Sort by » oldest newest most voted

answered 2012-11-13 22:10:26 -0500

Lorenz gravatar image

In your Python script, I guess you were using Bag.write. Did you specify the t parameter and set it to the correct time stamp? As far as I know, that's the parameter that controls playback speed.

The system cannot use header.stamp for a simple reason: not every message has a stamp but rosbag needs time information. Also, the C++ rosbag library uses the raw (serialized) message data blobs to store them in the file. There is just no way to access the header without knowing the exact message definition.

edit flag offensive delete link more


Thank you very much. Yeah it was the 't' paramater.

ChickenSoup gravatar image ChickenSoup  ( 2012-11-13 22:31:25 -0500 )edit

Question Tools


Asked: 2012-11-13 22:00:33 -0500

Seen: 1,358 times

Last updated: May 17 '16