This is just a further check to ensure the test is correct,
and also gets rid of a slew of dead store warnings from
clang static analysis.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Add fault injection macros and unit tests to rcl_action
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add action_server validity check, and remove dead code
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Increase test coverage of rcl_action
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Reorganizing impl structs into private header
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Addressing memory error and PR feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
* Update action graph tests to account for type namespace
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Enable OpenSplice action graph test
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Exclude some action graph tests with OpenSplice
It appears that getting graph information from finalized nodes succeeds with OpenSplice, unlike the other RMW implementations.
Since we do not have tests covering this case in rcl, it's not clear if this is a bug or expected behaviour.
In the meantime, I've disabled testing this specific case for OpenSplice.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* const bool
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* implement rcl_wait and rcl_take for rcl_event_t
Signed-off-by: Miaofei <miaofei@amazon.com>
* address feedback regarding formatting issues
Signed-off-by: Miaofei <miaofei@amazon.com>
* Remove dependency on sleep in test_events
Signed-off-by: Ross Desmond <44277324+ross-desmond@users.noreply.github.com>
* update total max wait time for setting up publisher and subscriber to 10 seconds
Signed-off-by: Miaofei <miaofei@amazon.com>
* Fix test_events for rmw_connext
Signed-off-by: Ross Desmond <44277324+ross-desmond@users.noreply.github.com>
* Refactor out timed loop from tests to function
Signed-off-by: Miaofei <miaofei@amazon.com>
* address additional feedback from pull request
Signed-off-by: Miaofei <miaofei@amazon.com>
* update comment regarding difference between connext and opensplice
Signed-off-by: Miaofei <miaofei@amazon.com>
* fix uncrustify issues
Signed-off-by: Miaofei <miaofei@amazon.com>
* update test_events for compatibility with API changes
Signed-off-by: Miaofei <miaofei@amazon.com>
* temporarily disable test_events for macOS
Signed-off-by: Miaofei <miaofei@amazon.com>
* Add return code to CancelGoal service response
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add case for terminated goals
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Check for ERROR_NONE instead of 0
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* 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>
* pass context to wait set, and fini rmw context
Signed-off-by: William Woodall <william@osrfoundation.org>
* use identifier rather than impl to check init status
Signed-off-by: William Woodall <william@osrfoundation.org>
* Add action_interaction_tests
* Fixed tests to work with new uuid
* Added comments for each test
* Addressed peer review comments
* Removed unnecessary rcl_reset_error calls from test_action_communication
* Addressed second part of peer review
* refactor init to not be global
Signed-off-by: William Woodall <william@osrfoundation.org>
* style changes
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor to hide use of C11 atomics in implementation
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix new action tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* use alternative atomic init for Windows support
* updates after rebase
Signed-off-by: William Woodall <william@osrfoundation.org>
* cleanup rmw_init_options before copying
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix two bugs in new init code
* relax validity checks in a few places to facilitate post shutdown cleanup
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixing tests for new API behavior
Signed-off-by: William Woodall <william@osrfoundation.org>
* to allocator -> to allocate
* acutally call rmw_shutdown() and address review comments
Signed-off-by: William Woodall <william@osrfoundation.org>
Added action cancel test
Added action result communication test
Added action status communication test
Added action feedback communication test
Fix wrong return code in action client
* Implement action server init, fini, and is_valid functions
* Add macros for initializing services and publishers
* Implement rcl_action_server_get_default_options()
* Implement rcl_action_accept_new_goal()
* Add function, rcl_action_server_goal_exists(), for checking if goal is already being tracked by an action server
* Add unit tests
* Implement rcl_action_server_get_goal_handles()
* Implement rcl_action_server_get_options()
* Implement rcl_action_server_get_action_name()
* Implement rcl_action_get_goal_status_array()
* Bugfix: reset pointers and size in type finalize functions
Also let finalize functions be called on already finalized objects
* Implement send/take functions for action server services
* Implement action server publishers for feedback and status
* Implement rcl_action_process_cancel_request()
* Add partial communication tests
* Define UUID_SIZE
* Use type-erased pointer for rcl_action_publish_status()
* Implement rcl_action_clear_expired_goals()
Introduce rcl_clock_t to action server implementation.
* Change internal goal handle array to be an array of pointers.
* Add check for invalid action names
* Do heap allocation of temporary array to satisfy MSVC compiler
* Bugfix: finalize node in test tear downs and reset expected errors
* Update documentation
* Update package.xml
* Pass in rcl_clock_t to action server
Rather than initializing internally.
* Do not finalize goal handles in expire function
Instead, leave it up to the caller to finalize goal handles.
Renamed the function to rcl_action_expire_goals.
* [rcl_action] Add function for checking if goal can be transitioned to CANCELING
Add unit tests for the new function rcl_action_goal_handle_is_cancelable(), as well as rcl_action_goal_handle_is_active().
* use new error handling API from rcutils
Signed-off-by: William Woodall <william@osrfoundation.org>
* use semicolons after macros
Signed-off-by: William Woodall <william@osrfoundation.org>
* use new error handling API from rcutils
Signed-off-by: William Woodall <william@osrfoundation.org>
* minimize vertical whitespace
Signed-off-by: William Woodall <william@osrfoundation.org>
* use semicolons after macros
Signed-off-by: William Woodall <william@osrfoundation.org>
* Fix buggy if-conditions in transition functions.
* Bugfix: incease number of states by one
* Cleanup CMakeLists.txt and package.xml
* Move goal state machine implementation details from header to C file