From 6ae9cc80610c54206e480c64448ed3e3019b933f Mon Sep 17 00:00:00 2001 From: Baruch Tabanpour Date: Fri, 3 Oct 2025 11:15:04 -0700 Subject: [PATCH] Fix #2508. PiperOrigin-RevId: 814761747 Change-Id: Ic3d1ed359f377799126987c3640b7e534e764c6b --- doc/changelog.rst | 5 +++++ mjx/mujoco/mjx/_src/io.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 8e367991..9c3347dc 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -25,6 +25,11 @@ General no :ref:`material` is set and :ref:`rgba` is default. +MJX +^^^ + +- Fix :github:issue:`2508`, ``qLD`` shapes mismatched mjModel during ``get_data_into``. + Version 3.3.6 (September 15, 2025) ---------------------------------- diff --git a/mjx/mujoco/mjx/_src/io.py b/mjx/mujoco/mjx/_src/io.py index e3a3936e..ff6d7505 100644 --- a/mjx/mujoco/mjx/_src/io.py +++ b/mjx/mujoco/mjx/_src/io.py @@ -1466,7 +1466,7 @@ def _get_data_into( if d.impl == types.Impl.JAX: if field.name == 'qM' and not support.is_sparse(m): value = value[dof_i, dof_j] - elif field.name == 'qLD' and not support.is_sparse(m): + elif field.name == 'qLD': value = np.zeros(m.nC) elif field.name == 'qLDiagInv' and not support.is_sparse(m): value = np.ones(m.nv)