template<typename A>
class rclcpp_action::Client< A >
Typed action client for a ROS 2 action.
Mirrors upstream's rclcpp_action::Client<A>. The action type A must provide nested Goal, Result, and Feedback types with TYPE_NAME, TYPE_HASH, SERIALIZED_SIZE_MAX, ffi_serialize(), and ffi_deserialize().
Usage:
goal.order = 10;
uint8_t goal_id[16];
Definition client.hpp:256
typename A::Result ResultType
Definition client.hpp:259
typename A::Goal GoalType
Definition client.hpp:258
*rclcpp::Client< AddTwoInts > client
Definition client.hpp:123
#define RCLCPP_TRY(expr)
Definition result.hpp:259
Is an action server for this action visible right now? — phase-417 W4.b.
rclcpp_action::ClientBase::action_server_is_ready, the NON-BLOCKING half of wait_for_action_server. C has had rclc_action_client_action_server_is_ready and Rust ActionClient::action_server_is_ready since phase-338; C++ had neither, so the only way to ask here was to block (ledger row cpp:Client::action_server_is_ready, a C++-only gap rather than a decision).
Spins nothing, so unlike wait_for_action_server it is legal inside a callback. Its answer is a SNAPSHOT: false means "not visible yet", never "will not appear".
Send a goal and receive the generated goal UUID (blocking).
Internally spins the executor until the server accepts or rejects the goal (Phase 82 compliant – drives the executor).
Upstream's async_send_goal returns a std::shared_future of a goal handle. This one blocks and reports through Result plus an out-param goal id: no future and no goal handle (RFC-0021: no async runtime, no allocator). The future-shaped spelling is send_goal_future, over rclcpp::Future.
- Parameters
-
| goal | Goal to send. |
| goal_id | Output 16-byte goal UUID (filled on success). |
- Returns
- Result indicating success or failure.
phase-338 W8 — block until the action server is discoverable.
Mirrors rclcpp_action::Client::wait_for_action_server. Probes the send_goal queryable, which is the load-bearing entity for the first send_goal(). Prefer this over retrying send_goal() on timeout: it waits for the real condition and re-probes, so a server that comes up after the wait starts is still seen.
Spins the executor while probing — not for use inside a callback. Returns Unsupported at once when the backend cannot know whether a server is up (XRCE — issue 1686); a caller that may send blind proceeds.
The budget is REQUIRED — phase-417 stage 3, the same defect and the same fix as Client::wait_for_service; they were found together and are corrected together, under one message. Upstream's rclcpp_action::Client::wait_for_action_server(timeout = -1) waits forever; this used to substitute 5000 ms for an argument-free call, silently. RFC-0021 is why the unbounded form does not exist here, and NROS_RCLCPP_REFUSE_UNBOUNDED_WAIT is what a ported caller now reads.
Takes uint32_t MILLISECONDS, not a std::chrono::duration, and returns Result (timeout vs. not-initialised by code), not bool.