-
Notifications
You must be signed in to change notification settings - Fork 163
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
Action server implementation #323
Changes from all commits
69d88a4
7a26a61
9bf16df
54ffb59
f638f78
c5b4ebb
d221b74
be6ce14
c84eba3
c751648
b0dc950
bf26092
cd6ab11
476b677
3caa6e7
8c13a5f
d4f085d
93c2120
db818d8
cd93ed2
f53f77a
45ea2b9
5bb55ef
260d93f
f658280
ef03884
2c938cb
6bfa497
22d3ace
5488680
906c6ce
df742be
02b9c28
18fc054
2c734fe
7028e3f
1140112
7aadb55
aba8f86
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,11 @@ project(rcl_action) | |
|
||
find_package(ament_cmake_ros REQUIRED) | ||
|
||
find_package(rosidl_generator_c REQUIRED) | ||
find_package(action_msgs REQUIRED) | ||
find_package(rcl REQUIRED) | ||
find_package(rcutils REQUIRED) | ||
find_package(rmw REQUIRED) | ||
|
||
include_directories( | ||
include | ||
|
@@ -33,6 +36,7 @@ add_executable(test_compile_headers | |
|
||
set(rcl_action_sources | ||
src/${PROJECT_NAME}/action_client.c | ||
src/${PROJECT_NAME}/action_server.c | ||
src/${PROJECT_NAME}/goal_handle.c | ||
src/${PROJECT_NAME}/goal_state_machine.c | ||
src/${PROJECT_NAME}/names.c | ||
|
@@ -49,8 +53,11 @@ add_library(${PROJECT_NAME} | |
) | ||
|
||
ament_target_dependencies(${PROJECT_NAME} | ||
"rcl" | ||
"rosidl_generator_c" | ||
"action_msgs" | ||
"rmw" | ||
"rcutils" | ||
"rcl" | ||
) | ||
# Causes the visibility macros to use dllexport rather than dllimport, | ||
# which is appropriate when building the dll but not consuming it. | ||
|
@@ -68,6 +75,7 @@ install(TARGETS ${PROJECT_NAME} | |
) | ||
|
||
if(BUILD_TESTING) | ||
find_package(test_msgs REQUIRED) | ||
find_package(ament_cmake_gtest REQUIRED) | ||
find_package(ament_lint_auto REQUIRED) | ||
find_package(test_msgs REQUIRED) | ||
|
@@ -86,6 +94,34 @@ if(BUILD_TESTING) | |
) | ||
ament_target_dependencies(test_action_client "rcl" "test_msgs") | ||
endif() | ||
ament_add_gtest(test_action_communication | ||
test/rcl_action/test_action_communication.cpp | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test (as well as the one below) is only covering the default rmw impl. It would be good if they test would be invoked for every rmw impl. |
||
if(TARGET test_action_communication) | ||
target_include_directories(test_action_communication PUBLIC | ||
include | ||
${rcl_INCLUDE_DIRS} | ||
${test_msgs_INCLUDE_DIRS} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, This is taken care of by |
||
) | ||
target_link_libraries(test_action_communication | ||
${PROJECT_NAME} | ||
) | ||
ament_target_dependencies(test_action_communication "test_msgs") | ||
endif() | ||
ament_add_gtest(test_action_server | ||
test/rcl_action/test_action_server.cpp | ||
) | ||
if(TARGET test_action_server) | ||
target_include_directories(test_action_server PUBLIC | ||
include | ||
${rcl_INCLUDE_DIRS} | ||
${test_msgs_INCLUDE_DIRS} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit, This is taken care of by ament_target_dependencies() below |
||
) | ||
target_link_libraries(test_action_server | ||
${PROJECT_NAME} | ||
) | ||
ament_target_dependencies(test_action_server "test_msgs") | ||
endif() | ||
ament_add_gtest(test_goal_handle | ||
test/rcl_action/test_goal_handle.cpp | ||
) | ||
|
@@ -139,5 +175,8 @@ ament_export_include_directories(include) | |
ament_export_libraries(${PROJECT_NAME}) | ||
ament_export_dependencies(ament_cmake) | ||
ament_export_dependencies(rcl) | ||
ament_export_dependencies(rcutils) | ||
ament_export_dependencies(rmw) | ||
ament_export_dependencies(action_msgs) | ||
ament_export_dependencies(rosidl_generator_c) | ||
ament_package() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, alphabetical order