Skip to content

Is Protective Stopped

SUMMARY

Is Protective Stopped returns True if the robot is currently in a protective stop and False otherwise.

A protective stop is a safety-triggered halt caused by a limit violation or external safety signal, and must be acknowledged before motion can resume.

UNITS

Returns a boolean. No quantitative units.

The Skill

python
stopped = robot.is_protective_stopped()

The Code

Example: Check for Protective Stop

Connect to the robot and check whether it is in a protective stop state.

python
"""
Logs whether the robot is currently in a protective stop state.

Supports Universal Robots (UR).

Usage:
    python is_protective_stopped.py [--ip <ROBOT_IP>]
"""

import argparse

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(ip: str) -> None:
    """Log whether the robot is in protective stop."""

    #===================== Create Robot ==========================================
    robot = universal_robots.UniversalRobotsUR10E(name='UR10e')

    try:
        #===================== Connect Robot ==========================================
        if ip:
            robot.connect(ip=ip)

        # ==================== Run Skill ============================================
        logger.success(f"is_protective_stopped: {robot.is_protective_stopped()}")
    except (ConnectionError, OSError) as e:
        logger.error(f"Error occurred: {e}")
    finally:
        robot.disconnect()
        robot.shutdown()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Check protective stop status Synapse example")
    parser.add_argument("--ip", type=str, default=None,
                         help="UR robot IP address for real hardware, e.g. 192.168.1.100")
    args = parser.parse_args()

    main(ip=args.ip)

Running the Example

bash
python is_protective_stopped.py --ip 192.168.1.100

For all options:

bash
python is_protective_stopped.py --help

Parameter Configuration

This skill takes no input parameters.

Returns

FieldTypeDescription
stoppedboolTrue if the robot is in protective stop, False otherwise.

Raises

ExceptionCondition
RuntimeErrorThe robot is not connected.

Where to Use the Skill

  • Pre-motion checks before issuing a new motion command.
  • Automated recovery loops that detect and report protective stop states.

When Not to Use the Skill

Use a different skill when:

  • You need the full safety mode code rather than just a boolean flag - use Get Safety Mode instead.