ROS2 The Message Flood

Medium Performance Debug 0% pass rate
#imu#throttling#timer#rate-control#multithreaded-executor#performance#sensor_msgs

Practice the ROS2 The Message Flood coding problem in Performance Debug. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.

Performance Bug

IMU node publishes at 1000Hz. CPU pegged at 95%. Everything downstream needs 50Hz max.


Symptoms

  • IMU publishes /imu/data at 1000Hz
  • All downstream nodes subscribe at 1000Hz
  • CPU at 95% — mostly ROS2 message processing overhead
  • Downstream algorithms only need 50Hz
  • Simple solution exists — but naive approach introduces problems

Your task

Throttle the IMU stream from 1000Hz to 50Hz. But do it correctly:

  • Always forward the MOST RECENT message at each 50Hz tick
  • Never forward a message older than 20ms
  • Publish a /imu/stats topic with received rate and forwarded rate

Note: ros2 topic_tools throttle loses messages rather than filtering properly. Implement a correct throttler node.

Frequently asked questions

What is the ROS2 The Message Flood practice problem?

It is a hands-on Performance Debug challenge on SimuCode where you implement and run ROS2 code in the browser with runtime-verified tests.

How do I practice ROS2 The Message Flood online?

Open this page, sign in, and solve the problem in the built-in IDE. Your solution is graded against real ROS2 execution checks.

What skills does ROS2 The Message Flood test?

This Medium problem focuses on imu, throttling, timer skills used in robotics interviews and production systems.