Add server_is_available to ActionClientState#622
Draft
patrick-deschambault wants to merge 5 commits intoros2-rust:mainfrom
Draft
Add server_is_available to ActionClientState#622patrick-deschambault wants to merge 5 commits intoros2-rust:mainfrom
patrick-deschambault wants to merge 5 commits intoros2-rust:mainfrom
Conversation
…on server is currently active
esteve
requested changes
Apr 11, 2026
ros2_rust_humble.repos
Outdated
| type: git | ||
| url: https://github.com/ros2/unique_identifier_msgs.git | ||
| version: humble | ||
| ros2/geometry2: |
Collaborator
There was a problem hiding this comment.
@patrick-deschambault thanks for the PR, can you elaborate why you needed this? Could you remove it if you don't need it? Thanks.
Collaborator
|
@patrick-deschambault CI is failing because the code is not formatted properly, could you run cargo fmt and fix the warnings? Thanks |
esteve
requested changes
Apr 11, 2026
| /// | ||
| /// Returns an [`RclrsError`] if there is an issue communicating with the | ||
| /// underlying `rcl` C layer. | ||
| pub fn server_is_available(&self) -> Result<bool, RclrsError> { |
Collaborator
There was a problem hiding this comment.
It'd be really useful to provide tests for this function, could you add them?
Author
There was a problem hiding this comment.
Yes sure, I'll put the PR on Draft and bring it Under Review when ready. Thanks for your input !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the
server_is_availablemethod toActionClientState.Currently,
rclrsaction clients does not have a built-in mechanism to verify the availability of an action server on the network. This makes it difficult to safely send goals upon initialization without risking dropped requests.By exposing the
rcl_action_server_is_availablebinding, this PR enables developers to easily build reliable waiting logic.Example Use Case
This enables the implementation of async timeout loops in user code, such as: