CoordinateFrame
ā ļø This type is unstable and may change significantly in a way that the data won't be backwards compatible. Specifies the coordinate frame for an entity.
Experimental: Transform frames are still in early development!
If not specified, the coordinate frame uses an implicit frame derived from the entity path.
The implicit frame's name is tf#/your/entity/path and has an identity transform connection to its parent path.
To learn more about transforms see Spaces & Transforms in the reference.
Fields fields
Required required
frame_id:TransformFrameId
Can be shown in can-be-shown-in
API reference links api-reference-links
- š C++ API docs for
CoordinateFrame - š Python API docs for
CoordinateFrame - š¦ Rust API docs for
CoordinateFrame
Example example
Change coordinate frame to different built-in frames change-coordinate-frame-to-different-builtin-frames
"""Demonstrates using explicit `CoordinateFrame` with implicit transform frames only."""
# TODO(RR-2777): This is still an experimental feature.
import rerun as rr
rr.init("rerun_example_transform3d_hierarchy", spawn=True)
rr.set_time("time", sequence=0)
rr.log(
"red_box",
rr.Boxes3D(half_sizes=[0.5, 0.5, 0.5], colors=[255, 0, 0]),
# Use Transform3D to place the box, so we actually change the underlying coordinate frame and not just the box's pose.
rr.Transform3D(translation=[2.0, 0.0, 0.0]),
)
rr.log(
"blue_box",
rr.Boxes3D(half_sizes=[0.5, 0.5, 0.5], colors=[0, 0, 255]),
# Use Transform3D to place the box, so we actually change the underlying coordinate frame and not just the box's pose.
rr.Transform3D(translation=[-2.0, 0.0, 0.0]),
)
rr.log("point", rr.Points3D([0.0, 0.0, 0.0], radii=0.5))
# Change where the point is located by cycling through its coordinate frame.
for t, frame_id in enumerate(["tf#/red_box", "tf#/blue_box"]):
rr.set_time("time", sequence=t + 1) # leave it untouched at t==0.
rr.log("point", rr.CoordinateFrame(frame_id))
