Mujoco

Latest version: v3.1.5

Safety actively analyzes 628969 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

3.0.1

See the [changelog](https://mujoco.readthedocs.io/en/3.0.1/changelog.html).

3.0.0

New features
1. Added simulation on GPU and TPU via the new [MuJoCo XLA (MJX)](https://mujoco.readthedocs.io/en/3.0.0/mjx.html) 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: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb)
- The MJX API is compatible with MuJoCo but is missing some features in this release. See the outline of [MJX feature parity](https://mujoco.readthedocs.io/en/3.0.0/mjx.html#mjxfeatureparity) for more details.

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 [documentation](https://mujoco.readthedocs.io/en/3.0.0/programming/extension.html#exwriting) for more details.

3. Added new low-level model element called `flex`, used to define deformable objects. These [simplicial complexes ](https://en.wikipedia.org/wiki/Simplicial_complex) 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 [deformable](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#deformable) section contains the low-level flex definition. The [flexcomp](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-flexcomp) element, similar to [composite](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-composite) is a convenience macro for creating deformables, and supports the GMSH tetrahedral file format.
- Added [shell](https://github.com/deepmind/mujoco/blob/main/plugin/elasticity/shell.cc) 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 [deformable](https://mujoco.readthedocs.io/en/3.0.0/modeling.html#cdeformable) and [composite](https://mujoco.readthedocs.io/en/3.0.0/modeling.html#ccomposite), and both are modifiable by the first-party [elasticity plugins](https://github.com/google-deepmind/mujoco/tree/main/plugin/elasticity). We expect some of this functionality to be unified in the future.

4. Added constraint island discovery with [`mj_island`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#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 [CG](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-solver). Island discovery can be activated using a new [enable flag](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-flag-island). 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 [`mjThreadPool`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjthreadpool) and [`mjTask`](https://mujoco.readthedocs.io/en/3.0.0/APItypes.html#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 [enabled](https://mujoco.readthedocs.io/en/3.0.0/APIreference/XMLreference.html#option-flag-island) and the [CG solver](https://mujoco.readthedocs.io/en/3.0.0/APIreference/XMLreference.html#option-solver) is selected. The [22 humanoids](https://github.com/deepmind/mujoco/blob/main/model/humanoid/22_humanoids.xml) 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 [testspeed](https://mujoco.readthedocs.io/en/3.0.0/programming/samples.html#satestspeed) utility, exposed with the `npoolthread` flag.

6. Added capability to initialize [`composite`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-composite) particles from OBJ files. Fixes 642 and 674.

General

> [!IMPORTANT]
> **Breaking API changes**
>
> 7. Removed the macros `mjMARKSTACK` and `mjFREESTACK`.
>
> **Migration:** These macros have been replaced by new functions [`mj_markStack`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mj-markstack) and [`mj_freeStack`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mj-freestack). These functions manage the [`mjData` stack](https://mujoco.readthedocs.io/en/3.0.0/programming/simulation.html#sistack) in a fully encapsulated way (i.e., without introducing a local variable at the call site).
>
> 8. Renamed `mj_stackAlloc` to [`mj_stackAllocNum`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mj-stackallocnum). The new function [`mj_stackAllocByte`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#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 [`mj_stackAllocNum`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mj-stackallocnum).
>
> 9. Renamed the `nstack` field in [`mjModel`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjmodel) and [`mjData`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjdata) to `narena`. Changed `narena`, `pstack`, and `maxuse_stack` to count number of bytes rather than number of [`mjtNum`s](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjtnum).
>
> 10. Changed [`mjData.solver`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjdata), the array used to collect solver diagnostic information. This array of [`mjSolverStat`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#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 [`mjNISLAND`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIglobals.html#glnumeric) was set to 20.
> - [`mjNSOLVER`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIglobals.html#glnumeric) was reduced from 1000 to 200.
> - Added [`mjData.solver_nisland`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjdata): 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 `<option collision="all"/>`, delete the attribute.
> - For models which have `<option collision="dynamic"/>`, delete all [`pair`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#contact-pair) elements.
> - For models which have `<option collision="pair"/>`, disable all dynamic collisions (determined via contype/conaffinity) by first deleting all [`contype`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-geom-contype) and [`conaffinity`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-geom-conaffinity) attributes in the model and then setting them globally to `0` using
> `<default> <geom contype="0" conaffinity="0"/> </default>`.
>
> 12. Removed the `rope` and `cloth` composite objects.
>
> **Migration:** Users should use the `cable` and `shell` elasticity plugins.
>
> 13. Added [`mjData.eq_active`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjdata) user input variable, for enabling/disabling the state of equality constraints. Renamed `mjModel.eq_active` to [`mjModel.eq_active0`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjmodel), which now has the semantic of "initial value of `mjData.eq_active`". Fixes 876.
>
> **Migration:** Replace uses of `mjModel.eq_active` with `mjData.eq_active`.
>
> 14. Changed the default of [`autolimits`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#compiler-autolimits) from "false" to "true". This is a minor breaking change. The potential breakage applies to models which have elements with "range" defined and "limited" not set. Such models cannot be loaded since version 2.2.2 (July 2022).

15. Added a new [`dyntype`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#actuator-general-dyntype), `filterexact`, which updates first-order filter states with the exact formula rather than with Euler integration.

16. Added an actuator attribute, [`actearly`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#actuator-general-actearly), which uses semi-implicit integration for actuator forces: using the next step's actuator state to compute the current actuator forces.

17. Renamed `actuatorforcerange` and `actuatorforcelimited`, introduced in the previous version to [`actuatorfrcrange`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-joint-actuatorfrcrange) and [`actuatorfrclimited`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-joint-actuatorfrclimited), respectively.

18. Added the flag [`eulerdamp`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-flag-eulerdamp), which disables implicit integration of joint damping in the Euler integrator. See the [Numerical Integration](https://mujoco.readthedocs.io/en/3.0.0/computation/index.html#geintegration) section for more details.

19. Added the flag [`invdiscrete`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-flag-invdiscrete), which enables discrete-time inverse dynamics for all [integrators](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-integrator) other than `RK4`. See the flag documentation for more details.

20. Added [`ls_iterations`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-ls-iterations) and [`ls_tolerance`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#option-ls-tolerance) options for adjusting linesearch stopping criteria in CG and Newton solvers. These can be useful for performance tuning.

21. Added `mesh_pos` and `mesh_quat` fields to [`mjModel`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjmodel) to store the normalizing transformation applied to mesh assets. Fixes 409.

22. Added camera [`resolution`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-resolution) attribute and [`camprojection`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#sensor-camprojection) sensor. If camera resolution is set to positive values, the camera projection sensor will report the location of a target site, projected onto the camera image, in pixel coordinates.

23. Added [`camera`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera) calibration attributes:

- The new attributes are [`resolution`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-resolution), [`focal`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-focal), [`focalpixel`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-focalpixel), [`principal`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-principal), [`principalpixel`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-principalpixel) and [`sensorsize`](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-camera-sensorsize).
- Visualize the calibrated frustum using the [`mjVIS_CAMERA`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjtvisflag) visualization flag when these attributes are specified. See the following [example model](https://github.com/deepmind/mujoco/blob/main/test/engine/testdata/vis_visualize/frustum.xml).
- Note that these attributes only take effect for offline rendering and do not affect interactive visualisation.

24. Implemented reversed Z rendering for better depth precision. An enum [`mjtDepthMap`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjtdepthmap) was added with values `mjDEPTH_ZERONEAR` and `mjDEPTH_ZEROFAR`, which can be used to set the new `readDepthMap` attribute in [`mjrContext`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APItypes.html#mjrcontext) to control how the depth returned by [`mjr_readPixels`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mjr-readpixels) is mapped from `znear` to `zfar`. Contribution 978 by aftersomemath.

25. Deleted the code sample `testxml`. The functionality provided by this utility is implemented in the [WriteReadCompare](https://github.com/google-deepmind/mujoco/blob/main/test/xml/xml_native_writer_test.cc) test.

26. Deleted the code sample `derivative`. Functionality provided by [`mjd_transitionFD`](https://mujoco.readthedocs.io/en/3.0.0/APIreference/APIfunctions.html#mjd-transitionfd).

Python bindings

27. Fixed 870 where calling `update_scene` with an invalid camera name used the default camera.
28. Added `user_scn` to the [passive viewer](https://mujoco.readthedocs.io/en/3.0.0/python.html#pyviewerpassive) handle, which allows users to add custom visualization geoms (1023).
29. Added optional boolean keyword arguments `show_left_ui` and `show_right_ui` to the functions `viewer.launch` and `viewer.launch_passive`, which allow users to launch a viewer with UI panels hidden.

Simulate

30. Added **state history** mechanism to [`simulate`](https://mujoco.readthedocs.io/en/3.0.0/programming/samples.html#sasimulate) and the managed [Python viewer](https://mujoco.readthedocs.io/en/3.0.0/python.html#pyviewermanaged). State history can be viewed by scrubbing the History slider and (more precisely) with the left and right arrow keys.

31. The `LOADING...` label is now shown correctly. Contribution 1070 by aftersomemath.

Documentation

32. Added [detailed documentation](https://mujoco.readthedocs.io/en/3.0.0/computation/fluid.html) of fluid force modeling, and an illustrative example model showing [tumbling cards](https://github.com/google-deepmind/mujoco/blob/main/model/cards/cards.xml) using the ellipsoid-based fluid model.

Bug fixes

33. Fixed a bug that was causing [geom margin](https://mujoco.readthedocs.io/en/3.0.0/XMLreference.html#body-geom-margin) to be ignored during the construction of midphase collision trees.

34. Fixed a bug that was generating incorrect values in `efc_diagApprox` for weld equality constraints.

2.3.7

General
1. Added primitive collider for sphere-cylinder contacts, previously this pair used the generic convex-convex collider.
2. Added [`joint-actuatorforcerange`](https://mujoco.readthedocs.io/en/2.3.7/XMLreference.html#body-joint-actuatorforcerange) for clamping total actuator force at joints and [`sensor-jointactuatorfrc<sensor-jointactuatorfrc>`](https://mujoco.readthedocs.io/en/2.3.7/XMLreference.html#sensor-jointactuatorfrc) for measuring total actuation force applied at a joint. The most important use case for joint-level actuator force clamping is to ensure that [Cartesian actuator](https://mujoco.readthedocs.io/en/2.3.7/XMLreference.html#actuator-general-refsite) forces are realizable by individual motors at the joints. See [Actuator force clamping](https://mujoco.readthedocs.io/en/latest/modeling.html#cforcerange) for details.
3. Added an optional `content_type` attribute to `hfield`, `texture`, and `mesh` assets. This attribute supports a formatted [Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml) (previously known as MIME type) string used to determine the type of the asset file without resorting to pulling the type from the file extension.
4. Added analytic derivatives for quaternion [subtraction](https://mujoco.readthedocs.io/en/2.3.7/APIreference/APIfunctions.html#mjd-subquat) and [integration](https://mujoco.readthedocs.io/en/latest/APIreference/APIfunctions.html#mjd-quatintegrate) (rotation with an angular velocity). Derivatives are in the 3D tangent space.
5. Added [`mjv_connector`](https://mujoco.readthedocs.io/en/2.3.7/APIreference/APIfunctions.html#mjv-connector) which has identical functionality to [`mjv_makeConnector`](https://mujoco.readthedocs.io/en/2.3.7/APIreference/APIfunctions.html#mjv-makeconnector), but with more convenient "from-to" argument parametrization. `mjv_makeConnector` is now deprecated.
6. Bumped oldest supported MacOS from version 10.12 to 11. MacOS 11 is the oldest version still maintained by Apple.

Python bindings
7. The [passive viewer](https://mujoco.readthedocs.io/en/2.3.7/python.html#pyviewerpassive) handle now exposes `update_hfield`, `update_mesh`, and `update_texture` methods to allow users to update renderable assets. (812 , 958, 965)
8. Allow a custom keyboard event callback to be specified in the [passive viewer](https://mujoco.readthedocs.io/en/2.3.7/python.html#pyviewerpassive). (766)
9. Fix GLFW crash when Python exits while the passive viewer is running. (790)

Models
10. Added simple [car](https://github.com/deepmind/mujoco/blob/2.3.7/model/car/car.xml) example model.

2.3.6

> **NOTE:** MuJoCo 2.3.6 is the last version to officially support Python 3.7.

Models
1. Added [3x3x3 cube](https://github.com/deepmind/mujoco/blob/main/model/cube/cube_3x3x3.xml) example model. See [README](https://github.com/deepmind/mujoco/blob/0945af7b8a8cb504e308b29fdb3c55048350a365/model/cube/README.md) for details.

Bug fixes
2. Fixed a bug that was causing an incorrect computation of the mesh bounding box and coordinate frame if the volume was invalid. In such case, now MuJoCo only accepts a non-watertight geometry if [`shellinertia`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#body-geom-shellinertia) is equal to `true`.
3. Fixed the sparse Jacobian multiplication logic that is used to compute derivatives for tendon damping and fluid force, which affects the behaviour of the [implicit and implicitfast integrators](https://mujoco.readthedocs.io/en/2.3.6/computation.html#geintegration).
4. Fixes to [`mj_ray`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mj-ray), in line with geom visualisation conventions:
- Planes and height-fields respect the `geom_group` and `flg_static` arguments. Before this change, rays would intersect planes and height-fields unconditionally.
- `flg_static` now applies to all static geoms, not just those which are direct children of the world body.

Plugins
5. Added touch-grid sensor plugin. See [documentation](https://github.com/deepmind/mujoco/blob/0945af7b8a8cb504e308b29fdb3c55048350a365/plugin/sensor/README.md) for details, and associated [touch_grid.xml](https://github.com/deepmind/mujoco/blob/0945af7b8a8cb504e308b29fdb3c55048350a365/model/plugin/touch_grid.xml) example model. The plugin includes [in-scene visualisation](https://youtu.be/0LOJ3WMnqeA).
6. Added Visualization tab to simulate UI, corresponding to elements of the [`visual`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#visual) MJCF element. After modifying values in the GUI, a saved XML will contain the new values. The modifiable members of [`mjStatistic`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APItypes.html#mjstatistic) ([`extent`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#statistic-extent), [`meansize`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#statistic-meansize) and [`center`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#statistic-center)) are computed by the compiler and therefore do not have defaults. In order for these attributes to appear in the saved XML, a value must be specified in the loaded XML.
7. Increased text width for UI elements in the default spacing.

General
8. Added [`mj_getState`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mj-getstate) and [`mj_setState`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mj-setstate) for getting and setting the simulation state as a concatenated vector of floating point numbers. See the [State](https://mujoco.readthedocs.io/en/2.3.6/computation.html#gestate) section for details.
9. Added [`mjContact.solreffriction`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APItypes.html#mjcontact), allowing different [`solref`](https://mujoco.readthedocs.io/en/2.3.6/modeling.html#csolver) parameters for the normal and frictional axes of contacts when using [elliptic friction cones](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#option-cone). This attribute is required for elastic frictional collisions, see associated [example model](https://github.com/deepmind/mujoco/blob/0945af7b8a8cb504e308b29fdb3c55048350a365/test/engine/testdata/spin_recoil.xml) mimicking the spin-bounce recoil behaviour of [elastic rubber balls](https://www.youtube.com/watch?v=uFLJcRegIVQ&t=3s). This is an advanced option currently only supported by explicit [contact pairs](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#contact-pair), using the [`solreffriction`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#contact-pair-solreffriction) attribute.
10. Added [`mjd_inverseFD`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mjd-inversefd) for finite-differenced inverse-dynamics derivatives.
11. Added functions for operations on banded-then-dense “arrowhead” matrices. Such matrices are common when doing direct trajectory optimization. See [`mju_cholFactorBand`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mju-cholfactorband) documentation for details.
12. Added [`mj_multiRay`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mj-multiray) function for intersecting multiple rays emanating from a single point. This is significantly faster than calling [`mj_ray`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mj-ray) multiple times.
13. Ray-mesh collisions are now up to 10x faster, using a bounding volume hierarchy of mesh faces.
14. Increased `mjMAXUIITEM` (maximum number of UI elements per section in Simulate) to 100.
15. Added [documentation](https://mujoco.readthedocs.io/en/2.3.6/programming/extension.html#exprovider) for resource providers.
16. Changed the formula for [`mju_sigmoid`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mju-sigmoid), a finite-support sigmoid $s: \mathbf{R} \rightarrow [0, 1]$. Previously, the smooth part consisted of two stitched quadratics, once continuously differentiable. It is now a single quintic, twice continuously differentiable:

$$
s(x) =
\begin{cases}
0, & & x \le 0 \\
6x^5 - 15x^4 + 10x^3, & 0 \lt & x \lt 1 \\
1, & 1 \le & x \qquad
\end{cases}
$$

17. Added optional [`tausmooth`](https://mujoco.readthedocs.io/en/2.3.6/XMLreference.html#actuator-muscle-tausmooth) attribute to muscle actuators. When positive, the time-constant $\tau$ of muscle activation/deactivation uses [`mju_sigmoid`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mju-sigmoid) to transition smoothly between the two extremal values given by the [Millard et al. (2013)](https://doi.org/10.1115/1.4023390) muscle model, within a range of width `tausmooth`. See [Muscle actuators](https://mujoco.readthedocs.io/en/2.3.6/modeling.html#cmuscle) for more details. Relatedly, [`mju_muscleDynamics`](https://mujoco.readthedocs.io/en/2.3.6/APIreference/APIfunctions.html#mju-muscledynamics) now takes 3 parameters instead of 2, adding the new smoothing-width parameter.
18. Moved public C macro definitions out of mujoco.h into a new public header file called [mjmacro.h](https://github.com/deepmind/mujoco/blob/0945af7b8a8cb504e308b29fdb3c55048350a365/include/mujoco/mjmacro.h). The new file is included by mujoco.h so this change does not break existing user code.
19. Added instrumentation for the [Address Sanitizer (ASAN)](https://clang.llvm.org/docs/AddressSanitizer.html) and [Memory Sanitizer (MSAN)](https://clang.llvm.org/docs/MemorySanitizer.html) to detect memory bugs when allocating from the mjData stack and arena.
20. Removed `pstack` and `parena` from the output of `mj_printData`, since these are implementation details of the `mjData` allocators that are affected by diagnostic paddings in instrumented builds.
21. Removed the `mj_activate` and `mj_deactivate` functions. These had been kept around for compatibility with old user code from when MuJoCo was closed source, but have been no-op functions since open sourcing.

2.3.5

Bug fixes

1. Fix asset loading bug that prevented OBJ and PNG files from being read from disk when [`mjVFS`](https://mujoco.readthedocs.io/en/2.3.5/APIreference/APItypes.html#mjvfs) is used.

2. Fix occasional segmentation faults on macOS when mouse perturbations are applied in the Python passive viewer.

Plugins

3. The visualize callback in [`mjpPlugin`](https://mujoco.readthedocs.io/en/2.3.5/APIreference/APItypes.html#mjpplugin) now receives an [`mjvOption`](https://mujoco.readthedocs.io/en/2.3.5/APIreference/APItypes.html#mjvoption) as an input argument.

2.3.4

24 April 2023: 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](https://github.com/deepmind/mujoco/releases/tag/2.3.5) instead.

General

1. Removed the "global" setting of the [compiler/coordinate](https://mujoco.readthedocs.io/en/2.3.4/XMLreference.html#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.
2. Added [`visual-global`](https://mujoco.readthedocs.io/en/2.3.4/XMLreference.html#visual-global) flag [`ellipsoidinertia`](https://mujoco.readthedocs.io/en/2.3.4/XMLreference.html#visual-global-ellipsoidinertia) to visualize equivalent body inertias with ellipsoids instead of the default boxes.
3. Added midphase and broadphase collision statistics to [`mjData`](https://mujoco.readthedocs.io/en/2.3.4/APIreference/APItypes.html#mjdata).
4. Added documentation for [engine plugins](https://mujoco.readthedocs.io/en/2.3.4/programming/extension.html#explugin).
5. Added struct information to the ``introspect`` module.
6. Added a new extension mechanism called "resource provider" . This extensible mechanism allows MuJoCo to read assets from data sources other than the local OS filesystem or the [Virtual file system](https://mujoco.readthedocs.io/en/2.3.4/APIreference/APIfunctions.html#virtualfilesystem).

Python bindings

7. 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.
8. 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](https://github.com/deepmind/mujoco/issues/783) or [segmentation fault](https://github.com/deepmind/mujoco/issues/790).
9. 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](https://mujoco.readthedocs.io/en/stable/python.html#pyviewer) for details.
10. The `viewer.launch_repl` function has been removed since its functionality is superceded by `launch_passive`.
11. Added a small number of missing struct fields discovered through the new `introspect` metadata.

Bug fixes

12. Fixed bug in the handling of ellipsoid-based fluid model forces in the new implicitfast integrator.
13. Removed spurious whole-arena copying in `mj_copyData`, which can considerably slow down the copying operation (568).
14. Make `shellinertia` ignore `exactmeshinertia`, which is only used for legacy volume computations (759).

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.