* Fix occasionally missing goal result caused by race condition
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
* Take action_server_reentrant_mutex_ out of the sending result loop
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
* add note for explaining the current locking order in server.cpp
Signed-off-by: Kaven Yau <kavenyau@foxmail.com>
Co-authored-by: Kaven Yau <kavenyau@foxmail.com>
* Add missing locking to the rclcpp_action::ServerBase. (#1421)
This patch actually does 4 related things:
1. Renames the recursive mutex in the ServerBaseImpl class
to action_server_reentrant_mutex_, which makes it a lot
clearer what it is meant to lock.
2. Adds some additional error checking where checks were missed.
3. Adds a lock to publish_status so that the action_server
structure is protected.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* [backport] Fix action server deadlock (#1285, #1313)
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
* revert comment
Signed-off-by: Daisuke Sato <daisukes@cmu.edu>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* increase test timeout necessary for Connext
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* revert changes overlapping with another PR
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* Increase coverage rclcpp_action to 95%
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Address PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Rebase onto #1311
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* rcutils test depend
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Cleaning up
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add -Wnon-virtual-dtor -Woverloaded-virtual compiler options
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* Add missing virtual dtors
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* please linter
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* [rclcpp_action] Action client holds weak pointers to goal handles
Fixes#861
It is against the design of ROS actions to rely on the status topic for the core implementation,
instead it should just be used for introspection.
Rather than relying on the status topic to remove references to goal handles, the action client
instead holds weak pointers to the goal handles. This way as long as a user holds a reference to
the goal handle they can use it to interact with the action client.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Move cleanup logic to the end of the function
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Add TODO
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Log debug messages when dropping a weak references to goal handles
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Improve documentation
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Fixes https://github.com/ros2/rclcpp/issues/955
There are currently two public APIs for users to get the result of a goal.
This change deprecates one of the APIs, which was considered to be unsafe as
it may result in a race with user-code and raise an exception.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* 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>