pub struct ActionClient<A, const GOAL_BUF: usize = nros_node::::executor::handles::ActionClient::{constant#0}, const RESULT_BUF: usize = nros_node::::executor::handles::ActionClient::{constant#1}, const FEEDBACK_BUF: usize = nros_node::::executor::handles::ActionClient::{constant#2}>where
A: RosAction,{ /* private fields */ }Expand description
Typed action client handle.
Wraps ActionClientCore for
raw-bytes protocol handling, adding typed goal/feedback/result
serialization at the boundary.
Implementations§
Source§impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> ActionClient<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>where
A: RosAction,
impl<A, const GOAL_BUF: usize, const RESULT_BUF: usize, const FEEDBACK_BUF: usize> ActionClient<A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>where
A: RosAction,
Sourcepub fn send_goal(
&mut self,
goal: &<A as RosAction>::Goal,
) -> Result<(GoalId, Promise<'_, bool>), NodeError>
pub fn send_goal( &mut self, goal: &<A as RosAction>::Goal, ) -> Result<(GoalId, Promise<'_, bool>), NodeError>
Send a goal (non-blocking). Returns the goal ID and a Promise for acceptance.
The promise resolves to true if accepted, false if rejected.
Sourcepub fn try_recv_feedback(
&mut self,
) -> Result<Option<(GoalId, <A as RosAction>::Feedback)>, NodeError>
pub fn try_recv_feedback( &mut self, ) -> Result<Option<(GoalId, <A as RosAction>::Feedback)>, NodeError>
Try to receive feedback (non-blocking).
Sourcepub fn cancel_goal(
&mut self,
goal_id: &GoalId,
) -> Result<Promise<'_, CancelResponse>, NodeError>
pub fn cancel_goal( &mut self, goal_id: &GoalId, ) -> Result<Promise<'_, CancelResponse>, NodeError>
Cancel a goal (non-blocking). Returns a Promise for the cancel response.
Sourcepub fn get_result(
&mut self,
goal_id: &GoalId,
) -> Result<Promise<'_, (GoalStatus, <A as RosAction>::Result)>, NodeError>
pub fn get_result( &mut self, goal_id: &GoalId, ) -> Result<Promise<'_, (GoalStatus, <A as RosAction>::Result)>, NodeError>
Get the result of a completed goal (non-blocking). Returns a Promise.
Sourcepub fn reset_send_goal_in_flight(&mut self)
pub fn reset_send_goal_in_flight(&mut self)
Explicitly clear the “send_goal reply in flight” flag (Phase 84.D3).
Sourcepub fn wait_for_action_server(
&mut self,
executor: &mut Executor,
timeout: Duration,
) -> Result<bool, NodeError>
pub fn wait_for_action_server( &mut self, executor: &mut Executor, timeout: Duration, ) -> Result<bool, NodeError>
Block until the action server’s send-goal queryable is discoverable
on the network, or timeout elapses.
Returns Ok(true) on discovery, Ok(false) on timeout. Mirrors
rclcpp_action::Client::wait_for_action_server.
Implementation: probes the action’s send_goal service-server
liveliness keyexpr via the same primitive as
[Client::wait_for_service]. Once that service is reachable the
remaining four action entities (cancel queryable + feedback /
status / result publishers) are also reachable in practice — they
were declared by the same server in one batch.
Sourcepub fn action_server_is_ready(&self) -> bool
pub fn action_server_is_ready(&self) -> bool
Snapshot whether the action server is currently visible.
Mirrors rclcpp_action::Client::action_server_is_ready.
Sourcepub fn reset_cancel_in_flight(&mut self)
pub fn reset_cancel_in_flight(&mut self)
Explicitly clear the “cancel reply in flight” flag (Phase 84.D3).
Sourcepub fn reset_get_result_in_flight(&mut self)
pub fn reset_get_result_in_flight(&mut self)
Explicitly clear the “get_result reply in flight” flag (Phase 84.D3).
Sourcepub fn feedback_stream(
&mut self,
) -> FeedbackStream<'_, A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
pub fn feedback_stream( &mut self, ) -> FeedbackStream<'_, A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
Create a feedback stream (receives feedback for all goals).
The stream borrows &mut self exclusively. Drop it before calling
get_result() or cancel_goal().
Sourcepub fn feedback_stream_for(
&mut self,
goal_id: GoalId,
) -> GoalFeedbackStream<'_, A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
pub fn feedback_stream_for( &mut self, goal_id: GoalId, ) -> GoalFeedbackStream<'_, A, GOAL_BUF, RESULT_BUF, FEEDBACK_BUF>
Create a goal-filtered feedback stream.
Only yields feedback for the given goal_id, returning A::Feedback
directly (without the GoalId wrapper).