2.3.3
General
-
Improvements to implicit integration:
- The derivatives of the RNE algorithm are now computed using sparse math, leading to significant speed improvements for large models when using the implicit integrator.
- A new integrator called
implicitfast
was added. It is similar to the existing implicit integrator, but skips the derivatives of Coriolis and centripetal forces. See the numerical integration section for a detailed motivation and discussion. The implicitfast integrator is recommended for all new models and will become the default integrator in a future version.
The table below shows the compute cost of the 627-DoF humanoid100 model using different integrators. "implicit (old)" uses dense RNE derivatives, "implicit (new)" is after the sparsification mentioned above. Timings were measured on a single core of an AMD 3995WX CPU.
timing | Euler | implicitfast | implicit (new) | implicit (old) |
---|---|---|---|---|
one step (ms) | 0.5 | 0.53 | 0.77 | 5.0 |
steps/second | 2000 | 1900 | 1300 | 200 |
- Added a collision mid-phase for pruning geoms in body pairs, see documentation for more details.
This is based on static AABB bounding volume hierarchy (a BVH binary tree) in the body inertial frame. The GIF on the right is cut from this longer video. - The
mjd_transitionFD
function no longer triggers sensor calculation unless explicitly requested. - Corrected the spelling of the
inteval
attribute tointerval
in the mjLROpt struct. - Mesh texture and normal mappings are now 3-per-triangle rather than 1-per-vertex. Mesh vertices are no longer duplicated in order to circumvent this limitation as they previously were.
- The non-zeros for the sparse constraint Jacobian matrix are now precounted and used for matrix memory allocation.
For instance, the constraint Jacobian matrix from the humanoid100 model, which previously required ~500,000mjtNum
s, now only requires ~6000. Very large models can now load and run with the CG solver. - Modified
mju_error
andmju_warning
to be variadic functions (support for printf-like arguments). The functionsmju_error_i
,mju_error_s
,mju_warning_i
, andmju_warning_s
are now deprecated. - Implemented a performant
mju_sqrMatTDSparse
function that doesn't require dense memory allocation. - Added
mj_stackAllocInt
to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
Python bindings
- Fixed IPython history corruption when using
viewer.launch_repl
. Thelaunch_repl
function now provides seamless continuation of an IPython interactive shell session, and is no longer considered experimental feature. - Added
viewer.launch_passive
which launches the interactive viewer in a passive, non-blocking mode. Calls tolaunch_passive
return immediately, allowing user code to continue execution, with the viewer automatically reflecting any changes to the physics state. (Note that this functionality is currently in experimental/beta stage, and is not yet described in our viewer documentation.) - Added the
mjpython
launcher for macOS, which is required forviewer.launch_passive
to function there. - Removed
efc_
fields from joint indexers. Since the introduction of arena memory, these fields now have dynamic sizes that change between time steps depending on the number of active constraints, breaking strict correspondence between joints andefc_
rows. - Added a number of missing fields to the bindings of
mjVisual
andmjvPerturb
structs.
Simulate
-
Implemented a workaround for broken VSync on macOS so that the frame rate is correctly capped when the Vertical Sync toggle is enabled.
-
Added optional labels to contact visualization, indicating which two geoms are contacting (names if defined, ids otherwise). This can be useful in cluttered scenes.