Skip to content

Trigger Protective Stop

SUMMARY

Trigger Protective Stop commands the robot controller to enter a protective stop - the same state triggered by collision or safety boundary violations. All motion halts immediately; the robot remains powered but frozen until the stop is acknowledged from the teach pendant.

The Skill

python
robot.trigger_protective_stop()

The Code

Safety first!

A real robot will faithfully do whatever you ask of it - so please take a moment to clear the workspace, keep an E-Stop within reach, and be ready to disconnect.

Operating real hardware is at your own risk.

Example: Trigger a Protective Stop

Connect to the robot and trigger a protective stop programmatically.

python
"""
Triggers a protective stop on the controller, immediately halting all motion.

Supports Universal Robots (UR).

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

import argparse

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(ip: str) -> None:
    """Trigger a protective stop on the controller."""

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

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

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


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Trigger a protective stop on the robot controller")
    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 trigger_protective_stop.py --ip 192.168.1.100

For all options:

bash
python trigger_protective_stop.py --help

Parameter Configuration

This skill takes no input parameters.

Returns

TypeDescription
NoneReturns after the protective stop command is sent.

Raises

ExceptionCondition
RuntimeErrorThe robot is not connected, or no active motion program is running on the controller (e.g. "RTDE control script is not running")

Where to Use the Skill

  • Safety-triggered application-level stops when a sensor or vision system detects an imminent collision.
  • Testing protective stop recovery procedures in a controlled environment.

When Not to Use the Skill

Use graceful motion stop methods instead: