General
1. 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](https://mujoco.readthedocs.io/en/2.3.3/computation.html#geintegration).
- 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](https://mujoco.readthedocs.io/en/2.3.3/computation.html#geintegration) 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](https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml) 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.
<div align="center">
| timing | Euler | implicitfast | implicit (new) | implicit (old) |
| ------------- | ----- | ------------ | -------------- | -------------- |
| one step (ms) | 0.5 | 0.53 | 0.77 | 5.0 |
| steps/second | 2000 | 1900 | 1300 | 200 |
</div>
<img src="https://github.com/deepmind/mujoco/blob/main/doc/images/computation/midphase.gif?raw=true" alt="Animation showing bounding volume hierarchy for humanoid and many small boxes" width="350px" align="right"/>
2. Added a collision mid-phase for pruning geoms in body pairs, see [documentation](https://mujoco.readthedocs.io/en/2.3.3/computation.html#coselection) 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](https://youtu.be/e0babIM8hBo).
3. The `mjd_transitionFD` function no longer triggers sensor calculation unless explicitly requested.
4. Corrected the spelling of the `inteval` attribute to `interval` in the [mjLROpt](https://mujoco.readthedocs.io/en/2.3.3/APIreference/APItypes.html#mjlropt) struct.
5. 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.
6. 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](https://github.com/deepmind/mujoco/blob/main/model/humanoid100/humanoid100.xml) model, which previously required ~500,000 `mjtNum`s, now only requires ~6000. Very large models can now load and run with the CG solver.
7. Modified [`mju_error`](https://mujoco.readthedocs.io/en/2.3.3/APIreference/APIfunctions.html#mju-error) and [`mju_warning`](https://mujoco.readthedocs.io/en/2.3.3/APIreference/APIfunctions.html#mju-warning) to be variadic functions (support for printf-like arguments). The functions `mju_error_i`, `mju_error_s`, `mju_warning_i`, and `mju_warning_s` are now deprecated.
8. Implemented a performant `mju_sqrMatTDSparse` function that doesn't require dense memory allocation.
9. Added `mj_stackAllocInt` to get correct size for allocating ints on mjData stack. Reducing stack memory usage by 10% - 15%.
Python bindings
10. Fixed IPython history corruption when using `viewer.launch_repl`. The `launch_repl` function now provides seamless continuation of an IPython interactive shell session, and is no longer considered experimental feature.
11. Added `viewer.launch_passive` which launches the interactive viewer in a passive, non-blocking mode. Calls to `launch_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](https://mujoco.readthedocs.io/en/2.3.3/python.html#pyviewer).)
12. Added the `mjpython` launcher for macOS, which is required for `viewer.launch_passive` to function there.
13. 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 and `efc_` rows.
14. Added a number of missing fields to the bindings of `mjVisual` and `mjvPerturb` structs.
Simulate
<img src="https://github.com/deepmind/mujoco/blob/main/doc/images/changelog/contactlabel.png?raw=true" alt="Screenshot of simulate showing labels for contacts" width="400px" align="right"/>
15. Implemented a workaround for [broken VSync](https://github.com/glfw/glfw/issues/2249) on macOS so that the frame rate is correctly capped when the Vertical Sync toggle is enabled.
16. Added optional labels to contact visualization, indicating which two geoms are contacting (names if defined, ids otherwise). This can be useful in cluttered scenes.