Skip to content

Get Robot Status

SUMMARY

Get Robot Status returns the robot status as a brand-specific bitmask or integer code.

SUPPORTED ROBOTS

Currently supported only on Universal Robots.

UNITS

Returns a string mapped from the controller's status bitmask (no units).

The Skill

python
status = robot.get_robot_status()

The Code

Example: Read and Log Robot Status

Connect to the robot and read its current status bitmask.

python
"""
Read robot status example for the Synapse SDK.

Returns the controller's high-level robot status (e.g. ``"NORMAL"``,
``"REDUCED"``, ``"PROTECTIVE_STOP"``).

Currently supported only for Universal Robots (UR10e).

Usage:
    python get_robot_status.py --ip <ROBOT_IP>
"""

import argparse
from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(ip: str):
    """Log the current robot status."""

    # Create and connect to the robot
    robot = universal_robots.UniversalRobotsUR10E()
    robot.connect(ip=ip)

    try:
        logger.success(f"Robot status: {robot.get_robot_status()}")
    finally:
        robot.disconnect()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Read robot status Synapse example")
    parser.add_argument("--ip", type=str, required=True, help="UR robot IP address")
    args = parser.parse_args()

    main(ip=args.ip)

The Explanation of the Code

get_robot_status reads the robot_status_bits field from the data stream. Each bit encodes a distinct status flag - power state, program state, teach-pendant state, and more.

How to Tune the Parameters

This skill takes no input parameters.

Return Value

TypeDescription
strRobot status as a brand-specific bitmask or integer code.

Where to Use the Skill

  • Health monitoring - Poll the status bitmask to detect power or program state changes
  • Diagnostics - Log the raw status field alongside other telemetry for post-hoc analysis

When Not to Use the Skill

Do not use Get Robot Status when: