-
Notifications
You must be signed in to change notification settings - Fork 411
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
Add more callbacks to rclcpp_action::Client #635
Comments
This seems like a reasonable addition. Until a mechanism like std::future::then is available, future objects are of limited use. I suspect this is why the service client also takes a callback parameter. A PR is welcome for the proposed change 🙂 An alternative to the issue is to refactor the spin functions so that it is possible to recursively spin on futures. I noticed a TODO in the code: rclcpp/rclcpp/include/rclcpp/executor.hpp Lines 227 to 228 in 3919ab1
I haven't thought too much about how this might be done though. |
Resolves #635. 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>
…#635) Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
The cache consumer requires that you call close() before calling change_consumer_callback(). The test forgot the close() call, so was running into a race where changing out the callback was not atomic. Remember to call close() in the test, which should fix some occasional failures in CI. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Feature request
Feature description
Using the action client in
rclcpp_action
requires polling using timers on the future objects returned byClient::async_send_goal
andClient::async_get_result
. It would be far more convenient to add callbacks to these functions.(
spin_until_future_complete
won't work because my node is already spinning.)Implementation considerations
Possible function signatures could look like this:
While these are the callbacks I currently need, it would be consistent to add appropriate callbacks to all functions returning future objects.
The text was updated successfully, but these errors were encountered: