Skip to content

2.3.0

Compare
Choose a tag to compare
@saran-t saran-t released this 18 Oct 10:38
· 2202 commits to main since this release

General

  1. The contact array and arrays prefixed with efc_ in mjData were moved out of the buffer into a new arena memory space. These arrays are no longer allocated with fixed sizes when mjData is created. Instead, the exact memory requirement is determined during each call to mj_forward (specifically, in mj_collision and mj_makeConstraint) and the arrays are allocated from the arena space. The stack now also shares its available memory with arena. This change reduces the memory footprint of mjData in models that do not use the PGS solver, and will allow for significant memory reductions in the future. See the Memory allocation section for details.

  2. Added colab notebook tutorial showing how to balance the humanoid on one leg with a Linear Quadratic Regulator. The
    notebook uses MuJoCo's native Python bindings, and includes a draft Renderer class, for easy rendering in Python. Try it yourself: Open In Colab

  3. Updates to humanoid model:

    • Added two keyframes (stand-on-one-leg and squat).
    • Increased maximum hip flexion angle.
    • Added hamstring tendons which couple the hip and knee at high hip flexion angles.
    • General cosmetic improvements, including improved use of defaults and better naming scheme.
  4. Added mju_boxQP and allocation function mju_boxQPmalloc for solving the box-constrained Quadratic Program: $x^* = \text{argmin} ; \tfrac{1}{2} x^T H x + x^T g \quad \text{s.t.} \quad l \le x \le u$ The algorithm, introduced in Tassa et al. 2014, converges after 2-5 Cholesky factorisations, independent of problem size.

  5. Added mju_mulVecMatVec to multiply a square matrix $M$ with vectors $x$ and $y$ on both sides. The function returns $x^TMy$.

  6. Added new plugin API. Plugins allow developers to extend MuJoCo's capability without modifying core engine code. The plugin mechanism is intended to replace the existing callbacks, though these will remain for the time being as an option for simple use cases and backward compatibility. The new mechanism manages stateful plugins and supports multiple plugins from different sources, allowing MuJoCo extensions to be introduced in a modular fashion, rather than as global overrides. Note the new mechanism is currently undocumented except in code, as we test it internally. If you are interested in using the plugin mechanism, please get in touch first.

  7. Added assetdir compiler option, which sets the values of both meshdir and texturedir. Values in the latter attributes take precedence over assetdir.

  8. Added realtime option to visual for starting a simulation at a slower speed.

  9. Added new cable composite type:

    • Cable elements are connected with ball joints.
    • The initial parameter specifies the joint at the starting boundary: free, ball, or none.
    • The boundary bodies are exposed with the names B_left and B_right.
    • The vertex initial positions can be specified directly in the XML with the parameter vertex.
    • The orientation of the body frame is the orientation of the material frame of the curve.
  10. Added new cable passive force plugin:

    • Twist and bending stiffness can be set separately with the parameters twist and bend.
    • The stress-free configuration can be set to be the initial one or flat with the flag flat.
    • New cable.xml example showing the formation of plectoneme.
    • New coil.xml example showing a curved equilibrium configuration.
    • New belt.xml example showing interaction between twist and anisotropy.
    • Added test using cantilever exact solution.

Python bindings

  1. Added id and name properties to named accessor objects. These provide more Pythonic API access to mj_name2id and mj_id2name respectively.

  2. The length of MjData.contact is now ncon rather than nconmax, allowing it to be straightforwardly used as
    an iterator without needing to check ncon.

  3. Fix a memory leak when a Python callable is installed as callback (#527).