forked from BehaviorTree/BehaviorTree.ROS2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37d809c
commit e350172
Showing
6 changed files
with
660 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
project(behaviortree_ros2) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
|
||
###################################################### | ||
|
||
set(THIS_PACKAGE_INCLUDE_DEPENDS | ||
rclcpp | ||
rclcpp_action | ||
ament_index_cpp | ||
behaviortree_cpp_v3) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED ) | ||
find_package(rclcpp_action REQUIRED ) | ||
find_package(behaviortree_cpp_v3 REQUIRED ) | ||
find_package(ament_index_cpp REQUIRED) | ||
|
||
find_package(rosidl_default_generators REQUIRED) | ||
|
||
rosidl_generate_interfaces(${PROJECT_NAME} | ||
"action/Sleep.action" | ||
) | ||
|
||
|
||
###################################################### | ||
|
||
###################################################### | ||
# TESTS | ||
|
||
add_executable(sleep_server test/sleep_server.cpp) | ||
target_include_directories(sleep_server PRIVATE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
ament_target_dependencies(sleep_server | ||
${THIS_PACKAGE_INCLUDE_DEPENDS} | ||
) | ||
rosidl_target_interfaces(sleep_server ${PROJECT_NAME} "rosidl_typesupport_cpp") | ||
|
||
|
||
add_executable(test_client test/test_client.cpp) | ||
target_include_directories(test_client PRIVATE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
ament_target_dependencies(test_client | ||
${THIS_PACKAGE_INCLUDE_DEPENDS} | ||
) | ||
rosidl_target_interfaces(test_client ${PROJECT_NAME} "rosidl_typesupport_cpp") | ||
|
||
|
||
#add_executable(test_server test/test_server.cpp) | ||
#add_dependencies(test_server ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
#target_link_libraries(test_server ${catkin_LIBRARIES} ) | ||
|
||
###################################################### | ||
# INSTALL | ||
|
||
install(TARGETS | ||
sleep_server | ||
test_client | ||
RUNTIME DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
) | ||
|
||
install( | ||
DIRECTORY include/ | ||
DESTINATION include | ||
) | ||
|
||
###################################################### | ||
|
||
ament_export_include_directories(include) | ||
|
||
ament_package() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#goal definition | ||
int32 msec_timeout | ||
--- | ||
#result definition | ||
bool done | ||
--- | ||
#feedback | ||
int32 cycle |
Oops, something went wrong.