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

Action server implementation #323

Merged
merged 39 commits into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
69d88a4
[rcl_action] Add action server boilerplate
jacobperron Nov 6, 2018
7a26a61
[wip] Implement action server init, fini, and is_valid functions
jacobperron Nov 6, 2018
9bf16df
Add macros for initializing services and publishers
jacobperron Nov 6, 2018
54ffb59
Initialize typesupport in test
jacobperron Nov 7, 2018
f638f78
Finish action server init/fini implementation
jacobperron Nov 8, 2018
c5b4ebb
Implement rcl_action_server_get_default_options()
jacobperron Nov 8, 2018
d221b74
Implement rcl_action_accept_new_goal()
jacobperron Nov 8, 2018
be6ce14
Implement rcl_action_server_get_options()
jacobperron Nov 8, 2018
c84eba3
Implement rcl_action_server_get_action_name()
jacobperron Nov 8, 2018
c751648
Implement rcl_action_get_goal_status_array()
jacobperron Nov 8, 2018
b0dc950
Remove print statements and quelch unused return warning
jacobperron Nov 8, 2018
bf26092
Fix typo
jacobperron Nov 8, 2018
cd6ab11
Fix type comparison warning
jacobperron Nov 8, 2018
476b677
Fix warnings
jacobperron Nov 8, 2018
3caa6e7
Bugfix: reset pointers and size in type finalize functions
jacobperron Nov 8, 2018
8c13a5f
Remove subfolder argument from action type supoport macro
jacobperron Nov 9, 2018
d4f085d
Implement send/take functions for action server services
jacobperron Nov 9, 2018
93c2120
Add explicit cast
jacobperron Nov 9, 2018
db818d8
Implement action server publishers for feedback and status
jacobperron Nov 9, 2018
cd93ed2
Implement rcl_action_process_cancel_request()
jacobperron Nov 9, 2018
f53f77a
Remove unnecessary check and clarify comment
jacobperron Nov 12, 2018
45ea2b9
Add test for initializing action server with same name
jacobperron Nov 12, 2018
5bb55ef
Address review
jacobperron Nov 12, 2018
260d93f
Use type-erased pointer for rcl_action_publish_status()
jacobperron Nov 12, 2018
f658280
Implement rcl_action_clear_expired_goals()
jacobperron Nov 13, 2018
ef03884
Finish rcl_action_clear_expired_goals() implementation
jacobperron Nov 13, 2018
2c938cb
Do heap allocation of temporary array to satisfy MSVC compiler
jacobperron Nov 13, 2018
6bfa497
Bugfix: finalize node in test tear downs and reset expected errors
jacobperron Nov 13, 2018
22d3ace
Update documentation
jacobperron Nov 15, 2018
5488680
Update package.xml
jacobperron Nov 15, 2018
906c6ce
Address review
jacobperron Nov 15, 2018
df742be
Pass in rcl_clock_t to action server
jacobperron Nov 16, 2018
02b9c28
Remove commented test
jacobperron Nov 16, 2018
18fc054
Update default options getter
jacobperron Nov 16, 2018
2c734fe
Replace assertions with error return codes
jacobperron Nov 16, 2018
7028e3f
Initialize output variables in tests to known invalid values
jacobperron Nov 16, 2018
1140112
Do not finalize goal handles in expire function
jacobperron Nov 16, 2018
7aadb55
Fix incorrect allocation size + minro refactor
jacobperron Nov 16, 2018
aba8f86
Add tests for invalid action names and fix bug
jacobperron Nov 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion rcl_action/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -49,8 +53,11 @@ add_library(${PROJECT_NAME}
)

ament_target_dependencies(${PROJECT_NAME}
"rcl"
"rosidl_generator_c"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, alphabetical order

"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.
Expand All @@ -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)
Expand All @@ -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
)
Copy link
Member

Choose a reason for hiding this comment

The 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}
Copy link
Contributor

Choose a reason for hiding this comment

The 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_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}
Copy link
Contributor

Choose a reason for hiding this comment

The 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
)
Expand Down Expand Up @@ -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()
Loading