Choosing and Configuring Gazebo’s Physics Engine: ODE, Bullet, Simbody, or DART
Select the right Gazebo physics engine—ODE, Bullet, Simbody, or DART—by editing the SDF <code><physics></code> block. Learn how each engine differs, how to tune key parameters, and common pitfalls to avoid for realistic, high‑performance robot simulations.
15 Dec 2025, 01:04 UTC

Why the Engine Matters
When a robot runs in Gazebo, the physics engine is the core that turns joint commands into forces, resolves contacts, and integrates motion. The engine you pick directly influences two key outcomes:
- Simulation fidelity – how closely the robot’s motion matches the real world.
- Performance – CPU usage, frame time, and the ability to run at real‑time or faster.
Gazebo supports four mature engines: ODE, Bullet, Simbody, and DART. Switching between them is a lightweight decision that requires only a change to the <physics> block in your SDF file, but each engine has its own strengths and quirks.
How to Specify the Engine in an SDF World
The <physics> element is the single place where you declare the engine and its tuning knobs. Below is a minimal example that shows how to set up ODE and Bullet side‑by‑side. In practice you would keep only one block in a given world, but the snippet demonstrates the syntax for each engine.
<world name="example_world">
<physics name="ode" type="ode">
<max_step_size>0.001</max_step_size>
<max_update_rate>1000</max_update_rate>
<ode>
<solver>
<iters>50</iters>
<sor>1.3</sor>
</solver>
<contact>
<damping>0.2</damping>
<friction>1.0</friction>
</contact>
</ode>
</physics>
<!-- Bullet configuration – keep only one block in a real world -->
<physics name="bullet" type="bullet">
<max_step_size>0.001</max_step_size>
<max_update_rate>1000</max_update_rate>
<bullet>
<solver>
<iters>50</iters>
<sor>1.3</sor>
</solver>
<contact>
<damping>0.2</damping>
<friction>1.0</friction>
</contact>
</bullet>
</physics>
</world>
Key points:
- The
nameattribute selects the engine (e.g.,ode,bullet,simbody,dart). - Engine‑specific child tags (e.g.,
<ode>,<bullet>) expose parameters that differ across engines. - Parameters such as
<max_step_size>and<max_update_rate>are common to all engines and control the integration timestep and how often the physics loop runs.
Engine‑Specific Strengths
| Engine | Typical Use Case | Key Advantage |
|---|---|---|
| ODE | Fast, lightweight simulations; small robots; educational demos | Fastest solver; good default stability for simple contacts |
| Bullet | High‑performance collision detection; GPU‑accelerated scenarios | GPU collision pipeline; robust against large contact forces |
| Simbody | Articulated mechanisms, complex joints, robotics research | Highly accurate rigid‑body dynamics; supports advanced joint constraints |
| DART | Advanced joint constraint handling; multi‑body dynamics research | Improved handling of joint limits and friction; supports soft‑body extensions |
Performance vs Fidelity Trade‑Offs
- ODE is the fastest but can struggle with stiff contacts or very small timesteps.
- Bullet offers a good balance; its GPU pipeline can process thousands of collision queries per frame, but the solver may be slower on CPU‑only systems.
- Simbody and DART provide the highest fidelity for articulated robots, but at a higher computational cost.
Tuning Engine Parameters
Changing the engine alone rarely yields a stable simulation. You must adjust engine‑specific parameters to match the dynamics of your robot.
- Step Size & Update Rate – Smaller
max_step_sizeincreases accuracy but raises CPU load. Typical values range from 0.001 to 0.01 seconds. - Solver Iterations – The
itersvalue determines how many constraint resolution passes the solver performs. ODE defaults to 50; Bullet often uses 10–20. Increase if you see jitter or penetration. - Contact Damping & Friction – These control how quickly contacts settle. ODE’s
dampingis a scalar; Bullet usescontact_dampingandcontact_frictionunder the<contact>tag. Tuning them can prevent unrealistic bouncing. - GPU Settings (Bullet) – If you enable
use_gpuunder the<bullet>tag, you can offload collision detection to the GPU. Verify that your graphics driver supports compute capability 3.0 or higher.
Common Pitfalls
- Mixing Engines – Defining multiple
<physics>blocks in the same world is unsupported. The last block read wins silently, which can lead to hard‑to‑debug behavior. - Using Default Parameters Across Engines – A parameter set that works for ODE may cause instability in Bullet or Simbody. Always start with engine‑specific defaults and adjust from there.
- Missing Dependencies – DART and Simbody require additional shared libraries not bundled with all Gazebo binaries. If you see
error loading libdart.so, install thelibdart-devpackage or build from source. - Ignoring Console Feedback – Gazebo prints a line such as
Using ODE physics engineat startup. If this does not match your<physics>block, you have a configuration mismatch.
Verifying Your Choice
- Console Output – On launch, look for the engine name. Example:
Using ODE physics engine Using Bullet physics engine
- Diagnostics Panel – In Gazebo’s GUI, open the
Physicstab. It shows real‑time statistics such asCPU %,Step Size, andSolver Iterations. Compare values between engines. - Joint Trajectory Comparison – Run a simple motion (e.g., a 2‑DOF arm lifting an object) with each engine and plot joint angles. Large deviations indicate fidelity issues.
- CPU Profiling – Use
htoporperfto measure CPU usage. Bullet should show lower CPU for collision detection but higher for the solver if GPU is not enabled.
Practical Decision Flow
Follow this quick checklist before you commit to an engine:
- Do you need GPU collision acceleration? Yes → Choose Bullet with
use_gpu=true. - Is your robot heavily articulated with complex joint constraints? Yes → Choose Simbody or DART.
- Are you running on a low‑power embedded host? Yes → Stick with ODE and keep
max_step_sizegenerous. - Do you need tight integration with ROS 2 and existing Gazebo plugins? Yes → Verify that the plugin for your chosen engine is available (e.g.,
libgazebo_ros_ode.sofor ODE).
Conclusion
Choosing the right physics engine in Gazebo is a lightweight but critical decision. By editing the <physics> block, you can swap engines without touching application code. Remember to tune engine‑specific parameters, avoid mixing engines, and verify the result with console output and diagnostics. With the right engine and settings, you can achieve both realistic robot behavior and efficient simulation performance.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.