Skip to main content

Module action

Module action 

Source
Expand description

Long-running goals with a status FSM (blueprint §9.4, goal_id/goal_status).

           ┌──────────► Canceling ──► Canceled
           │                ▲
  Accepted ┴──► Executing ──┼──► Succeeded
                            └──► Aborted

The states are astrs_wire::GoalStatus, whose discriminants match ROS 2’s action_msgs/msg/GoalStatus exactly, so astrs-ros2 bridges an action in either direction without a translation table.

§The FSM is enforced, not documented

GoalTracker refuses an illegal transition — Succeeded → Executing, a status after a terminal one, a status for a goal it has never seen — with crate::NodeError::Pattern. A client that trusts a server’s status sequence without checking it will eventually meet a server that resends, reorders, or reports a terminal status twice; the tracker turns each of those into an error at the moment it happens rather than a wrong decision ten seconds later.

§Feedback

A feedback message is a status update carrying GoalStatus::Executing and a payload. There is no separate feedback topic, because there does not need to be one: it is the same edge, the same goal_id, and the queue immunity that goal_status already confers (§11.2).

Structs§

ActionOutcome
One status update, as a client or server sees it.
GoalId
One action goal’s identity, stable for its whole lifetime (§9.4).
GoalTracker
A client-side view of every goal in flight, with the FSM enforced.