class ROS2SpatialMixin(ROS2MutationMixin):
Constructor: ROS2SpatialMixin(*args, **kwargs)
Gives a machinery item that declared a TF Binding its SpatialObject and its TF reading.
Goes on the Machine and on Components, because OPC 10000-210 6.1.1 defines the SpatialObjectType
as an AddIn extending an existing object. It also opens the item's TF watch. The facet
reference-counts, so any number of items share one pair of subscriptions, and the watch must
exist before a required TF Binding waits on it. Topics and depth come from the Machine's
~opensmi.ros2.server.config.TransformConfig, so every item reads the same frame
network.
| Method | __init__ |
Start out with no SpatialObject, and pass every argument to opensmi. |
| Property | ros2 |
Return this item's SpatialObject, or None when it declared no TF Binding. |
| Property | ros2 |
Return the one TF Binding this item declared, or None. |
| Property | ros2 |
Return, per TF Binding name, whether anything is publishing transforms right now. |
| Property | ros2 |
Return where this item's Machine reads TF from, and how often it polls. |
| Async Method | _init |
Create this item's SpatialObject and open its TF watch, if it declared a TF Binding. |
| Method | _ros2 |
Return the Runtime this item reaches TF through. |
| Async Method | _stop |
Close this item's TF watch. Idempotent. |
| Instance Variable | _ros2 |
Undocumented |
| Instance Variable | _ros2 |
Undocumented |
Return the one TF Binding this item declared, or None.
A machinery item has one head frame, and OPC 10000-210 gives a SpatialObject one PositionFrame.
| Raises | |
DeclarationError | When this item declares more than one. |
Return, per TF Binding name, whether anything is publishing transforms right now.
Presence only, never a particular frame: a required TF Binding that waited for tool0 would keep the Machine from starting until somebody switched an arm on.
Return where this item's Machine reads TF from, and how often it polls.
A Component answers with its Machine's settings. An item whose Machine is not one of ours gets the defaults.
Create this item's SpatialObject and open its TF watch, if it declared a TF Binding.
The PositionFrame starts at zero metres on the World Frame; the first poll re-bases it onto its head frame's TF parent. The SpatialObject is created here instead of by opensmi's spatial-object mixin, because that mixin needs a typed-parent property a Component need not have.
| Raises | |
DeclarationError | When the Machine has no spatial-object list. |
Return the Runtime this item reaches TF through.
| Raises | |
DeclarationError | When there is none (a wiring fault). |