Unit 09 · lesson
Prove the Environment Before Running Anything
Many ROS errors are actually shell-environment errors.
Before debugging code, inspect:
printenv | grep -i ROS
Look for the intended distribution.
Then inspect package search behavior:
ros2 pkg list | grep robotnix_pubsub
ros2 pkg executables robotnix_pubsub
Ask three questions
- Is Jazzy installed on disk?
- Is Jazzy sourced in this shell?
- Is the local workspace overlay sourced in this shell?
Those are different questions.
Compare terminals
Create two clean terminals:
A: source only /opt/ros/jazzy/setup.bash.
B: source Jazzy plus ~/ros2_ws/install/local_setup.bash.
Compare package/executable discovery.
Checkpoint
Write one sentence for each failure:
- "ROS 2 is not installed";
- "ROS 2 is installed but not sourced";
- "Jazzy is sourced but my overlay is not sourced."
Name the command evidence that distinguishes them.