google-deepmind/mujoco 3.12.0
google-deepmind/mujoco
Captured source
source ↗3.12.0
Repository: google-deepmind/mujoco
Tag: 3.12.0
Published: 2026-08-20T11:11:59Z
Prerelease: no
Release notes:
Version 3.12.0 (August 20, 2026)
General
1. 3f8db4c1 The MJCF grammar is now defined in a single source of truth schema file, `src/xml/mjcf.schema`. The parser's grammar table, presence constraints, keyword maps, typed attribute bindings and save policies are generated from it and gated by tests, as are the schema's enum keywords and declared defaults against the C headers and default-constructors.
> [!WARNING] > Breaking API changes > 2. 6fe04aa8 Removed the custom binary texture format (image/vnd.mujoco.texture) and the automatic fallback to custom textures when loading files with unrecognized extensions. Textures can now only be loaded from PNG (image/png) and KTX (image/ktx) files.
Actuation
3. 279df98c Added the `pid` actuator: a PID controller with real position and velocity setpoint inputs, optional integral action (`ki`, integrating the position error with `imax` anti-windup), setpoint rate limiting (`slewmax`), and an optional feedforward input. This subsumes the functionality of the mujoco.pid plugin with proper activation state: correct under all integrators and visible to keyframes and sensors. With a zero velocity setpoint it is identical to `position`. The input signature is any subset of [pos, vel, ff], selected by `input`; absent setpoint inputs are fixed at zero, so the control vector contains no inert entries. 4. 2f1843f4 The `dcmotor` on-board controller is redesigned: the `input` attribute selects any subset of [pos, vel, ff, voltage], where pos and vel are setpoints for the controller, ff is a torque feedforward, and voltage is the raw terminal voltage (the default, a plain voltage-commanded motor). Controller gains are in torque space, as for `pid`, and the drive voltage compensates back-EMF as in a current-controlled driver: commanded torque is delivered exactly until a limit is reached. The keyword input="none" selects the empty signature: the actuator has no control inputs and is purely passive, so friction, cogging and back-EMF braking can be used as passive joint forces.
> [!WARNING] > Breaking API changes > 5. 2f1843f4 The mode-flag semantics of `dcmotor/input` ("voltage", "position", "velocity", selecting the interpretation of a single control) are replaced by input signatures, and the controller gains changed from voltage space to torque space. The old velocity mode's integral term (integrated-velocity tracking) is retired without replacement; the integrator always accumulates position error. > > Migration: Voltage-commanded motors (the default) are unchanged. Replace input="position" with input="pos" and input="velocity" with input="vel", and multiply the controller gains by $K/R$ (torque per volt). The motor's back-EMF damping, previously felt in addition to the controller's damping, is now compensated: to preserve behavior when the velocity setpoint is zero, add $K^2/R$ to the converted kd.
Engine
6. 83e621d7 Optimized large-mesh convex collision detection with up to 2x speedup in certain cases. 7. 55d13aec Replaced the per-step sparse Cholesky factorization of the flex block of the implicit effective metric M + K with its prefactored per-vertex 3x3 diagonal blocks. The blocks precondition the CG constraint solver and drive an iterative solve for qacc_smooth, which now converges on `tolerance` rather than a fixed threshold. Flexes with `elastic2d` stretch stiffness step roughly twice as fast; bending-only flexes keep the exact constant factor and are unchanged. 8. 86e98601 Rewrote cleaner box-box SAT collider.
> [!WARNING] > Breaking API changes > 9. 2a3554c8 Contacts of a flex with `passive` collisions are now integrated implicitly: their stiffness is carried by the effective metric rather than applied as an explicit spring, and can be far stiffer than the timestep would otherwise permit. Models using passive collisions should be re-checked: the feature now requires implicit or implicitfast with the CG solver, pyramidal cones and sleep disabled; passive handling covers flex-flex, self-, and static-geometry contact, while contact with a moving body stays on the constraint solver; and the stiffness is now a mass-scaled natural frequency rather than a fixed 1e4. > 10. 55d13aec Removed mjData.efm_L_rownnz, mjData.efm_L_rowadr and mjData.efm_L_colind. They described the sparsity of the effective-metric Cholesky factor, which no longer exists; mjData.efm_L now holds dense 3x3 blocks, 9 numbers per covered vertex. mjData.efm_active no longer takes the value 2: nothing selects a solve path on preconditioner exactness, so it is now a plain 0/1 flag. > 11....
Excerpt shown — open the source for the full document.