class ROS2ComponentMixin(ROS2ParameterMirrorMixin, ROS2InwardMirrorMixin, ROS2KeyedMirrorMixin, ROS2SpatialMixin):
What a Component declares, and what becomes of it.
| Class Variable | bindings |
The Bindings this Component exposes. An instance may replace it in its constructor. |
| Class Variable | bindings |
A Binding file whose declarations union with bindings, or None. |
| Class Variable | projections |
The Projections this Component curates its own types with, ahead of its Machine's. An instance may replace it in its constructor. |
| Class Variable | startup |
A subclass of the stock StartupSkill these declarations ask for, or None for the stock one. |
| Property | ros2 |
Return the Bindings this Component resolved, both sources unioned. |
| Property | ros2 |
Return the ROS2 settings of the deployment this Component is part of. |
| Property | ros2 |
Return the Projection context this Component renders through, with nothing selected. |
| Property | ros2 |
Return the registry this Component renders its types through. |
| Property | runtime |
Return the Runtime this Component's Machine was injected with. |
| Async Method | _init |
Let opensmi initialise the Component, then create its Binding nodes. |
| Async Method | _init |
Add one Method per service declared, before any subscription is open. |
| Async Method | _init |
Add one Skill per published topic declared, continuous or finite as it says. |
| Async Method | _init |
Add one finite Skill per action declared, before any subscription is open. |
| Async Method | _init |
Give this Component the one StartupSkill its declarations ask for, if any do. |
| Method | _require |
Return the class to build this Component's StartupSkill from: its own, or the stock one. |
| Method | _require |
Refuse a Component that registered a StartupSkill of its own and then declared one. |
| Async Method | _shutdown |
Stop following this Component's nodes and topics, then let opensmi shut it down. |
| Class Variable | _resolved |
Undocumented |
| Class Variable | _resolved |
Undocumented |
| Instance Variable | _publisher |
Undocumented |
The Projections this Component curates its own types with, ahead of its Machine's. An instance may replace it in its constructor.
Return the Bindings this Component resolved, both sources unioned.
Resolved once, on first use, and held, so a name collision is fatal at init and the declarations cannot change under a running server.
Return the ROS2 settings of the deployment this Component is part of.
A Component whose Machine is not a ROS2 one answers with the defaults.
Return the Projection context this Component renders through, with nothing selected.
A surface narrows it to the field paths its own selection kept.
Return the registry this Component renders its types through.
Derived from the Machine's registry with this Component's own entries ahead of it, so
precedence runs Component, Machine, shipped, generic walk. A Component whose Machine is
not a ROS2 one derives from the shipped catalogue; it cannot render anything anyway,
because its _init raises ~opensmi.ros2.server.errors.DeclarationError.
Resolved once and held, like ros2_bindings.
| Raises | |
DuplicateProjectionError | When an entry covers a type the Machine already covers and does not say override=True. |
Return the Runtime this Component's Machine was injected with.
| Raises | |
DeclarationError | When the Machine carries no Runtime, which means it does
not use opensmi.ros2.server.machine.ROS2MachineMixin. |
Let opensmi initialise the Component, then create its Binding nodes.
Every way a declaration can be wrong is fatal on this path. The StartupSkill comes first, so it browses first in the SkillSet, then Methods, Skills, publishers, Monitoring variables, keyed members and parameters. The SpatialObject is last, because a companion specification's AddIn extends what the Component already is.
Add one Skill per published topic declared, continuous or finite as it says.
The Skill advertises its publisher itself, last, so a refused declaration leaves no endpoint behind.
Give this Component the one StartupSkill its declarations ask for, if any do.
A lifecycle Binding is the StartupSkill and a required Binding needs one to wait for it. A Component declaring both gets the lifecycle class, which adds the managed nodes to the other. Built here, not at the mutation chokepoint, because its nodes exist from init and never move.
| Raises | |
DeclarationError | When this Component already carries a StartupSkill of its own. |
ImplementationClassError | When startup_skill_type names a class that is not a subclass of the stock one these declarations ask for. |
type[ ROS2StartupSkill], asked: str) -> type[ ROS2StartupSkill]:
¶
Return the class to build this Component's StartupSkill from: its own, or the stock one.
| Raises | |
ImplementationClassError | When the named class is not a subclass of the stock one. |
Refuse a Component that registered a StartupSkill of its own and then declared one.
| Parameters | |
asked:str | What to call the declarations that asked for one, in the message. |
counted:int | How many of them there are. |
because:str | Why that declaration lands on the Skill this Component already has. |
| Raises | |
DeclarationError | When one is already registered. |