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

How to throttle a bag file?

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

Astronaut gravatar image

Hello

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
1

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

Hello!

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: http://wiki.ros.org/topic_tools/throttle

-Tim

edit flag offensive delete link more

Comments

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
0

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

Astronaut gravatar image

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

I find this option

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

Question Tools

2 followers

Stats

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

Seen: 1,828 times

Last updated: Jan 02 '14