Skip to content

Plot Transformation Frame

SUMMARY

plot_transformation_frame logs a 4x4 transformation matrix as a labeled 3D frame to Rerun, without needing a TransformTree.

UNITS

transformation_matrix's translation is in meters. axis_len is also in meters, since it sets the length of the drawn axes in the same scene units.

The Skill

python
tfutils.plot_transformation_frame(T, frame_name="camera", axis_len=0.2)

Parameter Configuration

ParameterTypeDefaultDescription
transformation_matrixnp.ndarrayrequiredThe (4, 4) transformation matrix defining the frame.
frame_namestr"frame"Entity path name for the frame in Rerun.
axis_lenfloat0.2Length of the displayed axes.

Raises

ExceptionCondition
ValueErrortransformation_matrix is not a (4, 4) np.ndarray.
TypeErrorframe_name is not a string.
TypeErroraxis_len is not a number.