Skip to content

Commit

Permalink
ifdef for windows
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 committed Jul 10, 2024
1 parent 0f18722 commit 5fe67d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bullet-featherstone/src/Base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,18 @@ WorldInfo::WorldInfo(std::string name_)
{
this->collisionConfiguration =
std::make_unique<btDefaultCollisionConfiguration>();
#ifdef _WIN32
// Use original btCollisionDispatcher on window as GzCollisionDispatcher
// causes tests to crash.
// \todo(iche033) Investigate cause of crash
this->dispatcher =
std::make_unique<btCollisionDispatcher>(collisionConfiguration.get());
#else
// Use custom GzCollisionDispatcher that reduces number of contact points
// for convex decomposed mesh collisions.
this->dispatcher =
std::make_unique<GzCollisionDispatcher>(collisionConfiguration.get());
#endif
this->broadphase = std::make_unique<btDbvtBroadphase>();
this->solver = std::make_unique<btMultiBodyConstraintSolver>();
this->world = std::make_unique<btMultiBodyDynamicsWorld>(
Expand Down

0 comments on commit 5fe67d0

Please sign in to comment.