Skip to content

Commit

Permalink
[example][glut_add_delete_skels] Use bullet collision detector
Browse files Browse the repository at this point in the history
(cherry picked from commit 9437d60)
  • Loading branch information
jslee02 committed Mar 31, 2024
1 parent a8af426 commit 5ba1e72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -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})
Expand Down
6 changes: 6 additions & 0 deletions examples/deprecated_examples/glut_add_delete_skels/Main.cpp
Expand Up @@ -34,6 +34,8 @@

#include <dart/utils/utils.hpp>

#include <dart/collision/bullet/bullet.hpp>

#include <dart/dart.hpp>

#include <iostream>
Expand All @@ -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);
Expand Down

0 comments on commit 5ba1e72

Please sign in to comment.