Allow _realloc_con_efc to also allocate new nJ arrays.

PiperOrigin-RevId: 761252071
Change-Id: Idce822c6f2b8f2d81a5d43228f5dc35281c5ad07
This commit is contained in:
Erik Frey
2025-05-20 15:25:10 -07:00
committed by Copybara-Service
parent 5051520733
commit 49c33716a1
2 changed files with 11 additions and 7 deletions
+3 -1
View File
@@ -623,10 +623,12 @@ class MuJoCoBindingsTest(parameterized.TestCase):
ncon = 13
nefc = 17
mujoco._functions._realloc_con_efc(self.data, ncon=ncon, nefc=nefc)
nj = 21
mujoco._functions._realloc_con_efc(self.data, ncon=ncon, nefc=nefc, nJ=nj)
self.assertLen(self.data.contact, ncon)
self.assertEqual(self.data.efc_id.shape, (nefc,))
self.assertEqual(self.data.efc_J.shape, (nj,))
self.assertEqual(self.data.efc_KBIP.shape, (nefc, 4))
expected_error = 'insufficient arena memory available'