Skip to content

Commit

Permalink
Use test world without gravity to fix tpe
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Nov 9, 2023
1 parent 28a0d15 commit d604c92
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/common_test/simulation_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ TYPED_TEST(SimulationFeaturesTestFreeGroup, FreeGroup)
auto world = LoadPluginAndWorld<FreeGroupFeatures>(
this->loader,
name,
gz::common::joinPaths(TEST_WORLD_DIR, "falling.world"));
gz::common::joinPaths(TEST_WORLD_DIR, "sphere.sdf"));

// model free group test
auto model = world->GetModel("sphere");
Expand Down Expand Up @@ -581,14 +581,11 @@ TYPED_TEST(SimulationFeaturesTestFreeGroup, FreeGroup)
// Check the velocities again.
freeGroupFrameData = freeGroup->FrameDataRelativeToWorld();
linkFrameData = model->GetLink(0)->FrameDataRelativeToWorld();

// Expect linear velocity to be affected by gravity.
const Eigen::Vector3d linearVelocityAfterStep{0.1, 0.2, 0.3 - 9.8 * 0.001};
EXPECT_PRED_FORMAT2(vectorPredicateVelocity,
linearVelocityAfterStep,
initialLinearVelocity,
freeGroupFrameData.linearVelocity);
EXPECT_PRED_FORMAT2(vectorPredicateVelocity,
linearVelocityAfterStep,
initialLinearVelocity,
linkFrameData.linearVelocity);

// Expect angular velocity is unchanged.
Expand Down

0 comments on commit d604c92

Please sign in to comment.