⌚ Time to complete: 30 min
You will have a working ROS Noetic installation on your machine.
To install ROS Noetic, you will need a machine with Ubuntu 20.04 (Focal Fossa) installed on it.
Set up sources:
sudo sh -c 'echo "deb <http://packages.ros.org/ros/ubuntu> $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
Set up keys:
sudo apt install -y curl
curl -s <https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc> | sudo apt-key add -
Update indexes:
sudo apt update
Install desktop version of ROS Noetic (recommended for development Robot Control Servers):
sudo apt install -y ros-noetic-desktop-full
<aside> ⏳ This will take several minutes to complete, so grab a cup of coffee in the meantime.
</aside>
Add ROS setup script to your rc file.
<aside> ℹ️ This will make ROS commands available to you in every terminal session without manual setup.
</aside>
# Define variables
SHELL_NAME=$(basename $(echo $0)) # gets the name of the current shell automatically
ROS_INIT_ENTRY="# Initialize ROS
source /opt/ros/noetic/setup.${SHELL_NAME}"
RC_FILE_PATH=~/.${SHELL_NAME}rc
# Patch RC file (using grep to make sure that the entry is not duplicated)
grep -xqF ${ROS_INIT_ENTRY} ${RC_FILE_PATH} || echo "\n${ROS_INIT_ENTRY}\n" >> ${RC_FILE_PATH}
# Source the RC file
source ${RC_FILE_PATH}
Install package building dependencies:
sudo apt install -y \
build-essential \
python3-rosinstall \
python3-rosinstall-generator \
python3-wstool \
python3-catkin-tools \
python3-osrf-pycommon
Install and initialize rosdep:
# Install rosdep
sudo apt install -y python3-rosdep
# Initialize rosdep
sudo rosdep init
rosdep update
Done! 🎉
This guide is based on the official installation tutorial from ROS wiki.