ROS 2 Humble Container For Incus

ROS 2 is a sequel to the master-slave approach of ROS 1, and just like its prequel its mostly Ubuntu Distro specific but with a few know - hows from the previous Tutorials its possible to have various OS level containers that are just as fast as installing on the host system but are portable enough to not brick your system packages. The previous tutorials are listed below:

Creating a New Container:

ROS2 Humble is recommended to be installed in Ubuntu 22.04 LTS.

Assuming that the name of the Container is ros-humble

Launching the container

Launch Shortcut (Optional)

I get it, sometimes that login command looks way too tedious to type (I'm Lazy), so we can create an alias (a.k.a short-cut) to login easily using:

Use this command only once, Its not required for subsequent newly created containers

This will now condense the login method to:

Install ROS2 Humble

This is identical to the instructions available from the Official Documentation:

Update and Upgrade existing system packages:

Set Locale

Verify Locale

Output:

Setup Sources

Ensure that the Ubuntu Universe repository is enabled

Add ROS2 GPG key with apt

Add repository to sources list

Install ROS2 Packages

Add Environmental script to .bashrc

Initialize Rosdep

Optional Workflows:

GUI Support:

If you have not created the incus prior to this step, follow the instructions here, once the gui profile has been created, it can be added to our container.

Reboot the container using incus reboot ros-humble

Validation:

Login to the container:

Install x11-apps and check for a gui:

Nvidia Drivers with CUDA support:

Reboot the container using incus reboot ros-humble

Validation:

Login to the container:

Run nvidia-smi:

Output:

Install Conda / Mamba:

This has been covered in the tutorial here:

Follow this part whilst being in the container

Install VS-Code:

This has been covered in the tutorial here:

Follow this part whilst being in the container

Reply

or to participate.