ROS (Robot Operating System) is an open-source project that provides a framework and tools for robotics applications. It helps to design complex software without knowing how certain hardware works.
Noetic is a LTS release of ROS and tailored for Ubuntu 20.04. ROS Noetic support is up to 2025 (5 years). The architecture supported are amd64, armhf, and arm64.
In this tutorial, we will walk through how to install ROS Noetic on Ubuntu 20.04.
1. Add Official Noetic repo to Ubuntu
The first step in installing ROS Noetic is to add the official ROS Noetic repository to Ubuntu 20.04 sources list file.
To add Noetic repo, type:
echo "deb http://packages.ros.org/ros/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/ros-focal.list
deb http://packages.ros.org/ros/ubuntu focal main.
2. Add official ROS keyring
Next, add the official ROS keyring to your Ubuntu 20.04 system. There are two ways to go about this.
The first method is to use the hkp://keyserver.ubuntu.com:80 Ubuntu key server. If this does not work, you can try to replace it with hkp://pgp.mit.edu:80. So, run the command below.
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
The second method is to use the curl command to download the official ROS keyring and add it locally.
curl -sSL 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xC1CF6E31E6BADE8868B172B4F42ED6FBAB17C654' | sudo apt-key add -
The output “OK”, means the key has successfully been added.
3. Update the ROS package index
Next, we will update our Ubuntu system so as to get the ROS Noetic package information from the repository.
sudo apt update
This will sync the newly added repository with the online Ubuntu repositories.
4. Install ROS Noetic on Ubuntu 20.04
ROS has several metapackages that you can choose to install according to your specific needs.
The following are the official ROS Noetic metapackages:
Choose your preferred metapackage and install with either of the commands below.
The package ros-noetic-desktop-full comes with all the packages in ros-noetic-desktop and also the perception (ros-noetic-perception) and simulation (ros-noetic-simulators) packages.
To install ros-noetic-desktop-full, run the following command:
sudo apt install ros-noetic-desktop-full
After you run the command, press Y to proceed with the installation.
Ros-noetic-desktop is a minimal version of ros-noetic-desktop-full. It contains most tutorial packages including:
To install ros-noetic-desktop, run the following command:
sudo apt install ros-noetic-desktop
The ros-noetic-base contains only basic packages. It includes the packages in ros_core and other basic non-robot tools such as dynamic reconfigure, nodelets, and actionlib.
To install ros-noetic-base, run the following command:
sudo apt install ros-noetic-base
The ros-noetic-core contains a collection of the bare minimum packages. The packages include:
To install ros-noetic-core, run the following command:
sudo apt install ros-noetic-core
5. Set up ROS Noetic environment
The next step is to set up ROS Noetic environment. First source the setup.bash script in every bash terminal that use ROS, type:
Add in the .bashrc file located in your home directory to avoid running each time when you launch a new shell:
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
Verify by running the following command:
For the changes to take effect, type:
Verify Noetic installation
After successfully installing ROS Noetic on Ubuntu 20.04, simply run the roscd command.
You will notice that the current directory of your prompt changes to /opt/ros/noetic, which is where we installed Noetic.
We can also verify the installation by running roscore command in the noetic directory. The output displays the ros distro and the ros version in the summary.
In this tutorial, we learned how to install ROS Noetic on Ubuntu 20.04. Now you can program your robots using Noetic.