Installing ROS 1 Noetic on Ubuntu
This tutorial will focus on installing Noetic Ninjemys, the latest LTS release for ROS 1, on Ubuntu Focal.
Though it’s possible to install ROS 1 from source, the easiest way to get ROS running on your Ubuntu machine is to install its corresponding Debian packages using
apt, a command line utility for installing and managing packages on Linux distributions.
In this tutorial, we’ll walk you through installing the Debian packages for ROS 1 Noetic Ninjemys on Ubuntu Focal (20.04.4 LTS). If you are on Ubuntu Jammy (22.04 LTS), the latest LTS release, you can opt for a ROS 2 installation instead – both Rolling Ridley and Humble Hawksbill can run on Ubuntu Jammy.
Set up a UTF-8 system locale
Before installing anything, you’ll need to make sure your system locale supports UTF-8. Locale issues can cause unexpected problems further down the line, when using various ROS tools and libraries.
$ locale in a terminal window to view your currently installed locale – if UTF-8 appears in the listed output, you’re all set!
Otherwise, you'll need to set up your locale in one of two ways – choose a locale on your system or generate a new one.
Show more info.
Set up your source repos
Ubuntu programs are stored in repositories that make installing new software easy and secure. Ubuntu’s four main repositories are as follows:
- Main (Canonical-supported open-source software)
- Universe (community-maintained open source software)
- Restricted (proprietary device drivers)
- Multiverse (proprietary software)
For the purposes of installing ROS, we need to enable the Ubuntu Universe, Restricted, and Multiverse repositories:
$ sudo apt install software-properties-common $ sudo add-apt-repository universe $ sudo add-apt-repository restricted $ sudo add-apt-repository multiverse
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' $ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Install ROS 1 packages
Install your ROS 1 Noetic desktop setup with the following commands:
$ sudo apt update # update your apt repo caches $ sudo apt install ros-noetic-desktop-full
This will install a few different components like the core ROS libraries, developer tools like RViz, and a variety of 2D/3D simulators and perception packages.
To install an additional ROS package separately, you can follow the pattern of
$ sudo apt install ros-noetic-PACKAGE:
$ apt search ros-noetic # see available packages $ sudo apt install ros-noetic-slam-gmapping
Show more info.
Install additional dependencies
To create and manage your own ROS workspaces, you'll need to install a few extra dependencies:
rosdep– Installs system dependencies for source you want to compile and runs some core ROS components
rosinstall– Downloads source trees for ROS packages
rosinstallfiles with information about repositories containing ROS packages
wstool– Maintains a workspace of projects from multiple version control systems
build-essential– Links to packages crucial to compiling software
$ sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential $ sudo rosdep init # initializes rosdep $ rosdep update
Source your setup file
Typically, you would need to source your setup file every time you open a terminal to use ROS:
$ source /opt/ros/noetic/setup.bash
To save yourself the time, you can automatically trigger this step every time you launch a new shell. Run the following commands if you’re using a
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc
Run the following commands if you’re using a
echo "source /opt/ros/noetic/setup.zsh" >> ~/.zshrc source ~/.zshrc
Continue with the official ROS 1 tutorials.
To uninstall ROS 1, remove the repository from your system completely:
$ sudo apt-get remove ros-noetic
Visualize and analyze your data with Foxglove
Once you’ve gotten the lay of the land and started recording your robots’ data, you’ll need to start visualizing your data to understand what’s going on under the hood of your robots.
.bag files can be imported directly into Foxglove Data Platform, so your whole team can collaborate on organizing and tagging your data:
They can also be dragged-and-dropped into Foxglove Studio for instant rich visualizations. Load up your data to view camera images, display 3D markers, review log messages, and more:
Join the Foxglove Slack community to ask questions and learn more.
- ROS 1 Noetic docs and tutorials
- Video tutorial
- Ubuntu repositories
- ROS 1 distribution variants
- Foxglove Studio docs
- Foxglove Data Platform docs
Downloading Debian packages to set up ROS on your Linux machine.
Using the MCAP C++ writer to record robotics data.
Get blog posts sent directly to your inbox.