91 lines
2.7 KiB
CMake
91 lines
2.7 KiB
CMake
cmake_minimum_required(VERSION 3.8)
|
|
project(rbs_bt_executor)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
add_compile_options(-Wall -Wextra -Wpedantic)
|
|
endif()
|
|
|
|
|
|
find_package(ament_cmake REQUIRED)
|
|
find_package(rclcpp REQUIRED)
|
|
find_package(rclcpp_action REQUIRED)
|
|
find_package(geometry_msgs REQUIRED)
|
|
find_package(tf2_geometry_msgs REQUIRED)
|
|
find_package(moveit_msgs REQUIRED)
|
|
find_package(moveit_core REQUIRED)
|
|
find_package(moveit_ros_planning REQUIRED)
|
|
find_package(moveit_ros_planning_interface REQUIRED)
|
|
find_package(ament_index_cpp REQUIRED)
|
|
find_package(rbs_skill_interfaces REQUIRED)
|
|
find_package(behavior_tree REQUIRED)
|
|
find_package(control_msgs REQUIRED)
|
|
|
|
if (NOT CMAKE_CXX_STANDARD)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
endif()
|
|
|
|
set(dependencies
|
|
rclcpp
|
|
rclcpp_action
|
|
geometry_msgs
|
|
tf2_geometry_msgs
|
|
moveit_msgs
|
|
moveit_core
|
|
moveit_ros_planning
|
|
moveit_ros_planning_interface
|
|
ament_index_cpp
|
|
rbs_skill_interfaces
|
|
behavior_tree
|
|
std_msgs
|
|
control_msgs
|
|
)
|
|
|
|
include_directories(include)
|
|
|
|
add_library(rbs_skill_move_topose_bt_action_client SHARED src/MoveToPose.cpp)
|
|
list(APPEND plugin_libs rbs_skill_move_topose_bt_action_client)
|
|
|
|
add_library(rbs_skill_gripper_move_bt_action_client SHARED src/gripper_move.cpp)
|
|
list(APPEND plugin_libs rbs_skill_gripper_move_bt_action_client)
|
|
|
|
add_library(rbs_skill_get_pick_place_pose_service_client SHARED src/GetPickPlacePoses.cpp)
|
|
list(APPEND plugin_libs rbs_skill_get_pick_place_pose_service_client)
|
|
|
|
add_library(rbs_skill_move_joint_state SHARED src/MoveToJointStates.cpp)
|
|
list(APPEND plugin_libs rbs_skill_move_joint_state)
|
|
|
|
add_library(rbs_add_planning_scene_object SHARED src/AddPlanningSceneObject.cpp)
|
|
list(APPEND plugin_libs rbs_add_planning_scene_object)
|
|
|
|
foreach(bt_plugin ${plugin_libs})
|
|
ament_target_dependencies(${bt_plugin} ${dependencies})
|
|
target_compile_definitions(${bt_plugin} PRIVATE BT_PLUGIN_EXPORT)
|
|
endforeach()
|
|
|
|
|
|
|
|
install(DIRECTORY launch bt_trees config DESTINATION share/${PROJECT_NAME})
|
|
|
|
install(TARGETS
|
|
${plugin_libs}
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
RUNTIME DESTINATION lib/${PROJECT_NAME}
|
|
)
|
|
|
|
|
|
if(BUILD_TESTING)
|
|
find_package(ament_lint_auto REQUIRED)
|
|
# the following line skips the linter which checks for copyrights
|
|
# comment the line when a copyright and license is added to all source files
|
|
set(ament_cmake_copyright_FOUND TRUE)
|
|
# the following line skips cpplint (only works in a git repo)
|
|
# comment the line when this package is in a git repo and when
|
|
# a copyright and license is added to all source files
|
|
set(ament_cmake_cpplint_FOUND TRUE)
|
|
ament_lint_auto_find_test_dependencies()
|
|
endif()
|
|
|
|
ament_export_dependencies(${dependencies})
|
|
|
|
ament_package()
|