← Back to search

For robotics teachers: ROS2 Multithreaded Executors and Callback Groups | #5

The Construct Robotics Institute 1:18:15

559 views · 18 likes Watch on YouTube ↗

Handling multiple robots becomes more efficient when the executor type and callback group configuration are chosen intentionally for the workload.

In this Open Class, you’ll build and compare three monitoring nodes that all subscribe to three robots’ LiDAR topics: a default single-threaded node where all callbacks share one mutually exclusive group, a multithreaded node using a single reentrant callback group to run scan callbacks in parallel, and a multithreaded node that isolates each robot and the timer in its own mutually exclusive group for fine‑grained control. Along the way, you will observe how heavy processing in callbacks impacts timing, how callback grouping changes concurrency behavior, and how to reason about performance when scaling to multi-robot fleets.

You will learn:

✅ Understanding default single-threaded executors and mutually exclusive callback groups in ROS 2 nodes.
✅ Creating multithreaded executors to process LiDAR callbacks from multiple robots in parallel.
✅ Configuring reentrant callback groups so multiple callbacks can execute simultaneously without blocking each other.
✅ Using multiple mutually exclusive callback groups to isolate robot-specific callbacks and timers while still benefiting from multithreading.
✅ Comparing behavior and performance across single-threaded, reentrant multithreaded, and multi-group multithreaded designs for robot monitoring applications

📁 *ROS project link: https://app.theconstruct.ai/l/70b8d921/
🤖️ *Robot Used: BotBot: https://www.theconstruct.ai/botbox-warehouse-lab/

Related courses:
* C++ for Robotics (Free): https://appv3.theconstruct.ai/courses/c-for-robotics-59/
* ROS2 Basics in 5 Days (C++): https://appv3.theconstruct.ai/courses/ros2-basics-in-5-days-c-325/


============================

[For Robotics Teachers Open Class], a weekly series of videos by The Construct Robotics Institute, aims to make robotics education easier by helping teachers teach a wide range of robotics topics through hands-on practice.

Each session provides a ROS-based project (referred to as ROSJECTs 🦾 📁) for all attendees, including notebooks, code, and robot simulations. Led by ROS expert Desire, you'll see how robotics teaching and hands-on practice come together in real time.

*Missed a session? Find recordings & ROSJECTs on https://app.theconstruct.ai/open-classes/*

We're excited to share this series with you! If you have questions or want to explore new topics, drop us a comment below.

Cheers.

*The Construct Robotics Institute | Where Your Robotics Career Happens*

============================

👨‍🏫 Class Creator: Desire (ROS Tutor @The Construct Robotics Institute )
👩‍💻 Class cover designer: Sonia/Ruojun Wang (Marketing Assistant @The Construct Robotics Institute )

--
#ai #Robotics #ros #robot #ros2

Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.