Raise an error if MJX scan functions are called on models with zero DoFs.
In the future, MJX will support correctly simulating models with zero dofs. PiperOrigin-RevId: 760731314 Change-Id: Iadddf80a959c64cddb31610e60927ae0437ebcaf
This commit is contained in:
committed by
Copybara-Service
parent
bf722098f0
commit
cada50434a
@@ -61,10 +61,7 @@ class ScanTest(absltest.TestCase):
|
||||
return body_id + 1
|
||||
|
||||
b_in = jp.array([1])
|
||||
b_expect = jp.array([2])
|
||||
b_out = scan.flat(m, fn, 'b', 'b', b_in)
|
||||
|
||||
np.testing.assert_equal(np.array(b_out), np.array(b_expect))
|
||||
self.assertRaises(ValueError, scan.flat, m, fn, 'b', 'b', b_in)
|
||||
|
||||
def test_flat_joints(self):
|
||||
"""Tests scanning over bodies with joints of different types."""
|
||||
|
||||
Reference in New Issue
Block a user