How can I throttle multiple ROS nodes at once?

asked 2019-05-08 15:55:27 -0500

lenignes gravatar image

I currently have a three-camera setup that I want to record data from using rosbag. However, I want to slow down the video feed from these cameras (from default 30fps to 3fps). I found out that you can throttle a node using

  <node name="foo_throttler" type="throttle" pkg="topic_tools" args="messages /input_topic 30 /input_topic_throttled" />

However, when we tried to create 3 different nodes, we realized that you can only throttle one node at a time. Is there a workaround to how we can publish multiple throttle nodes parallely. Essentially, we are trying ot throttle the video feed from the 3 cameras. In addition does using the -r parameter for rosbag guarantee recording at a lower fps since that was the only workaround I could think of

edit retag flag offensive close merge delete


Throttling multiple nodes (topics actually) at the same time is definitely possible. It's not clear to me what limitation or problem you ran into?

Are you worried about resource usage if you start three nodes? Something else?

Note that there is also a nodelet version of throttle (here), which may be better to use with something like a depth camera (as it avoids a lot of overhead).

gvdhoorn gravatar image gvdhoorn  ( 2019-05-09 05:24:45 -0500 )edit