Skip to content
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

Update ompl_interface with latest version of OMPL #2994

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions moveit2.repos
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ repositories:
type: git
url: https://github.com/moveit/moveit_resources.git
version: ros2
ompl:
Copy link
Member

Choose a reason for hiding this comment

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

Should we wait till the new ompl version is released?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the ompl crew would be willing to release although they still have at least one unresolved regression lying around.

But I'm not sure it's so difficult to support both ompl cmake interfaces here for now. We do that in MoveIt.

type: git
url: https://github.com/ompl/ompl.git
version: main
srdfdom:
type: git
url: https://github.com/moveit/srdfdom.git
Expand Down
2 changes: 1 addition & 1 deletion moveit_planners/ompl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
36 changes: 16 additions & 20 deletions moveit_planners/ompl/ompl_interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,23 @@ 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
moveit_core
moveit_msgs
moveit_ros_planning
rclcpp
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 PUBLIC ompl::ompl)
add_executable(moveit_generate_state_database
scripts/generate_state_database.cpp)
target_link_libraries(moveit_generate_state_database moveit_ompl_interface)
Expand All @@ -64,9 +59,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})
Expand All @@ -77,23 +72,24 @@ 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)
Boost Eigen3)
target_link_libraries(test_planning_context_manager moveit_ompl_interface)

# Disabling flaky test TODO (vatanaksoytezer): Uncomment once this is fixed
Expand All @@ -104,25 +100,25 @@ 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)
ament_target_dependencies(test_threadsafe_state_storage moveit_core Boost
Eigen3)
target_link_libraries(test_threadsafe_state_storage moveit_ompl_interface)
set_target_properties(test_threadsafe_state_storage
PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}")
Expand Down
Loading