CodeTheRobot

Ubuntu Linux for Robotics · Lesson 34 of 96

Install ROS 2 Lyrical Luth

Desktop vs ros-base, ros-dev-tools, upgrading and what gets installed.

Estimated time · 30–60 min

Learning goals

What you will understand

  • Explain install ros 2 lyrical luth in your own words
  • Use it in a small workstation example
  • Verify the result instead of assuming it worked

Understand the idea first

The mental model

ros-lyrical-desktop installs the complete distribution: the core libraries, command-line tools, RViz2, demos and tutorials. ros-lyrical-ros-base is smaller (no GUI tools), good for robot computers that have no screen. ros-dev-tools installs colcon, rosdep, vcstool and other build tools.

Update Ubuntu first (sudo apt update && sudo apt upgrade) so package versions match. Installation needs several gigabytes. Later you keep ROS 2 up to date with the normal apt upgrade; do not mix packages from two different ROS 2 distributions on one machine.

Guided lesson

Work through these steps

  1. 1.

    Open a terminal and record the current state before changing anything.

  2. 2.

    Read the install ros 2 lyrical luth commands and predict what each one does.

  3. 3.

    Run the commands one at a time and compare each output with your prediction.

  4. 4.

    Write the commands that worked in a setup note you can repeat later.

Worked example

Read it before you run it

sudo apt update && sudo apt upgrade -y
# Bring the system up to date before installing.
sudo apt install ros-lyrical-desktop
# Install the full desktop distribution (use ros-lyrical-ros-base on a robot with no screen).
sudo apt install ros-dev-tools
# Install colcon, rosdep, vcstool and related tools.
ls /opt/ros
# The installed distribution appears here as a folder.
ls /opt/ros/lyrical | head
# Look inside: bin, lib, share and setup files.
apt list --installed 2>/dev/null | grep -c ros-lyrical
# Count how many ROS 2 packages were installed.

What the example is doing

  1. 1.Lines without sudo only inspect or change files you own; sudo authorizes a system-wide change.
  2. 2.Read command output before moving to the next line. Stop if names, versions, disks, or paths differ from the lesson.
  3. 3.Comments beginning with # explain safety checks and are not executed by the shell.

Watch it run · Build and run

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.

sourcecompilerprogramBUILD AND RUN

Demo for Install ROS 2 Lyrical Luth. Expected result: lyrical

Practice code

Now type it yourself

Open a terminal, run the starter line by line (or save it as practice.sh and run bash practice.sh), and replace every TODO with your own command.

# TODO: install ros-lyrical-desktop, then list the distributions in /opt/ros

Expected output

lyrical
Stuck? Show the full solution (try it yourself first)
sudo apt install -y ros-lyrical-desktop
ls /opt/ros

Expected result

How you know it worked

  • Each command completes without an unexplained error.
  • Your notes contain the command, the important output, and what it proves.

Practical exercise

Apply the lesson

Install ros-lyrical-desktop and ros-dev-tools, list /opt/ros, count the installed ROS packages, and note the disk space used with du -sh /opt/ros.

Before you continue

  • You recorded the starting state
  • Every command and output is understood
  • The change can be repeated from your notes

If something goes wrong

A command says permission denied.

Check ownership and permissions first. Do not add sudo unless the command changes a documented system location.

A command or package is not found.

Check spelling, Ubuntu version, enabled repositories, and whether the previous installation command succeeded.