Skip to content

Commit dc50409

Browse files
DeepMindcopybara-github
authored andcommitted
Accelerate inertia computation for simple bodies.
PiperOrigin-RevId: 571411319 Change-Id: Ib716c26b338eb56e4e9334859cb732aebb5bd0f2
1 parent 14a6e37 commit dc50409

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

dm_control/mjcf/physics_test.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,9 @@ def test_write_to_ipos(self):
484484
second = physics.bind(entity2)
485485

486486
# Initially both bodies should be 'simple' and 'sameframe'
487-
self.assertEqual(first.simple, 1)
487+
self.assertEqual(first.simple, 2)
488488
self.assertEqual(first.sameframe, 1)
489-
self.assertEqual(second.simple, 1)
489+
self.assertEqual(second.simple, 2)
490490
self.assertEqual(second.sameframe, 1)
491491

492492
# Assigning to `ipos` should disable 'simple' and 'sameframe' only for that
@@ -495,7 +495,7 @@ def test_write_to_ipos(self):
495495
first.ipos = new_ipos
496496
self.assertEqual(first.simple, 0)
497497
self.assertEqual(first.sameframe, 0)
498-
self.assertEqual(second.simple, 1)
498+
self.assertEqual(second.simple, 2)
499499
self.assertEqual(second.sameframe, 1)
500500
# `xipos` should reflect the new position.
501501
np.testing.assert_array_equal(first.xipos, new_ipos)
@@ -518,9 +518,9 @@ def test_write_to_iquat(self):
518518
second = physics.bind(entity2)
519519

520520
# Initially both bodies should be 'simple' and 'sameframe'
521-
self.assertEqual(first.simple, 1)
521+
self.assertEqual(first.simple, 2)
522522
self.assertEqual(first.sameframe, 1)
523-
self.assertEqual(second.simple, 1)
523+
self.assertEqual(second.simple, 2)
524524
self.assertEqual(second.sameframe, 1)
525525

526526
# Assigning to `iquat` should disable 'simple' and 'sameframe' only for that
@@ -529,7 +529,7 @@ def test_write_to_iquat(self):
529529
first.iquat = new_iquat
530530
self.assertEqual(first.simple, 0)
531531
self.assertEqual(first.sameframe, 0)
532-
self.assertEqual(second.simple, 1)
532+
self.assertEqual(second.simple, 2)
533533
self.assertEqual(second.sameframe, 1)
534534
# `ximat` should reflect the new quaternion.
535535
np.testing.assert_allclose(first.ximat, self.quat2mat(new_iquat))

0 commit comments

Comments
 (0)