From 862b6059e9ba6dbbae83bc4282bcfde402104fa1 Mon Sep 17 00:00:00 2001 From: marqrazz Date: Mon, 9 Sep 2024 10:36:42 -0600 Subject: [PATCH 1/5] Update ompl_interface with latest version of OMPL --- moveit2.repos | 4 ++ moveit_planners/ompl/CMakeLists.txt | 2 +- .../ompl/ompl_interface/CMakeLists.txt | 39 ++++++++++--------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/moveit2.repos b/moveit2.repos index aec6f2851e..8fb644d227 100644 --- a/moveit2.repos +++ b/moveit2.repos @@ -12,3 +12,7 @@ repositories: type: git url: https://github.com/moveit/moveit_resources.git version: ros2 + ompl: + type: git + url: https://github.com/ompl/ompl.git + version: main diff --git a/moveit_planners/ompl/CMakeLists.txt b/moveit_planners/ompl/CMakeLists.txt index 91329a1e8d..6462894745 100644 --- a/moveit_planners/ompl/CMakeLists.txt +++ b/moveit_planners/ompl/CMakeLists.txt @@ -27,7 +27,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") endif() include_directories(ompl_interface/include) -include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${OMPL_INCLUDE_DIRS}) +include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) add_subdirectory(ompl_interface) diff --git a/moveit_planners/ompl/ompl_interface/CMakeLists.txt b/moveit_planners/ompl/ompl_interface/CMakeLists.txt index 90fe140801..a4aa1f9ba2 100644 --- a/moveit_planners/ompl/ompl_interface/CMakeLists.txt +++ b/moveit_planners/ompl/ompl_interface/CMakeLists.txt @@ -38,17 +38,17 @@ ament_target_dependencies( pluginlib tf2_eigen tf2_ros - OMPL Boost) set_target_properties( moveit_ompl_interface PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set_target_properties(moveit_ompl_interface PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") - +target_link_libraries(moveit_ompl_interface ompl::ompl) add_executable(moveit_generate_state_database scripts/generate_state_database.cpp) -target_link_libraries(moveit_generate_state_database moveit_ompl_interface) +target_link_libraries(moveit_generate_state_database moveit_ompl_interface + ompl::ompl) set_target_properties(moveit_generate_state_database PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") set_target_properties(moveit_generate_state_database @@ -64,9 +64,9 @@ ament_target_dependencies( rclcpp pluginlib tf2_ros - OMPL Boost) -target_link_libraries(moveit_ompl_planner_plugin moveit_ompl_interface) +target_link_libraries(moveit_ompl_planner_plugin moveit_ompl_interface + ompl::ompl) install(TARGETS moveit_generate_state_database RUNTIME DESTINATION lib/${PROJECT_NAME}) @@ -77,24 +77,26 @@ if(BUILD_TESTING) find_package(Eigen3 REQUIRED) ament_add_gtest(test_state_space test/test_state_space.cpp) - ament_target_dependencies(test_state_space moveit_core OMPL Boost Eigen3) - target_link_libraries(test_state_space moveit_ompl_interface) + ament_target_dependencies(test_state_space moveit_core Boost Eigen3) + target_link_libraries(test_state_space moveit_ompl_interface ompl::ompl) set_target_properties(test_state_space PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") ament_add_gtest(test_state_validity_checker test/test_state_validity_checker.cpp) - ament_target_dependencies(test_state_validity_checker moveit_core OMPL Boost + ament_target_dependencies(test_state_validity_checker moveit_core Boost Eigen3) - target_link_libraries(test_state_validity_checker moveit_ompl_interface) + target_link_libraries(test_state_validity_checker moveit_ompl_interface + ompl::ompl) set_target_properties(test_state_validity_checker PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") ament_add_gtest(test_planning_context_manager test/test_planning_context_manager.cpp) ament_target_dependencies(test_planning_context_manager moveit_core tf2_eigen - OMPL Boost Eigen3) - target_link_libraries(test_planning_context_manager moveit_ompl_interface) + Boost Eigen3) + target_link_libraries(test_planning_context_manager moveit_ompl_interface + ompl::ompl) # Disabling flaky test TODO (vatanaksoytezer): Uncomment once this is fixed # ament_add_gtest(test_ompl_constraints test/test_ompl_constraints.cpp) @@ -104,26 +106,27 @@ if(BUILD_TESTING) ament_add_gtest(test_constrained_planning_state_space test/test_constrained_planning_state_space.cpp) ament_target_dependencies(test_constrained_planning_state_space moveit_core - OMPL Boost Eigen3) + Boost Eigen3) target_link_libraries(test_constrained_planning_state_space - moveit_ompl_interface) + moveit_ompl_interface ompl::ompl) set_target_properties(test_constrained_planning_state_space PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") ament_add_gtest(test_constrained_state_validity_checker test/test_constrained_state_validity_checker.cpp) ament_target_dependencies(test_constrained_state_validity_checker moveit_core - OMPL Boost Eigen3) + Boost Eigen3) target_link_libraries(test_constrained_state_validity_checker - moveit_ompl_interface) + moveit_ompl_interface ompl::ompl) set_target_properties(test_constrained_state_validity_checker PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") ament_add_gtest(test_threadsafe_state_storage test/test_threadsafe_state_storage.cpp) - ament_target_dependencies(test_threadsafe_state_storage moveit_core OMPL - Boost Eigen3) - target_link_libraries(test_threadsafe_state_storage moveit_ompl_interface) + ament_target_dependencies(test_threadsafe_state_storage moveit_core Boost + Eigen3) + target_link_libraries(test_threadsafe_state_storage moveit_ompl_interface + ompl::ompl) set_target_properties(test_threadsafe_state_storage PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") From 6b1f3a840e4b33b3cc424a8a96c3aa30337e14a9 Mon Sep 17 00:00:00 2001 From: marqrazz Date: Mon, 9 Sep 2024 11:22:01 -0600 Subject: [PATCH 2/5] specify PUBLIC --- moveit_planners/ompl/ompl_interface/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moveit_planners/ompl/ompl_interface/CMakeLists.txt b/moveit_planners/ompl/ompl_interface/CMakeLists.txt index a4aa1f9ba2..63ff726913 100644 --- a/moveit_planners/ompl/ompl_interface/CMakeLists.txt +++ b/moveit_planners/ompl/ompl_interface/CMakeLists.txt @@ -30,7 +30,7 @@ if(APPLE) endif() ament_target_dependencies( - moveit_ompl_interface + moveit_ompl_interface PUBLIC moveit_core moveit_msgs moveit_ros_planning @@ -44,7 +44,7 @@ set_target_properties( "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set_target_properties(moveit_ompl_interface PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") -target_link_libraries(moveit_ompl_interface ompl::ompl) +target_link_libraries(moveit_ompl_interface PUBLIC ompl::ompl) add_executable(moveit_generate_state_database scripts/generate_state_database.cpp) target_link_libraries(moveit_generate_state_database moveit_ompl_interface From 7be46d48a3cd8801e6dbe7c5c89151f85e02a8eb Mon Sep 17 00:00:00 2001 From: marqrazz Date: Mon, 9 Sep 2024 12:35:15 -0600 Subject: [PATCH 3/5] pre-commit --- moveit_planners/ompl/ompl_interface/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moveit_planners/ompl/ompl_interface/CMakeLists.txt b/moveit_planners/ompl/ompl_interface/CMakeLists.txt index 63ff726913..38ff627406 100644 --- a/moveit_planners/ompl/ompl_interface/CMakeLists.txt +++ b/moveit_planners/ompl/ompl_interface/CMakeLists.txt @@ -30,7 +30,8 @@ if(APPLE) endif() ament_target_dependencies( - moveit_ompl_interface PUBLIC + moveit_ompl_interface + PUBLIC moveit_core moveit_msgs moveit_ros_planning From 46cec897bfbb26f49dcb72cb183fcf9517d1fdf0 Mon Sep 17 00:00:00 2001 From: marqrazz Date: Tue, 10 Sep 2024 06:55:08 -0600 Subject: [PATCH 4/5] only link ompl where required --- moveit_planners/ompl/ompl_interface/CMakeLists.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/moveit_planners/ompl/ompl_interface/CMakeLists.txt b/moveit_planners/ompl/ompl_interface/CMakeLists.txt index 38ff627406..e22c868ae4 100644 --- a/moveit_planners/ompl/ompl_interface/CMakeLists.txt +++ b/moveit_planners/ompl/ompl_interface/CMakeLists.txt @@ -24,11 +24,6 @@ set_target_properties(moveit_ompl_interface find_package(OpenMP REQUIRED) -# Used to link in ODE, an OMPL dependency, on macOS -if(APPLE) - target_link_directories(moveit_ompl_interface PUBLIC ${OMPL_LIBRARY_DIRS}) -endif() - ament_target_dependencies( moveit_ompl_interface PUBLIC @@ -48,8 +43,7 @@ set_target_properties(moveit_ompl_interface PROPERTIES LINK_FLAGS target_link_libraries(moveit_ompl_interface PUBLIC ompl::ompl) add_executable(moveit_generate_state_database scripts/generate_state_database.cpp) -target_link_libraries(moveit_generate_state_database moveit_ompl_interface - ompl::ompl) +target_link_libraries(moveit_generate_state_database moveit_ompl_interface) set_target_properties(moveit_generate_state_database PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") set_target_properties(moveit_generate_state_database @@ -96,8 +90,7 @@ if(BUILD_TESTING) test/test_planning_context_manager.cpp) ament_target_dependencies(test_planning_context_manager moveit_core tf2_eigen Boost Eigen3) - target_link_libraries(test_planning_context_manager moveit_ompl_interface - ompl::ompl) + target_link_libraries(test_planning_context_manager moveit_ompl_interface) # Disabling flaky test TODO (vatanaksoytezer): Uncomment once this is fixed # ament_add_gtest(test_ompl_constraints test/test_ompl_constraints.cpp) @@ -126,8 +119,7 @@ if(BUILD_TESTING) test/test_threadsafe_state_storage.cpp) ament_target_dependencies(test_threadsafe_state_storage moveit_core Boost Eigen3) - target_link_libraries(test_threadsafe_state_storage moveit_ompl_interface - ompl::ompl) + target_link_libraries(test_threadsafe_state_storage moveit_ompl_interface) set_target_properties(test_threadsafe_state_storage PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") From 7a7233408150f33468d0234b4dc7d68d0bdb421d Mon Sep 17 00:00:00 2001 From: Sebastian Jahr Date: Mon, 14 Oct 2024 08:28:43 +0200 Subject: [PATCH 5/5] Fix formatting --- moveit2.repos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moveit2.repos b/moveit2.repos index c2ab76799d..2bf031e2ae 100644 --- a/moveit2.repos +++ b/moveit2.repos @@ -19,4 +19,4 @@ repositories: srdfdom: type: git url: https://github.com/moveit/srdfdom.git - version: ros2 \ No newline at end of file + version: ros2