class ROS2MachineMixin(ROS2ModelChangeMixin, ROS2TransformMirrorMixin):
Constructor: ROS2MachineMixin(*args, runtime, ros2_config, **kwargs)
Gives a Machine its Runtime, and its Runtime a lifetime.
| Method | __init__ |
Take the Runtime this Machine owns, and pass everything else to opensmi. |
| Async Method | lifecycle |
Start the Runtime and publish the byte-string ceiling; stop the Runtime at the end. |
| Async Method | lifecycle |
Add the default StartupSkill unless the Machine registered one; release it at the end. |
| Class Variable | bindings |
TF Bindings only: the one frame the Machine is. Any other kind is refused, because it would land nowhere. |
| Class Variable | bindings |
A Binding file whose declarations union with bindings, or None. |
| Class Variable | introspection |
The Component that answers what is on the ROS2 graph and what this Machine is bound to. It is always added, with no flag to turn it off; the access level on its mutators is the safeguard. Replaceable to add listings. |
| Class Variable | projections |
The Projections this Machine adds to the shipped catalogue. Every Component on it derives its own registry from the result. |
| Class Variable | startup |
The StartupSkill added when the Machine registers none of its own. Replace it with a subclass of the stock one. |
| Property | ros2 |
Return the Bindings this Machine declared, which may only be TF Bindings. |
| Property | ros2 |
Return how many bytes a bulk payload on this Machine may carry, or 0 for no limit. |
| Property | ros2 |
Return the ROS2 settings this Machine was built with, defaults included. |
| Property | ros2 |
Return this Machine's default registry: the shipped catalogue plus its own entries. |
| Property | runtime |
Return this Machine's Runtime, which is where all its ROS2 access goes. |
| Async Method | _init |
Let opensmi initialise the Machine, then add the introspection Component. |
| Async Method | _shutdown |
Close the Machine's TF watch, then let opensmi shut the Machine down. |
| Instance Variable | _resolved |
Undocumented |
| Instance Variable | _resolved |
Undocumented |
| Instance Variable | _ros2 |
Undocumented |
| Instance Variable | _ros2 |
Undocumented |
| Instance Variable | _ros2 |
Undocumented |
Any, runtime: RuntimeInterface, ros2_config: ROS2Config | None = None, **kwargs: Any):
¶
Take the Runtime this Machine owns, and pass everything else to opensmi.
| Parameters | |
*args:Any | Undocumented |
runtime:RuntimeInterface | The Runtime, constructed and not yet started. |
ros2ROS2Config | None | The ROS2 settings this deployment loaded, or None for the defaults. The Components read the settings that are not the Runtime's from it. |
**kwargs:Any | Undocumented |
AsyncGenerator[ None]:
¶
Start the Runtime and publish the byte-string ceiling; stop the Runtime at the end.
Runs before the Machine's _init and after its _shutdown. opensmi rolls a failed init back through this step too, so a Machine that refuses to boot leaves no rclpy Context or executor thread behind. A stop that was not clean is logged, not raised.
| Raises | |
RuntimeAlreadyStartedError | When the injected Runtime is already up. |
AsyncGenerator[ None]:
¶
Add the default StartupSkill unless the Machine registered one; release it at the end.
Runs after the Machine's _init so that a StartupSkill registered there is seen however it is ordered against super()._init(). The Skill gets the skill_access_level of the ROS2 settings, so the orchestrator can start the Machine with no operator. It is released before the Components are shut down, because it holds a task and a watch.
TF Bindings only: the one frame the Machine is. Any other kind is refused, because it would land nowhere.
The Component that answers what is on the ROS2 graph and what this Machine is bound to. It is always added, with no flag to turn it off; the access level on its mutators is the safeguard. Replaceable to add listings.
The Projections this Machine adds to the shipped catalogue. Every Component on it derives its own registry from the result.
The StartupSkill added when the Machine registers none of its own. Replace it with a subclass of the stock one.
Return the Bindings this Machine declared, which may only be TF Bindings.
Resolved once and held.
| Raises | |
DeclarationError | When a kind other than TFBinding is declared. |
DuplicateBindingNameError | When one name appears twice, in either source. |
Return how many bytes a bulk payload on this Machine may carry, or 0 for no limit.
Published in the server's capability variable at init and applied by the Projection that produces the bytes. Zero before init.
Return this Machine's default registry: the shipped catalogue plus its own entries.
Resolved once and held. Every Component derives its own registry from this one; nothing discovers an entry, and no Component's curation reaches another's.
| Raises | |
DuplicateProjectionError | When an entry covers a type the shipped catalogue already covers and does not say override=True. |