Robotics StackExchange | Archived questions

How do I know the maximum rate my publisher can publish?

I need to publish the information of 4 sensors as quick as possible, could anybody tell which is that rate?

Asked by mmodetb on 2015-05-04 09:14:25 UTC

Comments

Answers

use $ rostopic hz /topic_name to know frequency of publisher.

check rostopic hz

Asked by bvbdort on 2015-05-04 09:21:40 UTC

Comments

But I know the value of the frecuency, because I have declare it. I just want to make as big as fast as possible. How do I know that?

Thank you,

Mercedes.

Asked by mmodetb on 2015-05-04 09:44:13 UTC

it depends on frequency of sensors. how did you declare the publisher frequency ?

Asked by bvbdort on 2015-05-04 10:22:14 UTC

Then sensors are giving information all the time. They are a current and a voltage sensor. I declare the frequency of the publisher by using a while loop: rate = rospy.Rate(100) while not rospy.is_shutdown(): pub.publish(state) rate.sleep() thank you!

Asked by mmodetb on 2015-05-04 10:57:37 UTC

I don't see any documentation of a maximum rate. It's probably system-dependent. On my machine which is a Lenovo T430 laptop, the maximum publication rate I have measured using a simple test program is about 30 khz.

Asked by kgilpin on 2018-01-28 20:47:24 UTC

Comments