* deprecate redundant namespaces, move classes to own files, rename some classes
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup
Signed-off-by: William Woodall <william@osrfoundation.org>
* address review comments
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix ups since rebase
Signed-off-by: William Woodall <william@osrfoundation.org>
* avoid deprecation warnings from deprecated functions
Signed-off-by: William Woodall <william@osrfoundation.org>
* more fixes
Signed-off-by: William Woodall <william@osrfoundation.org>
* another fixup, after another rebase
Signed-off-by: William Woodall <william@osrfoundation.org>
It was complaining about an unknown macro RCLCPP_SMART_PTR_DEFINITIONS.
Passing rclcpp include directories to cppcheck resolves the errors
reported in rclcpp_action and rclcpp_lifecycle.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Whenever a call is made to `rclcpp_action::Client::wait_for_action_server`
a weak pointer to an Event object gets added to the graph_event_ vector
of the NodeGraph interface. This vector will be cleared on a node graph
change event, but if no such event occurs the weak pointer will be stuck
in the vector. Furthermore, if client code issues repeated calls to
`wait_for_action_server` the vector will keep growing.
The fix moves the Event object creation right after the early return from
`wait_for_action_server` so that the Event object is not created in the
case that the server is known to be present and therefore there is no
need to wait for a node graph change event to occur.
Signed-off-by: Adrian Stere <astere@clearpath.ai>
As documented in rcl_action, a return code of RCL_RET_ACTION_CLIENT_TAKE_FAILED does not mean that
an error occurred.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This fixes a runtime error caused by a race condition when making consecutive requests for the
result.
Specifically, this happens if the user provides a result callback when sending a goal and then
calls async_get_result shortly after.
Resolves#783
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add line break after first open paren in multiline function call
as per developer guide:
https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#open-versus-cuddled-braces
see https://github.com/ament/ament_lint/pull/148
Signed-off-by: Dan Rose <dan@digilabs.io>
Fix dedent when first function argument starts with a brace
Signed-off-by: Dan Rose <dan@digilabs.io>
Line break with multiline if condition
Remove line breaks where allowed.
Signed-off-by: Dan Rose <dan@digilabs.io>
Fixup after rebase
Signed-off-by: Dan Rose <dan@digilabs.io>
Fixup again after reverting indent_paren_open_brace
Signed-off-by: Dan Rose <dan@digilabs.io>
* Revert comment spacing change, condense some lines
Signed-off-by: Dan Rose <dan@digilabs.io>
* improve interoperability with rclcpp::Duration and std::chrono
Signed-off-by: William Woodall <william@osrfoundation.org>
* add to_rmw_time to Duration
Signed-off-by: William Woodall <william@osrfoundation.org>
* add new QoS class to rclcpp
Signed-off-by: William Woodall <william@osrfoundation.org>
* changes to NodeBase, NodeTopics, etc in preparation for changes to pub/sub
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor publisher creation to use new QoS class
Signed-off-by: William Woodall <william@osrfoundation.org>
* refactor subscription creation to use new QoS class
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixing fallout from changes to pub/sub creation
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixed Windows error: no appropriate default constructor available
why? who knows
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixed Windows error: could not deduce template argument for 'PublisherT'
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix missing vftable linker error on Windows
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix more cases of no suitable default constructor errors...
Signed-off-by: William Woodall <william@osrfoundation.org>
* prevent msvc from trying to interpret some cases as functions
Signed-off-by: William Woodall <william@osrfoundation.org>
* uncrustify
Signed-off-by: William Woodall <william@osrfoundation.org>
* cpplint
Signed-off-by: William Woodall <william@osrfoundation.org>
* add C++ version of default action qos
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixing lifecycle subscription signatures
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix allocators (we actually use this already in the pub/sub factory)
Signed-off-by: William Woodall <william@osrfoundation.org>
* suppress cppcheck on false positive syntax error
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix more cppcheck syntax error false positives
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix case where sub-type of QoS is used
Signed-off-by: William Woodall <william@osrfoundation.org>
* fixup get_node_topics_interface.hpp according to reviews and tests
Signed-off-by: William Woodall <william@osrfoundation.org>
* additional fixes based on local testing and CI
Signed-off-by: William Woodall <william@osrfoundation.org>
* another trick to avoid 'no appropriate default constructor available'
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix compiler error with clang on macOS
Signed-off-by: William Woodall <william@osrfoundation.org>
* disable build failure tests until we can get Jenkins to ignore their output
Signed-off-by: William Woodall <william@osrfoundation.org>
* suppress more cppcheck false positives
Signed-off-by: William Woodall <william@osrfoundation.org>
* add missing visibility macros to default QoS profile classes
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix another case of 'no appropriate default constructor available'
Signed-off-by: William Woodall <william@osrfoundation.org>
* unfortunately this actaully fixes a build error on Windows...
Signed-off-by: William Woodall <william@osrfoundation.org>
* fix typos
Signed-off-by: William Woodall <william@osrfoundation.org>
* Populate return code of CancelGoal service response
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Throw if there is an error processing a cancel goal request
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Make cancel callback signature consistent across cancel methods and add tests
Refactored the callback signature for canceling one goal. Now it is the same as the other cancel methods.
This makes it easier to communicate the error code to the user.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Address review
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Now supports callbacks for the goal response and result.
This also makes it easier to incorporate action clients in composable nodes since we don't have to rely on waiting on futures.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* match renamed action types
* fix action type casting
* rename type/field to use correct term
* rename custom GoalID type to avoid naming collision, update types using unique_identifier_msgs
* remove obsolete comments
* change signature of set_succeeded / set_canceled
* change signature of on_terminal_state_(uuid_, result_msg);set_succeeded / set_canceled
* change signature of set_aborted
* change signature of publish_feedback
* update another test