Releases: google-deepmind/mujoco
3.1.6
3.1.5
3.1.4
3.1.3
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
New features
-
Added simulation on GPU and TPU via the new MuJoCo XLA (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:
- The MJX API is compatible with MuJoCo but is missing some features in this release. See the outline of MJX feature parity for more details.
-
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 for more details.
-
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 deformable section contains the low-level flex definition. The flexcomp element, similar to 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 deformable and composite, and both are modifiable by the first-party elasticity plugins. We expect some of this functionality to be unified in the future.
-
-
Added constraint island discovery with
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. Island discovery can be activated using a new 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). -
Added
mjThreadPool
andmjTask
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 and the 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 testspeed utility, exposed with the
npoolthread
flag. -
Added capability to initialize
composite
particles from OBJ files. Fixes #642 and #674.
General
Important
Breaking API changes
-
Removed the macros
mjMARKSTACK
andmjFREESTACK
.Migration: These macros have been replaced by new functions
mj_markStack
andmj_freeStack
. These functions manage themjData
stack in a fully encapsulated way (i.e., without introducing a local variable at the call site). -
Renamed
mj_stackAlloc
tomj_stackAllocNum
. The new functionmj_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 viamj_stackAllocNum
. -
Renamed the
nstack
field inmjModel
andmjData
tonarena
. Changednarena
,pstack
, andmaxuse_stack
to count number of bytes rather than number ofmjtNum
s. -
Changed
mjData.solver
, the array used to collect solver diagnostic information. This array ofmjSolverStat
structs is now of lengthmjNISLAND * mjNSOLVER
, interpreted as as a matrix. Each row of lengthmjNSOLVER
contains separate solver statistics for each constraint island. If the solver does not use islands, only row 0 is filled.- The new constant
mjNISLAND
was set to 20. mjNSOLVER
was reduced from 1000 to 200.- Added
mjData.solver_nisland
: the number of islands for which the solver ran. - Renamed
mjData.solver_iter
tosolver_niter
. Both this member andmjData.solver_nnz
are now integer vectors of lengthmjNISLAND
.
- The new constant
-
Removed
mjOption.collision
and the associatedoption/collision
attribute.Migration:
- For models which have
<option collision="all"/>
, delete the attribute. - For models which have
<option collision="dynamic"/>
, delete allpair
elements. - For models which have
<option collision="pair"/>
, disable all dynamic collisions (determined via contype/conaffinity) by first deleting allcontype
andconaffinity
attributes in the model and then setting them globally to0
using
<default> <geom contype="0" conaffinity="0"/> </default>
.
- For models which have
-
Removed the
rope
andcloth
composite objects.Migration: Users should use the
cable
andshell
elasticity plugins. -
Added
mjData.eq_active
user input variable, for enabling/disabling the state of equality constraints. RenamedmjModel.eq_active
tomjModel.eq_active0
, which now has the semantic of "initial value ofmjData.eq_active
". Fixes #876.Migration: Replace uses of
mjModel.eq_active
withmjData.eq_active
. -
Changed the default of
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).
-
Added a new
dyntype
,filterexact
, which updates first-order filter states with the exact formula rather than with Euler integration. -
Added an actuator attribute,
actearly
, which uses semi-implicit integration for actuator forces: using the next step's actuator state to compute the current actuator forces. -
Renamed
actuatorforcerange
andactuatorforcelimited
, introduced in the previous ve...
2.3.7
General
- Added primitive collider for sphere-cylinder contacts, previously this pair used the generic convex-convex collider.
- Added
joint-actuatorforcerange
for clamping total actuator force at joints andsensor-jointactuatorfrc<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 forces are realizable by individual motors at the joints. See Actuator force clamping for details. - Added an optional
content_type
attribute tohfield
,texture
, andmesh
assets. This attribute supports a formatted Media Type (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. - Added analytic derivatives for quaternion subtraction and integration (rotation with an angular velocity). Derivatives are in the 3D tangent space.
- Added
mjv_connector
which has identical functionality tomjv_makeConnector
, but with more convenient "from-to" argument parametrization.mjv_makeConnector
is now deprecated. - Bumped oldest supported MacOS from version 10.12 to 11. MacOS 11 is the oldest version still maintained by Apple.
Python bindings
- The passive viewer handle now exposes
update_hfield
,update_mesh
, andupdate_texture
methods to allow users to update renderable assets. (#812 , #958, #965) - Allow a custom keyboard event callback to be specified in the passive viewer. (#766)
- Fix GLFW crash when Python exits while the passive viewer is running. (#790)
Models
- Added simple car example model.