Enable the Ubuntu Universe repository.
Add the ROS 2 GPG key with apt.
Add the repository to your sources list.
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.
Colcon is a tool used to build ROS 2 software packages.
With Ubuntu 22.04 + ROS 2 Humble combination, we also need the following dependencies for building turtlesim: