The TF facet: both transform topics, held by us, in both directions.
TF is ROS2's frame network: coordinate frames, each naming its parent, carried on /tf (moving) and /tf_static (never moving). Inward, the facet drains both topics through two ordinary subscriptions into a topology record and a tf2_ros.Buffer. It does not use tf2_ros.TransformListener, which would start a second executor and break the rule that this package owns one Node and one spinning thread. The topology is read from the messages (parent header.frame_id, child child_frame_id), geometry is looked up synchronously with Buffer.lookup_transform and no timeout (its _async variant busy-spins on the Runtime's loop), and nothing here imports rclpy.
Outward, TFFacet.broadcast publishes on the same topics. The publishers are opened by a
watch that declares it broadcasts, so a Machine without outward frames never advertises /tf. Our
own publisher is discounted from TFFacet.satisfied, since a subscription's matched count
includes it (checked on Jazzy). The stamp is one reading of the Runtime's clock per call
(opensmi.ros2.runtime.stamp). tf2_ros.StaticTransformBroadcaster is not used, because it
silently drops an update for a frame it already sent. The static publisher is transient-local and
the moving one volatile (TF_STATIC_QOS, TF_QOS); both are declared constants, while
the subscriptions are discovered.
| Class | |
One link of the frame network, whichever direction it is travelling. |
| Class | |
The frame network, for as long as anything is watching it. |
| Class | |
One consumer's interest in TF, and its lifetime. |
| Class | |
One rigid-body transform, as ROS2 spells it: a translation and a unit quaternion. |
| Function | links |
Return the frame links one TFMessage carries, read off its own structure. |
| Function | roots |
Return every frame that is somebody's parent and nobody's child, in sorted order. |
| Constant | CHILD |
The field of one element naming the frame it describes. The parent is in its header. |
| Constant | FRAME |
The field of one header naming the parent frame. Read inward, written outward. |
| Constant | HEADER |
The field of one element carrying the parent frame and the stamp. Read inward, written outward. |
| Constant | ROTATION |
The field of one transform holding the unit quaternion. |
| Constant | TF |
How many messages each transform subscription buffers. |
| Constant | TF |
The one type both topics carry. |
| Constant | TF |
The topic a transform that never moves is published on, once, with transient-local QoS. |
| Constant | TF |
The topic every moving transform in a ROS2 system is published on. |
| Constant | TRANSFORM |
How many seconds of transform history the buffer keeps (tf2's default). Composed poses are answered from it. |
| Constant | TRANSFORM |
The field of one element carrying the geometry: a translation and a rotation. |
| Constant | TRANSFORMS |
The repeated field of a TFMessage, which is what keys the frame network. |
| Constant | TRANSLATION |
The field of one transform holding metres along three axes. |
| Type Alias | |
How the facet opens a topic outward: the Runtime's own advertise. |
| Type Alias | |
How a broadcast learns what time it is: whole seconds and nanoseconds off the ROS2 Node's own clock. |
| Type Alias | |
How one message reaches the transform buffer: the message, and whether it arrived static. |
| Type Alias | |
How a composed pose is asked for: a target frame and a source frame. |
| Type Alias | |
How the facet opens a topic: the Runtime's own subscribe. |
| Class | _ |
One of the two transform topics, live: its subscription and the task draining it. |
| Class | _ |
Where one declaration reads TF from, which every declaration on a Machine must share. |
| Function | _built |
Return one message dataclass instance, built by field name. |
| Function | _element |
Return the type one element of a TFMessage's repeated field is. |
| Function | _named |
Return a frame id as the network keys it: text, without tf2's optional leading slash. |
| Function | _nested |
Return the message type one field of another holds. |
| Function | _tf |
Return the one TFMessage a list of links becomes. |
| Function | _transform |
Return one element's transform, or None when it does not carry the shape of one. |
| Function | _triple |
Return the named float fields of one nested message, or None if any is missing. |
| Constant | _LOGGER |
Undocumented |
Return the frame links one TFMessage carries, read off its own structure.
An element missing either name, or naming itself as its parent, is skipped: one malformed element must not end the stream.
| Parameters | |
message:Message | One message from /tf or /tf_static, as it crossed the seam. |
static:bool | Whether it arrived on the static topic. |
| Returns | |
tuple[ | Undocumented |
Return every frame that is somebody's parent and nobody's child, in sorted order.
The root of a TF tree is what OPC 10000-210 calls the World Frame. A well-formed tree has one; two means two trees are published into one graph.
The field of one element naming the frame it describes. The parent is in its header.
| Value |
|
The field of one element carrying the parent frame and the stamp. Read inward, written outward.
| Value |
|
How many messages each transform subscription buffers.
Larger than the Binding default, because /tf carries one message per publisher per control cycle. A drop here is a transform the buffer never saw.
| Value |
|
The topic a transform that never moves is published on, once, with transient-local QoS.
| Value |
|
How many seconds of transform history the buffer keeps (tf2's default). Composed poses are answered from it.
| Value |
|
How the facet opens a topic outward: the Runtime's own advertise.
| Value |
|
How a broadcast learns what time it is: whole seconds and nanoseconds off the ROS2 Node's own clock.
It sits behind the seam because a Node on simulated time is the case a wall clock gets wrong.
| Value |
|
How one message reaches the transform buffer: the message, and whether it arrived static.
| Value |
|
How a composed pose is asked for: a target frame and a source frame.
The answer comes from the cache or not at all. Synchronous and non-blocking.
| Value |
|
How the facet opens a topic: the Runtime's own subscribe.
| Value |
|
Return one message dataclass instance, built by field name.
A message dataclass has no statically known fields, so type checkers reject naming them at a call site and accept a keyword splat.
Return the type one element of a TFMessage's repeated field is.
| Raises | |
UnusableMessageTypeError | When the type advertised for the transform topics does not repeat a message at all, which is a robot whose tf2_msgs is not tf2_msgs. |
Return a frame id as the network keys it: text, without tf2's optional leading slash.
tf2 treats /base_link and base_link as one frame, so do we.
Return the message type one field of another holds.
| Raises | |
UnusableMessageTypeError | When the field is not a nested message, which is the same condition as above one level down and says which level it was. |
type[ Message], links: Sequence[ FrameLink], *, seconds: int, nanoseconds: int) -> Message:
¶
Return the one TFMessage a list of links becomes.
Built rather than stamped: ~opensmi.ros2.runtime.stamp.stamped does not descend into
repeated message fields and every stamp in a TFMessage is inside one, so each stamp is
written as its element is constructed. Nested types are read off the dataclass, since nothing
here imports rclpy.