Skip to content

Commit

Permalink
increase tol in joint features test
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Feb 24, 2024
1 parent dc394e0 commit bae4277
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/common_test/joint_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ TYPED_TEST(JointFeaturesAttachDetachTest, JointAttachDetach)
}
frameDataModel2Body = model2Body->FrameDataRelativeToWorld();

EXPECT_NEAR(0.0, frameDataModel2Body.linearVelocity.z(), 1e-3);
EXPECT_NEAR(0.0, frameDataModel2Body.linearVelocity.z(), 2e-3);
}
}

Expand Down Expand Up @@ -1266,9 +1266,9 @@ TYPED_TEST(JointFeaturesAttachDetachTest, JointAttachMultiple)
gz::math::eigen3::convert(frameDataModel2Body.linearVelocity);
gz::math::Vector3d body3LinearVelocity =
gz::math::eigen3::convert(frameDataModel3Body.linearVelocity);
EXPECT_NEAR(0.0, body1LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(0.0, body1LinearVelocity.Z(), 3e-3);
EXPECT_NEAR(0.0, body2LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(0.0, body3LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(0.0, body3LinearVelocity.Z(), 3e-3);
}

// Detach the joints. M1 and M3 should fall as there is now nothing stopping
Expand Down Expand Up @@ -1296,9 +1296,9 @@ TYPED_TEST(JointFeaturesAttachDetachTest, JointAttachMultiple)
gz::math::Vector3d body3LinearVelocity =
gz::math::eigen3::convert(frameDataModel3Body.linearVelocity);

EXPECT_NEAR(dt * (numSteps) * -10, body1LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(dt * (numSteps) * -10, body1LinearVelocity.Z(), 3e-3);
EXPECT_NEAR(0.0, body2LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(dt * (numSteps) * -10, body3LinearVelocity.Z(), 1e-3);
EXPECT_NEAR(dt * (numSteps) * -10, body3LinearVelocity.Z(), 3e-3);
}
}
}
Expand Down

0 comments on commit bae4277

Please sign in to comment.