Setting up ROS 2 Humble Hawksbill on Ubuntu

Environment

Ubuntu 22.04

Setup Sources

Enable the Ubuntu Universe repository.

Add the ROS 2 GPG key with apt.

Add the repository to your sources list.

Install ROS 2 packages

WARNING: ROS2 tools like colcon does not quite work with conda environments, so it's recommended to install ROS-related things directly under system environment. In this case, make sure when running the commands, the conda environment is disabled:

apt will install things to system directory, but pip will install it to current active Python directory.

Update apt repository caches after setting up the repositories, and ensure the system is up to date before installing new packages.

Install Desktop Install, including ROS, RViz, demos, and tutorials.

Install Colcon

Colcon is a tool used to build ROS 2 software packages.

Adding Environment Variables

Colcon also has a tool, colcon_cd, to help navigating to package directories.

Additional Tools

other possible required dependencies

With Ubuntu 22.04 + ROS 2 Humble combination, we also need the following dependencies for building turtlesim:

Install Gazebo support

Last updated