ROS2 Rate-Limited Command Interface

Medium System Design 0% pass rate
#rate-limiting#timers#middleware#cmd_vel#system-design#ros2

Practice the ROS2 Rate-Limited Command Interface coding problem in System Design. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.

System Design

An external planning system sends velocity commands at 100Hz. The robot's motor controller accepts commands at 10Hz maximum. Build middleware that bridges them correctly.

Requirements

  1. Accept commands at 100Hz on /planning/cmd_vel
  2. Forward exactly 10 commands/second to /motor/cmd_vel
  3. Always forward the MOST RECENT command at each 10Hz tick
  4. Never forward a command older than 150ms
  5. Publish /command_stats (String) with format received:{N} forwarded:{M} stale_dropped:{K}

What "correct" means

  • If planning publishes at 100Hz and motor accepts at 10Hz: forward 10/sec (not 100)
  • If a command is 200ms old when the tick fires: drop it (publish nothing that tick)
  • Stats must be accurate

Starter code

The starter has the wrong architecture — it forwards every command on receipt (100Hz output), not on a timer.

Frequently asked questions

What is the ROS2 Rate-Limited Command Interface practice problem?

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

How do I practice ROS2 Rate-Limited Command Interface 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 Rate-Limited Command Interface test?

This Medium problem focuses on rate-limiting, timers, middleware skills used in robotics interviews and production systems.