Skip to content

Report wait outcome from SyncParametersClient::get_parameters (#200)#3169

Open
PavelGuzenfeld wants to merge 1 commit into
ros2:rollingfrom
PavelGuzenfeld:fix/issue-200-param-client-error-reporting
Open

Report wait outcome from SyncParametersClient::get_parameters (#200)#3169
PavelGuzenfeld wants to merge 1 commit into
ros2:rollingfrom
PavelGuzenfeld:fix/issue-200-param-client-error-reporting

Conversation

@PavelGuzenfeld
Copy link
Copy Markdown

SyncParametersClient::get_parameters() returns an empty vector both when the server responds with no matching parameters and when the request does not complete (timeout or interruption), so a caller cannot tell a failed request apart from a legitimately empty response (#200).

This adds a non-breaking overload that also reports the wait outcome through a rclcpp::FutureReturnCode out-parameter. The existing overloads delegate to it, so their behaviour is unchanged.

Tests cover SUCCESS-with-value, SUCCESS-but-empty, and TIMEOUT (no server): the last two both return an empty vector but now report different outcomes.

The sibling sync methods (describe_parameters, get_parameter_types, set_parameters, delete_parameters) share the same limitation; if this pattern looks right, I'm happy to extend it to them in a follow-up.


Some of this change was produced with Claude Opus 4.8 (Anthropic).

…outcome (ros2#200)

SyncParametersClient::get_parameters() returns an empty vector both when the
parameter server responds with no matching parameters and when the request does
not complete (timeout or interruption), so a caller cannot tell a failed request
apart from a legitimately empty response.

Add a non-breaking overload that additionally reports the wait outcome through a
rclcpp::FutureReturnCode out-parameter. The existing overloads delegate to it, so
their behaviour is unchanged; callers that need to distinguish the cases use the
new overload.

Adds a regression test covering SUCCESS-with-value, SUCCESS-but-empty, and TIMEOUT
(no server): the last two both return an empty vector but now report different
outcomes.

Refs ros2#200

Generated-by: Claude Opus 4.8 (Anthropic)
Signed-off-by: Pavel Guzenfeld <pavelguzenfeld@gmail.com>
@PavelGuzenfeld PavelGuzenfeld force-pushed the fix/issue-200-param-client-error-reporting branch from 99b84ca to 9b061ab Compare June 6, 2026 22:24
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.

1 participant