First install Distrobox: https://github.com/89luca89/distrobox
After installing, create a new container for ROS2. In this case, we'll be installing Ubuntu 22.04 LTS
distrobox create --name ros --image ubuntu:22.04
To enter the container,
First install Distrobox: https://github.com/89luca89/distrobox
After installing, create a new container for ROS2. In this case, we'll be installing Ubuntu 22.04 LTS
distrobox create --name ros --image ubuntu:22.04
To enter the container,
#!/bin/bash | |
echo "Setting up ROS 2 repository..." | |
sudo apt install software-properties-common -y | |
sudo add-apt-repository universe -y | |
sudo apt update && sudo apt install curl -y | |
echo "Setting up ROS 2 keyrings..." | |
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 jammy main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null |