Skip to content

Robot State & TF Publisher

SUMMARY

Pass name=... when constructing any Synapse robot and it automatically streams joint state, TCP pose, and link transforms over Zenoh using BabyROS — no manual publisher setup required.

SUPPORTED ROBOTS

Available on all supported manipulators.

The Skill

python
robot = universal_robots.UniversalRobotsUR10E(name="ur10e")

Naming the robot is the entire skill - RobotStateAndTFPublisher is constructed and started automatically the moment the robot has a name.

Topics Published

TopicContents
synapse/robots/<ClassName>/<name>/stateJoint state (positions, velocities) and TCP pose.
synapse/robots/<ClassName>/<name>/tfNamespaced link transforms for the full kinematic tree.

<ClassName> is the robot's Python class name (e.g. UniversalRobotsUR10E) and <name> is the string passed to the constructor.

The Code

python
"""
Stream robot state and TF over Zenoh with the Synapse SDK.

Naming a robot at construction time starts a RobotStateAndTFPublisher
automatically — publishing joint state, TCP pose, and link transforms
over Zenoh via BabyROS on every control cycle.

Universal Robots (UR10e) is used here for illustration; the same pattern
works for every supported brand. No connection to real hardware is
required to publish offline kinematic state.

Usage:
    python robot_state_and_tf_publisher.py
"""

import time

from telekinesis.synapse.robots.manipulators import universal_robots


def main():
    """Publish state and TF for a named robot for a few seconds."""

    # Naming the robot starts the publisher automatically
    robot = universal_robots.UniversalRobotsUR10E(name="ur10e")

    print("Publishing to synapse/robots/UniversalRobotsUR10E/ur10e/{state,tf} ...")
    time.sleep(5)

    # Stops the publisher loop cleanly
    robot.delete()


if __name__ == "__main__":
    main()

The Explanation of the Code

python
robot = universal_robots.UniversalRobotsUR10E(name="ur10e")

Passing name derives the base topic synapse/robots/UniversalRobotsUR10E/ur10e and immediately constructs and starts a RobotStateAndTFPublisher, which publishes on a background loop as long as the robot object is alive.

python
robot.delete()

Stops the publisher loop and releases its resources. Call this (or let the robot object be garbage collected) when you are done publishing.

Subscribing from BabyROS

Any BabyROS subscriber on the same Zenoh network can read the published topics directly:

python
from babyros import node

state_sub = node.Subscriber("synapse/robots/UniversalRobotsUR10E/ur10e/state", ...)
tf_sub = node.Subscriber("synapse/robots/UniversalRobotsUR10E/ur10e/tf", ...)

Where to Use the Skill

  • Remote monitoring - Stream a robot's live state to a dashboard or logging service without polling.
  • Digital twin - Drive a Rerun visualization in a separate process from the published TF stream.
  • Distributed control - Let multiple processes react to robot state over the network instead of sharing a single Python object.

When Not to Use the Skill