Skip to content

Kick Watchdog

SUMMARY

Kick Watchdog resets the communication watchdog timer on the robot controller, signalling that the Python process is alive and healthy. Call this method at a rate at or above the frequency set by Set Watchdog to prevent a watchdog timeout and protective stop.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
robot.kick_watchdog()

The Code

Example: Enable and Periodically Kick the Watchdog

Enable the watchdog at 10 Hz and send one kick.

python
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.info("Watchdog enabled at 10 Hz.")

robot.kick_watchdog()
logger.success("Watchdog kicked.")

# Disconnect
robot.disconnect()

The Explanation of the Code

kick_watchdog sends a heartbeat signal to the robot controller, resetting the watchdog countdown. The watchdog must be first enabled with Set Watchdog. In a real-time control loop, call kick_watchdog at each iteration to keep the watchdog satisfied. If kick_watchdog is not called within the timeout window, the controller triggers a protective stop. Returns True on success.

How to Tune the Parameters

This skill takes no parameters.

Return Value

TypeDescription
boolTrue if the watchdog was successfully kicked, False otherwise.

Where to Use the Skill

  • Real-time control loops — Call at each iteration to prevent watchdog timeout
  • Servo and force-control applications — Pair with motion commands sent at the same rate

When Not to Use the Skill

Do not use Kick Watchdog when:

  • The watchdog has not been enabled — call Set Watchdog first
  • Your application does not run a tight control loop — the watchdog is only appropriate for continuous real-time control patterns