From 69b474178761cb41c9e21437e551eb4138e32bb7 Mon Sep 17 00:00:00 2001 From: Michael Ripperger Date: Thu, 17 Aug 2023 18:44:34 -0500 Subject: [PATCH] Moved simple planner into own sub-directory --- tesseract_motion_planners/CMakeLists.txt | 7 +++++ tesseract_motion_planners/core/CMakeLists.txt | 28 ++--------------- .../core/src/{core => }/interpolation.cpp | 0 .../core/src/{core => }/planner.cpp | 0 .../core/src/{core => }/utils.cpp | 0 .../simple/CMakeLists.txt | 31 +++++++++++++++++++ ...e_planner_fixed_size_assign_plan_profile.h | 0 .../simple_planner_fixed_size_plan_profile.h | 0 .../simple_planner_lvs_no_ik_plan_profile.h | 0 .../profile/simple_planner_lvs_plan_profile.h | 0 .../simple/profile/simple_planner_profile.h | 0 .../simple/simple_motion_planner.h | 0 ...planner_fixed_size_assign_plan_profile.cpp | 0 ...simple_planner_fixed_size_plan_profile.cpp | 0 .../simple_planner_lvs_no_ik_plan_profile.cpp | 0 .../simple_planner_lvs_plan_profile.cpp | 0 .../src}/simple_motion_planner.cpp | 0 17 files changed, 40 insertions(+), 26 deletions(-) rename tesseract_motion_planners/core/src/{core => }/interpolation.cpp (100%) rename tesseract_motion_planners/core/src/{core => }/planner.cpp (100%) rename tesseract_motion_planners/core/src/{core => }/utils.cpp (100%) create mode 100644 tesseract_motion_planners/simple/CMakeLists.txt rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_assign_plan_profile.h (100%) rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_plan_profile.h (100%) rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h (100%) rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_plan_profile.h (100%) rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/profile/simple_planner_profile.h (100%) rename tesseract_motion_planners/{core => simple}/include/tesseract_motion_planners/simple/simple_motion_planner.h (100%) rename tesseract_motion_planners/{core/src/simple => simple/src}/profile/simple_planner_fixed_size_assign_plan_profile.cpp (100%) rename tesseract_motion_planners/{core/src/simple => simple/src}/profile/simple_planner_fixed_size_plan_profile.cpp (100%) rename tesseract_motion_planners/{core/src/simple => simple/src}/profile/simple_planner_lvs_no_ik_plan_profile.cpp (100%) rename tesseract_motion_planners/{core/src/simple => simple/src}/profile/simple_planner_lvs_plan_profile.cpp (100%) rename tesseract_motion_planners/{core/src/simple => simple/src}/simple_motion_planner.cpp (100%) diff --git a/tesseract_motion_planners/CMakeLists.txt b/tesseract_motion_planners/CMakeLists.txt index 97f45a2d1de..79b8d0b4d3f 100644 --- a/tesseract_motion_planners/CMakeLists.txt +++ b/tesseract_motion_planners/CMakeLists.txt @@ -45,6 +45,13 @@ tesseract_variables() add_subdirectory(core) +# Simple +option(TESSERACT_BUILD_SIMPLE "Build the simple planner" ON) +if(TESSERACT_BUILD_SIMPLE) + message("Building Simple Planner") + add_subdirectory(simple) +endif() + # OMPL option(TESSERACT_BUILD_OMPL "Build the OMPL planner" ON) if(TESSERACT_BUILD_OMPL) diff --git a/tesseract_motion_planners/core/CMakeLists.txt b/tesseract_motion_planners/core/CMakeLists.txt index 4666e730b70..703bad55fd1 100644 --- a/tesseract_motion_planners/core/CMakeLists.txt +++ b/tesseract_motion_planners/core/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(tesseract_environment REQUIRED) find_package(tesseract_command_language REQUIRED) # Create interface for core -add_library(${PROJECT_NAME}_core src/core/planner.cpp src/core/utils.cpp src/core/interpolation.cpp) +add_library(${PROJECT_NAME}_core src/planner.cpp src/utils.cpp src/interpolation.cpp) target_link_libraries( ${PROJECT_NAME}_core PUBLIC tesseract::tesseract_environment @@ -24,32 +24,8 @@ target_code_coverage( target_include_directories(${PROJECT_NAME}_core PUBLIC "$" "$") -# Simple Planner -add_library( - ${PROJECT_NAME}_simple - src/simple/simple_motion_planner.cpp - src/simple/profile/simple_planner_lvs_plan_profile.cpp - src/simple/profile/simple_planner_lvs_no_ik_plan_profile.cpp - src/simple/profile/simple_planner_fixed_size_assign_plan_profile.cpp - src/simple/profile/simple_planner_fixed_size_plan_profile.cpp) -target_link_libraries(${PROJECT_NAME}_simple PUBLIC ${PROJECT_NAME}_core Boost::boost) -target_compile_options(${PROJECT_NAME}_simple PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}) -target_compile_options(${PROJECT_NAME}_simple PUBLIC ${TESSERACT_COMPILE_OPTIONS_PUBLIC}) -target_compile_definitions(${PROJECT_NAME}_simple PUBLIC ${TESSERACT_COMPILE_DEFINITIONS}) -target_clang_tidy(${PROJECT_NAME}_simple ENABLE ${TESSERACT_ENABLE_CLANG_TIDY}) -target_cxx_version(${PROJECT_NAME}_simple PUBLIC VERSION ${TESSERACT_CXX_VERSION}) -target_code_coverage( - ${PROJECT_NAME}_simple - PRIVATE - ALL - EXCLUDE ${COVERAGE_EXCLUDE} - ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE}) -target_include_directories(${PROJECT_NAME}_simple PUBLIC "$" - "$") -add_dependencies(${PROJECT_NAME}_simple ${PROJECT_NAME}_core) - # Mark cpp header files for installation install(DIRECTORY include/${PROJECT_NAME} DESTINATION include) # Install targets -install_targets(TARGETS ${PROJECT_NAME}_core ${PROJECT_NAME}_simple) +install_targets(TARGETS ${PROJECT_NAME}_core) diff --git a/tesseract_motion_planners/core/src/core/interpolation.cpp b/tesseract_motion_planners/core/src/interpolation.cpp similarity index 100% rename from tesseract_motion_planners/core/src/core/interpolation.cpp rename to tesseract_motion_planners/core/src/interpolation.cpp diff --git a/tesseract_motion_planners/core/src/core/planner.cpp b/tesseract_motion_planners/core/src/planner.cpp similarity index 100% rename from tesseract_motion_planners/core/src/core/planner.cpp rename to tesseract_motion_planners/core/src/planner.cpp diff --git a/tesseract_motion_planners/core/src/core/utils.cpp b/tesseract_motion_planners/core/src/utils.cpp similarity index 100% rename from tesseract_motion_planners/core/src/core/utils.cpp rename to tesseract_motion_planners/core/src/utils.cpp diff --git a/tesseract_motion_planners/simple/CMakeLists.txt b/tesseract_motion_planners/simple/CMakeLists.txt new file mode 100644 index 00000000000..4fdcf88c3fd --- /dev/null +++ b/tesseract_motion_planners/simple/CMakeLists.txt @@ -0,0 +1,31 @@ +find_package(tesseract_environment REQUIRED) +find_package(tesseract_command_language REQUIRED) + +add_library( + ${PROJECT_NAME}_simple + src/simple_motion_planner.cpp + src/profile/simple_planner_lvs_plan_profile.cpp + src/profile/simple_planner_lvs_no_ik_plan_profile.cpp + src/profile/simple_planner_fixed_size_assign_plan_profile.cpp + src/profile/simple_planner_fixed_size_plan_profile.cpp) +target_link_libraries(${PROJECT_NAME}_simple PUBLIC ${PROJECT_NAME}_core Boost::boost) +target_compile_options(${PROJECT_NAME}_simple PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}) +target_compile_options(${PROJECT_NAME}_simple PUBLIC ${TESSERACT_COMPILE_OPTIONS_PUBLIC}) +target_compile_definitions(${PROJECT_NAME}_simple PUBLIC ${TESSERACT_COMPILE_DEFINITIONS}) +target_clang_tidy(${PROJECT_NAME}_simple ENABLE ${TESSERACT_ENABLE_CLANG_TIDY}) +target_cxx_version(${PROJECT_NAME}_simple PUBLIC VERSION ${TESSERACT_CXX_VERSION}) +target_code_coverage( + ${PROJECT_NAME}_simple + PRIVATE + ALL + EXCLUDE ${COVERAGE_EXCLUDE} + ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE}) +target_include_directories(${PROJECT_NAME}_simple PUBLIC "$" + "$") +add_dependencies(${PROJECT_NAME}_simple ${PROJECT_NAME}_core) + +# Mark cpp header files for installation +install(DIRECTORY include/${PROJECT_NAME} DESTINATION include) + +# Install targets +install_targets(TARGETS ${PROJECT_NAME}_simple) diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_assign_plan_profile.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_assign_plan_profile.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_assign_plan_profile.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_assign_plan_profile.h diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_plan_profile.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_plan_profile.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_plan_profile.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_fixed_size_plan_profile.h diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_no_ik_plan_profile.h diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_plan_profile.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_plan_profile.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_plan_profile.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_lvs_plan_profile.h diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_profile.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_profile.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/profile/simple_planner_profile.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/profile/simple_planner_profile.h diff --git a/tesseract_motion_planners/core/include/tesseract_motion_planners/simple/simple_motion_planner.h b/tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/simple_motion_planner.h similarity index 100% rename from tesseract_motion_planners/core/include/tesseract_motion_planners/simple/simple_motion_planner.h rename to tesseract_motion_planners/simple/include/tesseract_motion_planners/simple/simple_motion_planner.h diff --git a/tesseract_motion_planners/core/src/simple/profile/simple_planner_fixed_size_assign_plan_profile.cpp b/tesseract_motion_planners/simple/src/profile/simple_planner_fixed_size_assign_plan_profile.cpp similarity index 100% rename from tesseract_motion_planners/core/src/simple/profile/simple_planner_fixed_size_assign_plan_profile.cpp rename to tesseract_motion_planners/simple/src/profile/simple_planner_fixed_size_assign_plan_profile.cpp diff --git a/tesseract_motion_planners/core/src/simple/profile/simple_planner_fixed_size_plan_profile.cpp b/tesseract_motion_planners/simple/src/profile/simple_planner_fixed_size_plan_profile.cpp similarity index 100% rename from tesseract_motion_planners/core/src/simple/profile/simple_planner_fixed_size_plan_profile.cpp rename to tesseract_motion_planners/simple/src/profile/simple_planner_fixed_size_plan_profile.cpp diff --git a/tesseract_motion_planners/core/src/simple/profile/simple_planner_lvs_no_ik_plan_profile.cpp b/tesseract_motion_planners/simple/src/profile/simple_planner_lvs_no_ik_plan_profile.cpp similarity index 100% rename from tesseract_motion_planners/core/src/simple/profile/simple_planner_lvs_no_ik_plan_profile.cpp rename to tesseract_motion_planners/simple/src/profile/simple_planner_lvs_no_ik_plan_profile.cpp diff --git a/tesseract_motion_planners/core/src/simple/profile/simple_planner_lvs_plan_profile.cpp b/tesseract_motion_planners/simple/src/profile/simple_planner_lvs_plan_profile.cpp similarity index 100% rename from tesseract_motion_planners/core/src/simple/profile/simple_planner_lvs_plan_profile.cpp rename to tesseract_motion_planners/simple/src/profile/simple_planner_lvs_plan_profile.cpp diff --git a/tesseract_motion_planners/core/src/simple/simple_motion_planner.cpp b/tesseract_motion_planners/simple/src/simple_motion_planner.cpp similarity index 100% rename from tesseract_motion_planners/core/src/simple/simple_motion_planner.cpp rename to tesseract_motion_planners/simple/src/simple_motion_planner.cpp