Practice the ROS2 The Blocking Service coding problem in Safety-Critical. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.
A robot arm controller calls a /tool_change service before each operation. The service normally completes in about 5 seconds. A firmware bug causes it to freeze indefinitely roughly 1 in 50 calls.
When frozen, rclpy.spin_until_future_complete with no timeout blocks the entire node thread. No timers fire. No other callbacks run. The arm cannot be commanded, and the only recovery is a hard restart.
Your task: Add a timeout to the service call so that if the service does not respond within 6 seconds the node logs an error and continues operating normally. When the call succeeds the node should still publish Bool(data=True) to /arm/ready; on timeout it must not publish.
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 Hard problem focuses on service-client, timeout, spin_until_future_complete skills used in robotics interviews and production systems.