Practice the ROS2 Watchdog Without Teeth coding problem in Safety-Critical. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.
A watchdog monitors the navigation controller and triggers an alert when the controller goes missing. When you manually kill the nav node, the watchdog correctly fires. But in production the nav controller sometimes enters an infinite loop — the process is alive, the node appears in ros2 node list, but it is completely frozen and publishing nothing.
The watchdog never triggers. The bug: it checks node existence via ros2 node list subprocess instead of message freshness. A frozen node still appears in the node list.
Fix the watchdog to track the timestamp of the last received heartbeat from /nav/heartbeat (Empty) and publish a Bool(data=True) alert on /watchdog/alert if no heartbeat has been received for more than 0.5 seconds.
It is a hands-on Safety-Critical challenge on SimuCode where you implement and run ROS2 code in the browser with runtime-verified tests.
Open this page, sign in, and solve the problem in the built-in IDE. Your solution is graded against real ROS2 execution checks.
This Medium problem focuses on watchdog, heartbeat, liveness skills used in robotics interviews and production systems.