Expand description
ROS 2 Action types
Actions provide asynchronous goal-based communication with feedback. An action client sends a goal to an action server, which executes the goal and provides feedback during execution and a result upon completion.
§Action Communication Pattern
Actions use 5 underlying communication channels:
send_goalservice: Submit a new goalcancel_goalservice: Request cancellationget_resultservice: Retrieve final resultfeedbacktopic: Progress updates during executionstatustopic: Goal state transitions
§Example
use nros_core::{RosAction, GoalStatusCode};
// Define an action type
struct Fibonacci;
impl RosAction for Fibonacci {
type Goal = FibonacciGoal;
type Result = FibonacciResult;
type Feedback = FibonacciFeedback;
const ACTION_NAME: &'static str = "example_interfaces::action::dds_::Fibonacci_";
const ACTION_HASH: &'static str = "...";
}Structs§
- Goal
Info - Information about a goal
- Goal
Status Stamped - Goal status with associated goal info
- Goal
Uuid - Unique identifier for a goal – rclrs’s
GoalUuid(phase-515 R8).
Enums§
- Cancel
Response - Per-goal cancel decision returned from a server’s cancel callback.
- Cancel
Response Code action_msgs/srv/CancelGoalRPC return codes.- Goal
Response - Goal accept/reject response codes
- Goal
Status Code - Goal status states – rclrs’s
GoalStatusCode(phase-515 R8).
Traits§
- RosAction
- Trait for ROS 2 action types
Type Aliases§
- Cancel
Return Code Deprecated - The pre-phase-515 name of
CancelResponseCode. - GoalId
Deprecated - The pre-phase-515 name of
GoalUuid. - Goal
Status Deprecated - The pre-phase-515 name of
GoalStatusCode.