Repository navigation
Version 4.1.0 (December 1, 2026)
Significant new features
-
Substantially improved CPU stepping performance in both double and single precision, averaging ~1.4x faster on x86-64
and ARM64 across our benchmark suite, including ~1.3x (~1.6x ARM64) on Unitree G1 with hands, ~2.1x on ALOHA, and
~2.2x (~2.5x ARM64) on Shadow Hand. Continuous CPU performance across commits can be tracked at
mjbench (maintained by @kevinzakka):-
Portable SIMD infrastructure and vectorized kernels: Added a 4-wide SIMD layer (
mjtNum4in
engine_simd.h;6a6595c,d4c37d5) supporting AVX/FMA, ARM NEON, WebAssembly SIMD128, and a
scalar fallback across both double and single precision (mjUSESINGLE,298d367), replacing the legacy
double-precision AVX-only BLAS header (e603d5f). Vectorized hot kernels across dense and sparse linear
algebra (c4b0610,17cb305,6f5bbec,596c94b,90c2ad5), the primal
solver and constraint regularization (6c9e627,9995525,ec0384c), elliptic friction
cone updates (dbf9a74), flex contact Jacobian rotation (d5f6b13), and broadphase/dynamic BVH
bounding boxes (186f4dc,d6bcc2a). -
Algorithmic and memory-layout optimizations: Fused contact Jacobian construction and direct sparse CSR contact
assembly (09b8ea2,09834d3,d7fda58), supernode-accelerated sparse matrix squaring,
transposition, and matrix-vector products (681731c,8148157,020335c,
fa6c9fb), 2-column/4-row blocked Cholesky updates (6054e3c), dense elliptic Newton Hessian
folding and refactorization thresholds (c6ac133,0c51e88), single-island fast paths
(61659cf,5e06cd0), PGS sweeps and fused Nesterov updates (72add57), faster inertia
factorization and impedance assembly (05b1ae4,5ad852a), radix-sort broadphase with single-pass
projection frame (2787bae,9742035), cached relative-frame OBB tests and streamlined BVH
midphase traversal (27ebada), and warm-started convex mesh support queries and streamlined GJK simplex
projection (6e384ac,7bd0173).
-
-
Extended spatial tendon wrapping in MuJoCo, MJX, and MuJoCo Warp with closed-form multi-idler
chains and multi-turn spools:fa79308f9Wrapping chains: Consecutive cylinder geoms in the path of a
spatial tendon, with no sites between them, model a tendon running over several idlers. The
tendon is the shortest path that passes each cylinder on the side of its side site, computed in closed form, and it
lifts off a cylinder and touches down again with continuous length and moment arm. The cylinders must have parallel
axes and side sites, and the compiler checks that the idlers stay in one plane. See
Wrapping chains and the
idler elbow example. Below,
the idler elbow at three angles of the elbow and the role of the side sites.
a40c5690fSpools: A cylinder geom in the path of a
spatial tendon with the new turns attribute is a drum on a hinge
joint that the tendon is anchored to and winds around by any number of turns. The number of turns follows from the
angle of the hinge, so the tendon can be reeled in, paid out completely and wound the other way without additional
state. Instead of a site, the drum can be followed by the idlers of a wrapping chain. See Spools and
the winch example. Added
mjWRAP_SPOOL andmjsWrap.turns. Below, a drum at three angles of the hinge and a fairlead
displaced along the axis.
b32846bbaAddedmju_QP, a dual active-set solver for dense convex quadratic programs with bounds and
two-sided linear constraints. Constraints can be soft: a soft constraint holds exactly up to a threshold on its
multiplier and then yields with a given compliance, so problems with soft constraints remain feasible. The solver can
be warmstarted from a previous active set. The Hessian can be singular or zero (a linear program).
Engine
Warning
Breaking changes
-
69798e647Cables, i.e. spatial tendons with
springlength"0 L"andL > 0, now have a pull-only spring-damper.
Previously the spring acted only beyondLbut the damper always acted, so a slack cable was dragged by its
damping and a taut one could push. Now the spring and damper combine into a smooth tension that is zero when
slack, never negative and at most three times the spring force. A cable with zero stiffness now applies no force,
including from its damping, and the compiler warns when such a cable is damped. Damped cables now also render as
catenaries when slack. All other tendons are unchanged. This applies to MJX and MuJoCo Warp as well.Migration: To keep the previous behavior for lengths above a small
$\epsilon > 0$ , set
springlengthto"eps L"(for example"1e-6 L"; this disables catenary rendering and lets tensile
plasticity shift the lower bound along withL). Otherwise, move slack damping to joints or a separate tendon. -
7842fd7caRemoved theHfield ofmjContactand theflg_coneHessianparameter of
mj_constraintUpdate, as the Newton solver now computes closed-form elliptic cone factors directly without
materializingmjContact.H. The size ofmjContactwas reduced from 608 to 320 bytes (from 328 to 184
bytes in single precision).Migration: Remove uses of
mjContact.Hand drop the trailingflg_coneHessianargument when calling
mj_constraintUpdate. -
06d5f051cRemoved the per-geom/per-flexsolmixattribute and thegeom_solmix/flex_solmix
model arrays, which weighted the arithmetic averaging of contact solver parameters. They were rarely used because
arithmetic averaging is poorly suited to combining solver parameters; removing them also frees thesolmixname
for the new global option/solmix attribute below.
-
Added global contact-parameter mixing options on option to control how equal-priority contacts
combine per-geom and per-flex parameters (see Contact parameters):-
188926babfricmix (mjOption.fricmix,mjtFricMix): selects the
pairwise friction mixing rule (max,geometric, ormin; defaultmax). -
49adf9709solmix (mjOption.solmix,mjtSolMix): selects howsolref
andsolimpare combined (averageorseries; defaultaverage). The newseriesmode models two
compliant surfaces in series so softer surfaces dominate physically and smooth (solimp[0] = 0) contact onset is
preserved.
-
-
3e57ab8a6Optimized elliptic friction cone Hessians in the
Newton solver using closed-form rank-(dim - 1)factors (~5–30% faster elliptic Newton
solves). Thanks to @adenzler-nvidia for proposing the optimization in MJWarp pull
request 1879. -
30c53c3d3Optimized spatial tendon Jacobian computation (mj_tendon) and
sparsity (mjModel.ten_J_colind) by stopping ancestor walks at the endpoints' lowest common ancestor, skipping
shared ancestor DOFs whose contributions cancel (~7–22% faster stepping on MyoSuite musculoskeletal models). Thanks
to @kaibohex for identifying the opportunity in MJWarp issue
1733 and to @vishalkotak for the
implementation in MJWarp pull request
2014.
Deformables
-
64959ac81Passive interpolated flexes are no longer
reduced tomjMAXCONPAIR(50) contacts per geom via farthest-point selection, preventing contact-set churn and
resting jitter when more than 50 surface vertices touch a geom (solver cost remains independent of contact count via
aggregated contact CSR). -
7b7fc90c6Passive flex contacts now also handle
collisions with moving and mocap rigid bodies (previously only flex-flex, self-collision, and static-geometry pairs
took the passive path while moving-body pairs fell back to the constraint solver), scaling pair stiffness by the
minimum participating effective mass and excluding active passive-contact free bodies from the decoupled free-body
gyroscopic solve. -
15c2f1183Passive and IPC
flex contacts with condim 3 or higher now model isotropic lagged
Coulomb sliding friction using the pair's first friction coefficient (capped at the
viscous slip threshold1e-3m/s). Previously, both modes ignoredcondimand were always frictionless.
Existing models using passive or IPC flex contacts withcondim >= 3(the default) now experience contact
friction; setcondim="1"for frictionless behavior. In IPC mode,mjData.flexvert_lambdanow stores the
barycentrically weighted sum of touching pair multipliers (previously the maximum across touching pairs). -
1554e7d3d,5f99d0d25Under thediscreteintegrator, the
unconstrained smooth solve (qacc_smooth) now follows the selected solver:Newton
solves$(M + S)\,\dot{v}_{\text{smooth}} = f$ directly by Cholesky (reusing the 3x3-block sparse factor on
covered 1D/2D flexes and general sparse/dense Cholesky otherwise), eliminatingmjWARN_INERTIAunder-convergence
on 3D passive contacts and speeding up stiff interpolated-flex mechanisms
(model/flex/mechanisms/cantilever.xml~3.3x faster). UnderCG, the smooth solve for 3D and interpolated
flexes uses symmetric Gauss-Seidel (Eisenstat) preconditioning instead of diagonal
preconditioning, reusing the assembled stiffness matrix in place with zero extra arena memory (cutting smooth-solve
iterations 2-3x and speeding up stepping by ~15% onmodel/plastic/clay.xml, and up to ~1.9x on unconstrained 3D
tetrahedral meshes). -
f9420c6daFixed effective-metric PCG stalls and spuriousmjWARN_INERTIAwarnings on 2D flexes with
passive contacts by including fully covered passive flex contacts in the sparse Cholesky preconditioner. Previously,
passive flex contacts were omitted from the preconditioner, causing the implicit solve to stall or under-converge on
stacked cloth scenes (2.1-2.7x faster ondrape.xml; existing models with passive flex contacts can change
trajectory due to the more accurate solve). -
73327e000AddedmjModel.flex_cellempty(nflexcell x 1) andmjModel.flex_celladr, flagging the
empty (pruned) cells of interpolated flexes. Points of an interpolated flex, such as contact points, are now
evaluated in their active cell: their natural cell, or the nearest non-empty cell if it is empty, consistently with
the vertex positions (flex_vertcell). Previously contact weights near pruned cells could weight the pinned nodes
of the empty cell. -
630212fbbFixed capsule collision against 2D flexes missing contacts along the
capsule shaft (when crossing triangle edges, lying coplanar with a triangle, or piercing a triangle interior) and
fixed a NaN for zero-length capsules and degenerate triangles. Existing models with capsule--2D-flex contacts can
change behavior.mjModel.flex_edgeflapis now populated for all 2D flexes, not only those with bending, so that
interior shared edges do not generate opposing contacts. Code that used a valid flap to detect bending must check
mjModel.flex_bendingadrinstead.
Rendering
d0def6e64Added Kannala-Brandt fisheye projection and camera lens distortion coefficients:
projection now supportsfisheyeviamjPROJ_FISHEYE, and
distortion specifies up tomjNDISTCOEF= 8 coefficients forfisheyeand
perspectivecameras viamjsCamera.distortionandmjModel.cam_distortion.
Warning
Breaking changes
-
ca95109ecFixed some Filament-specific rendering options that were not working as intended. These
changes will affect the way all models are rendered by the Filament renderer.- The principal fix was to interpret material RGBA color values as linear colors instead of sRGB colors. This
ensures that material colors defined in the model will match any texture colors also defined in the model. For
example, the following two materials now appear identical (whereas previously they would not):
- The principal fix was to interpret material RGBA color values as linear colors instead of sRGB colors. This
<texture name="tex" rgb1="0.1 0.2 0.3" builtin="flat" />
<material texture="tex" />
<material rgba="0.1 0.2 0.3 1.0" /> Because the above change can affect any model, other long-standing issues with the default rendering settings
were fixed in the same release, so that their impact is concentrated in a single release.
- The tonal ranges for shadows, midtones, and highlights have been updated to a neutral weight. Previously, the
weights were incorrectly set to 1.0, resulting in oversaturated colors. As a result, scenes may now appear
darker and light intensities may need to be increased to compensate.
- The tone mapping and output color spaces for scenes without physical lights are now set to linear space
instead of sRGB. (Recall that scenes without physical lights are rendered using a fallback lighting model
[as described here](https://mujoco.readthedocs.io/en/stable/programming/rendering.html#reFilamentFallbackLighting).) Before this change, you may have noticed that such
scenes appeared "washed out" when rendered with the filament renderer compared to the classic renderer. To
compensate for the darker scenes in these scenarios, the default intensity of the headlight and environment
light has also been adjusted.
- The quality levels of the ambient occlusion settings have been reduced to match filament's recommended
defaults. This change is less likely to be noticed visually and was included to improve performance.
**Migration:** Add the following to your model to revert back to previous defaults:
<custom>
<text name="filament.material.base_color_type" data="srgb" />
<text name="filament.cg.output_color_space" data="srgb" />
<text name="filament.cg.tone_mapping" data="pbr_neutral" />
<text name="filament.ao.quality" data="ultra" />
<text name="filament.ao.low_pass_filter" data="ultra" />
<text name="filament.ao.upsampling" data="ultra" />
<numeric name="filament.cg.shadows" data="1 1 1 1" />
<numeric name="filament.cg.midtones" data="1 1 1 1" />
<numeric name="filament.cg.highlights" data="1 1 1 1" />
<numeric name="filament.fallback.head_light_intensity" data="100000" />
<numeric name="filament.fallback.scene_light_intensity" data="80000" />
<numeric name="filament.fallback.environment_light_intensity" data="5000" />
<numeric name="filament.fallback.environment_light_diffuse_scale" data="1" />
</custom>Note that the `cg.output_color_space`, `cg.tone_mapping`, and all the `fallback` settings are only needed for
scenes without physical lights.
-
ed8323d45Orthographic free and tracking cameras now derive their vertical view height from the camera
distance and global/fovy (matching the perspective view height at the lookat point)
and place the eye behind the model's bounding sphere so zooming scales the view without near-plane clipping.
Previously,global/fovywas used directly as a fixed view height in length units (45 by default), so zooming
had no visible effect and toggling orthographic made the view jump. Fixed orthographic cameras
(camera/fovy) are unchanged. In Studio and simulate, the Free Camera
field-of-view control shows the vertical view height in length units while in orthographic mode, and editing it
changes the camera distance rather thanglobal/fovy. For these camerasmjv_cameraFrustumnow returns a
vertical extent that depends onmjvCamera.distance.Migration: Models that set
global/fovyto a length for an orthographic free camera now render zoomed in.
Setglobal/fovyback to an angle in degrees (the default is 45); the view height then follows the camera
distance. -
e11f9e4c0Planar reflections in the Filament renderer are now energy conserving: diffuse base color is
attenuated by one minus the Fresnel reflection weight (dielectrics only; metals are unchanged), so a surface with
reflectance="1"is a pure mirror regardless of its base color. Previously, reflections were added on top of
the fully lit diffuse surface, washing out reflections on bright materials.
-
4019e053cAdded mjGEOM_DISC rendering-only geom type for flat double-sided discs and
annuli (size = [r_out, r_in, 0]). -
2a860e53fAddedmjvOption.offset, an offset added to simulation coordinates when rendering, so that
several simulations of one model can be drawn side by side. -
77718b1fcAddedimage_diffuse_scaletomjrfLightParamsto control the diffuse colour of image
based lights. -
6b907360cFixed Filament planar reflections leaking geometry behind or crossing the mirror plane by
clipping the reflection camera at the mirror plane with an oblique near-plane projection (#3902). -
3f8569e2bBuiltin textures withmark="cross"now draw a 2-pixel wide cross on even-sized textures so
that it is centered.
Compiler
-
bbaec528dSequentially appending elements to anmjSpecbody tree now runs in$O(1)$ instead
of rebuilding the model's tree lists, making procedural model construction up to ~250x faster. -
50c5900d7Added the facetexcoord attribute to mesh and
updated XML saving to emit it whenmjsMesh.userfacetexcoordis set. Previously, saving an inline textured mesh
with per-corner UVs droppeduserfacetexcoord, causing the saved XML to fail compilation or map UVs to the wrong
corners (#3931, reported by @andrewkaufman). -
da306ace5strippath no longer strips file names that match a registered
resource provider, such aspackage://URIs. These names are not filesystem paths, and the
compiler already treats them as absolute when combining them with meshdir.
Plugins
da306ace5Added a first-party resource provider plugin,plugin/package_uri, that
serves ROS-stylepackage://URIs by locating packages throughAMENT_PREFIX_PATHandROS_PACKAGE_PATH
without depending on ROS. It is not included in release packages: build it from source and load the resulting shared
library withmj_loadPluginLibrarybefore parsing a model, so that URDF and MJCF files can reference ROS
package assets unchanged. Contribution by @noah-wardlow.
OpenUSD
2f754ec82The native C++ OpenUSD exporter andLayerSinknow author
xformOp:translate(double3) andxformOp:orient(quatd) instead ofxformOp:transform
(matrix4d), avoiding shear artifacts when USD or external renderers interpolate between time samples.
Models
9a1af89e6Upgraded the 3x3x3 cube
example model with calibrated mass and inertia, flush outer collision hulls, and an internal drive and 90-degree
detent mechanism. Standalone defaults now usetimestep="0.002", thediscrete
integrator,cone="elliptic", and face motorctrlrange="-0.45 0.45"(previously
timestep="0.01",integrator="implicitfast", andctrlrange="-0.05 0.05"; motor commands must now exceed
the ~0.17 N*m breakaway torque).
Bug fixes
-
36a33b4f4Fixed a memory leak inmujoco-core(introduced in 4.0.0) whereimport mujocowithout
glfwinstalled stored theImportErrorinmujoco.rendering.classic.gl_contextand kept every local
variable on the importing call stack alive for the life of the process (#3928, reported by
@adenzler-nvidia). -
026907613Fixed capsule-box collisions when the capsule's centerline intersects the box, which could miss
the contact. -
ce23b6e70Fixed floating-point cancellation and non-orthogonal fallback frames inmju_makeFrameand
mjc_PlaneCylinderfor plane-capsule and plane-cylinder contacts on tilted planes. Previously, axes parallel or
nearly parallel to a tilted plane normal could produce non-orthogonal or singular contact frames and inaccurate
contact depths (especially in single precision). Discovered via MJWarp issue
1949 and pull requests
1950 (@YannBerthelot) and
1989 (@etaoxing). -
82196b63eUnder thediscreteintegrator, negative flex
damping is clamped to zero in the effective metric, like negative joint and tendon
damping, and its force is integrated explicitly. Previously it made the metric indefinite. -
82196b63eUnder thediscreteintegrator, the ellipsoid
fluid model contributes the dissipative part of its drag derivative to the effective metric. The
symmetrized derivative used before is indefinite for slender shapes at small angles of attack. -
3f8569e2bFixed Filament cube textures withtexuniformbeing scaled inversely; they now match the
classic renderer.