Add Action graph API (#411)
* Add action graph API Builds on top of the rcl graph API. A list of action names associated with action clients can be constructed by looking for subscriber topic names that have the suffix "/_action/feedback". Likewise, action servers are associated with publisher topic names with the same suffix. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Enable multiple rmw action graph API tests Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Use ament_target_dependencies for osrf_testing_tools_cpp Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix lint errors Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Refactor * Move graph API common implementation to local function * Refactor tests Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Disable graph tests with OpenSplice Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Include graph.h in rcl_action.h Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Remove duplicate test Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Prefix increment operators Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Rename 'suffix' -> 'identifier' Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add missing finalize calls and remove redundant branch Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Finalize names and types struct on error Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix bugs in tests Pass valid names and types struct and update expected error code. Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Add zero allocator tests Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Fix indentation Signed-off-by: Jacob Perron <jacob@openrobotics.org> * Check if action identifiers are the suffix Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
parent
11b5eb865b
commit
b5039d20d7
5 changed files with 961 additions and 1 deletions
|
@ -36,6 +36,7 @@ set(rcl_action_sources
|
|||
src/${PROJECT_NAME}/action_server.c
|
||||
src/${PROJECT_NAME}/goal_handle.c
|
||||
src/${PROJECT_NAME}/goal_state_machine.c
|
||||
src/${PROJECT_NAME}/graph.c
|
||||
src/${PROJECT_NAME}/names.c
|
||||
src/${PROJECT_NAME}/types.c
|
||||
)
|
||||
|
@ -91,7 +92,11 @@ if(BUILD_TESTING)
|
|||
target_link_libraries(test_action_client
|
||||
${PROJECT_NAME}
|
||||
)
|
||||
ament_target_dependencies(test_action_client "osrf_testing_tools_cpp" "rcl" "test_msgs")
|
||||
ament_target_dependencies(test_action_client
|
||||
"osrf_testing_tools_cpp"
|
||||
"rcl"
|
||||
"test_msgs"
|
||||
)
|
||||
endif()
|
||||
|
||||
# get the rmw implementations ahead of time
|
||||
|
@ -122,6 +127,7 @@ if(BUILD_TESTING)
|
|||
${PROJECT_NAME}
|
||||
)
|
||||
ament_target_dependencies(${target}${target_suffix}
|
||||
"osrf_testing_tools_cpp"
|
||||
"rcl"
|
||||
"test_msgs"
|
||||
)
|
||||
|
@ -146,6 +152,13 @@ if(BUILD_TESTING)
|
|||
"test/rcl_action/test_action_communication.cpp")
|
||||
custom_test_c(test_action_interaction
|
||||
"test/rcl_action/test_action_interaction.cpp")
|
||||
|
||||
# TODO(jacobperron): Graph tests fail with opensplice. Re-enable after resolving
|
||||
# https://github.com/ros2/ros2/issues/677
|
||||
if(NOT rmw_implementation STREQUAL "rmw_opensplice_cpp")
|
||||
custom_test_c(test_graph
|
||||
"test/rcl_action/test_graph.cpp")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
call_for_each_rmw_implementation(targets)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue