class ROS2ActionSkill(ROS2ContainerMixin, ParentMixin[
Constructor: ROS2ActionSkill(binding, runtime, context, config, ...)
The finite Skill one ~opensmi.ros2.server.bindings.ActionBinding becomes.
Constructed by the declaring Component. A declaration may name a subclass of this class to add behaviour; the subclass is checked when the declaration is read.
| Method | __init__ |
Resolve everything about the declaration that can be wrong, before any node exists. |
| Async Method | build |
Return the goal message to send, given what a client wrote into the Parameters. |
| Async Method | read |
Return what the Monitoring holds now, by variable name. |
| Async Method | read |
Return what the ParameterSet holds now, by variable name. |
| Async Method | read |
Return what the FinalResultData holds now, by variable name. |
| Async Method | result |
Return the FinalResultData values one result message carries, by variable name. |
| Class Variable | callable |
Undocumented |
| Property | action |
Return the goal, feedback and result types of the action this Skill is bound to. |
| Property | binding |
Return the declaration this Skill was built from. |
| Property | ros2 |
Return the goal currently in flight, or None when none is. |
| Async Method | _create |
Create the three booleans if the debugging aid is on. |
| Async Method | _follow |
Write every feedback message this goal produces, until it ends. |
| Async Method | _handle |
Ask the server to cancel whatever is in flight, then let the handle go. |
| Async Method | _handle |
Clear what the last run produced and keep the Parameters a client wrote. |
| Async Method | _handle |
Follow the feedback and wait for the ending, then let the ending decide the state. |
| Async Method | _handle |
Read the Parameters, build the goal and send it; reach Running only if it is taken. |
| Async Method | _init |
Let opensmi build the Skill, create the variables, and prove the defaults can be sent. |
| Async Method | _let |
Release the goal handle, if there is one. It never commands anything. |
| Async Method | _write |
Write one feedback message into the Monitoring variables its type was shaped into. |
| Async Method | _write |
Write the three booleans from one outcome; None means a reset. |
| Async Method | _write |
Write what the goal produced, and the debugging booleans if they were asked for. |
| Instance Variable | _binding |
Undocumented |
| Instance Variable | _config |
Undocumented |
| Instance Variable | _feedback |
Undocumented |
| Instance Variable | _feedback |
Undocumented |
| Instance Variable | _goal |
Undocumented |
| Instance Variable | _goal |
Undocumented |
| Instance Variable | _goal |
Undocumented |
| Instance Variable | _monitoring |
Undocumented |
| Instance Variable | _parameters |
Undocumented |
| Instance Variable | _result |
Undocumented |
| Instance Variable | _result |
Undocumented |
| Instance Variable | _results |
Undocumented |
| Instance Variable | _runtime |
Undocumented |
| Instance Variable | _types |
Undocumented |
ActionBinding, runtime: RuntimeInterface, context: ProjectionContext, config: ROS2Config, minimum_access_level: int = SKILL_ACCESS_LEVEL):
¶
Resolve everything about the declaration that can be wrong, before any node exists.
A missing interface package, a pattern that matches nothing or a goal that cannot be built backwards fails here instead of on the first Start.
| Parameters | |
binding:ActionBinding | What to build. |
runtime:RuntimeInterface | Where the goal is sent. The Machine's, reached through the Component. |
context:ProjectionContext | The Projection context of the Component, with nothing selected yet. The Skill narrows it once per surface (goal, feedback, result). |
config:ROS2Config | The deployment's ROS2 settings. |
minimumint | The level Start, Halt and Reset need. |
| Raises | |
MessageTypeError | When the action type cannot be resolved. |
FieldSelectionError | When a selection pattern matches nothing. |
NotInvertibleError | When the goal type reaches a Projection that cannot run backwards. |
Return the goal message to send, given what a client wrote into the Parameters.
Override on a custom class when building the goal needs the instance. The declaration's
goal_from is the pure-function form, and default_goal_from is the default.
An override must also work with the declaration's defaults, because _init calls it
once with them.
Return the FinalResultData values one result message carries, by variable name.
Overridable like build_goal; the declaration's result_to is the pure-function
form and default_result_to the default.
Return the goal currently in flight, or None when none is.
Held on the Skill because opensmi cancels the running handler's task before the halting handler runs, so a handle kept only there would already be gone.
Clear what the last run produced and keep the Parameters a client wrote.
Monitoring and FinalResultData go back to their declared initial values.
Follow the feedback and wait for the ending, then let the ending decide the state.
A cancel this Skill asked for never arrives here, because opensmi cancels this handler before running the halting one. Any non-success outcome that does arrive comes from outside and halts the Skill.
Read the Parameters, build the goal and send it; reach Running only if it is taken.
A goal the server refuses halts the Skill. Parameters that cannot be built into a goal halt
it with GOAL_UNBUILDABLE; every refusal of a client's value is a ValueError,
which opensmi would otherwise report without an error code.
Let opensmi build the Skill, create the variables, and prove the defaults can be sent.
Building a goal from the initial Parameters must work, so a value ROS2 would abort on fails here, on the machine of whoever wrote the declaration.