Unit 02 · lesson
Setup Recovery: Diagnose Before Reinstalling
When a beginner ROS install fails, the fastest emotional reaction is often:
uninstall everything and start over.
That destroys evidence.
Use a failure ladder instead.
Failure 1: ros2: command not found
Check:
ls /opt/ros/jazzy
source /opt/ros/jazzy/setup.bash
which ros2
printenv | grep -i ROS
Reasoning:
- if
/opt/ros/jazzyis missing, the installation layer is suspect; - if it exists but
ros2appears only after sourcing, the installation is probably fine and the shell environment was the problem.
Failure 2: apt cannot find ros-jazzy-desktop
Inspect the layer before ROS package installation:
sudo apt update
Look for repository/signature errors. Revisit the ros2-apt-source installation instead of repeatedly requesting a package apt cannot discover.
Failure 3: ROS_DISTRO is not jazzy
Run:
printenv | grep -i ROS
A machine can contain multiple ROS distributions or previously sourced workspaces. Open a clean terminal and source only the intended Jazzy setup.
Failure 4: talker runs, listener hears nothing
First prove both terminals were sourced and both nodes are visible:
ros2 node list
ros2 topic list
Do not jump to advanced middleware tuning in a beginner setup exercise.
Failure record
Use:
Symptom:
Expected:
Observed:
Layer inspected first:
Command/evidence:
What the evidence ruled out:
Next action:
Unit gate
From a clean terminal, complete this sequence without copying unexplained commands:
source /opt/ros/jazzy/setup.bash
printenv | grep -i ROS
ros2 --help
Then run the talker/listener verification in two terminals.
Explain the path from Ubuntu package repositories to a communicating pair of nodes.
If you can do that, your Jazzy workstation is ready for the rest of the course.