Gazebo | Ignition | Community
Ask Your Question

How does faster than real-time simulation in Gazebo work?

asked 2021-04-19 17:30:20 -0500

nrotella gravatar image

Hi all, I know this has been asked in various ways over the years, but I couldn't find any great answers. I'm testing a few Velodyne LIDAR sensors in Gazebo11 with ROS2 and trying to understand the behavior I'm seeing when I set Gazebo to run as fast as possible.

When running normally (real-time factor or RTF at 1.0), I get LIDAR data from my three sensors at ~30Hz, checked with 'ros2 topic hz' in a terminal. When I set Gazebo's Physics 'real-time update rate' from 1000.0 to 0 (which should enable running as fast as possible), the RTF goes up to ~16, yet the data I see in RViz is clearly not 16x as fast. Additionally, the 'ros2 topic hz' only shows the output rate roughly at 2x... and the message count received in RViz doesn't seem to agree with either 16x or 2x. Please see this short video for a demonstration, and let me know if you have issues viewing it.

What's going on here? What does an RTF of 16x actually mean, and why is the LIDAR data not truly coming in 16 times as fast?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-04-22 00:32:18 -0500

Veerachart gravatar image

I think your lidar's type is gpu_ray. Correct me if I'm wrong.

From my understanding, GPU sensors (cameras, rays) update independently from physics. Maximum possible update rate is depending on how complex the models around the sensor are, but are likely to be lower than the physics update rate. For 16x, that means the lidar needs to update at 480 Hz in real-time, and I think rendering process used in the gpu_ray cannot handle that.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-04-19 17:30:20 -0500

Seen: 22 times

Last updated: Apr 22