Skip to content

Commit

Permalink
Update mass expectation in auto-inertial tests
Browse files Browse the repository at this point in the history
The mass is no longer explicitly set in these
Link tests, so replace the not-equals expectation
with an expectation of what the mass should be.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Dec 11, 2024
1 parent cf4d77b commit ae7685c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/test/pyLink_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def test_inertial_values_given_with_auto_set_to_true(self):
root.resolve_auto_inertials(errors, sdfParserConfig)
self.assertEqual(len(errors), 0)

self.assertNotEqual(4.0, link.inertial().mass_matrix().mass())
self.assertEqual(2.0, link.inertial().mass_matrix().mass())
self.assertEqual(Pose3d.ZERO, link.inertial().pose())
self.assertEqual(Vector3d(0.33333, 0.33333, 0.33333),
link.inertial().mass_matrix().diagonal_moments())
Expand Down
2 changes: 1 addition & 1 deletion src/Link_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ TEST(DOMLink, InertialValuesGivenWithAutoSetToTrue)
root.ResolveAutoInertials(errors, sdfParserConfig);
EXPECT_TRUE(errors.empty());

EXPECT_NE(4.0, link->Inertial().MassMatrix().Mass());
EXPECT_EQ(2.0, link->Inertial().MassMatrix().Mass());
EXPECT_EQ(gz::math::Pose3d::Zero, link->Inertial().Pose());
EXPECT_EQ(gz::math::Vector3d(0.33333, 0.33333, 0.33333),
link->Inertial().MassMatrix().DiagonalMoments());
Expand Down

0 comments on commit ae7685c

Please sign in to comment.