Skip to content

Motor Off ​

SUMMARY

Motor Off removes commanded motor/servo power on the physical robot. It is not a substitute for a physical emergency stop.

The Skill ​

python
robot.motor_off()

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.

python
"""
Turns off the physical robot motors.

Supports Universal Robots (UR) and Epson.

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

import argparse

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(ip: str | None) -> None:
    """Turn off physical robot motors."""

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

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

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


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Turn off robot motors 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 motor_off.py --ip 192.168.1.100

For all options:

bash
python motor_off.py --help

Parameter Configuration ​

This skill takes no input parameters.

Returns ​

TypeDescription
NoneThe controller has accepted the motor-off command.

Raises ​

ExceptionCondition
NotImplementedErrorThe active interface has no physical controller, or the brand has no motor-off implementation

How to Tune the Parameters ​

This skill takes no parameters. Make sure the arm is supported or parked first: removing power may let a vertical axis sag, depending on the brake behavior.

Where to Use the Skill ​

  • End of a session - Power the arm down before leaving the cell.
  • Maintenance - Remove servo power before working near the robot.

When Not to Use the Skill ​