max_step_size vs sensor update_rate

asked 2023-04-24 04:30:05 -0600

I run gazebo 11.10.2 with the option --lockstep and a robot with a ray sensor (laser scanner) that I would like to run at update_rate of 400 Hz

The world's physics is set to real_time_update_rate =1000 Hz and max_step_size=1 ms / step

This means the sensor expects a period between OnUpdate calls to be 2.5 ms, which cannot be reached with a 1 ms resolution of the gazebo physics update. At best the sensor OnUpdate is called at 3 ms, which means 333 Hz update rate. I am fine with that obvious limit.

So to work-around the limit, I set my real_time_update_rate=400 Hz and max_step_size=2.5 ms / step so that the physics update and sensor update occur in sync (also permits to have other sensors at 100 Hz without issues), but in that setup, the sensor update that should be 400 Hz reaches 200 Hz at best.

Is there something wrong with my logic ?

To me it looks as if some time computation was wrongly computed when the time that passed is exactly the expected period.

edit retag flag offensive close merge delete