From b69a38898c9ba3815bd98474b647535cdcd57b52 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 21 Aug 2024 12:09:03 +0200 Subject: [PATCH] dartsim: To not call dart::collision::GzOdeCollisionDetector::create() in ConstructEmptyWorld --- dartsim/src/EntityManagementFeatures.cc | 4 ++-- dartsim/src/WorldFeatures.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dartsim/src/EntityManagementFeatures.cc b/dartsim/src/EntityManagementFeatures.cc index 990ca5631..441675ba5 100644 --- a/dartsim/src/EntityManagementFeatures.cc +++ b/dartsim/src/EntityManagementFeatures.cc @@ -28,7 +28,7 @@ #include #include -#include "GzOdeCollisionDetector.hh" +#include namespace gz { namespace physics { @@ -725,7 +725,7 @@ Identity EntityManagementFeatures::ConstructEmptyWorld( const Identity &/*_engineID*/, const std::string &_name) { const auto &world = std::make_shared(_name); - auto collisionDetector = dart::collision::GzOdeCollisionDetector::create(); + auto collisionDetector = dart::collision::DARTCollisionDetector::create(); world->getConstraintSolver()->setCollisionDetector(collisionDetector); auto &collOpt = world->getConstraintSolver()->getCollisionOption(); diff --git a/dartsim/src/WorldFeatures.cc b/dartsim/src/WorldFeatures.cc index da7088580..c256b8b57 100644 --- a/dartsim/src/WorldFeatures.cc +++ b/dartsim/src/WorldFeatures.cc @@ -62,6 +62,7 @@ void WorldFeatures::SetWorldCollisionDetector( } else { + collisionDetector = dart::collision::GzOdeCollisionDetector::create(); gzerr << "Collision detector [" << _collisionDetector << "] is not supported, defaulting to [" << collisionDetector->getType() << "]." << std::endl;