Method 2: Setup UTM step-by-step

1. Download requires

2. Create new Virtual Machine:

In the UTM software:

3. Set up the ROS env inside VM

Open the VM:

image.png

  1. Login with your username and password

image.png

  1. Download GUI

sudo apt install ubuntu-desktop

  1. reboot

    sudo reboot

  2. login to your account

    1. Open terminal

    2. 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: