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 and 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 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.
.. youtube:: 5k0_wsIRAFc
:align: right
:width: 240px
Added the :ref:replicate<replicate> to MJCF, a :ref:meta-element<meta-element> which permits to repeat a subtree
with incremental translational and rotational offsets.
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.
Added mjModel.mesh_scale: the scaling applied to asset vertices, as specified in the
:ref:scale<asset-mesh-scale> attribute.
Added visual properties which are ignored by the native renderer, but can be used by external renderers:
:ref:light/bulbradius<body-light-bulbradius> attribute and corresponding mjModel.light_bulbradius field.
:ref:material/metallic<asset-material-metallic> attribute and corresponding mjModel.material_metallic field.
:ref:material/roughness<asset-material-roughness> attribute and corresponding mjModel.material_roughness
field.
The type of the size argument of :ref:mj_stackAllocNum and :ref:mj_stackAllocInt was changed from int
to size_t.
Added support for gmsh format version 2.2 surface meshes in :ref:flexcomp<body-flexcomp-file>.
MJX
^^^
.. admonition:: Breaking API changes
:class: attention
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.
Added cylinder plane collisions.
Added efc_type to mjx.Data and dim, efc_address to mjx.Contact.
Added geom to mjx.Contact and marked geom1, geom2 deprecated.
Added ne, nf, nl, nefc, and ncon to mjx.Data to match mujoco.MjData.
Given the above added fields, removed mjx.get_params, mjx.ncon, and mjx.count_constraints.
Changed the way meshes are organized on device to speed up collision detection when a mesh is replicated for many
geoms.
Fixed a bug where capsules might be ignored in broadphase colliision checking.
Added cylinder collisions using SDFs.
Added support for all :ref:condim <coContact>: 1, 3, 4, 6.
Add support functions for id2name and name2id, MJX versions of :ref:mj_id2name and :ref:mj_name2id.
Added support for :ref:gravcomp<body-gravcomp> and :ref:actuatorgravcomp<body-joint-actuatorgravcomp>.
Fixed a bug in mjx.ray for sometimes allowed negative distances for ray-mesh tests.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps mujoco from 2.3.7 to 3.1.5.
Release notes
Sourced from mujoco's releases.
... (truncated)
Changelog
Sourced from mujoco's changelog.
... (truncated)
Commits
e001975
Update changelog for MuJoCo 3.1.5efbcd86
Update abseil to LTS 20240116.2.24bc1c8
Add new differentiable physics tutorial to readme.8d89652
Replace.copy()
withlist()
inminimize.py
4647f79
Update MarchingCubeCpp to version f03a1b3ec29b1d7d865691ca8aea4f1eb2c2873d.dbb258e
Fix compile-timesize_t
narrowing tobool
.ad04596
Enable compiler asset cache for public use, and add changelog entry.a40de1b
Move notebook copyright notice into HTML comment.34e537e
Updates tominimize.least_squares
. Fixes #158593b57c1
Update Python documentation.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show