FrameTransform
A transform between two reference frames in 3D space. The transform defines the position and orientation of a child frame within a parent frame. Translation moves the origin of the child frame relative to the parent origin. The rotation changes the orientiation of the child frame around its origin.
Examples:
-
With translation (x=1, y=0, z=0) and identity rotation (x=0, y=0, z=0, w=1), a point at (x=0, y=0, z=0) in the child frame maps to (x=1, y=0, z=0) in the parent frame.
-
With translation (x=1, y=2, z=0) and a 90-degree rotation around the z-axis (x=0, y=0, z=0.707, w=0.707), a point at (x=1, y=0, z=0) in the child frame maps to (x=-1, y=3, z=0) in the parent frame.
Panel support
FrameTransform is used in the 3D and Image panels.
Parent schema
FrameTransform appears in the FrameTransforms message schema.
Schema
| field | type | description |
|---|---|---|
timestamp | Timestamp | Timestamp of transform |
parent_frame_id | string | Name of the parent frame |
child_frame_id | string | Name of the child frame |
translation | Vector3 | Translation component of the transform, representing the position of the child frame's origin in the parent frame. |
rotation | Quaternion | Rotation component of the transform, representing the orientation of the child frame in the parent frame |
Reference implementations
Foxglove schemas are framework-agnostic, and can be implemented using any supported message encoding:
| encoding | schema |
|---|---|
| ROS 1 | foxglove_msgs/FrameTransform |
| ROS 2 | foxglove_msgs/msg/FrameTransform |
| JSON | foxglove.FrameTransform |
| Protobuf | foxglove.FrameTransform |
| FlatBuffers | foxglove.FrameTransform |
| OMG IDL | foxglove::FrameTransform |
You must use the schema names specified above for Foxglove to recognize the schema.