Skip to content

Commit 6fdcda2

Browse files
DeepMindcopybara-github
authored andcommitted
Fix flex constraint Jacobian for edges belonging to a single body.
PiperOrigin-RevId: 575161094 Change-Id: I1b015b2d399c0faf774472a9e9fd2163d610cf55
1 parent 4d356d3 commit 6fdcda2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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, 2)
487+
self.assertEqual(first.simple, 1)
488488
self.assertEqual(first.sameframe, 1)
489-
self.assertEqual(second.simple, 2)
489+
self.assertEqual(second.simple, 1)
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, 2)
498+
self.assertEqual(second.simple, 1)
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, 2)
521+
self.assertEqual(first.simple, 1)
522522
self.assertEqual(first.sameframe, 1)
523-
self.assertEqual(second.simple, 2)
523+
self.assertEqual(second.simple, 1)
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, 2)
532+
self.assertEqual(second.simple, 1)
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)