Robot Operating System — ROS
ROS Noetic Installation Guide on Ubuntu 20.04
Easy guide to installing ROS on Ubuntu System
ROS — Robot Operating System
ROS is an open-source robot operating system that helps develop software in robotics. It manages services like hardware abstraction, mapping, motion planning, message passing between nodes, and so on.
This article explains simple steps for installing ROS Noetic on Linux systems. For more details on the installation guide, click here or watch the below Youtube video.
Step 01: Setup your sources list
Open your Linux terminal using the ctrl + alt + t
command, and past the following code to link the source list to your Linux terminal.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Step 02: Set Up your Key
Now install curl
using sudo apt install curl
command and add the ROS package key using the line given below;
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
Before going through the installation process, always check that your Debian package is up to date. You can check it by using sudo apt-get update
command.
Step 03: ROS Setup
After checking the status of your Debian package, You can decide how much you want to install the ROS Package on your system. You can choose based on work requirements, but I will highly recommend installing Full Desktop
setup.
- Desktop-Full Installation — Includes Everything with desktop 2D/3D simulator and 2D/3D perception. The command for installing Full Desktop setup:
sudo apt install ros-noetic-desktop-full
- Desktop Installation — Includes ROS packaging, build, and communication libraries along with tools like
rqt
andrviz
. The command for installing Desktop setup:sudo apt install ros-noetic-desktop
- ROS Base Installation — Includes only ROS packaging, build, and communication libraries. The command for installing Base setup:
sudo apt install ros-noetic-ros-base
Step 04: Environment Setup
You must source a bash file of ROS setup every time you open a new terminal for your ROS system to function correctly. You can source the bash file using source /opt/ros/noetic/setup.bash
command your Linux terminal.
You can also store the path of the ROS setup bash file in .bashrc
the file.
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Note: Make sure to run either source /opt/ros/noetic/setup.bash
or source ~/.bashrc
command before using the ROS methods. Otherwise, you will face different errors.
Step 05: Dependencies
You have installed the core of the ROS package, but for managing your own ROS package, you need to install dependencies based on the requirement of that package. There are a few base dependencies that you can install before creating your own ROS Package. To install tools and dependencies for building ROS Package, run:
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
To use many ROS tools, you must initialize rosdep
. The rosdep
package of ROS allows us to easily install system dependencies for the sources we want to compile and is necessary to run some core ROS components. For installing rosdep, run;
sudo apt install python3-rosdep
Initialize rosdep
using sudo rosdep init
command.
Step 06: Checking ROS Installation
You can check successful ROS Noetic installation by running the following commands onto your Linux terminal.
source ~/.bashrc
roscore
After running roscore
you will see an output as shown below;
After running the roscore command on your Linux system, if you see no errors, then ROS has been successfully installed.
How to remove ROS setup from Ubuntu 20.04?
If you face some error while running aroscore
command, you can delete the ROS setup. After deleting the ROS setup with his dependencies, you can again start with the installation process.
You can delete the ROS package with two different methods as given below;
Method 01:
sudo apt-get remove ros-*
Method 02:
sudo apt-get purge ros-*
sudo apt-get autoremove
Congratulations ✨ on completing this article. Follow for more!
To Lovely Readers: Kindly highlights the mistakes So I can update them. Hoping this article helps you start your journey as a ROS developer. Do mention your doubts So I can create posts on those as well.