Skip to content

Reset Controller ​

SUMMARY

Reset Controller requests recovery from resettable controller faults. It never bypasses an active emergency stop or safeguard and does not turn motors on.

The Skill ​

python
robot.reset_controller()

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
"""
Recovers a Robot controller after automatic motor-on was rejected.

Supports Universal Robots (UR) and Epson.

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

import argparse

from loguru import logger

from telekinesis.synapse.robots.manipulators import universal_robots


def main(ip: str | None) -> None:
    """Reset Epson and turn motors on after the physical cause is cleared."""

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

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

        # ==================== Run Skill ============================================
        status = robot.get_status()
        if status.controller is not None and not status.controller.motors_on:
            logger.warning(
                "Motors are off. Release any physical E-stop or safeguard before "
                "continuing with controller reset."
            )
            robot.reset_controller()
            logger.success("Controller reset and motors turned on.")
        else:
            logger.success("Controller connected with motors already on; no reset required.")
    except (ConnectionError, OSError) as e:
        logger.error(f"Error occurred: {e}")
    finally:
        robot.disconnect()
        robot.shutdown()


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description="Reset an Epson controller Synapse example")
    parser.add_argument("--ip", type=str, default=None,
                         help="Epson controller IP address for real hardware, e.g. 192.168.0.1")
    args = parser.parse_args()

    main(ip=args.ip)

Running the Example ​

bash
python reset_controller.py --ip 192.168.1.100

For all options:

bash
python reset_controller.py --help

Parameter Configuration ​

ParameterTypeDefaultDescription
ipstr | NoneNoneController address for an offline reset session. Omit to use the current hardware connection.
portint | NoneNoneBrand-specific reset command port, for brands that support it.
passwordstr | NoneNoneBrand-specific reset password, for brands that support it.

Returns ​

TypeDescription
NoneThe controller has accepted the recovery command.

Raises ​

ExceptionCondition
ValueErrorThe connection arguments are invalid
RuntimeErrorAn offline reset is requested while the robot is connected
NotImplementedErrorThe active interface has no physical controller, or the brand has no reset implementation

How to Tune the Parameters ​

With no arguments the call uses the current hardware connection. Pass ip only when the robot is not connected, which opens a temporary command connection. Follow it with Motor On once your recovery procedure permits.

Where to Use the Skill ​

  • Fault recovery - Clear a resettable fault after fixing its cause.
  • Unattended restarts - Recover a cell as part of a supervised restart procedure.

When Not to Use the Skill ​

  • An emergency stop or safeguard is active - release it physically first; this call cannot bypass it.
  • Running offline or in Isaac Sim - there is no controller to reset.