0
$\begingroup$

Rosanswers logo

I have 5 topics publishing images at different rates. I want them to publish at the same rate and hence I am trying to set the rostopic hz to a constant rate for all the 5 topics. How can I do it in rospy?

My understanding is that rospy.Rate() will work only for that loop of code. How can I set the rate a which the messages are being published?

Thanks


Originally posted by Joy16 on ROS Answers with karma: 112 on 2017-03-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

This needs to be done/handled in the node actually sending the messages. Either they provide a possibility to set the rate, or not. Typcially, for most sensors (cameras, laser scanners, ...), they don't. You will get your messages as fast as possible.

If you want, you could, however, push all those topics through a topic_tools throttle. See the ROS wiki on the syntax.


Originally posted by mgruhler with karma: 12390 on 2017-03-02

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Joy16 on 2017-03-02:
Thank you very much!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.