How to Install ROS Noetic on Ubuntu 20.04 LTS

Written by: Winnie Ondara   |   Last updated: July 18, 2022

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
Add official ROS keyring

Output: 

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:

  • ros-noetic-desktop-full
  • ros-noetic-desktop
  • ros-noetic-ros-base
  • Ros-noetic-ros-core

Choose your preferred metapackage and install with either of the commands below.

Install ros-noetic-desktop-full

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. 

Install ros-noetic-desktop

Ros-noetic-desktop is a minimal version of ros-noetic-desktop-full.  It contains most tutorial packages including: 

  • vis
  • angles
  • common_tutorials
  • geometry_tutorials
  • ros_tutorials
  • roslint
  • urdf_tutorial
  • visualization_tutorials

To install ros-noetic-desktop, run the following command:

sudo apt install ros-noetic-desktop

Install ros-noetic-base

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

Install ros-noetic-core

The ros-noetic-core contains a collection of the bare minimum packages. The packages include:

  • common_msgs
  • gencpp
  • geneus
  • genlisp
  • genmsg
  • gennodejs
  • genpy
  • message_generation
  • message_runtime
  • pluginlib
  • ros
  • ros_comm
  • rosbag_migration_rule
  • rosconsole

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:

source /opt/ros/noetic/setup.bash

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:

tail ~/.bashrc
Set up ROS Noetic environment
Set up ROS Noetic environment in Ubuntu

For the changes to take effect, type:

source ~/.bashrc 

Verify Noetic installation

After successfully installing ROS Noetic on Ubuntu 20.04, simply run the roscd command.

$ roscd

You will notice that the current directory of your prompt changes to  /opt/ros/noetic, which is where we installed Noetic.

Verify installation of Noetic
Verify installation of 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. 

$ roscore
Verify Noetic installation by printing ros distribution and version
Verify Noetic installation by printing ros distribution and version

Conclusion

In this tutorial, we learned how to install ROS Noetic on Ubuntu 20.04. Now you can program your robots using Noetic.

About The Author

Winnie Ondara

Winnie Ondara

Winnie is a Linux technical writer with over 3 years of experience with various Linux distributions and writing technical guides in Linux. She is passionate about FOSS technologies and always endeavor to learn new technologies. During my free time, I watch movies, listen to music, and catch up with tech news.

SHARE

Comments

Please add comments below to provide the author your ideas, appreciation and feedback.

Leave a Reply

Leave a Comment