References#
Lecture 9
ENPM605 – L9: Launch Files & Executors
Covers Python launch files (anatomy, generate_launch_description,
two configuration patterns), advanced launch features (including
other launch files, conditional launching with IfCondition,
node grouping with GroupAction, and parameterized launch
arguments), executors (single-threaded vs. multi-threaded, the
concurrency-vs-parallelism distinction, the Python GIL and its
impact on ROS 2), and callback groups
(MutuallyExclusiveCallbackGroup and
ReentrantCallbackGroup with execution timelines and
comparison table).
ROS 2 Official Documentation
ROS 2 Jazzy: Launch
Complete tutorial series for Python launch files, from basic node startup through substitutions and events.
ROS 2 Executors Concept
In-depth conceptual explanation of how executors manage thread pools and dispatch callbacks.
Callback Groups How-To
Practical guide to creating and assigning callback groups, with examples for both group types.
Launch File API
launch package reference
Full API documentation for LaunchDescription,
DeclareLaunchArgument, IncludeLaunchDescription,
GroupAction, and substitution classes.
launch_ros package reference
API for Node, FindPackageShare, and
PushRosNamespace used in ROS 2 launch files.
XML, YAML, and Python
Comparison of all three launch file formats with equivalent examples, useful as a reference when reading third-party packages that use XML or YAML launch files.
Python Threading and the GIL
Python Standard Library: threading
Reference for Thread, Lock, RLock, Event,
and Condition – the synchronization primitives used
when callbacks share mutable state.
Real Python: The Python GIL
Practical explanation of what the GIL is, why it exists, and when it is and is not released.
Python Standard Library: multiprocessing
For cases where true Python parallelism is required,
multiprocessing bypasses the GIL by using separate
OS processes instead of threads.
External Tutorials
Articulated Robotics
Video and written tutorials for ROS 2 launch files and executors with practical robot examples.
The Construct
Browser-based interactive environment with guided exercises on executors and callback groups.
Recommended Reading
Robot Operating System (ROS): The Complete Reference (Vol. 1-7)
Relevant chapters cover ROS 2 launch systems and the executor concurrency model.
Programming Robots with ROS 2
Chapters on launch files and the threading model provide applied coverage of this lecture’s topics.
Operating System Concepts (10th Edition)
Chapter 4 (Threads) provides the OS-level background for understanding the multi-threaded executor, thread pools, scheduling, and the synchronization primitives that prevent race conditions.
Python Concurrency from the Ground Up (PyCon Talk)
Classic conference talk (available on YouTube) explaining the GIL, threads, asyncio, and multiprocessing in CPython with clear timing diagrams that map directly to the executor timelines covered in this lecture.