========= Changelog ========= Upcoming version (not yet released) ----------------------------------- General ^^^^^^^ 1. Improved the :ref:`discardvisual` compiler flag, which now discards all visual-only assets. See :ref:`discardvisual` for details. 2. Removed the :ref:`timer` for midphase colllision detection, it is now folded in with the narrowphase timer. This is because timing the two phases seperately required fine-grained timers inside the collision functions; these functions are so small and fast that the timer itself was incurring a measurable cost. 3. Added the flag :ref:`bvactive` to ``visual/global``, allowing users to turn off visualisation of active bounding volumes (the red/green boxes in this :ref:`this changelog item`). For models with very high-resolution meshes, the computation required for this visualization can slow down simulation speed. Fixes :github:issue:`1279`. - Added color of :ref:`bounding volumes` and :ref:`active bounding volumes` to :ref:`visual/rgba`. 4. Height-field elevation data can now be specified directly in XML with the :ref:`elevation` attribute (and not only with PNG files). See `example model `__. MJX ^^^ 5. Added :ref:`dyntype` ``filterexact``. 6. Added :at:`site` transmission. 7. Updated MJX colab tutorial with more stable quadruped environment. 8. Added ``mjx.ray`` which mirrors :ref:`mj_ray` for planes, spheres, capsules, boxes, and meshes. 9. Added ``mjx.is_sparse`` which mirrors :ref:`mj_isSparse` and ``mjx.full_m`` which mirrors :ref:`mj_fullM`. 10. Added support for specifying sparse or dense mass matrices via :ref:`option-jacobian`. 11. Raise a not implemented error when nonzero frictionloss is present. Fixes :github:issue:`1344`. Python bindings ^^^^^^^^^^^^^^^ 11. Improved the implmentation of the :ref:`rollout` module. Note the changes below are breaking, dependent code will require modification. - Uses :ref:`mjSTATE_FULLPHYSICS` as state spec, enabling divergence detection by inspecting time. - Allows user-defined control spec for any combination of :ref:`user input` fields as controls. - Outputs are no longer squeezed and always have dim=3. Bug fixes ^^^^^^^^^ 12. Fixed a bug that prevented the use of pins with plugins if flexes are not in the worldbody. Fixes :github:issue:`1270`. 13. Fixed a bug in the :ref:`muscle model` that led to non-zero values outside the lower bound of the length range. Fixes :github:issue:`1342`. Version 3.1.1 (December 18, 2023) ----------------------------------- Bug fixes ^^^^^^^^^ 1. Fixed a bug (introduced in 3.1.0) where box-box collisions produced no contacts if one box was deeply embedded in the other. 2. Fixed a bug in :ref:`simulate` where the "LOADING..." message was not showing correctly. 3. Fixed a crash in the Python :ref:`passive viewer`, when used with models containing Flex objects. 4. Fixed a bug in MJX where ``site_xmat`` was ignored in ``get_data`` and ``put_data`` 5. Fixed a bug in MJX where ``efc_address`` was sometimes incorrectly calculated in ``get_data``. Version 3.1.0 (December 12, 2023) --------------------------------- General ^^^^^^^ 1. Improved convergence of Signed Distance Function (SDF) collisions by using line search and a new objective function for the optimization. This allows to decrease the number of initial points needed for finding the contacts and is more robust for very small or large geom sizes. 2. Added :ref:`frame` to MJCF, a :ref:`meta-element` which defines a pure coordinate transformation on its direct children, without requiring a :ref:`body`. 3. Added the :at:`kv` attribute to the :ref:`position` and :ref:`intvelocity` actuators, for specifying actuator-applied damping. This can be used to implement a PD controller with 0 reference velocity. When using this attribute, it is recommended to use the implicitfast or implicit :ref:`integrators`. Plugins ^^^^^^^ 4. Allow actuator plugins to use activation variables in ``mjData.act`` as their internal state, rather than ``mjData.plugin_state``. Actuator plugins can now specify :ref:`callbacks` that compute activation variables, and they can be used with built-in :ref:`dyntype` actuator dynamics. 5. Added the `pid `__ actuator plugin, a configurable PID controller that implements the Integral term, which is not available with native MuJoCo actuators. MJX ^^^ 6. Added ``site_xpos`` and ``site_xmat`` to MJX. 7. Added ``put_data``, ``put_model``, ``get_data`` to replace ``device_put`` and ``device_get_into``, which will be deprecated. These new functions correctly translate fields that are the result of intermediate calculations such as ``efc_J``. Bug fixes ^^^^^^^^^ 8. Fix bug in Cartesian actuation with movable refsite, as when using body-centric Cartesian actuators on a quadruped. Before this fix such actuators could lead to non-conservation of momentum. 9. Fix bug that prevented using flex with :ref:`simulate`. 10. Fix bug that prevented the use of elasticity plugins in combination with pinned flex vertices. 11. Release Python wheels targeting macOS 10.16 to support x86_64 systems where ``SYSTEM_VERSION_COMPAT`` is set. The minimum supported version is still 11.0, but we release these wheels to fix compatibility for those users. See :github:issue:`1213`. Version 3.0.1 (November 15, 2023) --------------------------------- General ^^^^^^^ 1. Added sub-terms of total passive forces in ``mjData.qfrc_passive`` to :ref:`mjData`: ``qfrc_{spring, damper, gravcomp, fluid}``. The sum of these vectors equals ``qfrc_passive``. .. youtube:: H9qG9Zf2W44 :align: right :width: 240px 2. Added :ref:`actuatorgroupdisable` attribute and associated :ref:`mjOption.disableactuator` integer bitfield, which can be used to disable sets of actuators at runtime according to their :ref:`group`. Fixes :github:issue:`1092`. See :ref:`CActDisable`. - The first 6 actuator groups are toggleable in the :ref:`simulate` viewer. See `example model `__ and associated screen-capture on the right. 3. Increased ``mjMAXUIITEM`` (maximum number of UI elements per section in Simulate) to 200. MJX ^^^ 4. Added support for Newton solver (``mjSOL_NEWTON`` in :ref:`mjtSolver`). The Newton solver significantly speeds up simulation on GPU: .. list-table:: Steps-per-second, Conjugate Gradient vs. Newton on A100 :header-rows: 1 :align: left * - Model - CG - Newton - Speedup * - `Humanoid `__ - 640,000 - 1,020,000 - **1.6 x** * - `Barkour v0 `__ - 1,290,000 - 1,750,000 - **1.35 x** * - `Shadow Hand `__ - 215,000 - 270,000 - **1.25 x** Humanoid is the standard MuJoCo humanoid, `Google Barkour `__ and the Shadow Hand are both available in the :ref:`MuJoCo Menagerie`. 5. Added support for joint equality constraints (``mjEQ_JOINT`` in :ref:`mjtEq`). 6. Fixed bug where mixed ``jnt_limited`` joints were not being constrained correctly. 7. Made ``device_put`` type validation more verbose (fixes :github:issue:`1113`). 8. Removed empty EFC rows from ``MJX``, for joints with no limits (fixes :github:issue:`1117`). 9. Fixed bug in ``scan.body_tree`` that led to incorrect smooth dynamics for some kinematic tree layouts. Python bindings ^^^^^^^^^^^^^^^ 10. Fix the macOS ``mjpython`` launcher to work with the Python interpreter from Apple Command Line Tools. 11. Fixed a crash when copying instances of ``mujoco.MjData`` for models that use plugins. Introduced a ``model`` attribute to ``MjData`` which is reference to the model that was used to create that ``MjData`` instance. Simulate ^^^^^^^^ 12. :ref:`simulate`: correct handling of "Pause update", "Fullscreen" and "VSync" buttons. Documentation ^^^^^^^^^^^^^ .. youtube:: cE3s_IfO4g4 :align: right :width: 240px 13. Added cell to the `tutorial colab `__ providing an example of procedural camera control: 14. Added documentation for the :ref:`UI` framework. 15. Fixed typos and supported fields in docs (fixes :github:issue:`1105` and :github:issue:`1106`). Bug fixes ^^^^^^^^^ 16. Fixed bug relating to welds modified with :ref:`torquescale`. Version 3.0.0 (October 18, 2023) -------------------------------- New features ^^^^^^^^^^^^ 1. Added simulation on GPU and TPU via the new :doc:`mjx` (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: |colab| - The MJX API is compatible with MuJoCo but is missing some features in this release. See the outline of :ref:`MJX feature parity ` for more details. .. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb .. youtube:: QewlEqIZi1o :align: right :width: 240px 2. 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 :ref:`documentation` for more details. .. youtube:: ra2bTiZHGlw :align: right :width: 240px 3. 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 :ref:`deformable` section contains the low-level flex definition. The :ref:`flexcomp` element, similar to :ref:`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 :ref:`deformable` and :ref:`composite`, and both are modifiable by the first-party `elasticity plugins `__. We expect some of this functionality to be unified in the future. .. youtube:: Vc1tq0fFvQA :align: right :width: 240px 4. Added constraint island discovery with :ref:`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 :ref:`CG`. Island discovery can be activated using a new :ref:`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). 5. Added :ref:`mjThreadPool` and :ref:`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 :ref:`enabled` and the :ref:`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 :ref:`testspeed` utility, exposed with the ``npoolthread`` flag. 6. Added capability to initialize :ref:`composite` particles from OBJ files. Fixes :github:issue:`642` and :github:issue:`674`. General ^^^^^^^ .. admonition:: Breaking API changes :class: attention 7. Removed the macros ``mjMARKSTACK`` and ``mjFREESTACK``. **Migration:** These macros have been replaced by new functions :ref:`mj_markStack` and :ref:`mj_freeStack`. These functions manage the :ref:`mjData stack` in a fully encapsulated way (i.e., without introducing a local variable at the call site). 8. Renamed ``mj_stackAlloc`` to :ref:`mj_stackAllocNum`. The new function :ref:`mj_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 via :ref:`mj_stackAllocNum`. 9. Renamed the ``nstack`` field in :ref:`mjModel` and :ref:`mjData` to ``narena``. Changed ``narena``, ``pstack``, and ``maxuse_stack`` to count number of bytes rather than number of :ref:`mjtNum` |-| s. 10. Changed :ref:`mjData.solver`, the array used to collect solver diagnostic information. This array of :ref:`mjSolverStat` structs is now of length ``mjNISLAND * mjNSOLVER``, interpreted as as a matrix. Each row of length ``mjNSOLVER`` contains separate solver statistics for each constraint island. If the solver does not use islands, only row 0 is filled. - The new constant :ref:`mjNISLAND` was set to 20. - :ref:`mjNSOLVER` was reduced from 1000 to 200. - Added :ref:`mjData.solver_nisland`: the number of islands for which the solver ran. - Renamed ``mjData.solver_iter`` to ``solver_niter``. Both this member and ``mjData.solver_nnz`` are now integer vectors of length ``mjNISLAND``. 11. Removed ``mjOption.collision`` and the associated ``option/collision`` attribute. **Migration:** - For models which have ``