========= Changelog ========= Version 3.6.0 (March 10, 2026) ------------------------------ General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 1. The tendon Jacobian ``ten_J`` is now always sparse. The fields ``ten_J_rownnz``, ``ten_J_rowadr``, and ``ten_J_colind`` have been moved from :ref:`mjData` to :ref:`mjModel` and are no longer computed at run time by ``mj_tendon`` but at compile time. 2. Added :ref:`mjs_getCompiler` C API function and a ``compiler`` read-only property to all Python spec element types. This allows querying the compiler settings (e.g., ``meshdir``) from any element, with the correct originating spec's compiler preserved after attachment. 3. Added a new ``strain`` :ref:`equality constraint` type for trilinear and quadratic :ref:`dofs`. 4. Flexes now support collisions with SDF geoms. 5. Improved memory requirements for ``ten_J`` and ``ten_J_colind`` by reducing the upper bound for the number of non-zeros ``nJten``. 6. Improved memory requirements for ``actuator_moment`` and ``moment_colind`` by reducing the upper bound for the number of non-zeros ``nJmom``. MJX ^^^ 7. Add batch rendering support for MJX-Warp. See the :ref:`MJX-Warp batch rendering` section for details. Bug fixes ^^^^^^^^^ 8. Fixed a bug where :ref:`mjs_attach` silently dropped spatial tendons with wrapping geometries that had no ``sidesite`` attribute (:issue:`3119`, reported by :github:user:`tomstewart89`). Version 3.5.0 (February 12, 2026) --------------------------------- Significant new features ^^^^^^^^^^^^^^^^^^^^^^^^ 1. :doc:`MuJoCo Warp ` is now officially released. 2. Added a new **System Identification** toolbox (Python), see `README `__ for details. |br| A Colab notebook demonstrating the toolbox is available here: |sysid_colab| |br| Contribution by :github:user:`kevinzakka`, :github:user:`aftersomemath`, :github:user:`jonathanembleyriches`, :github:user:`qiayuanl`, :github:user:`spjardim` and :github:user:`gizemozd`. .. |sysid_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/mujoco/sysid/sysid.ipynb 3. Actuators and sensors now support arbitrary delays via history buffers, and sensor values can be computed at intervals larger than the simulation timestep. Using a delay or interval introduces a new ``mjData.history`` variable to the :ref:`Physics state`. See :ref:`Delays` for details. .. image:: images/changelog/poncho.png :width: 45% :align: right :target: https://github.com/google-deepmind/mujoco/blob/main/model/flex/poncho.xml 4. Added new :ref:`flexvert` equality constraints that enable cloth simulations with coarser meshes. This adds a new attribute value ``vert`` to flexcomp edge :ref:`equality` and the new equality type :ref:`flexvert`. Uses the method described in `Chen, Kry and Vouga, 2019 `__. 5. Added implicit integration support for deformable objects (flex) in ``implicit`` and ``implicitfast`` :ref:`integrators`. This method extracts the flex degrees of freedom and solves them as a dense block, enabling increased stability for stiff flex objects without reducing the timestep. It is compatible with the ``trilinear`` and ``quadratic`` :ref:`dof` types. .. image:: images/XMLreference/rfcamera.png :width: 45% :align: right :target: https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/sensor/rfcamera.xml 6. Rangefinder sensors can now be attached to a camera using the :ref:`rangefinder/camera` attribute. In this case, the sensor respects the :ref:`camera/resolution` attribute and casts multiple rays, one for each pixel. 7. :ref:`Rangefinders` can now report various kinds of information besides ray distances, including surface normals and intersection points. .. container:: custom-clear .. raw:: html
General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 8. Ray-cast functions now optionally compute the surface normal at the ray intersection. This is a breaking change due to the addition of the ``mjtNum normal[3]`` argument. The modified functions are :ref:`mj_ray`, :ref:`mj_multiRay`, :ref:`mju_rayGeom`, :ref:`mj_rayFlex`, :ref:`mj_rayHfield` and :ref:`mj_rayMesh`. **Migration:** In C/C++, pass ``NULL`` to the ``normal`` argument. In Python, in all functions except :ref:`mj_multiRay`, it defaults to ``None``, so no action is required. 9. ``mju_rayFlex`` has been renamed to :ref:`mj_rayFlex` for consistency with other functions that take ``mjModel*`` and ``mjData*`` arguments. 10. The ``mjModel.cam_orthographic`` field has been renamed to ``cam_projection``, with the semantic of a new enum type :ref:`mjtProjection`. This will allow for more projection types in the future like fisheye cameras. Relatedly, the ``camera/orthographic`` MJCF attribute for cameras has been renamed to :ref:`camera/projection` and now accepts the values ``orthographic`` and ``perspective``. **Migration:** Replace ``orthographic = "false/true"`` with ``projection="perspective/orthographic"``, respectively. 11. Removed ``getdir`` from the ``mjpResourceProvider`` struct. All Resource Providers now use the same shared implementation. 12. When combining the ``margin`` or ``gap`` :ref:`parameters` of two geoms to obtain the parameters of a contact, the respective values are now **summed** rather than taking the maximum. This allows geom margins to be a proper "inflation" of the geom. 13. Camera frustum visualization is now triggered by setting :ref:`resolution` to values larger than 1. Relatedly, frustum visualization also works for :ref:`orthographic` cameras. See :ref:`rangefinder` for details. 14. Cameras now have an :ref:`output` attribute, parsed into the ``mjModel.cam_output`` bitfield. Unused by the renderer, it serves as a convenient location to store a camera's supported output types. 15. Added :ref:`mj_mountVFS` and :ref:`mj_unmountVFS` functions for mounting a custom VFS provider. Mounting allows providers to be used to open/read/close resources dynamically at arbitrary paths. 16. The optimization whereby sequential :ref:`collision sensors` with identical attributes shared computation has been removed. This results in a (likely minor) performance regression for models which exploited this optimization. To recover the performance, use the :ref:`fromto` and compute the other values manually. If ``from = fromto[0:3]`` and ``to = fromto[3:6]`` then ``distance = norm(to-from)`` and ``normal = normalize(to-from)``. 17. :doc:`OpenUSD `: - Parsing has been moved out of experimental into a mjpDecoder plugin. (documentation pending) - OpenUSD can now be built with the `third_party_deps/openusd `__ CMake utility project. - ``USD_DIR`` is no longer used by the MuJoCo CMake project, instead use ``pxr_DIR`` if you have a pre-built USD library. - Users no longer have to set ``PXR_PLUGINPATH_NAME`` environment variable, MuJoCo should load USD plugins automatically. 18. Non-breaking ABI changes: - The type of the ``sig`` (signature) argument of :ref:`mj_stateSize` and related functions has been changed from ``unsigned int`` to ``int``. Before this change, invalid negative arguments passed to this function would result in a silent implicit cast; now, negativity will trigger an error. - Added a :ref:`depth` rendering flag. - Allocation sizes in :ref:`mjModel` now use 64-bit rather than 32-bit integers to accommodate larger scenes. MJX ^^^ 19. Added ``actuator_length``, ``cdof`` and ``cdof_dof`` fields to ``mjx.Data``. 20. Add ``graph_mode`` argument to ``put_model`` to support multiple Warp graph capture modes. Documentation ^^^^^^^^^^^^^ 21. General improvements to the :ref:`Programming/Simulation` chapter. Notably, the main discussion of :ref:`state` has been moved there, and the section on :ref:`mjModel changes` has been expanded. 22. The usability of the :ref:`MJCF schema` is improved with a collapsible dropdown menu with links to elements and attributes. 23. MuJoCo version numbering is now based on Semantic Versioning, see `VERSIONING.md `__. Bug fixes ^^^^^^^^^ 24. Fixed a bug in :ref:`implicit integrator` derivatives where actuator velocity derivatives were incorrectly computed when the force was clamped by :ref:`forcerange`. 25. Fixed a bug in :ref:`implicit integrator` derivatives where actuator velocity derivatives did not account for the :ref:`actearly` flag. 26. Multi-threaded mesh processing, enabled by the :ref:`usethread` compiler flag (on by default), was in fact disabled by the flag. Fixing this bug speeds up compilation of mesh-heavy models by (up to) the number of available cores. 27. The ``vertid`` argument of :ref:`mj_rayFlex` and :ref:`mju_raySkin` was marked as nullable but was not; it is now nullable. 28. Fixed :ref:`gravcomp` being ignored for bodies with no joints nested inside jointed parent bodies (:issue:`3066`, reported by :github:user:`Alex108306`). Version 3.4.0 (December 5, 2025) -------------------------------- General ^^^^^^^ .. youtube:: vct493lGQ8Q :align: right :width: 35% 1. Introduced a major new feature: :ref:`sleeping islands`. Preliminary release for early testing, see documentation for details. 2. Added "quadratic" option to :ref:`flexcomp/dof`. This type of fast :ref:`deformable` flex object is similar to the "trilinear" option, but it includes curved deformations. 3. Raise an error if there are name collisions also during parsing. 4. Increase Windows stack size to 16MB to enable models with deep nested body hierarchies. 5. Added a new pipeline component function :ref:`mj_fwdKinematics` that combines all kinematics-like sub-components. Relatedly, added a clarifying table at the top of the :ref:`Simulation Pipeline` chapter. 6. Added a new :ref:`mj_extractState` function that allows a subset of a state that was previously returned by :ref:`mj_getState` to be extracted without having to be written back into ``mjData`` first. 7. Added a new :ref:`mj_copyState` function that copies state components from one ``mjData`` to another. 8. Tendon paths can now be queried from Python via ``MjsTendon.path``, the returned object is iterable and indexing it will give the ``MjsWrap`` at the given index in the path. 9. ``MjsWrap`` now exposes: - ``type -> mujoco.mjtWrap`` - ``target -> MjsSite|MjsJoint|MjsGeom|None`` - ``sidesite -> MjsSite|None`` - ``coef -> real`` - ``divisor -> real`` 10. Non-breaking ABI changes: - :ref:`mjtSize` is now defined as ``int64_t`` rather than ``uint64_t`` to avoid future type-promotion bugs. - :ref:`mj_sizeModel` now returns an :ref:`mjtSize` rather than an ``int``. MJX ^^^ 11. ``warp-lang`` optional dependency is updated to 1.10.0. ``pmap`` now works with MuJoCo Warp from MJX. .. admonition:: Breaking ABI changes :class: attention - ``mjx.Model.tex_data`` is now a numpy ndarray instead of a jax.Array, to avoid vmapping over this potentially large array. This may break certain use-cases with Madrona MJX, but we are no longer supporting this codepath. We will be migrating users to a Warp-based batch renderer. Bug fixes ^^^^^^^^^ 12. Fixed a bug in the box-box distance computation. Reported by :github:user:`nvtw`. Version 3.3.7 (October 13, 2025) -------------------------------- General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 1. The mjSpec C API fields :ref:`meshdir` and :ref:`texturedir` have been moved to `compiler.meshdir `__ and `compiler.texturedir `__ respectively. For backwards compatibility, the old fields are still available in the Python API but will be removed in a future release. **Migration:** Replace ``meshdir`` and ``texturedir`` with ``compiler.meshdir`` and ``compiler.texturedir``. 2. Remove ``_full_compat`` from ``mjx.put_data`` and ``mjx.put_model``. 3. ``nconmax`` and ``njmax`` fields in ``mjx.make_data`` now default to ``None`` instead of -1. ``nconmax`` will be deprecated in favor of ``naconmax`` in a future release. 3. Joint decorators and spatial tendons which have limits defined and whose current value (angle or length) exceeds the limit, are recolored by using the :ref:`constraint impedance` :math:`d` to mix the existing color with :ref:`visual/rgba/constraint`. For spatial tendons, this visualization aid is active only if no :ref:`material` is set and :ref:`rgba` is default. 4. Added :ref:`mju_getXMLDependencies` for computing a list of unique asset dependencies from an MJCF file. 5. Added the code sample ``dependencies`` which provides command line utility for printing the result of :ref:`mju_getXMLDependencies`. 6. The minimum C++ standard required to compile MuJoCo is now C++20, this has been the case within Google since 2023 but the CMake update was forgotten. .. admonition:: Breaking ABI changes :class: attention 7. The attribute ``mjOption.apirate`` was unused and has been removed. 8. MJX ``nconmax`` and ``njmax`` fields in ``mjx.make_data`` now default to ``None`` instead of -1. MJX ^^^ 9. Fix :issue:`2508`, ``qLD`` shapes mismatched mjModel during ``get_data_into``. 10. Pull in MuJoCo Warp update to ``io.py``, and use ``naconmax`` instead of ``nconmax`` to set the maximum number of contacts over all environments. Bug fixes ^^^^^^^^^ 11. Fix :issue:`2881`, :at:`fitaabb` was adding an offset to the mesh and applying an incorrect frame transformation. Also, unify the meaning of fitting a geom to a mesh AABB: it now means to find the smallest geom such that its AABB contains the mesh AABB. Version 3.3.6 (September 15, 2025) ---------------------------------- General ^^^^^^^ 1. Constraint island discovery and construction, previously an experimental feature, is now :ref:`documented` and promoted to default; disable it with :ref:`option/flag/island `. We expect islanding to be a strict improvement over the monolithic constraint solver, please let us know if you experience any issues. 2. :ref:`Contact sensor` :at-val:`subtree1/subtree2` specification is now available for any body, not just direct children of the world. .. admonition:: Breaking API changes :class: attention 3. The update of ``mjData.qacc_warmstart`` was moved from the end of the solver call (:ref:`mj_fwdConstraint`) to the end of :ref:`mj_step`, and is now updated with all other state variables. This change makes :ref:`mj_forward` fully idempotent. Before this change, calling :ref:`mj_forward` repeatedly would make the constraint solver converge, since each subsequent call would start from the previously updated ``qacc_warmstart`` value. Indeed, this is precisely what happened in the viewer, which calls :ref:`mj_forward` repeatedly in PAUSE mode. **Migration:** If your code depended on this behavior, you can recover it by updating manually after each :ref:`mj_forward`: ``qacc_warmstart ← qacc``. The behavior is available in :ref:`simulate` by clicking the "Pause update" toggle (off by default). Furthermore, this change has a numerical impact on the output of the :ref:`RK4 ` integrator. Before this change, due to the ``qacc_warmstart`` update occurring after each of the four Runge-Kutta substeps, the solver convergence of RK4 was faster, at the cost of unprincipled integration. This change makes the RK4 integration principled and well-defined. Since this change to RK4 is effectively a bug fix, migration to the previous behavior is not provided. 4. The ``mjDSBL_PASSIVE`` flag for disabling passive forces was removed and replaced by :ref:`mjDSBL_SPRING` and :ref:`mjDSBL_DAMPER` with corresponding :ref:`mjcf` :ref:`attributes`. Each flag disables only joint and tendon springs or dampers, respectively. When both flags are set, **all** passive forces are disabled, including gravity compensation, fluid forces, forces computed by the :ref:`mjcb_passive` callback, and forces computed by :ref:`plugins ` when passed the :ref:`mjPLUGIN_PASSIVE` capability flag. **Migration:** Set both flags to recover the behavior of the previous flag. .. admonition:: Breaking ABI changes :class: attention 5. Removed ``mjMOUSE_SELECT`` flag for :ref:`mjtMouse` as it is no longer in use. 6. The promotion of islanding to default involved removing the enable flag ``mjENBL_ISLAND`` and converting it to a disable flag :ref:`mjDSBL_ISLAND `. 7. Added support for shells with a curved reference configuration. See this `example `__. 8. Added experimental option for :ref:`passive` contacts involving flexes. 9. Added support for assigning a default material to a mesh asset using the :ref:`mesh/material ` attribute. MJX ^^^ 10. Promote ``ten_length`` to the public MJX API. Add Warp support for ``mjx.tendon``. .. admonition:: Breaking API changes :class: attention 11. ``ten_length`` was moved from ``mjx.Data._impl.ten_length`` to a public field ``mjx.Data.ten_length``. Bug fixes ^^^^^^^^^ 12. Fixed a latent bug where MjData objects were not serialized correctly by the Python bindings when islanding was enabled. Version 3.3.5 (August 8, 2025) ------------------------------ General ^^^^^^^ 1. Added the :ref:`insidesite` sensor, for checking if an object is inside the volume of a site. It is useful for triggering events in surrounding environment logic. 2. Added the :ref:`contact` sensor, for reporting contact information according to user-defined criteria. The purpose of the :el:`contact` sensor is to report contact-related information in a fixed-size array. This is useful as input to learning-based agents and in environment logic. 3. Added the :ref:`tactile` sensor, for measuring the penetration depth between two objects at given points and the sliding velocities in the tangent frame. The sensor reports tactile data only when colliding with SDFs. 4. Removed the SdfLib plugin and the dependency on `SdfLib `__. SDFs are now supported natively in mjModel. 5. Removed ``oct_depth`` from :ref:`mjvOption` (unused). 6. Added the functionality to create a builtin meshes, see :ref:`mesh/builtin`. 7. Inertia computation in MuJoCo C is now performed by a new :ref:`pipeline` function :ref:`mj_makeM`, which combines the Composite Rigid Body algorithm in :ref:`mj_crb` and additional terms related to :ref:`tendon armature`. Code that uses :ref:`mj_crb` to compute the inertia should now use :ref:`mj_makeM` instead. .. admonition:: Breaking API changes :class: attention 8. Removed the ``mjVIS_FLEXBVH`` enum value, its functionality is now provided by :ref:`mjVIS_MESHBVH`. Bug fixes ^^^^^^^^^ 9. Fixed a bug that caused object lists in the child to have missing elements after attaching an mjSpec. This was caused by adding to the lists only the objects that belong to the tree of the requested body, but this causes to skip objects that were attached, since they belong to the tree of the parent. 10. Fixed a bug where the convex hull of a collision mesh was not being computed if the mesh could only collide via a :ref:`contact pair`. Python ^^^^^^ 11. On Linux, built distribution packages (wheels) now target the ``manylinux_2_28`` platform tag. Previously MuJoCo wheels targeted ``manylinux2014`` based on CentOS 7, which reached end-of-life in June 2024. MJX ^^^ 12. Add Warp as a backend implementation for MJX. The implementation can be specified via ``mjx.put_model(m, impl='warp')`` and ``mjx.make_data(m, impl='warp')``. The warp implementation requires a CUDA device and ``warp-lang`` to be installed (``pip install mujoco-mjx[warp]``). This feature is available in "beta" and some bugs are expected. Version 3.3.4 (July 8, 2025) ---------------------------- .. admonition:: Breaking API changes :class: attention 1. The functions ``mjs_detachBody`` and ``mjs_detachDefault`` have been replaced by :ref:`mjs_delete`. 2. The Python functions ``element.delete`` have been replaced by ``spec.delete(element)``. 3. In the mjSpec C API, directly setting an element's name using :ref:`mjs_setString` has been replaced with a new function :ref:`mjs_setName` which allows checking for naming collisions at set-time rather than compile-time, for earlier catching of errors. Relatedly, the ``name`` attribute has been removed from all mjs elements. Known issue: the error is not raised during parsing. 4. For MJX, the ``mjx.Option`` dataclass now has private and public fields similar to ``mjx.Model`` and ``mjx.Data``. Some fields are no longer publicly available due to differences in the underlying implementations of this data structure. General ^^^^^^^ 4. Added support for setting the initial camera in the viewer using :ref:`visual/global/cameraid`. 5. Added support to only sync the state in the Python :ref:`passive viewer`'s ``Sync`` method, this is useful to improve performance. The default behavior is unchanged and copies the entire model and data. Bug fixes ^^^^^^^^^ 6. Inverse dynamics were not being computed correctly when :ref:`tendon armature` was present, now fixed. 7. Fix bug in ``mjx.put_data`` where ``actuator_moment`` was not being copied correctly for the C implementation. Documentation ^^^^^^^^^^^^^ 8. Added missing item documentation and clarified the nature of breaking changes in the 3.3.3 changelog. See items 3 and 4 below. Version 3.3.3 (June 10, 2025) ----------------------------- General ^^^^^^^ 1. Refactored island implementation so that island data is memory-contiguous. This speeds up island processing in the solver and clears the way for the addition of the Newton and PGS solvers (currently only CG is supported). 2. Removed the :at:`shell` plugin. This is now supported by :ref:`flexcomp` and is active depending on the :ref:`elastic2d` attribute (off by default). .. admonition:: Breaking API changes :class: attention 3. Replaced the :ref:`directional` (boolean) field for lights with a :ref:`type` field (of type :ref:`mjtLightType`) to allow for additional lighting types. **Migration:** Replace light/directional="false/true" with light/type="spot/directional", respectively. 4. Added :ref:`mjtColorSpace` enum and associated :ref:`colorspace` attribute that allows to specify the color space of textures (either linear or `sRGB `__). Since this property is now read correctly from PNG files, textures files which use sRGB will now be rendered differently. **Migration:** Set :ref:`colorspace` to "linear" for all textures that should look like they did before this change. 5. Added new sub-component :ref:`mj_makeM` which combines the :ref:`mj_crb` call with additional logic to support the introduction in 3.3.1 of :ref:`tendon armature`. In addition to the traditional ``mjData.qM``, :ref:`mj_makeM` also computes ``mjData.M``, a CSR representation of the same matrix. 6. Added a new function :ref:`mj_copyBack` to copy real-valued arrays in an mjModel to a compatible mjSpec. 7. Removed the limitation of :ref:`fusestatic` to models which contain no references. The fusestatic flag will now fuse all bodies which are not referenced and ignore bodies which are referenced. Simulate ^^^^^^^^ 8. The struct ``mjv_sceneState`` has been removed. This struct was used for partial synchronization of ``mjModel`` and ``mjData`` when the Python viewer is used in passive mode. This functionality is now provided by :ref:`mjv_copyModel` and :ref:`mjv_copyData`, which don't copy arrays which are not required for visualization. .. image:: images/changelog/procedural_terrain_generation.png :width: 33% :align: right Python bindings ^^^^^^^^^^^^^^^ 9. Added examples of procedural terrain generation to the Model Editing tutorial: |mjspec_colab| MJX ^^^ 10. Added tendon armature. Version 3.3.2 (April 28, 2025) ------------------------------ MJX ^^^ 1. Added inverse dynamics. 2. Added tendon actuator force sensor. 3. Fix :issue:`2606` such that ``make_data`` copies over ``mocap_pos`` and ``mocap_quat`` from ``body_pos`` and ``body_quat``. Version 3.3.1 (Apr 9, 2025) ---------------------------- .. admonition:: Breaking API changes :class: attention 1. The default value of the flag for toggling :ref:`internal flex contacts` was changed from "true" to "false". This feature has proven to be counterintuitive for users. 2. All of the attach functions (``mjs_attachBody``, ``mjs_attachFrame``, ``mjs_attachToSite``, ``mjs_attachFrameToSite``) have been removed and replaced by a single function :ref:`mjs_attach`. General ^^^^^^^ 3. Added :ref:`tendon armature`: inertia associated with changes in tendon length. 4. Added the :ref:`compiler/saveinertial` flag, writing explicit inertial clauses for all bodies when saving to XML. 5. Added :ref:`orientation` attribute to :ref:`composite`. Moreover, allow the composite to be the direct child of a frame. 6. Added :ref:`tendon actuator force limits` and :ref:`tendon actuator force sensor`. MJX ^^^ 7. Added tendon actuator force limits. Bug fixes ^^^^^^^^^ 8. :ref:`mj_jacDot` was missing a term that accounts for the motion of the point with respect to which the Jacobian is computed, now fixed. 9. Fixed a bug that caused the parent frame of elements in the child worldbody to be incorrectly set when attaching an mjSpec to a frame or a site. 10. Fixed a bug that caused shadow rendering to flicker on platforms (e.g., MacOS) that do not support ARB_clip_control. Fixed in collaboration with :github:user:`aftersomemath`. Python bindings ^^^^^^^^^^^^^^^ .. youtube:: LbANnKMDOHg :aspect: 16:7 :align: right :width: 240px 11. Added examples of procedural model creation to the Model Editing tutorial: |mjspec_colab| 12. Added support for nameless :ref:`mjSpec` objects in the ``bind`` method, see the corresponding :ref:`section` in the documentation. .. |mjspec_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/mjspec.ipynb Version 3.3.0 (Feb 26, 2025) ---------------------------- Feature promotion ^^^^^^^^^^^^^^^^^ .. youtube:: qJFbx-FR7Bc :aspect: 16:7 :align: right :width: 240px 1. Introduced a new kind of **fast deformable body**, activated by setting :ref:`flexcomp/dof` to "trilinear". This type of :ref:`deformable` flex object has the same collision geometry as a regular flex, but has far fewer degrees of freedom. Instead of 3 dofs per vertex, only the corners of the bounding box are free to move, with the positions of the interior vertices computed with trilinear interpolation of the 8 corners, for a total of 24 dofs for the entire flex object (or less, if some of the corners are pinned). This limits the types of deformation achievable by the flex, but allows for much faster simulation. For example, see the video on the right comparing `full `__ and `trilinear `__ flexes for modeling deformable gripper pads. .. image:: images/computation/ccd_light.gif :width: 20% :align: right :class: only-light .. image:: images/computation/ccd_dark.gif :width: 20% :align: right :class: only-dark 2. The native convex collision detection pipeline introduced in 3.2.3 and enabled by the :ref:`nativeccd` flag, is now the default. See the section on :ref:`Convex Collision Detection` for more details. **Migration:** If the new pipeline breaks your workflow, set :ref:`nativeccd` to "disable". General ^^^^^^^ 3. Add support for custom plots in the MuJoCo viewer by exposing a ``viewport`` property, a ``set_figures`` method, and a ``clear_figures`` method. 4. Separate collision and deformation meshes for :ref:`flex`. This enables a fixed cost for the soft body computations, while preserving the fidelity of high-resolution collisions. 5. Added :ref:`potential` and :ref:`kinetic` energy sensors. 6. Improved shadow rendering in the native renderer. 7. Moved ``introspect`` to ``python/introspect``. .. admonition:: Breaking API changes :class: attention 8. As mentioned above, the native convex collision detection pipeline is now the default, which may break some workflows. In this case, set :ref:`nativeccd` to "disable" to restore the old behavior. 9. Added :ref:`mjs_setDeepCopy` API function. When the deep copy flag is 0, attaching a model will not copy it to the parent, so the original references to the child can be used to modify the parent after attachment. The default behavior is to perform such a shallow copy. The old behavior of creating a deep copy of the child model while attaching can be restored by setting the deep copy flag to 1. 10. Changes to inertia inference from meshes: Previously, in order to specify that the mass lies on the surface, :ref:`geom/shellinertia` could be used for any geom type. Now this attribute is ignored if the geom is a mesh; instead, inertia inference for meshes is specified in the asset, using the :ref:`asset/mesh/inertia` attribute. Previously, if the volumetric inertia computation failed (for example due to a very flat mesh), the compiler would silently fall back to surface inertia computation. Now, the compiler will throw an informative error. 11. Removed the composite type ``grid``. Users should instead use :ref:`flexcomp`. 12. Removed the ``particle`` composite type. It is recommended to use the more generic :ref:`replicate` instead, see for example `this model `__. MJX ^^^ 13. Added support for spatial tendons with internal sphere and cylinder wrapping. 14. Fix a bug with box-box collisions :issue:`2356`. Python bindings ^^^^^^^^^^^^^^^ 15. Added a pedagogical colab notebook for ``mujoco.rollout``, a Python module for multithreaded simulation rollouts. It is available here |rollout_colab|. |br| Contribution by :github:user:`aftersomemath`. .. |rollout_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/rollout.ipynb Version 3.2.7 (Jan 14, 2025) ---------------------------- Python bindings ^^^^^^^^^^^^^^^ 1. :ref:`rollout` now features native multi-threading. If a sequence of ``MjData`` instances of length ``nthread`` is passed in, ``rollout`` will automatically create a thread pool and parallelize the computation. The thread pool can be reused across calls, but then the function cannot be called simultaneously from multiple threads. To run multiple threaded rollouts simultaneously, use the new class ``Rollout`` which encapsulates the thread pool. Contribution by :github:user:`aftersomemath`. 2. Fix global namespace pollution when using ``mjpython`` (:issue:`2265`). General ^^^^^^^ .. admonition:: Breaking API changes (minor) :class: attention 3. The field ``mjData.qLDiagSqrtInv`` has been removed. This field is only required for the dual solvers. It is now computed as-needed rather than unconditionally. Relatedly, added the corresponding argument to :ref:`mj_solveM2`. 4. Reduced the memory footprint of the PGS solver's :ref:`A matrix`. This was the last remaining dense-memory allocation in MuJoCo, allowing for a significant reduction of the :ref:`dynamic memory allocation heuristic`. Bug fixes ^^^^^^^^^ 5. Fixed a bug in the box-sphere collider, depth was incorrect for deep penetrations (:issue:`2206`). 6. Fixed a bug in :ref:`mj_mulM2` and added a test. Version 3.2.6 (Dec 2, 2024) --------------------------- General ^^^^^^^ 1. Removed rope and loop from :ref:`composite`. The user is encouraged to instead use the :at:`cable` plugin or :ref:`flexcomp`, respectively. MJX ^^^ 2. Added muscle actuators. Python bindings ^^^^^^^^^^^^^^^ 3. Provide prebuilt wheels for Python 3.13. 4. Added ``bind`` method and removed id attribute from :ref:`mjSpec` objects. Using ids is error prone in scenarios of repeated attachment and detachment. Python users are encouraged to use names for unique identification of model elements. 5. :ref:`rollout` can now accept sequences of MjModel of length ``nroll``. Also removed the ``nroll`` argument because its value can always be inferred. Bug fixes ^^^^^^^^^ 6. Fixed :issue:`2212`, type error in ``mjx.get_data``. 7. Fixed bug introduced in 3.2.0 in handling of :ref:`texrepeat` attribute, was mistakenly cast from ``float`` to ``int``, (fixed :issue:`2223`). Version 3.2.5 (Nov 4, 2024) --------------------------- Feature promotion ^^^^^^^^^^^^^^^^^ 1. The :doc:`Model Editing` framework afforded by :ref:`mjSpec`, introduced in 3.2.0 as an in-development feature, is now stable and recommended for general use. 2. The native convex collision detection pipeline introduced in 3.2.3 and enabled by the :ref:`nativeccd` flag, is not yet the default but is already recommended for general use. Please try it when encountering collision-related problems and report any issues you encounter. General ^^^^^^^ 3. The global compiler flag ``exactmeshinertia`` has been removed and replaced with the mesh-specific :ref:`inertia` attribute. 4. The not-useful ``convexhull`` compiler option (to disable computation of mesh convex hulls) has been removed. 5. Removed the deprecated ``mju_rotVecMat``, ``mju_rotVecMatT`` and ``mjv_makeConnector`` functions. 6. Sorting now uses a faster, native sort function (fixes :issue:`1638`). 7. The PBR texture layers introduced in 3.2.1 were refactored from separate sub-elements to a single :ref:`layer` sub-element. 8. The composite types box, cylinder, and sphere have been removed. Users should instead use the equivalent types available in :ref:`flexcomp`. MJX ^^^ 9. Added ``apply_ft``, ``jac``, and ``xfrc_accumulate`` as public functions. 10. Added ``TOUCH`` sensor. 11. Added support for ``eq_active``. Fixes :issue:`2173`. 12. Added ray intersection with ellipsoid. Bug fixes ^^^^^^^^^ 13. Fixed several bugs related to connect and weld constraints with site semantics (fixes :issue:`2179`, reported by :github:user:`yinfanyi`). The introduction of site specification to connects and welds in 3.2.3 conditionally changed the semantics of `mjData.eq_obj1id` and `mjData.eq_obj2id`, but these changes were not properly propagated in several places leading to incorrect computations of constraint inertia, readings of affected force/torque sensors and runtime enabling/disabling of such constraints. 14. Fixed a bug in slider-crank :ref:`transmission`. The bug was introduced in 3.0.0. 15. Fixed a bug in flex texture coordinates that prevented the correct allocation of textures in mjModel. Documentation ^^^^^^^^^^^^^ 16. Function headers in the :doc:`API reference <../APIreference/APIfunctions>` now link to their source definitions in GitHub. Version 3.2.4 (Oct 15, 2024) ---------------------------- General ^^^^^^^ .. youtube:: e8lUuykQPGs :aspect: 16:7 :align: right :width: 240px 1. The Newton solver no longer requires ``nv*nv`` memory allocation, allowing for much larger models. See e.g., `100_humanoids.xml `__. Two quadratic-memory allocations still remain to be fully sparsified: ``mjData.actuator_moment`` and the matrices used by the PGS solver. 2. Removed the :at:`solid` and :at:`membrane` plugins and moved the associated computations into the engine. See `3D example model `__ and `2D example model `__ for examples of flex objects that previously required these plugins. 3. Replaced the function ``mjs_setActivePlugins`` with :ref:`mjs_activatePlugin`. MJX ^^^ 4. Added ``mocap_pos`` and ``mocap_quat`` in kinematics. 5. Added support for :ref:`spatial tendons ` with pulleys and external sphere and cylinder wrapping. 6. Added sphere-cylinder and sphere-ellipsoid collision functions (:issue:`2126`). 7. Fixed a bug with frictionloss constraints. 8. Added ``TENDONPOS`` and ``TENDONVEL`` sensors. 9. Fixed a bug with the computation of tangential contact forces in ``_decode_pyramid``. 10. Added ``JOINTINPARENT`` actuator transmission type. Python bindings ^^^^^^^^^^^^^^^ 11. Removed support for Python 3.8, now that it's `deprecated upstream `__. Bug fixes ^^^^^^^^^ 12. Fixed a bug where ``actuator_force`` was not set in MJX (:issue:`2068`). 13. Fixed bug where MJX data tendon fields were incorrect after calling ``mjx.put_data``. 14. The compiler now returns an error if height fields are used with :ref:`collision sensors` as they are not yet supported. Version 3.2.3 (Sep 16, 2024) ---------------------------- General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 1. The runtime options ``mpr_tolerance`` and ``mpr_iterations`` were renamed to :ref:`ccd_tolerance` and :ref:`ccd_iterations`, both in XML and in the :ref:`mjOption` struct. This is because the new convex collision detection pipeline (see below) does not use the MPR algorithm. The semantics of these options remain identical. 2. The functions ``mjs_findMesh`` and ``mjs_findKeyframe`` were replaced by ``mjs_findElement``, which allows to look for any object type. 3. The experimental use of 2D/3D elasticity plugins with :ref:`composite` has been removed. Users should instead use :ref:`flexcomp`, which provides the correct collision behavior. 4. Added the :ref:`nativeccd` flag. When this flag is enabled, general convex collision detection is handled with a new native code path, rather than `libccd `__. This feature is in early stages of testing, but users who've experienced issues related to collision detection are welcome to experiment with it and report any issues. .. youtube:: kcM_oauk3ZA :aspect: 16:7 :align: right :width: 240px 5. Added a new way of defining :ref:`connect` and :ref:`weld` equality constraints, using two sites. The new semantic is useful when the assumption that the constraint is satisfied in the base configuration does not hold. In this case the sites will "snap together" at the beginning of the simulation. Additionally, changing the site positions (``mjModel.site_pos``) and orientations ( ``mjModel.site_quat``) at runtime will correctly modify the constraint definition. This `example model `__ using the new semantic is shown in the video on the right. 6. Introduced **free joint alignment**, an optimization that applies to bodies with a free joint and no child bodies (simple free-floating bodies): automatically aligning the body frame with the inertial frame. This feature can be toggled individually using the :ref:`freejoint/align` attribute or globally using the compiler :ref:`alignfree` attribute. The alignment diagonalizes the related 6x6 inertia sub-matrix, leading to both faster and more stable simulation of free bodies. While this optimization is a strict improvement, it changes the semantics of the joint's degrees-of-freedom. Therefore, ``qpos`` and ``qvel`` values saved in older versions (for example, in :ref:`keyframes`) will become invalid. The global compiler attribute currently defaults to "false" due to this potential breakage, but could be changed to "true" in a future release. Aligned free joints are recommended for all new models. 7. Added an :ref:`mjSpec` option for creating a texture directly from a buffer. 8. :ref:`shell (surface) inertia ` is now supported by all geom types. 9. When :ref:`attaching` sub-models, :ref:`keyframes` will now be correctly merged into the parent model, but only on the first attachment. 10. Added the :ref:`mjtSameFrame` enum which contains the possible frame alignments of bodies and their children. These alignments are used for computation shortcuts in :ref:`mj_kinematics`. 11. Added :ref:`mj_jacDot` for computing time-derivatives of kinematic Jacobians. Fixes :issue:`411`. MJX ^^^ 12. Added ``efc_pos`` to ``mjx.Data`` (:issue:`1388`). 13. Added position-dependent sensors: ``MAGNETOMETER``, ``CAMPROJECTION``, ``RANGEFINDER``, ``JOINTPOS``, ``ACTUATORPOS``, ``BALLQUAT``, ``FRAMEPOS``, ``FRAMEXAXIS``, ``FRAMEYAXIS``, ``FRAMEZAXIS``, ``FRAMEQUAT``, ``SUBTREECOM``, ``CLOCK``. 14. Added velocity-dependent sensors: ``VELOCIMETER``, ``GYRO``, ``JOINTVEL``, ``ACTUATORVEL``, ``BALLANGVEL``, ``FRAMELINVEL``, ``FRAMEANGVEL``, ``SUBTREELINVEL``, ``SUBTREEANGMOM``. 15. Added acceleration/force-dependent sensors: ``ACCELEROMETER``, ``FORCE``, ``TORQUE``, ``ACTUATORFRC``, ``JOINTACTFRC``, ``FRAMELINACC``, ``FRAMEANGACC``. 16. Changed default policy to avoid placing unused (MuJoCo-only) arrays on device. 17. Added ``device`` parameter to ``mjx.make_data`` to bring it to parity with ``mjx.put_model`` and ``mjx.put_data``. 18. Added support for :ref:`implicitfast integration` for all cases except :doc:`fluid drag `. 19. Fixed a bug where ``qLDiagInv`` had the wrong size for sparse mass matrices. 20. Added support for joint and tendon :ref:`frictionloss `. 21. Added support for :ref:`connect` equality constraints using two sites. 22. Added support for :ref:`spatial tendons ` with site wrapping. Bug fixes ^^^^^^^^^ 23. Fixed a performance regression introduced in 3.1.7 in mesh Bounding Volume Hierarchies (:issue:`1875`, contribution by :github:user:`michael-ahn`). 24. Fixed a bug wherein, for models that have both muscles and stateless actuators and used one of the implicit integrators, wrong derivatives would be computed. 25. Fixed a bug in tendon wrapping around spheres. Before this fix, tendons that wrapped around spheres with an externally-placed :ref:`sidesite` could jump inside the sphere instead of wrapping around it. 26. Fixed a bug that caused :at:`meshdir` and :at:`texturedir` to be overwritten during model :ref:`attachment`, preventing model attachment for models with assets in different directories. Python bindings ^^^^^^^^^^^^^^^ 27. Added support for engine plugins in :ref:`mjSpec` (:issue:`1903`). 28. Better error reporting for issues with the assets dictionary, when loading models. Version 3.2.2 (Aug 8, 2024) --------------------------- General ^^^^^^^ 1. Increase texture and material limit back to 1000. 3.2.0 inadvertently reduced this limit to 100, breaking some existing models (:issue:`1877`). Version 3.2.1 (Aug 5, 2024) --------------------------- General ^^^^^^^ 1. Renamed ``mjModel.tex_rgb`` to ``mjModel.tex_data``. 2. Added a new :ref:`autoreset` flag to disable automatic reset when NaNs or infinities are detected. 3. Added sub-elements to the MJCF :ref:`material` element, to allow specification of multiple textures for rendering (e.g., ``occlusion, roughness, metallic``). Note that the MuJoCo renderer doesn't support these new features, and they are made available for use with external renderers. 4. Sorting (``mjQUICKSORT``) now calls ``std::sort`` when building with C++ (:issue:`1638`). MJX ^^^ 5. Added more fields to ``mjx.Model`` and ``mjx.Data`` for further compatibility with the corresponding MuJoCo structs. 6. Added support for :ref:`fixed tendons `. 7. Added support for tendon length limits (``mjCNSTR_LIMIT_TENDON`` in :ref:`mjtConstraint`). 8. Added support for tendon equality constraints (``mjEQ_TENDON`` in :ref:`mjtEq`). 9. Added support for tendon actuator transmission (``mjTRN_TENDON`` in :ref:`mjtTrn`). Python bindings ^^^^^^^^^^^^^^^ 10. Added support for asset dictionary argument in ``mujoco.spec.from_file``, ``mujoco.spec.from_string`` and ``mujoco.spec.compile``. Bug fixes ^^^^^^^^^ 11. Fixed a bug where implicit integrators did not take into account disabled actuators (:issue:`1838`). Version 3.2.0 (Jul 15, 2024) ---------------------------- New features ^^^^^^^^^^^^ 1. Introduced a major new feature: **procedural model creation and editing**, using a new top-level data-structure :ref:`mjSpec`. See the :doc:`Model Editing` chapter for details. Note that as of this release this feature is still in testing and subject to future breaking changes. Fixes :issue:`364`. General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 2. Removed deprecated ``mj_makeEmptyFileVFS`` and ``mj_findFileVFS`` functions. The constants ``mjMAXVFS`` and ``mjMAXVFSNAME`` are also removed as they are no longer needed. **Migration:** Use :ref:`mj_addBufferVFS` to copy a buffer into a VFS file directly. 3. Calls to :ref:`mj_defaultVFS` may allocate memory inside VFS, and the corresponding :ref:`mj_deleteVFS` must be called to deallocate any internal allocated memory. 4. Deprecated ``mju_rotVecMat`` and ``mju_rotVecMatT`` in favor of :ref:`mju_mulMatVec3` and :ref:`mju_mulMatTVec3`. These function names and argument order are more consistent with the rest of the API. The older functions have been removed from the Python bindings and will be removed from the C API in the next release. 5. Removed the ``actuator_actdim`` callback from actuator plugins. They now have the ``actdim`` attribute, which must be used with actuators that write state to the ``act`` array. This fixed a crash which happened when keyframes were used in a model with stateful actuator plugins. The PID plugin will give an error when the wrong value of actdim is provided. 6. Added :ref:`attach` meta-element to MJCF, which allows :ref:`attaching` a subtree from a different model to a body in the current model. 7. The :ref:`VFS` implementation has been rewritten in C++ and is now considerably more efficient in speed and memory footprint. .. youtube:: ZXBTEIDWHhs :aspect: 16:7 :align: right :width: 240px 8. Added support for orthographic cameras. This is available for both fixed cameras and the free camera, using the ``camera/orthographic`` and :ref:`global/orthographic` attributes, respectively. 9. Added :ref:`maxhullvert`, the maximum number of vertices in a mesh's convex hull. 10. Added :ref:`mj_setKeyframe` for saving the current state into a model keyframe. 11. Added support for ``ball`` joints in the URDF parser ("spherical" in URDF). 12. Replaced ``mjUSEDOUBLE`` which was previously hard-coded in `mjtnum.h `__ with the build-time flag ``mjUSESINGLE``. If this symbol is not defined, MuJoCo will use double-precision floating point, as usual. If ``mjUSESINGLE`` is defined, MuJoCo will use single-precision floating point. See :ref:`mjtNum`. Relatedly, fixed various type errors that prevented building with single-precision. 13. Quaternions in ``mjData.qpos`` and ``mjData.mocap_quat`` are no longer normalized in-place by :ref:`mj_kinematics`. Instead they are normalized when they are used. After the first step, quaternions in ``mjData.qpos`` will be normalized. 14. Mesh loading in the compiler, which is usually the slowest part of the loading process, is now multi-threaded. MJX ~~~ 15. Added support for :ref:`elliptic friction cones`. 16. Fixed a bug that resulted in less-optimal linesearch solutions for some difficult constraint settings. 17. Fixed a bug in the Newton solver that sometimes resulted in less-optimal gradients. .. youtube:: P83tKA1iz2Y :align: right :width: 360px Simulate ^^^^^^^^ 18. Added improved tutorial video. 19. Improved the Brownian noise generator. 20. Now displaying model load times if they are longer than 0.25 seconds. Python bindings ^^^^^^^^^^^^^^^ 21. Fixed a memory leak when using ``copy.deepcopy()`` on a ``mujoco.MjData`` instance (:issue:`1572`). Bug fixes ^^^^^^^^^ 22. Fix an issue where ``mj_copyData`` (or ``copy.copy()`` in the Python bindings) was not copying contact information correctly (:issue:`1710`). 23. Fix an issue with saving to XML that caused frames to be written multiple times (:issue:`1802`). Version 3.1.6 (Jun 3, 2024) --------------------------- General ^^^^^^^ 1. Added :ref:`mj_geomDistance` for computing the shortest signed distance between two geoms and optionally a segment connecting them. Relatedly, added the 3 sensors: :ref:`distance`, :ref:`normal`, :ref:`fromto`. See the function and sensor documentation for details. Fixes :issue:`51`. 2. Improvements to position actuators: - Added :ref:`timeconst` attribute to the :ref:`position actuator`. When set to a positive value, the actuator is made stateful with :at:`filterexact` dynamics. - Added :ref:`dampratio` to both :el:`position` and :el:`intvelocity` actuators. An alternative to the :at:`kv` attribute, it provides a convenient way to set actuator damping using natural units. See attribute documentation for details. MJX ^^^ 3. Add height-field collision support. Fixes :issue:`1491`. 4. Add a pre-compiled field ``mesh_convex`` to ``mjx.Model`` so that mesh properties can be vmapped over. Fixes :issue:`1655`. 5. Fix a bug in convex mesh collisions, where erroneous edge contacts were being created even though face separating axes were found. Fixes :issue:`1695`. Bug fixes ^^^^^^^^^ 6. Fixed a bug the could cause collisions to be missed when :ref:`fusestatic` is enabled, as is often the case for URDF imports. Fixes :issue:`1069`, :issue:`1577`. 7. Fixed a bug that was causing the visualization of SDF iterations to write outside the size of the vector storing them. Fixes :issue:`1539`. Version 3.1.5 (May 7, 2024) --------------------------- General ^^^^^^^ .. youtube:: 5k0_wsIRAFc :aspect: 16:7 :align: right :width: 240px 1. Added the :ref:`replicate` to MJCF, a :ref:`meta-element` which permits to repeat a subtree with incremental translational and rotational offsets. 2. Enabled an internal cache in the MuJoCo compiler resulting in recompilation speedup. Currently, processed textures, hfields, and OBJ meshes are cached. Support for Unity environments is not yet available. 3. Added ``mjModel.mesh_scale``: the scaling applied to asset vertices, as specified in the :ref:`scale` attribute. 4. Added visual properties which are ignored by the native renderer, but can be used by external renderers: - :ref:`light/bulbradius` attribute and corresponding ``mjModel.light_bulbradius`` field. - :ref:`material/metallic` attribute and corresponding ``mjModel.material_metallic`` field. - :ref:`material/roughness` attribute and corresponding ``mjModel.material_roughness`` field. 5. The type of the ``size`` argument of :ref:`mj_stackAllocNum` and :ref:`mj_stackAllocInt` was changed from ``int`` to ``size_t``. 6. Added support for gmsh format version 2.2 surface meshes in :ref:`flexcomp`. MJX ^^^ .. admonition:: Breaking API changes :class: attention 7. Removed deprecated ``mjx.device_get_into`` and ``mjx.device_put`` functions as they lack critical new functionality. **Migration:** Use ``mjx.get_data_into`` instead of ``mjx.device_get_into``, and ``mjx.put_data`` instead of ``mjx.device_put``. 8. Added cylinder plane collisions. 9. Added ``efc_type`` to ``mjx.Data`` and ``dim``, ``efc_address`` to ``mjx.Contact``. 10. Added ``geom`` to ``mjx.Contact`` and marked ``geom1``, ``geom2`` deprecated. 11. Added ``ne``, ``nf``, ``nl``, ``nefc``, and ``ncon`` to ``mjx.Data`` to match ``mujoco.MjData``. 12. Given the above added fields, removed ``mjx.get_params``, ``mjx.ncon``, and ``mjx.count_constraints``. 13. Changed the way meshes are organized on device to speed up collision detection when a mesh is replicated for many geoms. 14. Fixed a bug where capsules might be ignored in broadphase colliision checking. 15. Added cylinder collisions using SDFs. 16. Added support for all :ref:`condim `: 1, 3, 4, 6. 17. Add support functions for ``id2name`` and ``name2id``, MJX versions of :ref:`mj_id2name` and :ref:`mj_name2id`. 18. Added support for :ref:`gravcomp` and :ref:`actuatorgravcomp`. 19. Fixed a bug in ``mjx.ray`` for sometimes allowed negative distances for ray-mesh tests. 20. Added a new `differentiable physics tutorial `__ that demonstrates training locomotion policies with analytical gradients automatically derived from the MJX physics step. Contribution by :github:user:`Andrew-Luo1`. Bug fixes ^^^^^^^^^ 21. Defaults of lights were not being saved, now fixed. 22. Prevent overwriting of frame names by body names when saving an XML. Bug introduced in 3.1.4. 23. Fixed bug in Python binding of :ref:`mj_saveModel`: ``buffer`` argument was documented as optional but was actually not optional. 24. Fixed bug that prevented memory allocations larger than 2.15 GB. Fixes :issue:`1606`. Version 3.1.4 (April 10th, 2024) -------------------------------- General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 1. Removed the ability to natively add noise to sensors. Note that the ``mjModel.sensor_noise`` field and :ref:`corresponding attribute` are kept and now function as a convenient location for the user to save standard-deviation information for their own use. This feature was removed because: - There was no mechanism to seed the random noise generator. - It was not thread-safe, even if seeding would have been provided, sampling on multiple threads would lead to non-reproducible results. - This feature was seen as overreach by the engine. Adding noise should be the user's responsibility. - We are not aware of anyone who was actually using the feature. **Migration:** Add noise to sensor values yourself. 2. Added the :ref:`actuatorgravcomp` joint attribute. When enabled, gravity compensation forces on the joint are treated as applied by actuators. See attribute documentation for more details. The example model `refsite.xml `__, which demonstrates Cartesian actuation of an arm, has been updated to use this attribute. 3. Added support for gmsh format 2.2 , tetrahedral mesh, as generated by e.g. `fTetwild `__. 4. Added :ref:`mju_euler2Quat` for converting an Euler-angle sequence to quaternion. MJX ^^^ 5. Improved performance of SAT for convex collisions. 6. Fixed bug for sphere/capsule-convex deep penetration. 7. Fixed bug where ``mjx.Data`` produced by ``mjx.put_data`` had different treedef than ``mjx.make_data``. 8. Throw an error for margin/gap for convex mesh collisions, since they are not supported. 9. Added ellipsoid plane collisions. 10. Added support for userdata. 11. Added ellipsoid-ellipsoid and ellipsoid-capsule collisions using signed distance functions (SDFs). Simulate ^^^^^^^^ 12. Fixed bug in order of enable flag strings. Before this change, using the simulate UI to toggle the :ref:`invdiscrete` or the (now removed) ``sensornoise`` flags would actually toggle the other flag. Python bindings ^^^^^^^^^^^^^^^ .. youtube:: xHDS0n5DpqM :aspect: 16:7 :align: right :width: 240px 13. Added the ``mujoco.minimize`` Python module for nonlinear least-squares, designed for System Identification (sysID). The sysID tutorial is work in progress, but a pedagogical colab notebook with examples, including Inverse Kinematics, is available here: |ls_colab| |br| The video on the right shows example clips from the tutorial. .. |ls_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/least_squares.ipynb Version 3.1.3 (March 5th, 2024) ------------------------------- General ^^^^^^^ 1. Added the :at:`inheritrange` attribute to :ref:`position` and :ref:`intvelocity` actuators, allowing convenient setting of the actuator's :at:`ctrlrange` or :at:`actrange` (respectively), according to the range of the transmission target (joint or tendon). See :ref:`position/inheritrange` for details. 2. Deprecated ``mj_makeEmptyFileVFS`` in favor of :ref:`mj_addBufferVFS`. :ref:`mjVFS` now computes checksums of its internal file buffers. :ref:`mj_addBufferVFS` allocates an empty buffer with a given name in an mjVFS and copies the data buffer into it, combining and replacing the deprecated two-step process of calling ``mj_makeEmptyFileVFS`` followed by a direct copy into the given mjVFS internal file buffer. 3. Added :ref:`mj_angmomMat` which computes the ``3 x nv`` angular momentum matrix :math:`H(q)`, providing the linear mapping from generalized velocities to subtree angular momentum :math:`h = H \dot q`. Contribution by :github:user:`v-r-a`. MJX ^^^ 4. Improved performance of getting and putting device data. - Use ``tobytes()`` for numpy array serialization, which is orders of magnitude faster than converting to tuples. - Avoid reallocating host ``mjData`` arrays when array shapes are unchanged. - Speed up calculation of ``mjx.ncon`` for models with many geoms. - Avoid calling ``mjx.ncon`` in ``mjx.get_data_into`` when ``nc`` can be derived from ``mjx.Data``. 5. Fixed a bug in ``mjx-viewer`` that prevented it from running. Updated ``mjx-viewer`` to use newer ``mjx.get_data_into`` function call. 6. Fixed a bug in ``mjx.euler`` that applied incorrect damping when using dense mass matrices. 7. Fixed a bug in ``mjx.solve`` that was causing slow convergence when using ``mjSOL_NEWTON`` in :ref:`mjtSolver`. 8. Added support for :ref:`mjOption.impratio` to ``mjx.Model``. 9. Added support for cameras in ``mjx.Model`` and ``mjx.Data``. Fixes :issue:`1422`. 10. Added an implementation of broadphase using `top_k` and bounding spheres. Python bindings ^^^^^^^^^^^^^^^ 11. Fixed incorrect data types in the bindings for the ``geom``, ``vert``, ``elem``, and ``flex`` array members of the ``mjContact`` struct, and all array members of the ``mjrContext`` struct. Version 3.1.2 (February 05, 2024) --------------------------------- General ^^^^^^^ 1. Improved the :ref:`discardvisual` compiler flag, which now discards all visual-only assets. See :ref:`discardvisual` for details. 2. Removed the :ref:`timer` for midphase colllision detection, it is now folded in with the narrowphase timer. This is because timing the two phases separately required fine-grained timers inside the collision functions; these functions are so small and fast that the timer itself was incurring a measurable cost. 3. Added the flag :ref:`bvactive` to ``visual/global``, allowing users to turn off visualisation of active bounding volumes (the red/green boxes in this :ref:`this changelog item`). For models with very high-resolution meshes, the computation required for this visualization can slow down simulation speed. Fixes :issue:`1279`. - Added color of :ref:`bounding volumes` and :ref:`active bounding volumes` to :ref:`visual/rgba`. 4. Height-field elevation data can now be specified directly in XML with the :ref:`elevation` attribute (and not only with PNG files). See `example model `__. MJX ^^^ 5. Added :ref:`dyntype` ``filterexact``. 6. Added :at:`site` transmission. 7. Updated MJX colab tutorial with more stable quadruped environment. 8. Added ``mjx.ray`` which mirrors :ref:`mj_ray` for planes, spheres, capsules, boxes, and meshes. 9. Added ``mjx.is_sparse`` which mirrors :ref:`mj_isSparse` and ``mjx.full_m`` which mirrors :ref:`mj_fullM`. 10. Added support for specifying sparse or dense mass matrices via :ref:`option-jacobian`. 11. Raise a not implemented error when nonzero frictionloss is present. Fixes :issue:`1344`. Python bindings ^^^^^^^^^^^^^^^ 12. Improved the implementation of the :ref:`rollout` module. Note the changes below are breaking, dependent code will require modification. - Uses :ref:`mjSTATE_FULLPHYSICS` as state spec, enabling divergence detection by inspecting time. - Allows user-defined control spec for any combination of :ref:`user input` fields as controls. - Outputs are no longer squeezed and always have dim=3. 13. The ``sync`` function for the :ref:`passive viewer` can now pick up changes to rendering flags in ``user_scn``, as requested in :issue:`1190`. Bug fixes ^^^^^^^^^ 14. Fixed a bug that prevented the use of pins with plugins if flexes are not in the worldbody. Fixes :issue:`1270`. 15. Fixed a bug in the :ref:`muscle model` that led to non-zero values outside the lower bound of the length range. Fixes :issue:`1342`. Version 3.1.1 (December 18, 2023) ----------------------------------- Bug fixes ^^^^^^^^^ 1. Fixed a bug (introduced in 3.1.0) where box-box collisions produced no contacts if one box was deeply embedded in the other. 2. Fixed a bug in :ref:`simulate` where the "LOADING..." message was not showing correctly. 3. Fixed a crash in the Python :ref:`passive viewer`, when used with models containing Flex objects. 4. Fixed a bug in MJX where ``site_xmat`` was ignored in ``get_data`` and ``put_data`` 5. Fixed a bug in MJX where ``efc_address`` was sometimes incorrectly calculated in ``get_data``. Version 3.1.0 (December 12, 2023) --------------------------------- General ^^^^^^^ 1. Improved convergence of Signed Distance Function (SDF) collisions by using line search and a new objective function for the optimization. This allows to decrease the number of initial points needed for finding the contacts and is more robust for very small or large geom sizes. 2. Added :ref:`frame` to MJCF, a :ref:`meta-element` which defines a pure coordinate transformation on its direct children, without requiring a :ref:`body`. 3. Added the :at:`kv` attribute to the :ref:`position` and :ref:`intvelocity` actuators, for specifying actuator-applied damping. This can be used to implement a PD controller with 0 reference velocity. When using this attribute, it is recommended to use the implicitfast or implicit :ref:`integrators`. Plugins ^^^^^^^ 4. Allow actuator plugins to use activation variables in ``mjData.act`` as their internal state, rather than ``mjData.plugin_state``. Actuator plugins can now specify :ref:`callbacks` that compute activation variables, and they can be used with built-in :ref:`dyntype` actuator dynamics. 5. Added the `pid `__ actuator plugin, a configurable PID controller that implements the Integral term, which is not available with native MuJoCo actuators. MJX ^^^ 6. Added ``site_xpos`` and ``site_xmat`` to MJX. 7. Added ``put_data``, ``put_model``, ``get_data`` to replace ``device_put`` and ``device_get_into``, which will be deprecated. These new functions correctly translate fields that are the result of intermediate calculations such as ``efc_J``. Bug fixes ^^^^^^^^^ 8. Fix bug in Cartesian actuation with movable refsite, as when using body-centric Cartesian actuators on a quadruped. Before this fix such actuators could lead to non-conservation of momentum. 9. Fix bug that prevented using flex with :ref:`simulate`. 10. Fix bug that prevented the use of elasticity plugins in combination with pinned flex vertices. 11. Release Python wheels targeting macOS 10.16 to support x86_64 systems where ``SYSTEM_VERSION_COMPAT`` is set. The minimum supported version is still 11.0, but we release these wheels to fix compatibility for those users. See :issue:`1213`. 12. Fixed mass computation of meshes: Use the correct mesh volume instead of approximating it using the inertia box. Version 3.0.1 (November 15, 2023) --------------------------------- General ^^^^^^^ 1. Added sub-terms of total passive forces in ``mjData.qfrc_passive`` to :ref:`mjData`: ``qfrc_{spring, damper, gravcomp, fluid}``. The sum of these vectors equals ``qfrc_passive``. .. youtube:: H9qG9Zf2W44 :aspect: 16:7 :align: right :width: 240px 2. Added :ref:`actuatorgroupdisable` attribute and associated :ref:`mjOption.disableactuator` integer bitfield, which can be used to disable sets of actuators at runtime according to their :ref:`group`. Fixes :issue:`1092`. See :ref:`CActDisable`. - The first 6 actuator groups are toggleable in the :ref:`simulate` viewer. See `example model `__ and associated screen-capture on the right. 3. Increased ``mjMAXUIITEM`` (maximum number of UI elements per section in Simulate) to 200. MJX ^^^ 4. Added support for Newton solver (``mjSOL_NEWTON`` in :ref:`mjtSolver`). The Newton solver significantly speeds up simulation on GPU: .. list-table:: Steps-per-second, Conjugate Gradient vs. Newton on A100 :header-rows: 1 :align: left * - Model - CG - Newton - Speedup * - `Humanoid `__ - 640,000 - 1,020,000 - **1.6 x** * - `Barkour v0 `__ - 1,290,000 - 1,750,000 - **1.35 x** * - `Shadow Hand `__ - 215,000 - 270,000 - **1.25 x** Humanoid is the standard MuJoCo humanoid, `Google Barkour `__ and the Shadow Hand are both available in the :ref:`MuJoCo Menagerie`. 5. Added support for joint equality constraints (``mjEQ_JOINT`` in :ref:`mjtEq`). 6. Fixed bug where mixed ``jnt_limited`` joints were not being constrained correctly. 7. Made ``device_put`` type validation more verbose (fixes :issue:`1113`). 8. Removed empty EFC rows from ``MJX``, for joints with no limits (fixes :issue:`1117`). 9. Fixed bug in ``scan.body_tree`` that led to incorrect smooth dynamics for some kinematic tree layouts. Python bindings ^^^^^^^^^^^^^^^ 10. Fix the macOS ``mjpython`` launcher to work with the Python interpreter from Apple Command Line Tools. 11. Fixed a crash when copying instances of ``mujoco.MjData`` for models that use plugins. Introduced a ``model`` attribute to ``MjData`` which is reference to the model that was used to create that ``MjData`` instance. Simulate ^^^^^^^^ 12. :ref:`simulate`: correct handling of "Pause update", "Fullscreen" and "VSync" buttons. Documentation ^^^^^^^^^^^^^ .. youtube:: cE3s_IfO4g4 :aspect: 16:7 :align: right :width: 240px 13. Added cell to the `tutorial colab `__ providing an example of procedural camera control: 14. Added documentation for the :ref:`UI` framework. 15. Fixed typos and supported fields in docs (fixes :issue:`1105` and :issue:`1106`). Bug fixes ^^^^^^^^^ 16. Fixed bug relating to welds modified with :ref:`torquescale`. Version 3.0.0 (October 18, 2023) -------------------------------- New features ^^^^^^^^^^^^ 1. Added simulation on GPU and TPU via the new :doc:`mjx` (MJX) Python module. Python users can now natively run MuJoCo simulations at millions of steps per second on Google TPU or their own accelerator hardware. - MJX is designed to work with on-device reinforcement learning algorithms. This Colab notebook demonstrates using MJX along with reinforcement learning to train humanoid and quadruped robots to locomote: |colab| - The MJX API is compatible with MuJoCo but is missing some features in this release. See the outline of :ref:`MJX feature parity ` for more details. .. |colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb .. youtube:: QewlEqIZi1o :aspect: 16:7 :align: right :width: 240px 2. Added new signed distance field (SDF) collision primitive. SDFs can take any shape and are not constrained to be convex. Collision points are found by minimizing the maximum of the two colliding SDFs via gradient descent. - Added new SDF plugin for defining implicit geometries. The plugin must define methods computing an SDF and its gradient at query points. See the :ref:`documentation` for more details. .. youtube:: ra2bTiZHGlw :aspect: 16:7 :align: right :width: 240px 3. Added new low-level model element called ``flex``, used to define deformable objects. These `simplicial complexes `__ can be of dimension 1, 2 or 3, corresponding to stretchable lines, triangles or tetrahedra. Two new MJCF elements are used to define flexes. The top-level :ref:`deformable` section contains the low-level flex definition. The :ref:`flexcomp` element, similar to :ref:`composite` is a convenience macro for creating deformables, and supports the GMSH tetrahedral file format. - Added `shell `__ passive force plugin, computing bending forces using a constant precomputed Hessian (cotangent operator). **Note**: This feature is still under development and subject to change. In particular, deformable object functionality is currently available both via :ref:`deformable` and :ref:`composite`, and both are modifiable by the first-party `elasticity plugins `__. We expect some of this functionality to be unified in the future. .. youtube:: Vc1tq0fFvQA :aspect: 16:7 :align: right :width: 240px 4. Added constraint island discovery with :ref:`mj_island`. Constraint islands are disjoint sets of constraints and degrees-of-freedom that do not interact. The only solver which currently supports islands is :ref:`CG`. Island discovery can be activated using a new :ref:`enable flag`. If island discovery is enabled, geoms, contacts and tendons will be colored according to the corresponding island, see video. Island discovery is currently disabled for models that have deformable objects (see previous item). 5. Added :ref:`mjThreadPool` and :ref:`mjTask` which allow for multi-threaded operations within the MuJoCo engine pipeline. If engine-internal threading is enabled, the following operations will be multi-threaded: - Island constraint resolution, if island discovery is :ref:`enabled` and the :ref:`CG solver` is selected. The `22 humanoids `__ model shows a 3x speedup compared to the single threaded simulation. - Inertia-related computations and collision detection will happen in parallel. Engine-internal threading is a work in progress and currently only available in first-party code via the :ref:`testspeed` utility, exposed with the ``npoolthread`` flag. 6. Added capability to initialize :ref:`composite` particles from OBJ files. Fixes :issue:`642` and :issue:`674`. General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 7. Removed the macros ``mjMARKSTACK`` and ``mjFREESTACK``. **Migration:** These macros have been replaced by new functions :ref:`mj_markStack` and :ref:`mj_freeStack`. These functions manage the :ref:`mjData stack` in a fully encapsulated way (i.e., without introducing a local variable at the call site). 8. Renamed ``mj_stackAlloc`` to :ref:`mj_stackAllocNum`. The new function :ref:`mj_stackAllocByte` allocates an arbitrary number of bytes and has an additional argument for specifying the alignment of the returned pointer. **Migration:** The functionality for allocating ``mjtNum`` arrays is now available via :ref:`mj_stackAllocNum`. 9. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``, and ``maxuse_stack`` to count number of bytes rather than number of :ref:`mjtNum` |-| s. 10. Changed :ref:`mjData.solver`, the array used to collect solver diagnostic information. This array of :ref:`mjSolverStat` structs is now of length ``mjNISLAND * mjNSOLVER``, interpreted as as a matrix. Each row of length ``mjNSOLVER`` contains separate solver statistics for each constraint island. If the solver does not use islands, only row 0 is filled. - The new constant :ref:`mjNISLAND` was set to 20. - :ref:`mjNSOLVER` was reduced from 1000 to 200. - Added :ref:`mjData.solver_nisland`: the number of islands for which the solver ran. - Renamed ``mjData.solver_iter`` to ``solver_niter``. Both this member and ``mjData.solver_nnz`` are now integer vectors of length ``mjNISLAND``. 11. Removed ``mjOption.collision`` and the associated ``option/collision`` attribute. **Migration:** - For models which have ``