2.3.1
Python bindings
- The
simulate
GUI is now available through themujoco
Python package asmujoco.viewer
. See documentation for details. (Contribution by Levi Burner.) - The
Renderer
class from the MuJoCo tutorial Colab is now available directly in the native Python bindings.
General
-
The tendon
springlength
attribute can now take two values. Given two non-decreasing values,springlength
specifies a deadband range for spring stiffness. If the tendon length is between the two values, the force is 0. If length is outside this range, the force behaves like a regular spring, with the spring resting length corresponding to the nearestspringlength
value. This can be used to create tendons whose limits are enforced by springs rather than constraints, which are cheaper and easier to analyse. See tendon_springlength.xml example model. This is a minor breaking API change.mjModel.tendon_lengthspring
now has sizentendon x 2
rather thanntendon x 1
. -
Removed the requirement that stateless actuators come before stateful actuators.
-
Added mju_fill, mju_symmetrize and mju_eye utility functions.
-
Added
gravcomp
attribute to body implementing gravity compensation and buoyancy. See balloons.xml example model. -
Renamed the
cable
plugin library toelasticity
. -
Added
actdim
attribute to general actuators. Values greater than 1 are only allowed foruser
, as native activation dynamics are all scalar. Added example test implementing 2nd-order activation dynamics to engine_forward_test.cc. -
Improved particle composite type, which now permits a user-specified geometry and multiple joints. See the two new examples: particle_free.xml and particle_free2d.xml.
-
Performance improvements for non-AVX configurations:
- 14% faster
mj_solveLD
using restrict. See engine_core_smooth_benchmark_test. - 50% faster
mju_dotSparse
using manual loop unroll. See engine_util_sparse_benchmark_test.
- 14% faster
-
Added new
solid
passive force plugin.- This is new force field compatible with the composite particles.
- Generates a tetrahedral mesh having particles with mass concentrated at vertices.
- Uses a piecewise-constant strain model equivalent to finite elements but expressed in a coordinate-free
formulation. This implies that all quantities can be precomputed except edge elongation, as in a mass-spring model. - Only suitable for small strains (large displacements but small deformations). Tetrahedra may invert if subject to
large loads.
-
Added API functions mj_loadPluginLibrary and mj_loadAllPluginLibraries. The first function is identical to
dlopen
on a POSIX system, and toLoadLibraryA
on Windows. The second function scans a specified directory for all dynamic libraries file and loads each library found. Dynamic libraries opened by these functions are assumed to register one or more MuJoCo plugins on load. -
Added an optional
visualize
callback to plugins, which is called duringmjv_updateScene
. This callback allows custom plugin visualizations. Enable stress visualization for the Cable plugin as an example. -
Sensors of type user no longer require
objtype
,objname
andneedstage
. If unspecified, the objtype is now mjOBJ_UNKNOWN.user
sensorsdatatype
default is nowreal
,needstage
default is nowacc
. -
Added support for capsules in URDF import.
-
On macOS, issue an informative error message when run under Rosetta 2 translation on an Apple Silicon machine. Pre-built MuJoCo binaries make use of AVX instructions on x86-64 machines, which is not supported by Rosetta 2. (Before this version, users only get a cryptic "Illegal instruction" message.)
Bug fixes
- Fixed bug in
mj_addFileVFS
that was causing the file path to be ignored (introduced in 2.1.4).
Simulate
- Renamed the directory in which the
simulate
application searches for plugins fromplugin
tomujoco_plugin
. - Mouse force perturbations are now applied at the selection point rather than the body center of mass.
Python bindings 2.3.1.post1
(6 December 2022)
- Fix type annotations in
mujoco.viewer
that were causing errors in Python 3.7 and 3.8.