Get Publisher Names and Types
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. get_publisher_names_and_types reads back the topic names and message types that background publisher exposes, so a BabyROS subscriber knows exactly what to subscribe to.
The Skill
python
robot.get_publisher_names_and_types()Topics Published
| Topic | Contents |
|---|---|
synapse/robots/<ClassName>/<name>/state | Joint state (positions, velocities) and TCP pose. |
synapse/robots/<ClassName>/<name>/tf | Namespaced 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. get_publisher_names_and_types returns these topic names together with their message types.
The Code
python
"""
Logs the babyros topics published by a named robot and their message types.
Supports Universal Robots (UR), Epson, virtual, and Isaac Sim.
Usage:
python get_publisher_names_and_types.py [--ip <ROBOT_IP>] [--prim_path <PRIM_PATH>]
"""
import argparse
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
def main(ip: str | None, prim_path: str | None) -> None:
"""Log the babyros topics published by a named robot."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
try:
#===================== Connect Robot ==========================================
if ip:
robot.connect(ip=ip)
elif prim_path:
robot.connect(simulation_prim_path=prim_path)
# ==================== Run Skill ============================================
logger.success(f"publisher_names_and_types: {robot.get_publisher_names_and_types()}")
except (ConnectionError, OSError) as e:
logger.error(f"Error occurred: {e}")
finally:
robot.disconnect()
robot.shutdown()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Read publisher names and types Synapse example")
parser.add_argument("--ip", type=str, default=None,
help="UR robot IP address for real hardware, e.g. 192.168.1.100")
parser.add_argument("--prim_path", type=str, default=None,
help='Isaac Sim articulation prim path, e.g. "/World/ur10e"')
args = parser.parse_args()
main(ip=args.ip, prim_path=args.prim_path)Running the Example
bash
python get_publisher_names_and_types.pybash
python get_publisher_names_and_types.py --prim_path /World/ur10ebash
python get_publisher_names_and_types.py --ip 192.168.1.100For all options:
bash
python get_publisher_names_and_types.py --helpParameter Configuration
This skill takes no input parameters.
Returns
| Type | Description |
|---|---|
list[tuple[str, type]] | (topic_name, message_type) pairs describing every topic the background publisher is currently emitting - the same state and tf topics listed above. Returns an empty list if the robot was constructed without a name (no publisher exists). |
Where to Use the Skill
- Dynamic subscriber setup - Build a BabyROS subscriber without hardcoding topic names or message types.
- Remote monitoring - Discover what a robot is streaming before wiring up a dashboard or logging service.
- Digital twin - Confirm the topics feeding a Rerun visualization match what you expect from a separate process.
When Not to Use the Skill
- You need the publish rate, not the topic list - use Get Publisher Hz instead.
- Single-process scripts - If everything runs in one process, call Get Joint Positions, Get Cartesian Pose, or Get Visual Mesh Transforms directly instead of publishing over the network.

