module documentation

The Goal handle: one ROS2 goal's lifetime and its signals, in one object.

Like opensmi.ros2.runtime.subscription, the handle is read-only for a Skill author and a separate sink is the write side. A goal has three signals:

  • feedback is a stream that ends with the goal. The buffer is bounded and drops the oldest message, because the newest progress report is the one worth having;
  • the result is a single value, awaited once and readable afterwards. It is a ~opensmi.ros2.runtime.outcomes.GoalOutcome and not an exception, because a goal that was rejected, aborted or cancelled did happen;
  • cancel is a request. Goal.cancel returns when the server has answered; the actual ending arrives on Goal.result.

A server that rejects the goal answers, so the handle comes back settled with Goal.accepted False. A path with no action server raises ~opensmi.ros2.runtime.errors.ActionServerUnavailableError. Nothing here imports rclpy.

Class Goal One goal sent to a ROS2 action server, from Runtime.send_goal.
Class GoalSink The write side of a Goal; every method runs on the Runtime's event loop.
Function rejected_outcome Return the outcome of a goal the server refused, which therefore never ran.
Function settled_outcome Return the outcome of an accepted goal that has finished; every ending but success has one fault.
def rejected_outcome(action: str) -> GoalOutcome:

Return the outcome of a goal the server refused, which therefore never ran.

def settled_outcome(status: GoalStatus, result: Message | None) -> GoalOutcome:

Return the outcome of an accepted goal that has finished; every ending but success has one fault.