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

How to throttle a bag file?

asked 2014-01-01 16:28:02 -0500

Astronaut gravatar image


I have bag file with topics scan and imu but I need to throttle them as the frequency rate is to high. So basicly I wont to use the same bag file but with much lower frequency. When the ros topics in the bag file are throttled is good, but when I have the bag file with same ros topics but are not throttle the frequency rate of the recorded topic is to high. So I thought I can throttle the bag file in order to have the same information but recorded with lower frequency rate. Is that possible and if yes how to do it?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-01-01 17:28:04 -0500


Would using the rate option for rosbag play solve your problem? For example, you can lower the publish rate to half speed using:

rosbag play my_bag.bag -r 0.5

Where 0.5 means 0.5 times the recorded rate.

Otherwise, you can use throttle from:


edit flag offensive delete link more


Awesome, if this helped you could you accept the answer so other people can find answers more efficiently?

Tim Sweet gravatar image Tim Sweet  ( 2014-01-02 19:43:54 -0500 )edit

answered 2014-01-01 19:19:00 -0500

Astronaut gravatar image

updated 2014-01-02 23:20:30 -0500

I find this option

  <node name="foo_throttler" type="throttle" pkg="topic_tools" args="messages /input_topic frequency/input_topic_throttled" />
edit flag offensive delete link more

Question Tools



Asked: 2014-01-01 16:28:02 -0500

Seen: 1,905 times

Last updated: Jan 02 '14