Reducing Simulation Jitter: Tuning ODE Physics and Collision Hulls in Gazebo
Learn how to eliminate simulation jitter in Gazebo by tuning ODE physics parameters and optimizing collision hulls for better stability and performance.
13 Jun 2026, 09:59 UTC

The Stability Gap in Robotic Simulation
A common frustration when moving from a CAD model to a Gazebo simulation is the "jitter" effect—where a robot vibrates violently or objects slide unnaturally across a surface. This usually isn't a bug in the software, but a mismatch between the physics engine's time step and the physical properties of the model. To get stable results, you must balance the Open Dynamics Engine (ODE) parameters with simplified collision geometries.
The Physics Trade-off: Step Size vs. Stability
Gazebo uses ODE as its default physics engine to handle rigid body dynamics. ODE calculates the state of the world in discrete time steps. If the max_step_size is too large, the engine may calculate a collision that pushes an object too far into another surface in a single frame. The engine then applies a massive corrective force to "eject" the object, creating the characteristic jitter.
For high-mass robots or high-friction surfaces, reducing the step size increases accuracy but consumes more CPU. The goal is to find the largest step size that maintains stability without lagging the simulation clock (Real Time Factor < 1.0).
Optimizing Collision Hulls
A frequent mistake is using the same high-polygon mesh for both the and tags in the Simulation Description Format (SDF). While the visual mesh makes the robot look realistic, the physics engine must calculate every vertex intersection for collisions.
Complex meshes lead to "snagging," where a robot gets stuck on a flat surface because of tiny imperfections in the mesh geometry. The practical solution is to use primitive shapes (boxes, spheres, and cylinders) for collision hulls. These have mathematically optimized intersection tests that are faster and more stable than mesh-to-mesh calculations.
Worked Example: Configuring a Stable World
To resolve jitter in a world file, you should explicitly define the physics properties and simplify the collision geometry. Below is a configuration for a stable environment using Gazebo Classic (v11) syntax.
<sdf version='1.6'>
<world name='stable_world'>
<physics type='ode'>
<max_step_size>0.001</max_step_size> <!-- 1ms step for higher stability -->
<real_time_update_rate>1000</real_time_update_rate>
</physics>
<model name='robot_base'>
<link name='link'>
<visual>
<geometry>
<mesh<uri>model://robot/mesh.dae</uri></mesh>
</geometry>
</visual>
<collision>
<geometry>
<box>
<size>0.5 0.3 0.2</size>
</box>
</geometry>
</collision>
</link>
</model>
</world>
</sdf>
Diagnostic Verification
To verify if your changes worked, use the following workflow:
- Visual Check: In the Gazebo GUI, go to
View > Collisions. Ensure the highlighted collision shapes are simple primitives and not complex meshes. - Stability Test: Place a heavy object on a surface and observe the
Real Time Factor (RTF)in the bottom bar. If RTF drops significantly below 1.0, yourmax_step_sizemay be too small for your hardware. - Jitter Check: If the object still vibrates, decrease
max_step_sizefurther (e.g., to 0.0005) and increasereal_time_update_rateaccordingly.
Limitations and Constraints
Tuning ODE is a balancing act. While smaller time steps reduce jitter, they increase the computational load. If you are simulating a swarm of robots or a massive environment, you cannot simply lower the step size indefinitely. In such cases, you may need to increase the erp (Error Reduction Parameter) or cfm (Constraint Force Mixing) settings within the ODE physics block to allow for a small amount of "softness" in the joints and collisions, which can dampen oscillations.
Actionable Closing
Next time your simulation behaves erratically, don't assume it's a plugin error. First, switch your collision tags to primitive boxes or cylinders, then incrementally lower your max_step_size until the jitter disappears. This ensures your robotic prototyping remains performant without sacrificing physical accuracy.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.