Practice the ROS2 The 24-Hour Robot coding problem in Code Audit. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.
A sensor processing node works perfectly in short tests. In production the team must restart it every 16–20 hours — memory usage climbs steadily throughout the shift.
The node subscribes to /scan (LaserScan), computes the minimum valid range, and publishes it to /min_range (Float32). There are no memory leaks in application logic. The culprit is a QoS setting.
The bug: HistoryPolicy.KEEP_ALL with depth=0 on the subscriber creates an unbounded DDS message queue. Every message the publisher produces — faster than the callback drains it — is retained in the middleware layer forever.
Fix the QoS profile so the subscriber uses a bounded queue. Verify that:
KEEP_ALL.It is a hands-on Code Audit 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 qos, KEEP_ALL, KEEP_LAST skills used in robotics interviews and production systems.