Set Watchdog
SUMMARY
Set Watchdog enables a communication watchdog on the robot controller. If the Python process stops sending periodic kick_watchdog signals at the required frequency, the controller detects the timeout and triggers a protective stop.
Use this skill in any real-time control loop where a frozen or crashed Python process must not leave the robot in motion.
SUPPORTED ROBOTS
This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.
The Skill
robot.set_watchdog(min_frequency=10.0)The Code
Example: Enable the Watchdog at 10 Hz
Connect to the robot and enable the watchdog at 10 Hz.
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots
robot_ip = "192.168.1.2" # replace with your robot's IP
robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)
robot.set_watchdog(min_frequency=10.0)
logger.success("Watchdog enabled at 10 Hz.")
# Disconnect
robot.disconnect()The Explanation of the Code
set_watchdog configures the controller to expect a kick_watchdog call at least min_frequency times per second. If the watchdog is not kicked within the corresponding timeout period (1 / min_frequency seconds), the controller triggers a protective stop. After calling set_watchdog, your control loop must call kick_watchdog at the appropriate rate. Returns True on success.
How to Tune the Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
min_frequency | float | 10.0 | Minimum watchdog kick frequency [Hz]. The controller timeout is 1 / min_frequency seconds. |
Return Value
| Type | Description |
|---|---|
bool | True if the watchdog was successfully enabled, False otherwise. |
Where to Use the Skill
- Real-time control loops — Ensure the robot stops safely if the Python process crashes or freezes
- Force-control and servo applications — Pair with Kick Watchdog inside any tight control loop
When Not to Use the Skill
Do not use Set Watchdog when:
- The control loop does not run continuously — the watchdog will immediately trigger a protective stop if not kicked regularly
- You only need a single commanded move — motion skills like Set Joint Positions do not require a watchdog

