Skip to content

URDF Support

rerun.urdf

class UrdfJoint

A URDF joint with properties and transform computation.

axis: tuple[float, float, float] property

Axis of the joint.

Name of the child link.

joint_type: str property

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

limit_effort: float property

Effort limit of the joint.

limit_lower: float property

Lower limit of the joint.

limit_upper: float property

Upper limit of the joint.

limit_velocity: float property

Velocity limit of the joint.

name: str property

Name of the joint.

origin_rpy: tuple[float, float, float] property

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

origin_xyz: tuple[float, float, float] 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 :func:rerun.send_columns.

A URDF link.

name: str property

Name of the link.

class UrdfTree

A URDF robot model with joints and links.

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

frame_prefix: str | None property

The frame prefix, if set.

name: str property

Name of the robot defined in this URDF.

def from_file_path(path, entity_path_prefix=None, *, frame_prefix=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

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 :func: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.