Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
Enable DirectionNaN test for dart
Browse files Browse the repository at this point in the history
Set bullet collision_detector via PhysicsEngine::SetParam API.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters committed Sep 22, 2020
1 parent 1f017dc commit 9f706fe
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/integration/physics_friction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -485,13 +485,17 @@ void PhysicsFrictionTest::DirectionNaN(const std::string &_physicsEngine)
<< std::endl;
return;
}
#ifdef HAVE_DART
#if DART_MAJOR_MINOR_VERSION_AT_MOST(6, 9)
if (_physicsEngine == "dart")
{
gzerr << "Aborting test since there's an issue with dart's friction"
<< " parameters (#1000)"
gzerr << "Aborting test since dart 6.9 and earlier doesn't support"
<< " body-fixed friction directions (#1000)."
<< std::endl;
return;
}
#endif
#endif

// Load an empty world
Load("worlds/empty.world", true, _physicsEngine);
Expand All @@ -503,6 +507,14 @@ void PhysicsFrictionTest::DirectionNaN(const std::string &_physicsEngine)
ASSERT_TRUE(physics != NULL);
EXPECT_EQ(physics->GetType(), _physicsEngine);

#ifdef HAVE_DART
// Use bullet collision detector with DART
if (_physicsEngine == "dart")
{
physics->SetParam("collision_detector", std::string("bullet"));
}
#endif

// set the gravity vector
// small positive y component
ignition::math::Vector3d g(0.0, 1.5, -1.0);
Expand Down

0 comments on commit 9f706fe

Please sign in to comment.