ROS2 Callback or Executor? Choose Wisely

Hard Migration 0% pass rate
#ros2#migration#executor#multithreaded#callbacks#concurrency#sensor-fusion

Practice the ROS2 Callback or Executor? Choose Wisely coding problem in Migration. Browser-based execution with automated grading — no local ROS install required. 0% of engineers pass this challenge.

Migration Problem

A sensor fusion node was ported from ROS1 to ROS2. In ROS1, it handled 3 topics simultaneously. In ROS2, it frequently misses updates from the slowest topic, causing stale fused output.

Setup

  • 3 sensor topics: /sensor/fast (20Hz), /sensor/medium (10Hz), /sensor/slow (2Hz)
  • Fusion node subscribes to all 3, fuses latest values
  • Slow sensor callback takes 80ms (hardware I/O simulation)

Bug

The node uses SingleThreadedExecutor (the default). The slow callback (80ms) blocks the executor thread. During those 80ms, the fast sensor queues 1-2 messages. When the slow callback finishes, the queued messages run but are now stale. The fused output uses data that arrived 80-160ms ago.

Your task

Fix the executor strategy so all 3 callbacks can process concurrently. The fused output should use data no older than 100ms.

Frequently asked questions

What is the ROS2 Callback or Executor? Choose Wisely practice problem?

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

How do I practice ROS2 Callback or Executor? Choose Wisely 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 Callback or Executor? Choose Wisely test?

This Hard problem focuses on ros2, migration, executor skills used in robotics interviews and production systems.