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

rosbag playback speed [closed]

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

ChickenSoup gravatar image

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

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

CS

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
1

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

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

Comments

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

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

Question Tools

Stats

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

Seen: 1,413 times

Last updated: May 17 '16