ROBOTICS 101Concept explainer

Simulators and Physics Engines

Simulators like Gazebo, Isaac Sim, MuJoCo, and PyBullet let robots be tested and trained without risk. Under the hood, a physics engine advances the world in small time steps and resolves contacts with an iterative solver. Its settings trade speed against accuracy, and contacts, especially stacks of objects, are where cheap settings go wrong first.

Stepping the world

Each step integrates velocities and positions over a time step \(\Delta t\), then fixes contacts so bodies do not overlap. Contact solvers work iteratively: each iteration pushes overlapping pairs apart, but fixing one contact disturbs its neighbors, so a tall stack needs many iterations to settle every contact. Semi-implicit Euler, common in game-style engines, is

$$\mathbf{v}_{t+1} = \mathbf{v}_t + \Delta t\,\mathbf{a}_t, \qquad \mathbf{x}_{t+1} = \mathbf{x}_t + \Delta t\,\mathbf{v}_{t+1}$$

What to notice

With a small time step and enough iterations, the stack settles and stays still. Too few iterations and the lower boxes sink into each other, since the solver never finishes pushing them apart, and the stack jitters. A large time step lets boxes move far within one step, so contacts are resolved violently and the stack can bounce apart. Robot simulators tune exactly these settings, and robot learning results that depend on contact, like grasping, are sensitive to them, part of the sim-to-real gap.