Download UTM software from Prerequisites
Download Ubuntu20.04 iso file: https://cdimage.ubuntu.com/releases/focal/release/
<aside> ⚠️
AMD version: Intel Mac
ARM version: Apple Silicon Mac
</aside>
In the UTM software:
Create a new image and choose Virtualize
option.
Select the ISO image you have downloaded in the Boot ISO Image
field.
Leave all hardware settings at default (including hardware acceleration disabled).
Leave all the remaining parameters as default.
During the first launch of the VM, install Ubuntu and choose a username for your account. In this example, the username is bristol_fsai
, password is fsai123
Once Ubuntu is installed, close the VM, remove the iso image from the CD/DVD field and restart the VM.
Open the VM:
sudo apt install ubuntu-desktop
reboot
sudo reboot
login to your account
Open terminal
Follow the guide below to install ROS2 env
Ubuntu (Debian) — ROS 2 Documentation: Galactic documentation
Ubuntu (Debian) — ROS 2 Documentation: Foxy documentation
Trouble Shooting:
Disable the cdrom if you cannot do sudo apt update
sudo sed -e '/cdrom/s/^/#/' -i /etc/apt/sources.list
sudo apt update
Advises:
Install the ROS2 desktop
sudo apt install ros-galactic-desktop
Set up your environment by sourcing the following file.
source /opt/ros/galactic/setup.bash
Add the command above to ~/.bashrc
, so that you do not need to source the setup.bash every time when you open a new terminal
echo "source /opt/ros/galactic/setup.bash" >> ~/.bashrc
source ~/.bashrc
Open terminal: