Practice the ROS2 Python - Multi-threading Executor coding problem in Python for ROS2. Browser-based execution with automated grading — no local ROS install required. 55% of engineers pass this challenge.
By default, ROS2 callbacks in Python run in a single thread (sequentially). Use a MultiThreadedExecutor to allow parallel execution of callbacks from multiple nodes.
node_a and node_b (these exact names)node_a logs: "node_a is running"node_b logs: "node_b is running"MultiThreadedExecutor to spin both nodes concurrentlyexecutor.add_node()rclpy.spin() — it blocks and prevents multi-node executionOutput: Console logs showing both nodes running simultaneously, e.g.:
[node_a]: node_a is running
[node_b]: node_b is running
[node_a]: node_a is running
executor.add_node(node) — both nodes must be registeredrclpy.spin(node) blocks the thread, preventing the second node from runningSingleThreadedExecutor — it doesn't allow true parallelismIt is a hands-on Python for ROS2 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 python, threading, executor skills used in robotics interviews and production systems.