Skip to content

Conversation

@mxgrey
Copy link
Collaborator

@mxgrey mxgrey commented Aug 10, 2025

This PR builds off of #410 to fully implement action clients and action servers that utilize the new async execution capabilities of rclrs.

This PR depends on both ros2-rust/rosidl_runtime_rs#15 and ros2-rust/rosidl_rust#7. Anyone testing it out should make sure to fetch those branches of rosidl_generator_rs and rosidl_rust.

In the coming week, I will update this PR description with a thorough description of what's been implemented and how it should be used. In the meantime I just wanted to get this PR up for visibility in the upcoming working group meeting.

The implementation is finished, along with some initial tests. All that's left to do is add more documentation, add usage examples, and add comprehensive tests.

mxgrey added 19 commits July 18, 2025 16:45
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
… is WIP

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
…n_server.rs

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Co-authored-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
@mxgrey mxgrey mentioned this pull request Aug 10, 2025
mxgrey and others added 8 commits August 11, 2025 21:08
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
… binding generation

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
…bindings

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
@esteve esteve self-requested a review October 13, 2025 15:22
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
@mxgrey
Copy link
Collaborator Author

mxgrey commented Oct 13, 2025

@esteve I've done one more iteration, and I believe this PR is in a good state to review now. Every aspect of actions is implemented, and there are test cases for a good number of action state transitions and server-client interactions.

I think I'd recommend adding more complex and comprehensive test cases before anyone puts this into production, but as it is, it should be a very strong debut for action support.

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
@mxgrey
Copy link
Collaborator Author

mxgrey commented Oct 17, 2025

@esteve Earlier today I noticed that there was a CI failure for MSRV 1.75 from using an unstable function. I've removed it, and now the CI is green.

Let me know if you encounter any other blockers for this PR. I'm happy to help move this along with whatever is needed.

Copy link
Collaborator

@esteve esteve left a comment

Choose a reason for hiding this comment

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

@mxgrey thanks! Overall it looks good, however I'd prefer to leave the bindings generation stuff aside for now, I've submitted mxgrey#5 towards this PR to revert those changes and fix/improve the bindings generation separately.

Signed-off-by: Esteve Fernandez <esteve@apache.org>
@esteve
Copy link
Collaborator

esteve commented Oct 27, 2025

@mxgrey I think CI is failing because Cargo is using rosidl_runtime_rs 0.4, which doesn't have the latest changes. I've submitted mxgrey#6 to update to 0.5

Signed-off-by: Esteve Fernandez <esteve@apache.org>
esteve
esteve previously approved these changes Oct 27, 2025
@esteve esteve merged commit 266c08f into ros2-rust:main Oct 27, 2025
9 checks passed
esteve added a commit that referenced this pull request Oct 27, 2025
* Remove lockfiles from being tracked

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Port draft action implementation from #410

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Rework readiness for waitables

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Reworking action server goal handle lifecycles

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fleshing out the state machines for action server goals -- cancelling is WIP

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Finished action server goal state machine API -- need to finish action_server.rs

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Progress on action_server implementation

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Action server finished -- needs testing

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Creating action server and action goal receiver -- needs testing

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Introducing action clients into the wait set processing

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Incorporate action clients into wait sets

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fleshing out implementation of action clients

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Implementing goal status client

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Implementing goal result client

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* CancellationClient API in progress

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Finish action cancellation request API

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Finish API for action clients -- needs testing

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Link against rcl_action

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Add initial tests and improve ergonomics

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Add co-author credit

Co-authored-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Re-export traits from rosidl_runtime_rs

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Update bindings to include actions -- added script for automating the binding generation

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Apply cargo fmt

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Update bindings for kilted

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>

* Update bindings for humble

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>

* Update bindings for rolling

Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>

* Fix use of serde

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Use desktop image so it includes rcl_action which we need for action bindings

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fix serde

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Finish documentation for GoalClientStream

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Enable serde for goal status info

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fix action cancellation pipeline

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* More trait re-exports

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Add tests for action cancellation

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fix use of action client options

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Fix style

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* Remove use of .clear_poison because it is not stable in 1.75

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>

* chore: revert bindings-related changes (#5)

Signed-off-by: Esteve Fernandez <esteve@apache.org>

* update rosidl_runtime_rs for action support (#6)

Signed-off-by: Esteve Fernandez <esteve@apache.org>

* revert bindings generation changes

---------

Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
Signed-off-by: Esteve Fernandez <esteve@apache.org>
Co-authored-by: Nathan Wiebe Neufeldt <wn.nathan@gmail.com>
Co-authored-by: Esteve Fernandez <33620+esteve@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants