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

How to drop message rate? Unable to load topic_throttle.

asked 2017-04-09 09:36:45 -0600

Joy16 gravatar image

I have a topic published by baxter robot "/robot/digital_io/torso_left_itb_button0/state" that publishes at 100 Hz.

As I am running a loop in the subscriber call back, my loop keeps running for 100 times. I want it to receive only one message/per second and hence process that loop only once. For some reason, I am not able to load the page of ros_topic throttle to take a look on how it works.

Can you please tell me how to do it via throttle or srop or any other tool that will drop the number of messages published?

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-09 15:27:09 -0600

ahendrix gravatar image

It looks like the wiki is back up now: http://wiki.ros.org/topic_tools/throttle

The basic usage for throttling the message rate is: throttle messages <intopic> <msgs_per_sec> [outtopic]

In your case, it looks like you want to do:

 rosrun topic_tools throttle messages /robot/digital_io/torso_left_itb_button0/state 1.0

And then have your subscriber subscribe to the throttled topic /robot/digital_io/torso_left_itb_button0/state_throttle

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-04-09 09:36:45 -0600

Seen: 383 times

Last updated: Apr 09 '17