Skip to content

Visualize in Rerun

SUMMARY

Visualize in Rerun streams the robot (and any attached gripper) into a Rerun viewer — static meshes logged once, then link transforms and TCP frame axes updated on every call. No connection to real hardware is required; it runs directly off the kinematic model.

SUPPORTED ROBOTS

Available on all supported manipulators. If a robot's URDF has no mesh registered for an attached gripper, that gripper is skipped silently.

The Skill

python
robot.visualize_rerun()

Parameters

ParameterTypeDefaultDescription
axis_lengthfloat0.05Length in meters of the TCP frame axis arrows drawn for the default and any custom TCPs.
recording_streamrr.RecordingStream | NoneNoneAn existing Rerun recording stream to log into. If None, a new viewer is spawned automatically via rr.init(..., spawn=True).

The Code

python
"""
Visualize a Synapse robot live in Rerun.

Spawns a Rerun viewer, logs the robot's static meshes once, then updates
link transforms and TCP frame axes on every call to ``visualize_rerun``.

Universal Robots (UR10e) is used here for illustration. It supports all
robots; no connection to real hardware is required.

Usage:
    python visualize_rerun.py
"""

import time

from telekinesis.synapse.robots.manipulators import universal_robots


def main():
    """Move through a few joint configurations, visualizing each in Rerun."""

    # Create the robot (no connect required — runs on the kinematic model)
    robot = universal_robots.UniversalRobotsUR10E()

    # First call spawns the Rerun viewer and logs the static meshes
    robot.visualize_rerun()

    for delta in (0, 15, -15, 0):
        q = robot.get_joint_positions()
        q[0] += delta
        robot.set_joint_positions(q)

        # Re-log link transforms and TCP frames at the new configuration
        robot.visualize_rerun()
        time.sleep(0.5)


if __name__ == "__main__":
    main()

The Explanation of the Code

python
robot = universal_robots.UniversalRobotsUR10E()
robot.visualize_rerun()

Create the robot and call visualize_rerun() once. With no recording_stream passed, this spawns a new Rerun viewer and logs the robot's static visual meshes at /robot/{link}.

python
robot.visualize_rerun()

Every subsequent call updates the live state: per-link transforms via rr.Transform3D, plus TCP frame axes and labels at /frames/{name} for the default TCP and any custom TCPs added with add_tcp. If a gripper is attached, its own visualize_rerun() is called automatically using the current TCP transform.

Return Value

This skill returns None — it logs directly to the Rerun recording stream (spawned or provided) as a side effect.

Where to Use the Skill

  • Live debugging - Watch the robot move through a motion sequence without opening a real viewer window per script.
  • Digital twin - Pair with the state and TF publisher to visualize a robot that is being driven from a separate process.
  • Recording & playback - Pass a shared recording_stream to log multiple robots or sessions into the same .rrd file for later review.

When Not to Use the Skill