pub trait ActionExecutor {
// Required methods
fn complete_goal_raw(
&mut self,
action_entity: &str,
goal_id: &GoalId,
status: GoalStatus,
result: &[u8],
) -> NodeResult<()>;
fn publish_feedback_raw(
&mut self,
action_entity: &str,
goal_id: &GoalId,
feedback: &[u8],
) -> NodeResult<()>;
fn for_each_active_goal(
&self,
action_entity: &str,
visit: &mut dyn FnMut(&GoalId, GoalStatus),
);
}Expand description
The executable counterpart of Node (W.5.1).
register (declarative) stays the planning SSOT; this binds runnable
bodies. The generated runtime builds State once via
init, then routes every fired callback to
on_callback. Trait-dispatch (no boxed dyn, no
alloc) keeps it no_std.
Executor-backed action operations a TickCtx drives (W.5.6).
Action result/feedback need &mut Executor (complete_goal_raw /
publish_feedback_raw), which a mid-spin callback can’t hold (the executor
is borrowed) — so they run from ExecutableNode::tick, between spins.
The generated runtime implements this over the real executor + the action
servers’ handles (resolved by stable action entity id); the component never
sees the executor directly. Kept as a trait so TickCtx stays no_std +
free of the rmw-cffi-gated Executor type.
Required Methods§
Sourcefn complete_goal_raw(
&mut self,
action_entity: &str,
goal_id: &GoalId,
status: GoalStatus,
result: &[u8],
) -> NodeResult<()>
fn complete_goal_raw( &mut self, action_entity: &str, goal_id: &GoalId, status: GoalStatus, result: &[u8], ) -> NodeResult<()>
Complete the goal goal_id on action action_entity with raw CDR result.
Sourcefn publish_feedback_raw(
&mut self,
action_entity: &str,
goal_id: &GoalId,
feedback: &[u8],
) -> NodeResult<()>
fn publish_feedback_raw( &mut self, action_entity: &str, goal_id: &GoalId, feedback: &[u8], ) -> NodeResult<()>
Publish raw CDR feedback for goal_id on action action_entity.
Sourcefn for_each_active_goal(
&self,
action_entity: &str,
visit: &mut dyn FnMut(&GoalId, GoalStatus),
)
fn for_each_active_goal( &self, action_entity: &str, visit: &mut dyn FnMut(&GoalId, GoalStatus), )
Visit every goal on action_entity that has been accepted but not yet
completed, with its id + current status. The execution seam: a tick body
has no other way to learn an accepted goal’s id (the goal-decision callback
doesn’t surface it), so it iterates here to drive feedback / completion.