Motor On
SUMMARY
Motor On requests motor/servo power on the physical robot. It never bypasses a safety circuit, fault or controller permission check.
The Skill
python
robot.motor_on()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 on robot motors after the controller reports a permitted safety state.
Supports Universal Robots (UR) and Epson.
Usage:
python motor_on.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 on physical robot motors."""
#===================== Create Robot ==========================================
robot = universal_robots.UniversalRobotsUR10E(name='UR10e')
try:
#===================== Connect Robot ==========================================
if ip:
robot.connect(ip=ip)
# ==================== Run Skill ============================================
robot.motor_on()
logger.success("Robot motors turned on.")
except (ConnectionError, OSError) as e:
logger.error(f"Error occurred: {e}")
finally:
robot.disconnect()
robot.shutdown()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Turn on 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_on.py --ip 192.168.1.100For all options:
bash
python motor_on.py --helpParameter Configuration
This skill takes no input parameters.
Returns
| Type | Description |
|---|---|
None | The controller has accepted the motor-on command. |
Raises
| Exception | Condition |
|---|---|
NotImplementedError | The active interface has no physical controller, or the brand has no motor-on implementation |
How to Tune the Parameters
This skill takes no parameters. Motor power may still be refused while an emergency stop, safeguard stop or fault is active; clear the cause first, then call it.
Where to Use the Skill
- Startup - Enable servo power after connecting and before commanding motion.
- Recovery - Re-enable motors after the approved fault-recovery procedure.
When Not to Use the Skill
- Running offline or in Isaac Sim - there are no physical motors.
- You expect it to clear faults - use Reset Controller first.