Unit 08 · lesson
Launch Your Talker and Listener Together
Create a launch directory inside the ROS package:
cd ~/ros2_ws/src/robotnix_pubsub
mkdir -p launch
Create:
launch/student_system.launch.py
using the launch description from the previous lesson.
Run directly while developing
The pinned launch tutorial demonstrates that a launch file can be run directly by path/from its directory.
From the launch directory, with Jazzy and your overlay sourced:
ros2 launch student_system.launch.py
You should see launch messages showing processes starting, followed by your node log output.
Inspect from another terminal
ros2 node list
ros2 topic list -t
ros2 topic info /student_chatter --verbose
The graph should match the two-node system you previously started manually.
Stop the system
Use Ctrl+C in the launch terminal.
Observe shutdown messages. Launch is managing more than a static configuration file; it is supervising the processes it started.
Checkpoint
Compare manual startup and launch startup:
| Evidence | Manual | Launch |
|---|---|---|
| number of startup commands | ||
| node names | ||
| topic | ||
| shutdown behavior |