ROS Installation
- 1.Configure your Ubuntu repositories
Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guide for instructions on doing this.
- 2.Setup your sources.list
Setup your computer to accept software from packages.ros.org.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Mirrors | Source Debs are also available
- 3.Set up your keys
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
- 4.Installation
First, make sure your Debian package index is up-to-date:
sudo apt update
Now pick how much of ROS you would like to install.
Desktop-Full Install: (Recommended) : Everything in Desktop plus 2D/3D simulators and 2D/3D perception packages
sudo apt install ros-noetic-desktop-full
Desktop Install: Everything in ROS-Base plus tools like rqt and rviz
sudo apt install ros-noetic-desktop
ROS-Base: (Bare Bones) ROS packaging, build, and communication libraries. No GUI tools.
sudo apt install ros-noetic-ros-base
There are even more packages available in ROS. You can always install a specific package directly.
sudo apt install ros-noetic-PACKAGE
e.g.
sudo apt install ros-noetic-slam-gmapping
To find available packages, see ROS Index or use:
apt search ros-noetic
- 5.Environment setup
You must source this script in every bash terminal you use ROS in.
source /opt/ros/noetic/setup.bash
It can be convenient to automatically source this script every time a new shell is launched. These commands will do that for you.
Bash
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc