Remove mjData.qM

PiperOrigin-RevId: 942520660
Change-Id: I422358e299ca0fcfe4c49cd0ee90c014a4c319d7
This commit is contained in:
Yuval Tassa
2026-07-04 09:38:07 -07:00
committed by Copybara-Service
parent 7c6f519879
commit 315bcfbf3a
16 changed files with 14 additions and 76 deletions
+1 -6
View File
@@ -1297,12 +1297,11 @@ def _get_data_into_warp(
value = value.reshape((-1, 9))
# elif field.name == 'efc_J': # TODO(btaba): add this back
# elif field.name.startswith('efc_'): # TODO(btaba): add this back
# TODO(btaba): qM, qLD, qLDiagInv
# TODO(btaba): qLD, qLDiagInv
if field.name in (
'actuator_moment',
'contact',
'qM',
'qLD',
'qLU',
'qLDiagInv',
@@ -1472,10 +1471,6 @@ def _get_data_into(
else:
setattr(result_i, field.name, value)
if hasattr(result_i, 'qM'):
result_i.qM.fill(0.0)
result_i.qM[m.mapM2M] = result_i.M
# recalculate qLD and qLDiagInv as MJX and MuJoCo have different
# representations of the Cholesky decomposition.
mujoco.mj_factorM(m, result_i)
-2
View File
@@ -671,7 +671,6 @@ class DataIOTest(parameterized.TestCase):
np.testing.assert_allclose(d_2.xpos, d.xpos)
np.testing.assert_allclose(d_2.cvel, d.cvel)
np.testing.assert_allclose(d_2.cdof_dot, d.cdof_dot)
np.testing.assert_allclose(d_2.qM, d.qM)
np.testing.assert_allclose(d_2.qLD, d.qLD, atol=1e-6)
np.testing.assert_allclose(d_2.qLDiagInv, d.qLDiagInv, atol=1e-6)
@@ -782,7 +781,6 @@ class DataIOTest(parameterized.TestCase):
# check a few fields
np.testing.assert_allclose(d_2.qpos, d.qpos)
np.testing.assert_allclose(d_2.xpos, d.xpos)
np.testing.assert_allclose(d_2.qM, d.qM)
# only 1 contact active
self.assertEqual(d_2.contact.dist.shape, (1,))