Support for MJX bind set() for scalars.
PiperOrigin-RevId: 715832281 Change-Id: I217021e81fae95e44e9297a1c447891ff76572bd
This commit is contained in:
committed by
Copybara-Service
parent
ff1ff44e34
commit
f1d557c125
@@ -236,6 +236,9 @@ class SupportTest(parameterized.TestCase):
|
||||
dx4 = dx.bind(mx, s.actuators[1]).set('ctrl', [6])
|
||||
np.testing.assert_array_equal(dx4.bind(mx, s.actuators).ctrl, [0, 6, 0])
|
||||
np.testing.assert_array_equal(dx.bind(mx, s.actuators).ctrl, [0, 0, 0])
|
||||
dx5 = dx.bind(mx, s.actuators[1]).set('ctrl', 7)
|
||||
np.testing.assert_array_equal(dx5.bind(mx, s.actuators).ctrl, [0, 7, 0])
|
||||
np.testing.assert_array_equal(dx.bind(mx, s.actuators).ctrl, [0, 0, 0])
|
||||
|
||||
# test invalid name
|
||||
with self.assertRaises(AttributeError):
|
||||
|
||||
Reference in New Issue
Block a user