Allow _realloc_con_efc to also allocate new nJ arrays.
PiperOrigin-RevId: 761252071 Change-Id: Idce822c6f2b8f2d81a5d43228f5dc35281c5ad07
This commit is contained in:
committed by
Copybara-Service
parent
5051520733
commit
49c33716a1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user