Skip to content

Add planner_dart component for DART planners #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Planner

* Fixed key bugs in CRRTs: [#574](https://github.com/personalrobotics/aikido/pull/574)
* Make planner_dart component and build all DART planners as planner_dart component: [#567](https://github.com/personalrobotics/aikido/pull/567)
* Added ConfigurationToConfigurations planner adapter: [#587](https://github.com/personalrobotics/aikido/pull/587)
* Cleaned up planning methods in robot/util: [#588](https://github.com/personalrobotics/aikido/pull/588)

Expand Down
15 changes: 1 addition & 14 deletions src/planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ set(sources
SequenceMetaPlanner.cpp
World.cpp
WorldStateSaver.cpp
dart/ConfigurationToConfiguration.cpp
dart/ConfigurationToConfigurationPlanner.cpp
dart/ConfigurationToConfigurations.cpp
dart/ConfigurationToConfigurationsPlanner.cpp
dart/ConfigurationToEndEffectorOffset.cpp
dart/ConfigurationToEndEffectorPose.cpp
dart/ConfigurationToTSR.cpp
dart/ConfigurationToEndEffectorOffsetPlanner.cpp
# dart/ConfigurationToEndEffectorPosePlanner.cpp
dart/ConfigurationToTSRPlanner.cpp
dart/ConfigurationToConfiguration_to_ConfigurationToConfiguration.cpp
dart/ConfigurationToConfiguration_to_ConfigurationToConfigurations.cpp
dart/ConfigurationToConfiguration_to_ConfigurationToTSR.cpp
dart/util.cpp
)

add_library("${PROJECT_NAME}_planner" SHARED ${sources})
Expand Down Expand Up @@ -63,6 +49,7 @@ add_component_dependencies(${PROJECT_NAME} planner
clang_format_add_sources(${sources})

add_subdirectory("ompl") # [constraint], [distance], [statespace], [trajectory], dart, ompl
add_subdirectory("dart") # [constraint], [distance], [trajectory], [statespace], [planner_ompl], dart, ompl
add_subdirectory("parabolic") # [external], [common], [trajectory], [statespace], dart
add_subdirectory("vectorfield") # [common], [trajectory], [statespace], dart
add_subdirectory("kunzretimer") # [external], [common], [trajectory], [statespace], dart
62 changes: 62 additions & 0 deletions src/planner/dart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
if(CMAKE_COMPILER_IS_GNUCXX)
if(OMPL_VERSION VERSION_GREATER 1.2.0 OR OMPL_VERSION VERSION_EQUAL 1.2.0)
if(Boost_VERSION VERSION_LESS 106501)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not need to check boost version here since this subdirectory does not have ompl code.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to the below comment as well: this PR is set up for #566. Sorry, I totally should have made that more clear: because the ultimate goal here is deprecating a lot of the old robot/util stuff, we need to move some of the planTo methods that use ompl into this new dart_planner module. That's what #566 starts to do, but we set up the ompl dependency here 😄

message(STATUS "OMPL planners are disabled for OMPL (>=1.2.0) + GCC + "
"Boost (< 1.65.1). For details, please see: "
" https://github.com/personalrobotics/aikido/issues/363"
)
return()
endif()
endif()
endif()

#==============================================================================
# Libraries
#
set(sources
ConfigurationToConfiguration.cpp
ConfigurationToConfigurationPlanner.cpp
ConfigurationToConfiguration_to_ConfigurationToConfiguration.cpp
ConfigurationToConfiguration_to_ConfigurationToTSR.cpp
ConfigurationToEndEffectorOffset.cpp
ConfigurationToEndEffectorPose.cpp
ConfigurationToEndEffectorOffsetPlanner.cpp
ConfigurationToTSR.cpp
ConfigurationToTSRPlanner.cpp
util.cpp
)

add_library("${PROJECT_NAME}_planner_dart" SHARED ${sources})
target_include_directories("${PROJECT_NAME}_planner_dart" SYSTEM
PUBLIC
${DART_INCLUDE_DIRS}
${OMPL_INCLUDE_DIRS}
)
target_link_libraries("${PROJECT_NAME}_planner_dart"
PUBLIC
"${PROJECT_NAME}_common"
"${PROJECT_NAME}_constraint"
"${PROJECT_NAME}_distance"
"${PROJECT_NAME}_trajectory"
"${PROJECT_NAME}_statespace"
"${PROJECT_NAME}_planner"
"${PROJECT_NAME}_planner_ompl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need ompl here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment! 😸

${DART_LIBRARIES}
${OMPL_LIBRARIES}
)
target_compile_options("${PROJECT_NAME}_planner_dart"
PUBLIC ${AIKIDO_CXX_STANDARD_FLAGS}
)

add_component(${PROJECT_NAME} planner_dart)
add_component_targets(${PROJECT_NAME} planner_dart "${PROJECT_NAME}_planner_dart")
add_component_dependencies(${PROJECT_NAME} planner_dart
constraint
distance
planner
planner_ompl
statespace
trajectory
)

clang_format_add_sources(${sources})
5 changes: 5 additions & 0 deletions src/planner/vectorfield/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if(NOT TARGET ${PROJECT_NAME}_planner_dart)
return()
endif()

set(sources
VectorFieldPlanner.cpp
VectorField.cpp
Expand All @@ -19,6 +23,7 @@ target_link_libraries("${PROJECT_NAME}_planner_vectorfield"
"${PROJECT_NAME}_trajectory"
"${PROJECT_NAME}_statespace"
"${PROJECT_NAME}_planner"
"${PROJECT_NAME}_planner_dart"
${DART_LIBRARIES}
${Boost_LIBRARIES}
)
Expand Down
3 changes: 2 additions & 1 deletion src/robot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#==============================================================================
# Dependencies
#
if(NOT TARGET ${PROJECT_NAME}_planner_ompl)
if(NOT TARGET ${PROJECT_NAME}_planner_ompl OR
NOT TARGET ${PROJECT_NAME}_planner_vectorfield)
return()
endif()
set(CMAKE_REQUIRED_DEFINITIONS "")
Expand Down
15 changes: 10 additions & 5 deletions tests/planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ target_link_libraries(test_SnapPlanner
"${PROJECT_NAME}_trajectory"
"${PROJECT_NAME}_planner")

aikido_add_test(test_World test_World.cpp)
target_link_libraries(test_World
"${PROJECT_NAME}_planner")

if(NOT TARGET ${PROJECT_NAME}_planner_dart)
return()
endif()

aikido_add_test(test_DartPlanners test_DartPlanners.cpp)
target_link_libraries(test_DartPlanners
"${PROJECT_NAME}_constraint"
"${PROJECT_NAME}_distance"
"${PROJECT_NAME}_trajectory"
"${PROJECT_NAME}_planner")

aikido_add_test(test_World test_World.cpp)
target_link_libraries(test_World
"${PROJECT_NAME}_planner")
"${PROJECT_NAME}_planner"
"${PROJECT_NAME}_planner_dart")