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.
General
^^^^^^^
.. admonition:: Breaking API changes
:class: attention
Removed the ability to natively add noise to sensors. Note that the mjModel.sensor_noise field and
:ref:corresponding attribute<CSensor> 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.
Added the :ref:actuatorgravcomp<body-joint-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 <https://github.com/google-deepmind/mujoco/blob/main/test/engine/testdata/actuation/refsite.xml>__,
which demostrates Cartesian actuation of an arm, has been updated to use this attribute.
Added support for gmsh format 2.2, as generated by e.g. fTetwild <https://github.com/wildmeshing/fTetWild>__.
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<option-flag-invdiscrete> or the (now removed) sensornoise flags would actually toggle the
other flag.
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.4.
Release notes
Sourced from mujoco's releases.
... (truncated)
Changelog
Sourced from mujoco's changelog.
... (truncated)
Commits
6d1f0a3
Fix rendering bug in changelog32fa617
Update the MuJoCo changelog for the 3.1.4 release5a36560
Addmju_euler2Quat
.2b3f336
Add ellipsoid sdf collisions to MJX.725630c
Add insertion task.b441923
Add userdata support to MJX.bb4389e
Update MuJoCo changelog.rst for the v3.1.4 release930d7b0
Update MuJoCo Cmake dependency on PyBind11 to the latest release3660417
Add note about segmentation images tooffsamples
documentation.feccf7e
Documentmj_fwdPosition
in pipeline docs, fix ordering error.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