Gazebo | Ignition | Community
Ask Your Question

Gazebo /clock publish rate

asked 2020-06-09 13:12:37 -0500

fiji3119 gravatar image

Gazebo publishes /clock at 10Hz. Can this be increased and how?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-09 14:26:33 -0500

/clock publishes a message once per every new state, i.e. at 1/max_step_size Hz. You should rather focus on why your simulation runs so slow than the clock publish rate (did you perhaps tweak max_step_size?).

Nonetheless, if you still want to change the frequency, you can do that with the /gazebo/pub_clock_frequency parameter on the parameter server.

edit flag offensive delete link more


I am using default value i.e max_step_size = 0.001 but when I run ros2 topic hz /clock, I get avg 10Hz. Shouldn't I expect 1000hz?

fiji3119 gravatar imagefiji3119 ( 2020-06-09 18:13:01 -0500 )edit

So, things are different in ROS2. It seems that /clock indeed publishes at 10 Hz. You can find the answer to your question here.

nlamprian gravatar imagenlamprian ( 2020-06-09 19:00:46 -0500 )edit

Exactly what I was looking for. Thank you!

fiji3119 gravatar imagefiji3119 ( 2020-06-10 08:55:27 -0500 )edit

Question Tools

1 follower


Asked: 2020-06-09 13:12:37 -0500

Seen: 1,723 times

Last updated: Jun 09 '20