ROS 2 Install Instructions
Regular Ubuntu releases are only supported for 9 months, so, ROS 2 are not targeted for them. A single ROS 2 distribution will only have full support for a single Ubuntu LTS.
The Introduction to ROS course is focused on the ROS 2 version, Humble Hawksbill. The official page to install it is here.
It is highly recommended installing ROS 2 from binary packages. So, in an Ubuntu 22.04 system the installation steps are:
Open a terminal. You can use the tools: terminator, konsole, xterm. We recommend terminator because it provides an easy way to have several terminals in the same window. Also, xterm will be used tied to the execution of some ROS nodes. To install them do:
sudo apt install terminator sudo apt install xterm
To continue with the installation, you need to add the ROS 2 apt repository to your system. Also, you will need to enable the Ubuntu Universe repository.
sudo apt install software-properties-common sudo add-apt-repository universe
The next steps are to add the key of the repository and the reference to the sources.list.
sudo apt update && sudo apt install curl -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null sudo apt update
Some needed step. ROS 2 packages are built on frequently updated Ubuntu systems. It is always recommended that you ensure your system is up-to-date before installing new packages.
sudo apt upgrade
Now, install the packages for the course:
sudo apt install ros-humble-desktop sudo apt install ros-humble-rqt-tf-tree ros-humble-tf2-tools sudo apt install ros-humble-xacro ros-humble-joint-state-publisher-gui sudo apt install ros-humble-camera-info-manager sudo apt install ros-humble-camera-calibration-parsers ros-humble-camera-info-manager sudo apt install ros-humble-ur-description sudo apt install ros-humble-aruco-ros sudo apt install ros-humble-controller-manager sudo apt install ros-humble-ros2-controllers ros-humble-ros2-control sudo apt install ros-humble-rqt-joint-trajectory-controller sudo apt install ros-humble-rqt-controller-manager sudo apt install ros-humble-ros-gz ros-humble-gz-ros2-control ros-humble-ros-gz-bridge sudo apt install ros-humble-ros-gz-image ros-humble-ros-gz-interfaces ros-humble-ros-gz-sim sudo apt install ros-humble-ros-gz-sim-demos ros-humble-ur-simulation-gz
In the scope of the course, some other utilities must be needed:
sudo apt install python3-colcon-common-extensions sudo apt install python3-colcon-clean sudo apt install git gitk qgit build-essential wget curl sudo apt install liburdfdom-tools bash-completion sudo apt install python3-ament-lint python3-ament-lint-cmake
Installing an editor
In the scope on the course, you will need to create, view and edit a lot of text files. All the code (python, c++, CMakelists.txt, … and README files) are plain text files. So, any editor can be used to work with that kind of files. However, we recommend some editor with some advanced features for editing code.
There are multiples options: qtcreator, codeblocks, eclipse, lapce, vscode, codium. Check them and choose one.
Qtcreator
sudo apt install qtcreator
Codeblocks
sudo apt install codeblocks
Eclipse
There are several methods. Check this page
Lapce
Check this.
VSCode and Codium
VSCode is and excellent editor, but it is not a fully open source software, and it has some functionalities that are not clear in privacy aspects. If you don’t mind with it, install it. If not, you can use codium.
VSCode
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install code
Codium
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \
| sudo tee /etc/apt/sources.list.d/vscodium.list
sudo apt update && sudo apt install codium