Skip to content

URDF Support

rerun.urdf

UrdfJoint

A URDF joint with properties and transform computation.

axis property

Axis of the joint.

child_link: str

Name of the child link.

joint_type property
joint_type: str

Type of the joint (revolute, continuous, prismatic, fixed, etc.).

limit_effort property
limit_effort: float

Effort limit of the joint.

limit_lower property
limit_lower: float

Lower limit of the joint.

limit_upper property
limit_upper: float

Upper limit of the joint.

limit_velocity property
limit_velocity: float

Velocity limit of the joint.

mimic property
mimic: UrdfMimic | None

Mimic-tag specification, or None if this joint is not a mimic joint.

name property
name: str

Name of the joint.

origin_rpy property
origin_rpy: tuple[float, float, float]

Origin of the joint (rotation in roll, pitch, yaw).

origin_xyz property
origin_xyz: tuple[float, float, float]

Origin of the joint (translation).

parent_link: str

Name of the parent link.

compute_transform
def compute_transform(
    value: float, clamp: bool = True
) -> Transform3D

Compute a Transform3D for this joint at the given value.

PARAMETER DESCRIPTION
value

Joint angle in radians (revolute/continuous) or distance in meters (prismatic). Ignored for fixed joints. Values outside limits are clamped with a warning if clamp is True.

TYPE: float

clamp

Whether to clamp & warn about values outside joint limits.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
Transform3D

Transform with rotation, translation, parent_frame, and child_frame ready to log.

compute_transform_columns
def compute_transform_columns(
    values: Sequence[float], *, clamp: bool = True
) -> ComponentColumnList

Compute transforms for this joint at multiple values, returning columnar data for use with send_columns.

PARAMETER DESCRIPTION
values

Joint values: angles in radians (revolute/continuous) or distances in meters (prismatic). Values outside limits are clamped with a warning if clamp is True.

TYPE: Sequence[float]

clamp

Whether to clamp & warn about values outside joint limits.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
ComponentColumnList

Columnar transform data ready for use with rerun.send_columns.

A URDF link.

name property
name: str

Name of the link.

UrdfMimic

A URDF <mimic> tag specification.

A mimic joint's value is derived from a driver joint as value = multiplier * driver_value + offset.

joint property
joint: str

Name of the driver joint.

multiplier property
multiplier: float

Multiplier applied to the driver joint's value (defaults to 1.0).

offset property
offset: float

Offset added after multiplying the driver joint's value (defaults to 0.0).

UrdfTree

A URDF robot model with joints and links.

Use log_urdf_to_recording to log the full model (geometry + static transforms), then animate individual joints by logging archetypes.Transform3D computed via UrdfJoint.compute_transform.

frame_prefix property
frame_prefix: str | None

The frame prefix, if set.

name property
name: str

Name of the robot defined in this URDF.

compute_joint_transform_batches
def compute_joint_transform_batches(
    names: Array, values: Array, *, clamp: bool = False
) -> Array

Compute batches of 3D transform components from Arrow list arrays containing joint names and values.

names must be a ListArray with Utf8 values. values must be a ListArray with values castable to Float64.

The output is a ListArray with translation, quaternion, parent_frame, and child_frame fields and the same outer row count as the inputs.

Note: this is intended as a helper for lens pipelines, where you would usually pipe this output through an additional lens that scatters each batch into final Transform3D component rows.

PARAMETER DESCRIPTION
names

Joint names for each row.

TYPE: Array

values

Joint values for each row.

TYPE: Array

clamp

Whether to clamp & warn about values outside joint limits.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Array

Transform batches with one outer row for each input row.

from_file_path staticmethod
def from_file_path(
    path: str | Path,
    entity_path_prefix: str | None = None,
    *,
    frame_prefix: str | None = None,
    static_transform_entity_path: str | None = None,
) -> UrdfTree

Load a URDF file from the given path.

PARAMETER DESCRIPTION
path

Path to the URDF file.

TYPE: str | Path

entity_path_prefix

Optional entity path prefix.

TYPE: str | None DEFAULT: None

frame_prefix

Optional prefix for all frame IDs. Use to load the same URDF multiple times with unique frames.

TYPE: str | None DEFAULT: None

static_transform_entity_path

Optional entity path to use when logging static transforms. If omitted, defaults to /tf_static. This path is not affected by entity_path_prefix.

TYPE: str | None DEFAULT: None

get_collision_geometry_paths
def get_collision_geometry_paths(
    link: str | UrdfLink,
) -> list[str]

Get the entity paths for all collision geometries of the given link, if any.

PARAMETER DESCRIPTION
link

The link for which to retrieve the collision geometry entity paths, either by name or as an UrdfLink instance.

TYPE: str | UrdfLink

get_joint_by_name
def get_joint_by_name(joint_name: str) -> UrdfJoint | None

Get a joint by name.

PARAMETER DESCRIPTION
joint_name

Name of the joint.

TYPE: str

get_joint_child
def get_joint_child(joint: UrdfJoint) -> UrdfLink

Get the child link of a joint.

PARAMETER DESCRIPTION
joint

The joint whose child link to retrieve.

TYPE: UrdfJoint

def get_link_by_name(link_name: str) -> UrdfLink | None

Get a link by name.

PARAMETER DESCRIPTION
link_name

Name of the link.

TYPE: str

get_visual_geometry_paths
def get_visual_geometry_paths(
    link: str | UrdfLink,
) -> list[str]

Get the entity paths for all visual geometries of the given link, if any.

PARAMETER DESCRIPTION
link

The link for which to get visual geometry paths, either by name or as an UrdfLink instance.

TYPE: str | UrdfLink

joints
def joints() -> list[UrdfJoint]

Get all joints in the URDF.

log_urdf_to_recording
def log_urdf_to_recording(
    recording: RecordingStream | None = None,
) -> None

Log the full robot model (geometry + static transforms) to a recording stream.

This can be used as alternative to rerun.log_file_from_path for URDF files, especially in cases where you need the extra configuration options of UrdfTree (e.g. frame_prefix for multi-robot setups).

PARAMETER DESCRIPTION
recording

The recording stream to log to. If None, the current active recording is used.

TYPE: RecordingStream | None DEFAULT: None

def root_link() -> UrdfLink

Get the root link of the URDF.

stream
def stream(
    *, include_joint_transforms: bool = True
) -> LazyChunkStream

Return a lazy stream over chunks emitted from this URDF tree.

Warning

This method is experimental and returns the experimental rerun.experimental.LazyChunkStream API.

PARAMETER DESCRIPTION
include_joint_transforms

Whether to include the static joint transforms from the URDF.

TYPE: bool DEFAULT: True