Introduction to ROS Part 9: Launch Files | DigiKey
In this video, we explore how ROS 2 launch files can dramatically improve how you manage and run multiple nodes in your robotic systems. Instead of launching each node individually through the terminal, you’ll learn how to start entire node networks with a single command using launch files written in XML and Python. The written guide for this episode can be found here: https://www.digikey.com/en/maker/projects/intro-to-ros-part-9-launch-files/fd0cadb56d1c466fabe45f0b528aad91 The GitHub repository containing the Docker image and example code for this series can be found here: https://github.com/ShawnHymel/introduction-to-ros We begin with a hands-on demo of a simple XML launch file that starts a publisher and multiple subscribers, complete with custom parameters, namespaces, and unique node names. You’ll see how to modify package.xml and CMakeLists.txt to support launch files and use tools like rqt_graph to verify your node connections. Next, we step into Python-based launch files, which offer more flexibility and logic than XML. You’ll learn how to organize these files in a separate bringup package and configure your nodes dynamically using YAML parameter files. This is incredibly useful for switching between development and production settings without modifying your node code. We also introduce the generate_launch_description() function and break down how it builds a LaunchDescription object that orchestrates the behavior of your nodes. You'll see how to declare launch arguments, substitute file paths, and apply configurations at runtime—skills essential for building scalable ROS 2 systems. By the end of this tutorial, you’ll know how to automate node orchestration, manage parameters across environments, and build reusable launch infrastructure for your ROS-based robotics projects!