From 166fa17a1c3909491cb362f69f407175981d748a Mon Sep 17 00:00:00 2001 From: Taylor Howell Date: Thu, 8 Jan 2026 10:46:29 -0800 Subject: [PATCH] MuJoCo Warp documentation: inertia matrix automatic sparsity. PiperOrigin-RevId: 853805011 Change-Id: I8c0040f3b2b08d8615f1fbf559cdc9841e33438a --- doc/mjwarp/index.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/mjwarp/index.rst b/doc/mjwarp/index.rst index c95f79e2..d1c56a73 100644 --- a/doc/mjwarp/index.rst +++ b/doc/mjwarp/index.rst @@ -506,6 +506,21 @@ friction values may be sensitive to differences in floating point representation If you encounter unexpected results, including NaNs, please open a GitHub issue. +**Why is inertia matrix qM sparsity not consistent with MuJoCo / MJX?** + +.. admonition:: ``mjtJacobian`` semantics + :class: note + + - MuJoCo's inertia matrix is always sparse and :ref:`mjtJacobian` affects constraint Jacobians and related quantities + - MJWarp's (and MJX's) constraint Jacobian is always dense and :ref:`mjtJacobian` is repurposed to affect the inertia + matrix that can be represented as dense or sparse + +The automatic sparsity threshold utilized by MJWarp for ``AUTO`` is optimized for GPU and set to ``nv > 32``, +unlike MuJoCo and MJX which use ``nv >= 60``. Dense ``DENSE`` and sparse ``SPARSE`` settings are consistent with MuJoCo +and MJX. + +This feature is likely to change in the future. + Compilation -----------