ROS 2 Lyrical Luth · Lesson 01 of 86
What ROS 2 is and where Lyrical Luth fits
The ROS 2 idea, distributions, LTS releases and why this course targets Lyrical Luth.
Estimated time · 45–60 min
Learning goals
What you will understand
- Explain what ros 2 is and where lyrical luth fits in your own words
- Use it in a small robotics example
- Verify the result instead of assuming it worked
Understand the idea first
The mental model
ROS 2 (Robot Operating System 2) is not an operating system: it is a set of libraries, tools and conventions for building robot software as many small programs (nodes) that talk to each other. It runs on Linux, Windows and macOS, and its communication layer is built on DDS.
ROS 2 is released as named distributions, such as Humble, Jazzy and Lyrical Luth. Each has a support period and a Tier 1 platform; this course uses Lyrical Luth on Ubuntu 26.04. Every command in the course starts by sourcing /opt/ros/lyrical/setup.bash.
Guided lesson
Work through these steps
- 1.
Source the ROS 2 Lyrical environment in a fresh terminal.
- 2.
Read the what ros 2 is and where lyrical luth fits example and identify what each line does.
- 3.
Build only the affected package, source the workspace overlay, and run the example.
- 4.
Inspect the result from a second terminal with the ros2 CLI or RViz2 and compare it with the expected result.
Worked example
Read it before you run it
lsb_release -a
# Confirm you are on the Ubuntu release the distribution supports.
source /opt/ros/lyrical/setup.bash
# Add ROS 2 Lyrical to this terminal's environment.
printenv ROS_DISTRO
# Print the active distribution; it must say lyrical.
ros2 --help
# List the top-level ros2 command families (node, topic, service, action, pkg, ...).
ros2 pkg list | head
# Show the first installed packages, proving the installation is visible.
ros2 run demo_nodes_cpp talker
# Run a demo node that publishes a message every second (stop with Ctrl+C).What the example is doing
- 1.The ros2 commands query the running graph; they do not prove that a node's internal behavior is correct.
- 2.Build from the workspace root, then source install/setup.bash so the shell can discover the new package.
- 3.Use a second sourced terminal to inspect nodes and interfaces while the example runs.
Watch it run · Messages between nodes
See what this code does
The terminal types this lesson's practice solution and runs it. The scene shows the kind of robot behaviour that code drives. It plays by itself and loops.
Demo for What ROS 2 is and where Lyrical Luth fits. Expected result: lyrical
Practice code
Now type it yourself
Copy the starter into your ROS 2 package, replace every TODO, then build with colcon build and run it from a sourced terminal.
# Run each line in a terminal and check the result
# TODO: load ROS 2 Lyrical into this terminal
# TODO: print which ROS distribution is active (it must say lyrical)
ros2 run demo_nodes_cpp talkerExpected output
lyricalStuck? Show the full solution (try it yourself first)
# Run each line in a terminal and check the result
source /opt/ros/lyrical/setup.bash
printenv ROS_DISTRO
ros2 run demo_nodes_cpp talkerExpected result
How you know it worked
- ROS_DISTRO is lyrical in every terminal used for the exercise.
- The complete package from the exercise builds and the expected graph entity appears in a second terminal.
Practical exercise
Apply the lesson
Install ROS 2 Lyrical desktop, source it in a fresh terminal, and record ROS_DISTRO plus the path returned by which ros2. Then run the talker in one terminal and listener (demo_nodes_cpp listener) in another and describe what you see.
Before you continue
- ROS_DISTRO reports lyrical in every terminal you used
- The example builds and runs without errors
- You checked the result with a ros2 command, RViz2 or a test, not just by reading the code
If something goes wrong
Source /opt/ros/lyrical/setup.bash, build from the workspace root, then source install/setup.bash in that terminal.
Confirm both terminals use Lyrical, the same ROS_DOMAIN_ID, and compatible network/discovery settings.