Skip to content

URDF Support

rerun.urdf

class UrdfJoint

A URDF joint with properties and transform computation.

axis property

Axis of the joint.

Name of the child link.

joint_type property

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

limit_effort property

Effort limit of the joint.

limit_lower property

Lower limit of the joint.

limit_upper property

Upper limit of the joint.

limit_velocity property

Velocity limit of the joint.

mimic property

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

name property

Name of the joint.

origin_rpy property

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

origin_xyz property

Origin of the joint (translation).

Name of the parent link.

def compute_transform(value, clamp=True)

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.

def compute_transform_columns(values, *, clamp=True)

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 of the link.

class 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

Name of the driver joint.

multiplier property

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

offset property

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

class 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

The frame prefix, if set.

name property

Name of the robot defined in this URDF.

def compute_joint_transform_batches(names, values, *, clamp=False)

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.

def from_file_path(path, entity_path_prefix=None, *, frame_prefix=None, static_transform_entity_path=None) staticmethod

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

def get_collision_geometry_paths(link)

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

def get_joint_by_name(joint_name)

Get a joint by name.

PARAMETER DESCRIPTION
joint_name

Name of the joint.

TYPE: str

def get_joint_child(joint)

Get the child link of a joint.

PARAMETER DESCRIPTION
joint

The joint whose child link to retrieve.

TYPE: UrdfJoint

Get a link by name.

PARAMETER DESCRIPTION
link_name

Name of the link.

TYPE: str

def get_visual_geometry_paths(link)

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

def joints()

Get all joints in the URDF.

def log_urdf_to_recording(recording=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

Get the root link of the URDF.

def stream(*, include_joint_transforms=True)

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