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.100For all options:
bash
python motor_off.py --helpParameter Configuration
This skill takes no input parameters.
Returns
| Type | Description |
|---|---|
None | The controller has accepted the motor-off command. |
Raises
| Exception | Condition |
|---|---|
NotImplementedError | The 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
- You need an emergency stop - use the physical E-stop.
- You only want to hold a move - use Pause and Continue Motion.