From 9437d606145e242d313a2fb9b1b3c2643447b39f Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Sat, 30 Mar 2024 18:04:16 -0700 Subject: [PATCH] [example][glut_add_delete_skels] Use bullet collision detector --- .../glut_add_delete_skels/CMakeLists.txt | 4 ++-- examples/deprecated_examples/glut_add_delete_skels/Main.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/deprecated_examples/glut_add_delete_skels/CMakeLists.txt b/examples/deprecated_examples/glut_add_delete_skels/CMakeLists.txt index e912116a765b7..098159adab0d3 100644 --- a/examples/deprecated_examples/glut_add_delete_skels/CMakeLists.txt +++ b/examples/deprecated_examples/glut_add_delete_skels/CMakeLists.txt @@ -4,8 +4,8 @@ get_filename_component(example_name ${CMAKE_CURRENT_LIST_DIR} NAME) project(${example_name}) -set(required_components utils-urdf gui) -set(required_libraries dart dart-utils-urdf dart-gui) +set(required_components collision-bullet utils-urdf gui) +set(required_libraries dart dart-collision-bullet dart-utils-urdf dart-gui) if(DART_IN_SOURCE_BUILD) dart_build_example_in_source(${example_name} LINK_LIBRARIES ${required_libraries}) diff --git a/examples/deprecated_examples/glut_add_delete_skels/Main.cpp b/examples/deprecated_examples/glut_add_delete_skels/Main.cpp index da7df53f8824e..3ceebf9a5b1f1 100644 --- a/examples/deprecated_examples/glut_add_delete_skels/Main.cpp +++ b/examples/deprecated_examples/glut_add_delete_skels/Main.cpp @@ -34,6 +34,8 @@ #include +#include + #include #include @@ -47,6 +49,10 @@ int main(int argc, char* argv[]) Eigen::Vector3d gravity(0.0, -9.81, 0.0); myWorld->setGravity(gravity); + // Set collision detector type + myWorld->getConstraintSolver()->setCollisionDetector( + dart::collision::BulletCollisionDetector::create()); + // create a window and link it to the world MyWindow window; window.setWorld(myWorld);