Google DeepMind Rebuilds MuJoCo 3.9.0 to Speed Up Robot Simulation
Google DeepMind ships MuJoCo 3.9.0 with redesigned contact semantics, exact diagonal inertia, a 20 percent faster PGS solver, and new sleeping flexes.
Takeaways
- MuJoCo 3.9.0 redesigns contact
marginandgapsemantics for consistency with Newton. - New
diagexactflag computes exact constraint-space inertia diagonal, improving solver quality. - Flexes can now sleep alongside rigid bodies, cutting wasted work in soft-body scenes.
- 3.8.1 added PGS solver island support and pseudo-random iteration for a 20 percent speedup.
mjtBoolreplacesmjtByte; newmjassert.henforces ABI stability at compile time.- Tactile sensor now returns raw depth; MJX drops deprecated
nconmaxfornaconmax.
Google DeepMind has pushed a new release of MuJoCo, the physics engine that sits underneath a large fraction of published robot learning work. Version 3.9.0 is the headline drop, arriving on the heels of a 3.8.1 point release that quietly landed a chunky solver upgrade. Together they reshape how contacts are defined, speed up constrained simulation, and start prepping the C API for stricter typing.
Contact margin and gap get a rewrite
The most user-visible change in 3.9.0 is a redesign of the margin and gap parameters that govern contact detection. In the old model, margin controlled the detection threshold (contacts exist when dist < margin) and gap was subtracted from it to produce the force threshold. That was counterintuitive because most users expect margin to mean geometric inflation and gap to mean an actual spatial buffer.
Under the new semantics, margin is the geometric inflation of the geom surface and gap is an additional detection buffer beyond the inflated surface. Contacts are created when dist < margin + gap, forces are applied when dist < margin, and contacts with margin < dist ≤ margin + gap are included in mjData.contact but generate no force. That inactive band is directly useful for adhesion actuators and custom callbacks that need to know about near-misses without paying for constraint forces.