Skip to content
Yiqing-Gu edited this page Nov 8, 2021 · 6 revisions

Official websites for ROS noetic installation: http://wiki.ros.org/noetic/Installation/Ubuntu

The following instruction is based on Ubuntu 20.04. Please check your system version before starting following steps.

If you have older Ubuntu, please go to https://github.com/gsilano/CrazyS to find your corresponding system version.

1. Configure your Ubuntu repositories

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." Here is a guide for doing this: https://help.ubuntu.com/community/Repositories/Ubuntu

2. Setup your sources.list

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

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. Formal Installation

Make sure your Debian package index is up-to-date

sudo apt update

Desktop-Full Install

sudo apt install ros-noetic-desktop-full

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

Zsh:

echo "source /opt/ros/noetic/setup.zsh" >> ~/.zshrc

source ~/.zshrc

6. Dependencies for building packages

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

sudo apt-get install ros-noetic-octomap ros-noetic-octomap-mapping ros-noetic-octomap-rviz-plugins ros-noetic-octomap-server ros-noetic-octomap-msgs ros-noetic-joy ros-noetic-geodesy ros-noetic-octomap-ros ros-noetic-mavlink ros-noetic-control-toolbox

sudo apt-get install libgflags-dev

sudo apt install libgoogle-glog-dev

sudo apt-get install protobuf-compiler libprotobuf-dev

Using python3 as default instead of python

sudo ln -s /usr/bin/python3 /usr/bin/python

With the following, you can initialize rosdep.

sudo rosdep init

rosdep update

Clone this wiki locally