NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #1785 most downloaded on PyPI
MuJoCo Physics Simulator
Latest stable
4.0.0
Last release 13 days ago
06 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 55 of 57 stable releases
1 version withdrawn
withdrawn after publishing
5 years old
58 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Removed the "global" setting of the compiler/coordinate attribute. This rarely-used setting complicates the compiler logic and is blocking future impr
mjVFS is used. Users are advised to skip to version 2.3.5 instead.visual-global flag ellipsoidinertia to visualize equivalent body inertias with ellipsoids instead of the default boxes.mjData.introspect module.viewer.launch_passive and viewer.launch_repl. These functions could previously return before an internal call to mj_forward. This allows user code to continue and potentially modify physics state concurrently with the internal mj_forward, resulting in e.g. MuJoCo stack overflow error or segmentation fault.viewer.launch_passive function now returns a handle which can be used to interact with the viewer. The passive viewer now also requires an explicit call to sync on its handle to pick up any update to the physics state. This is to avoid race conditions that can result in visual artifacts. See documentation for details.viewer.launch_repl function has been removed since its functionality is superceded by launch_passive.introspect metadata.mj_copyData, which can considerably slow down the copying operation (#568).shellinertia ignore exactmeshinertia, which is only used for legacy volume computations (#759).Your coding agent can read these notes before it upgrades. Set up the MCP server →
Note
This version is affected by an asset loading bug that prevents OBJ and PNG files from being read from disk when mjVFS is used. Users are advised to skip to version 2.3.5 instead.
7cc42ecf Removed the “global” setting of the compiler/coordinate attribute. This rarely-used setting complicates the compiler logic and is blocking future improvements. In order to convert older models which used this option, load and save them in MuJoCo 2.3.3 or older.
7cc42ecf Added visual-global flag ellipsoidinertia to visualize equivalent body inertias with ellipsoids instead of the default boxes.
5f132af6 Added midphase and broadphase collision statistics to mjData .
01b84089 Added documentation for engine plugins .
2e23594f Added struct information to the introspect module.
fe3dccfd Added a new extension mechanism called resource providers . This extensible mechanism allows MuJoCo to read assets from data sources other than the local OS filesystem or the Virtual file system .
6d63e046 Offscreen rendering on macOS is no longer restricted to the main thread. This is achieved by using the low-level Core OpenGL (CGL) API to create the OpenGL context, rather than going via GLFW which relies on Cocoa’s NSOpenGL. The resulting context is not tied to a Cocoa window, and is therefore not tied to the main thread.
34226bf5 Fixed a race condition in viewer.launch_passive and viewer.launch_repl . These functions could previously return before an internal call to mj_forward . This allows user code to continue and potentially modify physics state concurrently with the internal mj_forward , resulting in e.g. MuJoCo stack overflow error or segmentation fault .
0db9a453 The viewer.launch_passive function now returns a handle which can be used to interact with the viewer. The passive viewer now also requires an explicit call to sync on its handle to pick up any update to the physics state. This is to avoid race conditions that can result in visual artifacts. See documentation for details.
b362cb49 The viewer.launch_repl function has been removed since its functionality is superseded by launch_passive .
2e23594f Added a small number of missing struct fields discovered through the new introspect metadata.
101c647a Fixed bug in the handling of ellipsoid-based fluid model forces in the new implicitfast integrator.
0db9a453 Removed spurious whole-arena copying in mj_copyData , which can considerably slow down the copying operation.
2d69b158 Make shellinertia ignore exactmeshinertia , which is only used for legacy volume computations ( #759 ).
The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.
Improvements to implicit integration:
implicitfast was added. It is similar to the existing implicit integrator, but skips the derivatives of Coriolis and centripetal forces. See the numerical integration section for a detailed motivation and discussion. The implicitfast integrator is recommended for all new models and will become the default integrator in a future version.The table below shows the compute cost of the 627-DoF humanoid100 model using different integrators. "implicit (old)" uses dense RNE derivatives, "implicit (new)" is after the sparsification mentioned above. Timings were measured on a single core of an AMD 3995WX CPU.
<div align="center">
| timing | Euler | implicitfast | implicit (new) | implicit (old) |
|---|---|---|---|---|
| one step (ms) | 0.5 | 0.53 | 0.77 | 5.0 |
| steps/second | 2000 | 1900 | 1300 | 200 |
</div>
<img src="https://github.com/deepmind/mujoco/blob/main/doc/images/computation/midphase.gif?raw=true" alt="Animation showing bounding volume hierarchy for humanoid and many small boxes" width="350px" align="right"/>
mjd_transitionFD function no longer triggers sensor calculation unless explicitly requested.inteval attribute to interval in the mjLROpt struct.mjtNums, now only requires ~6000. Very large models can now load and run with the CG solver.mju_error and mju_warning to be variadic functions (support for printf-like arguments). The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.mju_sqrMatTDSparse function that doesn't require dense memory allocation.mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.viewer.launch_repl. The launch_repl function now provides seamless continuation of an IPython interactive shell session, and is no longer considered experimental feature.viewer.launch_passive which launches the interactive viewer in a passive, non-blocking mode. Calls to launch_passive return immediately, allowing user code to continue execution, with the viewer automatically reflecting any changes to the physics state. (Note that this functionality is currently in experimental/beta stage, and is not yet described in our viewer documentation.)mjpython launcher for macOS, which is required for viewer.launch_passive to function there.efc_ fields from joint indexers. Since the introduction of arena memory, these fields now have dynamic sizes that change between time steps depending on the number of active constraints, breaking strict correspondence between joints and efc_ rows.mjVisual and mjvPerturb structs.<img src="https://github.com/deepmind/mujoco/blob/main/doc/images/changelog/contactlabel.png?raw=true" alt="Screenshot of simulate showing labels for contacts" width="400px" align="right"/>
Implemented a workaround for broken VSync on macOS so that the frame rate is correctly capped when the Vertical Sync toggle is enabled.
Added optional labels to contact visualization, indicating which two geoms are contacting (names if defined, ids otherwise). This can be useful in cluttered scenes.
8c7f6ce5 Improvements to implicit integration:
The derivatives of the RNE algorithm are now computed using sparse math, leading to significant speed improvements for large models when using the implicit integrator.
A new integrator called implicitfast was added. It is similar to the existing implicit integrator, but skips the derivatives of Coriolis and centripetal forces. See the numerical integration section for a detailed motivation and discussion. The implicitfast integrator is recommended for all new models and will become the default integrator in a future version.
The table below shows the compute cost of the 627-DoF humanoid100 model using different integrators. "implicit (old)" uses dense RNE derivatives, "implicit (new)" is after the sparsification mentioned above. Timings were measured on a single core of an AMD 3995WX CPU.
timing |
Euler |
implicitfast |
implicit (new) |
implicit (old) |
|---|---|---|---|---|
one step (ms) |
0.5 |
0.53 |
0.77 |
5.0 |
steps/second |
2000 |
1900 |
1300 |
200 |
70959c1a Added a collision mid-phase for pruning geoms in body pairs, see documentation for more details. This is based on static AABB bounding volume hierarchy (a BVH binary tree) in the body inertial frame. The GIF on the right is cut from this longer video.
49c939ea The mjd_transitionFD function no longer triggers sensor calculation unless explicitly requested.
c57a588a Corrected the spelling of the inteval attribute to interval in the mjLROpt struct.
9756ed0d Mesh texture and normal mappings are now 3-per-triangle rather than 1-per-vertex. Mesh vertices are no longer duplicated in order to circumvent this limitation as they previously were.
50bebcb4 The non-zeros for the sparse constraint Jacobian matrix are now precounted and used for matrix memory allocation. For instance, the constraint Jacobian matrix from the humanoid100 model, which previously required ~500,000 mjtNum's, now only requires ~6000. Very large models can now load and run with the CG solver.
d3d789cf Modified mju_error and mju_warning to be variadic functions (support for printf-like arguments). The functions mju_error_i, mju_error_s, mju_warning_i, and mju_warning_s are now deprecated.
056e8492 Implemented a performant mju_sqrMatTDSparse function that doesn't require dense memory allocation.
8696247f Added mj_stackAllocInt to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
e58d53e7 Fixed IPython history corruption when using viewer.launch_repl. The launch_repl function now provides seamless continuation of an IPython interactive shell session, and is no longer considered experimental feature.
mode. Calls to launch_passive return immediately, allowing user code to continue execution, with the viewer automatically reflecting any changes to the physics state. (Note that this functionality is currently in experimental/beta stage, and is not yet described in our viewer documentation.)
7a0def97 Added the mjpython launcher for macOS, which is required for viewer.launch_passive to function there.
now have dynamic sizes that change between time steps depending on the number of active constraints, breaking strict correspondence between joints and efc_ rows.
e20ab6c9 Added a number of missing fields to the bindings of mjVisual and mjvPerturb structs.
2f0fb1e4 Implemented a workaround for broken VSync on macOS so that the frame rate is correctly capped when the Vertical Sync toggle is enabled.
2607e67f Added optional labels to contact visualization, indicating which two geoms are contacting (names if defined, ids otherwise). This can be useful in cluttered scenes.
|br|
A more performant mju_transposeSparse has been implemented that doesn't require dense memory allocation. For a constraint Jacobian matrix from the hum
mj_name2id is now implemented using a hash function instead of a linear search for better performance.mj_printData output now contains contacting geom names.shellinertia equal to true caused the mesh orientation to be overwritten by the principal components of the shell inertia, while the vertex coordinates are rotated using the volumetric inertia. Now the volumetric inertia orientation is used also in the shell case.fitaabb.launch_repl functionality in the Python viewer has been fixed.time correctly in mjd_transitionFD, to support time-dependent user code.user type sensors are present.nsensordata callback is encountered during model compilation.TM_END) mj_fwdConstraint returns early.mj_deleteFileVFS.reset callback now receives instance-specific plugin_state and plugin_data as arguments, rather than the entire mjData. Since reset is called inside mj_resetData before any physics forwarding call has been made, it is an error to read anything from mjData at this stage.capabilities field in mjpPlugin is renamed capabilityflags to more clearly indicate that this is a bit field.c741dfce A more performant mju_transposeSparse has been implemented that doesn’t require dense memory allocation. For a constraint Jacobian matrix from the humanoid100.xml model, this function is 35% faster.
f1007df0 The function mj_name2id is now implemented using a hash function instead of a linear search for better performance.
929e09f8 Geom names are now parsed from URDF. Any duplicate names are ignored. mj_printData output now contains contacting geom names.
6ba4d6f0 Fixed a bug that for shellinertia equal to true caused the mesh orientation to be overwritten by the principal components of the shell inertia, while the vertex coordinates are rotated using the volumetric inertia. Now the volumetric inertia orientation is used also in the shell case.
19b6c70e Fixed misalignment bug in mesh-to-primitive fitting when using the bounding box fitting option fitaabb .
d022cd1a The launch_repl functionality in the Python viewer has been fixed.
06557c14 Set time correctly in mjd_transitionFD , to support time-dependent user code.
6b80b010 Fixed sensor data dimension validation when user type sensors are present.
093125c2 Fixed incorrect plugin error message when a null nsensordata callback is encountered during model compilation.
e9869d3b Correctly end the timer ( TM_END ) mj_fwdConstraint returns early.
436fc6e7 Fixed an infinite loop in mj_deleteFileVFS .
bc0184d6 Increased precision of simulate sensor plot y-axis by 1 digit ( #719 ).
79fffdc0 Body labels are now drawn at the body frame rather than inertial frame, unless inertia is being visualised.
5c021d04 The reset callback now receives instance-specific plugin_state and plugin_data as arguments, rather than the entire mjData . Since reset is called inside mj_resetData before any physics forwarding call has been made, it is an error to read anything from mjData at this stage.
Nothing published for this version
The simulate GUI is now available through the mujoco Python package as mujoco.viewer. See documentation for details. (Contribution by Levi Burner.)
simulate GUI is now available through the mujoco Python package as mujoco.viewer. See documentation for details. (Contribution by Levi Burner.)Renderer class from the MuJoCo tutorial Colab is now available directly in the native Python bindings.The tendon springlength attribute can now take two values. Given two non-decreasing values, springlength specifies a deadband range for spring stiffness. If the tendon length is between the two values, the force is 0. If length is outside this range, the force behaves like a regular spring, with the spring resting length corresponding to the nearest springlength value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See tendon_springlength.xml example model. This is a minor breaking API change. mjModel.tendon_lengthspring now has size ntendon x 2 rather than ntendon x 1.
Removed the requirement that stateless actuators come before stateful actuators.
Added mju_fill, mju_symmetrize and mju_eye utility functions.
Added gravcomp attribute to body implementing gravity compensation and buoyancy. See balloons.xml example model.
Renamed the cable plugin library to elasticity.
Added actdim attribute to general actuators. Values greater than 1 are only allowed for user, as native activation dynamics are all scalar. Added example test implementing 2nd-order activation dynamics to engine_forward_test.cc.
Improved particle composite type, which now permits a user-specified geometry and multiple joints. See the two new examples: particle_free.xml and particle_free2d.xml.
Performance improvements for non-AVX configurations:
mj_solveLD using restrict. See engine_core_smooth_benchmark_test.mju_dotSparse using manual loop unroll. See engine_util_sparse_benchmark_test.Added new solid passive force plugin.
Added API functions mj_loadPluginLibrary and mj_loadAllPluginLibraries. The first function is identical to dlopen on a POSIX system, and to LoadLibraryA on Windows. The second function scans a specified directory for all dynamic libraries file and loads each library found. Dynamic libraries opened by these functions are assumed to register one or more MuJoCo plugins on load.
Added an optional visualize callback to plugins, which is called during mjv_updateScene. This callback allows custom plugin visualizations. Enable stress visualization for the Cable plugin as an example.
Sensors of type user no longer require objtype, objname and needstage. If unspecified, the objtype is now mjOBJ_UNKNOWN. user sensors datatype default is now real, needstage default is now acc.
Added support for capsules in URDF import.
On macOS, issue an informative error message when run under Rosetta 2 translation on an Apple Silicon machine. Pre-built MuJoCo binaries make use of AVX instructions on x86-64 machines, which is not supported by Rosetta 2. (Before this version, users only get a cryptic "Illegal instruction" message.)
mj_addFileVFS that was causing the file path to be ignored (introduced in 2.1.4).simulate application searches for plugins from plugin to mujoco_plugin.2.3.1.post1 (6 December 2022)mujoco.viewer that were causing errors in Python 3.7 and 3.8.0846f38c The simulate GUI is now available through the mujoco Python package as mujoco.viewer . See documentation for details. (Contribution by Levi Burner .)
ef695bb8 The Renderer class from the MuJoCo tutorial Colab is now available directly in the native Python bindings.
893942a7 The tendon springlength attribute can now take two values. Given two non-decreasing values, springlength specifies a deadband range for spring stiffness. If the tendon length is between the two values, the force is 0. If length is outside this range, the force behaves like a regular spring, with the spring resting length corresponding to the nearest springlength value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See tendon_springlength.xml example model.
Attention
This is a minor breaking API change. mjModel.tendon_lengthspring now has size ntendon x 2 rather than ntendon x 1 .
0eb7f871 Removed the requirement that stateless actuators come before stateful actuators.
f905c7fb Added mju_fill , mju_symmetrize and mju_eye utility functions.
23092a11 Added gravcomp attribute to body , implementing gravity compensation and buoyancy. See balloons.xml example model.
36b30e45 Renamed the cable plugin library to elasticity .
0b45129c Added actdim attribute to general actuators . Values greater than 1 are only allowed for dyntype user , as native activation dynamics are all scalar. Added example test implementing 2nd-order activation dynamics to engine_forward_test.cc .
3b89b0fd Improved particle composite type, which now permits a user-specified geometry and multiple joints. See the two new examples: particle_free.xml and particle_free2d.xml .
7b0fbc63 Performance improvements for non-AVX configurations:
14% faster mj_solveLD using restrict . See engine_core_smooth_benchmark_test .
50% faster mju_dotSparse using manual loop unroll. See engine_util_sparse_benchmark_test .
d0b1a973 Added new solid passive force plugin:
This is new force field compatible with the composite particles.
Generates a tetrahedral mesh having particles with mass concentrated at vertices.
Uses a piecewise-constant strain model equivalent to finite elements but expressed in a coordinate-free formulation. This implies that all quantities can be precomputed except edge elongation, as in a mass-spring model.
Only suitable for small strains (large displacements but small deformations). Tetrahedra may invert if subject to large loads.
9ecade07 Added API functions mj_loadPluginLibrary and mj_loadAllPluginLibraries . The first function is identical to dlopen on a POSIX system, and to LoadLibraryA on Windows. The second function scans a specified directory for all dynamic libraries file and loads each library found. Dynamic libraries opened by these functions are assumed to register one or more MuJoCo plugins on load.
0d52feaa Added an optional visualize callback to plugins, which is called during mjv_updateScene . This callback allows custom plugin visualizations. Enable stress visualization for the Cable plugin as an example.
dee1d602 Sensors of type user no longer require objtype , objname and needstage . If unspecified, the objtype is now mjOBJ_UNKNOWN . user sensors datatype default is now “real” , needstage default is now “acc” .
638c9a69 Added support for capsules in URDF import.
df25d7d6 On macOS, issue an informative error message when run under Rosetta 2 translation on an Apple Silicon machine. Pre-built MuJoCo binaries make use of AVX instructions on x86-64 machines, which is not supported by Rosetta 2. (Before this version, users only get a cryptic “Illegal instruction” message.)
89185b4a Fixed bug in mj_addFileVFS that was causing the file path to be ignored (introduced in 2.1.4).
2ebc5f09 Renamed the directory in which the simulate application searches for plugins from plugin to mujoco_plugin .
165e72f7 Mouse force perturbations are now applied at the selection point rather than the body center of mass.
The contact array and arrays prefixed with efc_ in mjData were moved out of the buffer into a new arena memory space. These arrays are no longer alloc
The contact array and arrays prefixed with efc_ in mjData were moved out of the buffer into a new arena memory space. These arrays are no longer allocated with fixed sizes when mjData is created. Instead, the exact memory requirement is determined during each call to mj_forward (specifically, in mj_collision and mj_makeConstraint) and the arrays are allocated from the arena space. The stack now also shares its available memory with arena. This change reduces the memory footprint of mjData in models that do not use the PGS solver, and will allow for significant memory reductions in the future. See the Memory allocation section for details.
Added colab notebook tutorial showing how to balance the humanoid on one leg with a Linear Quadratic Regulator. The
notebook uses MuJoCo's native Python bindings, and includes a draft Renderer class, for easy rendering in Python. Try it yourself:
Updates to humanoid model:
Added mju_boxQP and allocation function mju_boxQPmalloc for solving the box-constrained Quadratic Program: $x^* = \text{argmin} ; \tfrac{1}{2} x^T H x + x^T g \quad \text{s.t.} \quad l \le x \le u$ The algorithm, introduced in Tassa et al. 2014, converges after 2-5 Cholesky factorisations, independent of problem size.
Added mju_mulVecMatVec to multiply a square matrix $M$ with vectors $x$ and $y$ on both sides. The function returns $x^TMy$.
Added new plugin API. Plugins allow developers to extend MuJoCo's capability without modifying core engine code. The plugin mechanism is intended to replace the existing callbacks, though these will remain for the time being as an option for simple use cases and backward compatibility. The new mechanism manages stateful plugins and supports multiple plugins from different sources, allowing MuJoCo extensions to be introduced in a modular fashion, rather than as global overrides. Note the new mechanism is currently undocumented except in code, as we test it internally. If you are interested in using the plugin mechanism, please get in touch first.
Added assetdir compiler option, which sets the values of both meshdir and texturedir. Values in the latter attributes take precedence over assetdir.
Added realtime option to visual for starting a simulation at a slower speed.
Added new cable composite type:
initial parameter specifies the joint at the starting boundary: free, ball, or none.B_left and B_right.vertex.Added new cable passive force plugin:
twist and bend.flat.Added id and name properties to named accessor objects. These provide more Pythonic API access to mj_name2id and mj_id2name respectively.
The length of MjData.contact is now ncon rather than nconmax, allowing it to be straightforwardly used as
an iterator without needing to check ncon.
Fix a memory leak when a Python callable is installed as callback (#527).
58fd72f5 The contact array and arrays prefixed with efc_ in mjData were moved out of the buffer into a new arena memory space. These arrays are no longer allocated with fixed sizes when mjData is created. Instead, the exact memory requirement is determined during each call to mj_forward (specifically, in mj_collision and mj_makeConstraint) and the arrays are allocated from the arena space. The stack now also shares its available memory with arena. This change reduces the memory footprint of mjData in models that do not use the PGS solver, and will allow for significant memory reductions in the future. See the Memory allocation section for details.
f151e84a Added colab notebook tutorial showing how to balance the humanoid on one leg with a Linear Quadratic Regulator. The notebook uses MuJoCo's native Python bindings, and includes a draft Renderer class, for easy rendering in Python. |br| Try it yourself:
04d44e1e Updates to humanoid model: - Added two keyframes (stand-on-one-leg and squat). - Increased maximum hip flexion angle. - Added hamstring tendons which couple the hip and knee at high hip flexion angles. - General cosmetic improvements, including improved use of defaults and better naming scheme.
89579766 Added mju_boxQP and allocation function mju_boxQPmalloc for solving the box-constrained Quadratic Program:
The algorithm, introduced in Tassa et al. 2014, converges after 2-5 Cholesky factorisations, independent of problem size.
f4e7fa97 Added mju_mulVecMatVec to multiply a square matrix M with vectors x and y on both sides. The function returns x^TMy.
1e2a9a53 Added new plugin API. Plugins allow developers to extend MuJoCo's capability without modifying core engine code. The plugin mechanism is intended to replace the existing callbacks, though these will remain for the time being as an option for simple use cases and backward compatibility. The new mechanism manages stateful plugins and supports multiple plugins from different sources, allowing MuJoCo extensions to be introduced in a modular fashion, rather than as global overrides. Note the new mechanism is currently undocumented except in code, as we test it internally. If you are interested in using the plugin mechanism, please get in touch first.
cce35e18 Added assetdir compiler option, which sets the values of both meshdir and texturedir. Values in the latter attributes take precedence over assetdir.
84d16844 Added realtime option to visual for starting a simulation at a slower speed.
e250ff0d Added new cable composite type:
Cable elements are connected with ball joints.
The initial parameter specifies the joint at the starting boundary: free, ball, or none.
The boundary bodies are exposed with the names B_last and B_first.
The vertex initial positions can be specified directly in the XML with the parameter vertex.
The orientation of the body frame is the orientation of the material frame of the curve.
e250ff0d Added new cable passive force plugin:
Twist and bending stiffness can be set separately with the parameters twist and bend.
The stress-free configuration can be set to be the initial one or flat with the flag flat.
New cable.xml example showing the formation of plectoneme.
New coil.xml example showing a curved equilibrium configuration.
New belt.xml example showing interaction between twist and anisotropy.
Added test using cantilever exact solution.
c13979cd Added id and name properties to named accessor objects. These provide more Pythonic API access to mj_name2id and mj_id2name respectively.
58fd72f5 The length of MjData.contact is now ncon rather than nconmax, allowing it to be straightforwardly used as an iterator without needing to check ncon.
ec6ea6a6 Fix a memory leak when a Python callable is installed as callback (#527).
*This is a breaking change. In models where a range was defined but `limited` was unspecified, explicitly set limited to `false` or remove the range t…
Added adhesion actuators mimicking vacuum grippers and adhesive biomechanical appendages.
Added related example model and video.
Added mj_jacSubtreeCom for computing the translational Jacobian of the center-of-mass of a subtree.
Added torquescale and anchor attributes to weld constraints. torquescale sets the torque-to-force ratio exerted by the constraint, anchor sets the point at which the weld wrench is applied. See weld for more details.
Increased mjNEQDATA, the row length of equality constraint parameters in mjModel.eq_data, from 7 to 11.
Added visualisation of anchor points for both connect and weld constraints (activated by the 'N' key in simulate).
Added weld.xml showing different uses of new weld attributes.
Cartesian 6D end-effector control is now possible by adding a reference site to actuators with site transmission. See description of new refsite attribute in the actuator documentation and refsite.xml example model. Video
Added autolimits compiler option. If true, joint and tendon limited attributes and actuator ctrllimited, forcelimited and actlimited attributes will automatically be set to true if the corresponding range is defined and false otherwise.
If autolimits="false" (the default) models where a range attribute is specified without the limited attribute will fail to compile. A future release will change the default of autolimits to true, and this compilation error allows users to catch this future change of behavior.
This is a breaking change. In models where a range was defined but limited was unspecified, explicitly set limited to false or remove the range to maintain the current behavior of your model.
Added moment of inertia computation for all well-formed meshes. This option is activated by setting the compiler flag exactmeshinertia to true (defaults to false). This default may change in the future.
Added parameter shellinertia to geom, for locating the inferred inertia on the boundary (shell). Currently only meshes are supported.
For meshes from which volumetric inertia is inferred, raise error if the orientation of mesh faces is not consistent. If this occurs, fix the mesh in e.g., MeshLab or Blender.
Added catenary visualisation for hanging tendons. The model seen in the video can be found here.
Added azimuth and elevation attributes to visual/global, defining the initial orientation of the free camera at model load time.
Added mjv_defaultFreeCamera which sets the default free camera, respecting the above attributes.
simulate now supports taking a screenshot via a button in the File section or via Ctrl-P.
Improvements to time synchronisation in simulate, in particular report actual real-time factor if different from requested factor (if e.g., the timestep is so small that simulation cannot keep up with real-time).
Added a disable flag for sensors.
mju_mulQuat and mju_mulQuatAxis support in place computation. For example mju_mulQuat(a, a, b); sets the quaternion a equal to the product of a and b.
Added sensor matrices to mjd_transitionFD (note this is an API change).
distance constraints.intvelocity defaults parsing.3d77eb1e Added adhesion actuators mimicking vacuum grippers and adhesive biomechanical appendages.
3d77eb1e Added related example model and video:
fcf41317 Added mj_jacSubtreeCom for computing the translational Jacobian of the center-of-mass of a subtree.
d26501c0 Added torquescale and anchor attributes to weld constraints. torquescale sets the torque-to-force ratio exerted by the constraint, anchor sets the point at which the weld wrench is applied. See weld for more details.
d26501c0 Increased mjNEQDATA , the row length of equality constraint parameters in mjModel.eq_data , from 7 to 11.
d26501c0 Added visualisation of anchor points for both connect and weld constraints (activated by the ‘N’ key in simulate ).
8ca5887c Added weld.xml showing different uses of new weld attributes.
46da1285 Cartesian 6D end-effector control is now possible by adding a reference site to actuators with site transmission. See description of new refsite attribute in the actuator documentation and refsite.xml example model.
a693a2d9 Added autolimits compiler option. If true , joint and tendon limited attributes and actuator ctrllimited , forcelimited and actlimited attributes will automatically be set to true if the corresponding range is defined and false otherwise.
If autolimits="false" (the default) models where a range attribute is specified without the limited attribute will fail to compile. A future release will change the default of autolimits to true , and this compilation error allows users to catch this future change of behavior.
Attention
This is a breaking change. In models where a range was defined but limited was unspecified, explicitly set limited to false or remove the range to maintain the current behavior of your model.
8ca5887c Added moment of inertia computation for all well-formed meshes. This option is activated by setting the compiler flag exactmeshinertia to true (defaults to false ). This default may change in the future.
5c5449bf Added parameter shellinertia to geom , for locating the inferred inertia on the boundary (shell). Currently only meshes are supported.
833dc740 For meshes from which volumetric inertia is inferred, raise error if the orientation of mesh faces is not consistent. If this occurs, fix the mesh in e.g., MeshLab or Blender.
ae0ac86e Added catenary visualisation for hanging tendons. The model seen in the video can be found here .
b966a378 Added azimuth and elevation attributes to visual/global , defining the initial orientation of the free camera at model load time.
b966a378 Added mjv_defaultFreeCamera which sets the default free camera, respecting the above attributes.
80b4ffdd simulate now supports taking a screenshot via a button in the File section or via Ctrl-P .
834e8dd5 Improvements to time synchronisation in simulate , in particular report actual real-time factor if different from requested factor (if e.g., the timestep is so small that simulation cannot keep up with real-time).
090fe2db Added a disable flag for sensors.
fdbbc8bb mju_mulQuat and mju_mulQuatAxis support in place computation. For example
mju_mulQuat(a, a, b); sets the quaternion a equal to the product of a and b .
e3a82247 Added sensor matrices to mjd_transitionFD (note this is an API change).
c8ff7b3d Removed distance constraints.
f71daed6 Fixed rendering of some transparent geoms in reflection.
0b2f19bb Fixed intvelocity defaults parsing.
Added mjd_transitionFD to compute efficient finite difference approximations of the state-transition and control-transition matrices, see here for mor
mjd_transitionFD to compute efficient finite difference approximations of the state-transition and control-transition matrices, see here for more details.ctrl attribute to keyframes.clock sensor which measures time.free and ball joints and for actuators with site transmission.<intvelocity> actuator shortcut for "integrated velocity" actuators, documented here.<damper> actuator shortcut for active-damping actuators, documented here.mju_rotVecMat and mju_rotVecMatT now support in-place multiplication.mjData.ctrl values are no longer clamped in-place, remain untouched by the engine.mjModel.buffer and mjData.buffer that do not lie within an array, and for MSAN to detect reads from uninitialised fields in mjData following mj_resetData.model/.quat and an alternative specifier e.g., <geom ... quat=".1 .2 .3 .4" euler="10 20 30">, would lead to the quat being ignored and only euler being used. After this change a parse error will be thrown.<geom size="1/2 3 4"> would have been parsed as size="1 0 0" and no error would have been thrown. Now throws an error.NaN via XML like <geom size="1 NaN 4">, while allowed for debugging purposes, will now print a warning.mj_loadModel.mjModel buffer sizes.mjWARN_BADCTRL.mujoco.framework embedded in MuJoCo.app can be used to build applications externally.228264c9 Added mjd_transitionFD to compute efficient finite difference approximations of the state-transition and control-transition matrices, see here for more details.
373cc894 Added derivatives for the ellipsoid fluid model.
09a5efc0 Added ctrl attribute to keyframes .
c14a7ef4 Added clock sensor which measures time .
2d0995b4 Added visualisation groups to skins.
6ead1461 Added actuator visualisation for free and ball joints and for actuators with site transmission.
d3a86bb7 Added visualisation for actuator activations.
d3a86bb7 Added <actuator-intvelocity> actuator shortcut for “integrated velocity” actuators, documented here .
d3a86bb7 Added <actuator-damper> actuator shortcut for active-damping actuators, documented here .
ec7133b0 mju_rotVecMat and mju_rotVecMatT now support in-place multiplication.
d3a86bb7 mjData.ctrl values are no longer clamped in-place, remain untouched by the engine.
d3a86bb7 Arrays in mjData’s buffer now align to 64-byte boundaries rather than 8-byte.
f887c1e9 Added memory poisoning when building with Address Sanitizer (ASAN) and Memory Sanitizer (MSAN) . This allows ASAN to detect reads and writes to regions in mjModel.buffer and mjData.buffer that do not lie within an array, and for MSAN to detect reads from uninitialised fields in mjData following mj_resetData .
373cc894 Added a slider-crank example model .
d3a86bb7 Activation clamping was not being applied in the implicit integrator .
d3a86bb7 Stricter parsing of orientation specifiers. Before this change, a specification that included both quat and an alternative specifier e.g., <geom ... quat=".1 .2 .3 .4" euler="10 20 30"> , would lead to the quat being ignored and only euler being used. After this change a parse error will be thrown.
f3453cf8 Stricter parsing of XML attributes. Before this change an erroneous XML snippet like <geom size="1/2 3 4"> would have been parsed as size="1 0 0" and no error would have been thrown. Now throws an error.
d3a86bb7 Trying to load a NaN via XML like <geom size="1 NaN 4"> , while allowed for debugging purposes, will now print a warning.
d5672639 Fixed null pointer dereference in mj_loadModel .
dbef8e6c Fixed memory leaks when loading an invalid model from MJB.
d3a86bb7 Integer overflows are now avoided when computing mjModel buffer sizes.
d3a86bb7 Added missing warning string for mjWARN_BADCTRL .
d3a86bb7 Changed MacOS packaging so that the copy of mujoco.framework embedded in MuJoCo.app can be used to build applications externally.
MuJoCo is now fully open-source software. Newly available top level directories are:
MuJoCo is now fully open-source software. Newly available top level directories are:
src/: All source files. Subdirectories correspond to the modules described in the Programming chapter introduction:
src/engine/: Core engine.src/xml/: XML parser.src/user/: Model compiler.src/visualize/: Abstract visualizer.src/ui/: UI framework.test/: Tests and corresponding asset files.dist/: Files related to packaging and binary distribution.Added contributor's guide and style guide.
Added analytic derivatives of smooth (unconstrained) dynamics forces, with respect to velocities:
Added implicit integrator. Using the analytic derivatives above, a new implicit-in-velocity integrator was added. This integrator lies between the Euler and Runge Kutta integrators in terms of both stability and computational cost. It is most useful for models which use fluid drag (e.g. for flying or swimming) and for models which use velocity actuators. For more details, see the Numerical Integration section.
Added actlimited and actrange attributes to general actuators, for clamping actuator internal states (activations). This clamping is useful for integrated-velocity actuators, see the Activation clamping section for details.
mjData fields qfrc_unc (unconstrained forces) and qacc_unc (unconstrained accelerations) were renamed qfrc_smooth and qacc_smooth, respectively. While "unconstrained" is precise, "smooth" is more intelligible than "unc".
Public headers have been moved from /include to /include/mujoco/, in line with the directory layout common in other open source projects. Developers are encouraged to include MuJoCo public headers in their own codebase via #include <mujoco/filename.h>.
The default shadow resolution specified by the shadowsize attribute was increased from 1024 to 4096.
Saved XMLs now use 2-space indents.
Antialiasing was disabled for segmentation rendering. Before this change, if the offsamples attribute was greater than 0 (the default value is 4), pixels that overlapped with multiple geoms would receive averaged segmentation IDs, leading to incorrect or non-existent IDs. After this change offsamples is ignored during segmentation rendering.
The value of the enable flag for the experimental multiCCD feature was made sequential with other enable flags. Sequentiality is assumed in the simulate UI and elsewhere.
Fix issue of duplicated meshes when saving models with OBJ meshes using mj_saveLastXML.
Update 1 (27 May 2022): Replaced Linux tarball to fix RPATH on the sample binaries. No change in functionality.
1913a02b MuJoCo is now fully open-source software. Newly available top level directories are:
a. src/ : All source files. Subdirectories correspond to the modules described in the Programming chapter introduction :
src/engine/ : Core engine.
src/xml/ : XML parser.
src/user/ : Model compiler.
src/visualize/ : Abstract visualizer.
src/ui/ : UI framework.
test/ : Tests and corresponding asset files.
dist/ : Files related to packaging and binary distribution.
1913a02b Added contributor’s guide and style guide .
64bc6d27 Added analytic derivatives of smooth (unconstrained) dynamics forces, with respect to velocities:
Centripetal and Coriolis forces computed by the Recursive Newton-Euler algorithm.
Damping and fluid-drag passive forces.
Actuation forces.
64bc6d27 Added implicit integrator. Using the analytic derivatives above, a new implicit-in-velocity integrator was added. This integrator lies between the Euler and Runge Kutta integrators in terms of both stability and computational cost. It is most useful for models which use fluid drag (e.g. for flying or swimming) and for models which use velocity actuators . For more details, see the Numerical Integration section.
1913a02b Added actlimited and actrange attributes to general actuators , for clamping actuator internal states (activations). This clamping is useful for integrated-velocity actuators, see the Activation clamping section for details.
1913a02b mjData fields qfrc_unc (unconstrained forces) and qacc_unc (unconstrained accelerations) were renamed qfrc_smooth and qacc_smooth , respectively. While “unconstrained” is precise, “smooth” is more intelligible than “unc”.
1913a02b Public headers have been moved from /include to /include/mujoco/ , in line with the directory layout common in other open source projects. Developers are encouraged to include MuJoCo public headers in their own codebase via #include <mujoco/filename.h> .
1913a02b The default shadow resolution specified by the shadowsize attribute was increased from 1024 to 4096.
1913a02b Saved XMLs now use 2-space indents.
1913a02b Antialiasing was disabled for segmentation rendering. Before this change, if the offsamples attribute was greater than 0 (the default value is 4), pixels that overlapped with multiple geoms would receive averaged segmentation IDs, leading to incorrect or non-existent IDs. After this change offsamples is ignored during segmentation rendering.
1913a02b The value of the enable flag for the experimental multiCCD feature was made sequential with other enable flags. Sequentiality is assumed in the simulate UI and elsewhere.
1913a02b Fix issue of duplicated meshes when saving models with OBJ meshes using mj_saveLastXML.
Added an experimental feature: multi-contact convex collision detection, activated by an enable flag. See full description here.
GLAD initialization logic on Linux now calls dlopen to load a GL platform dynamic library if a *GetProcAddress function is not already present in the process' global symbol table. In particular, processes that use GLFW to set up a rendering context that are not explicitly linked against libGLX.so (this applies to the Python interpreter, for example) will now work correctly rather than fail with a gladLoadGL error when mjr_makeContext is called. Fixes https://github.com/deepmind/dm_control/issues/283.
In the Python bindings, named indexers for scalar fields (e.g. the ctrl field for actuators) now return a NumPy array of shape (1,) rather than (). This allows values to be assigned to these fields more straightforwardly. Fixes https://github.com/deepmind/mujoco/issues/238.
MuJoCo now uses GLAD to manage OpenGL API access instead of GLEW. On Linux, there is no longer a need to link against different GL wrangling libraries
MuJoCo now uses GLAD to manage OpenGL API access instead of GLEW. On Linux, there is no longer a need to link against different GL wrangling libraries depending on whether GLX, EGL, or OSMesa is being used. Instead, users can simply use GLX, EGL, or OSMesa to create a GL context and mjr_makeContext will detect which one is being used.
Add visualisation for contact frames. This is useful when writing or modifying collision functions, when the actual direction of the x and y axes of a contact can be important.
_nogl dynamic library is no longer provided on Linux and Windows. The switch to GLAD allows us to resolve OpenGL symbols when mjr_makeContext is called rather than when the library is loaded. As a result, the MuJoCo library no longer has an explicit dynamic dependency on OpenGL, and can be used on system where OpenGL is not present.Fix a bug in simulate where pressing '[' or ']' when a model is not loaded causes a crash.
Contact frame visualisation is added to the Simulate GUI.
Rename "set key", "reset to key" to "save key" and "load key", respectively.
Change bindings of F6 and F7 from the not very useful "vertical sync" and "busy wait" to the more useful cycling of frames and labels.
mj_resetData now zeroes out the solver_nnz field.
Remove a special branch in mju_quat2mat for unit quaternions. Previously, mju_quat2mat skipped all computation if the real part of the quaternion equals 1.0. For very small angles (e.g. when finite differencing), the cosine can evaluate to exactly 1.0 at double precision while the sine is still nonzero.
90dea1bd MuJoCo now uses GLAD to manage OpenGL API access instead of GLEW. On Linux, there is no longer a need to link against different GL wrangling libraries depending on whether GLX, EGL, or OSMesa is being used. Instead, users can simply use GLX, EGL, or OSMesa to create a GL context and mjr_makeContext will detect which one is being used.
90dea1bd Added visualisation for contact frames. This is useful when writing or modifying collision functions, when the actual direction of the x and y axes of a contact can be important.
90dea1bd The _nogl dynamic library is no longer provided on Linux and Windows. The switch to GLAD allows us to resolve OpenGL symbols when mjr_makeContext is called rather than when the library is loaded. As a result, the MuJoCo library no longer has an explicit dynamic dependency on OpenGL, and can be used on system where OpenGL is not present.
90dea1bd Fixed a bug in simulate where pressing ‘[’ or ‘]’ when a model is not loaded causes a crash.
90dea1bd Contact frame visualisation was added to the Simulate GUI.
90dea1bd Renamed “set key”, “reset to key” to “save key” and “load key”, respectively.
90dea1bd Changed bindings of F6 and F7 from the not very useful “vertical sync” and “busy wait” to the more useful cycling of frames and labels.
90dea1bd mj_resetData zeroes out the solver_nnz field.
90dea1bd Removed a special branch in mju_quat2mat for unit quaternions. Previously, mju_quat2mat skipped all computation if the real part of the quaternion equals 1.0. For very small angles (e.g. when finite differencing), the cosine can evaluate to exactly 1.0 at double precision while the sine is still nonzero.
This is a minor release, handling issues discovered after the launch of 2.1.2.
This is a minor release, handling issues discovered after the launch of 2.1.2.
simulate now support cycling through cameras (with [ and ] keys).mjVIS_STATIC toggles all static bodies, not just direct children of the world.free() method to MjrContext, rather than relying on the object destructor.dm_control.df048e54 simulate now supports cycling through cameras (with the [ and ] keys).
df048e54 mjVIS_STATIC toggles all static bodies, not just direct children of the world.
df048e54 Added a free() method to MjrContext .
df048e54 Enums now support arithmetic and bitwise operations with numbers.
df048e54 Fixed rendering bug for planes, introduced in 2.1.2. This broke maze environments in dm_control .
df048e54 simulate now supports cycling through cameras (with the [ and ] keys).
df048e54 mjVIS_STATIC toggles all static bodies, not just direct children of the world.
df048e54 Added a free() method to MjrContext.
df048e54 Enums now support arithmetic and bitwise operations with numbers.
df048e54 Fixed rendering bug for planes, introduced in 2.1.2. This broke maze environments in dm_control.
Nothing published for this version
Added new Python bindings, which can be installed via pip install mujoco, and imported as import mujoco.
pip install mujoco, and imported as import mujoco.introspect module, which provides reflection-like capability for MuJoCo's public API, currently describing functions and enums. While implemented in Python, this module is expected to be generally useful for automatic code generation targeting multiple languages. (This is not shipped as part of the mujoco Python bindings package.)mjtNum floating point type into a new header mjtnum.h.mujoco_export.h to mjexport.h.mj_printFormattedData, which accepts a format string for floating point numbers, for example to increase precision.framepos, framequat, framexaxis, frameyaxis, framezaxis, framelinvel, and frameangvel sensors. The frame-of-reference is specified by new reftype and refname attributes.nuser_body, nuser_jnt, etc.) now accept a value of -1, which is the default. This will automatically set the value to the length of the maximum associated user attribute defined in the model.user attribute defined in the model will lead to an error (previously additional values were ignored).mjvScene from 8 to 100.mjVIS_STATIC visualisation flag . After this change, both the geom group and the visualisation flag need to be enabled for the geom to be rendered.mjtNum quat[4] rather than mjtNum* quat. From the perspective of C and C++, this is a non-change since array types in function signatures decay to pointer types. However, it allows autogenerated code to be aware of expected input shapes.<geom fluidshape="ellipsoid"/>. The parameters are described succinctly here, but we leave a full description or the model and its parameters to when this feature leaves experimental status.mj_loadXML and mj_saveLastXML are now locale-independent. The Unity plugin should now work correctly for users whose system locales use commas as decimal separators.mjrContext when skins are used.2.1.2.post1 (16 March 2022)__init__.py.libglewegl.so for Linux now has a DT_NEEDED entry on libOpenGL.so.0. (The download packages for Linux below have also been updated with this.)3577e2cf Added new Python bindings , which can be installed via pip install mujoco , and imported as import mujoco .
3577e2cf Added new Unity plug-in .
3577e2cf Added a new introspect module, which provides reflection-like capability for MuJoCo’s public API, currently describing functions and enums. While implemented in Python, this module is expected to be generally useful for automatic code generation targeting multiple languages. (This is not shipped as part of the mujoco Python bindings package.)
3577e2cf Moved definition of mjtNum floating point type into a new header mjtnum.h .
3577e2cf Renamed header mujoco_export.h to mjexport.h .
3577e2cf Added mj_printFormattedData , which accepts a format string for floating point numbers, for example to increase precision.
3577e2cf MuJoCo can load OBJ mesh files.
Meshes containing polygons with more than 4 vertices are not supported.
In OBJ files containing multiple object groups, any groups after the first one will be ignored.
Added (post-release, not included in the 2.1.2 archive) textured mug example model:
3577e2cf Added optional frame-of-reference specification to framepos , framequat , framexaxis , frameyaxis , framezaxis , framelinvel , and frameangvel sensors. The frame-of-reference is specified by new reftype and refname attributes.
3577e2cf Sizes of user parameters are now automatically inferred.
Declarations of user parameters in the top-level size clause (e.g. nuser_body , nuser_jnt , etc.) now accept a value of -1, which is the default. This will automatically set the value to the length of the maximum associated user attribute defined in the model.
Setting a value smaller than -1 will lead to a compiler error (previously a segfault).
Setting a value to a length smaller than some user attribute defined in the model will lead to an error (previously additional values were ignored).
3577e2cf Increased the maximum number of lights in an mjvScene from 8 to 100.
3577e2cf Saved XML files only contain explicit inertial elements if the original XML included them. Inertias that were automatically inferred by the compiler’s inertiafromgeom mechanism remain unspecified.
3577e2cf User-selected geoms are always rendered as opaque. This is useful in interactive visualizers.
3577e2cf Static geoms now respect their geom group for visualisation. Until this change rendering of static geoms could only be toggled using the mjVIS_STATIC visualisation flag . After this change, both the geom group and the visualisation flag need to be enabled for the geom to be rendered.
3577e2cf Pointer parameters in function declarations in mujoco.h that are supposed to represent fixed-length arrays are now spelled as arrays with extents, e.g. mjtNum quat[4] rather than mjtNum* quat . From the perspective of C and C++, this is a non-change since array types in function signatures decay to pointer types. However, it allows autogenerated code to be aware of expected input shapes.
147efb51 Experimental stateless fluid interaction model. As described here , fluid forces use sizes computed from body inertia. While sometimes convenient, this is very rarely a good approximation. In the new model forces act on geoms, rather than bodies, and have a several user-settable parameters. The model is activated by setting a new attribute: <geom fluidshape="ellipsoid"/> . The parameters are described succinctly here , but we leave a full description or the model and its parameters to when this feature leaves experimental status.
3577e2cf mj_loadXML and mj_saveLastXML are now locale-independent. The Unity plugin should now work correctly for users whose system locales use commas as decimal separators.
3577e2cf XML assets in VFS no longer need to end in a null character. Instead, the file size is determined by the size parameter of the corresponding VFS entry.
3577e2cf Fix a vertex buffer object memory leak in mjrContext when skins are used.
3577e2cf Camera quaternions are now normalized during XML compilation.
3577e2cf Windows binaries are now built with Clang.
One column per quarter.