Fusion of Engineering, Control, Coding, Machine Learning, and Science

How to install ROS2 Jazzy on Raspberry Pi 5 and Linux Ubuntu

In this tutorial, we explain how to install ROS2 Jazzy Jalisco on Raspberry Pi 5 and Linux Ubuntu 24.04. The YouTube video is given below.

How to Correctly Install ROS2 Jazzy on Raspberry Pi 5 and Linux Ubuntu - Complete Tutorial

Important Notes

Before proceeding with installation, we need to emphasize the following

Install ROS2 Jazzy on Raspberry Pi 5

Let us start with the installation instructions. First let us make sure that the locale is UTF-8

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale  # verify settings

Let us enable the required repositories

sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

The following command is a single command that spans several lines. You need to copy and paste it as a whole.

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

Next, you need to install the development tools:

sudo apt update 
sudo apt install ros-dev-tools

To install ROS2, you need to perform these commands:

sudo apt update
sudo apt upgrade
sudo apt install ros-jazzy-desktop

After ROS2 is installed, you need to verify the installation. To verify the installation, open a new terminal and type

source /opt/ros/jazzy/setup.bash
ros2 run demo_nodes_cpp talker

This will start a ROS2 talker node that will publish messages with increasing strings.

While the terminal running the ROS2 talker node is active, open a new terminal and type this

source /opt/ros/jazzy/setup.bash
ros2 run demo_nodes_py listener

This will start a ROS2 listener node that should receive the messages through an appropriate topic and display the messages on the computer screen. If you see the messages shown below this means that ROS2 is properly installed.

Exit mobile version