Skip to content

Install ROS on macOS

Quintin edited this page Sep 25, 2023 · 58 revisions

Overview

Although not officially supported, running a virtual machine with VMWare Fusion or UTM works decently well.

Download Ubuntu server ISO here:

(M1 or M2, choose 64-bit ARM server) https://cdimage.ubuntu.com/releases/focal/release/

(Intel, choose 64-bit AMD64 server) https://releases.ubuntu.com/focal/

VMWare Fusion Pro (recommended)

  1. Request an account for the VMWare IT Academy following this guide: https://its.umich.edu/computing/computers-software/software-services/software-information/vmware
  2. Wait for the email notifying you that a VMWare subscription has been allocated to you (up to 4 hours wait). Follow the link to register
  3. Visit this link and make sure you are still logged into your account. Request a license for VMWare Fusion Pro (version 13.x as of writing): https://itacademy.vmware.com/catalog?pagename=Software-Licenses-Repository (up to 12 hours wait)
  4. Download VMWare Fusion Pro from https://www.vmware.com/products/fusion/fusion-evaluation.html and install it
  5. Install the downloaded OS from the .iso file
  6. Configure the memory and hard disk (allocate as much RAM as you can based on your computer's limits for memory. For hard disk, we recommend at least 64GB for disk storage but if you can't 32GB should be fine). On this page, click on customize settings

Screen Shot 2023-09-17 at 12 18 22 PM

Then customize memory and hard disk in these locations:

Screen Shot 2023-09-17 at 11 52 16 AM
  1. Move on to UTM and VMWare section below
  2. ADVANCED: Enable "Accelerate 3D Graphics" under "Settings > Display" for the VM. In the VM install the latest Mesa drivers sudo add-apt-repository ppa:kisak/kisak-mesa && sudo apt update && sudo apt upgrade. Also install the latest Linux kernel sudo add-apt-repository ppa:cappelikan/ppa && sudo apt update && sudo apt install mainline. Kernel version 6.2.16 worked as of writing this. Note the header apt package may fail to install but that is okay. Fix it with sudo apt --fix-broken install.

UTM (second open source option)

  1. Make sure you have brew installed
  2. Run brew install --cask utm from your terminal
  3. Open the UTM application (through launchpad or cmd-space then search UTM)
  4. Select the plus button, click virtualize, click other, click browse, then choose the iso file you downloaded. Continue
  5. On the hardware page, set it to how much you want (suggested: around 3/4 to all of your computer's memory). Continue
  6. On the storage page, set to 64GB. Continue
  7. Shared Directory: Continue
  8. Summary: Save
  9. Move on to UTM and VMWare section below

UTM and VMWare

  1. Launch the VM (click play button) and let ubuntu server install
  2. Enter for install
  3. Continue without updating
  4. Select keyboard is English: Done
  5. Network connections: Done
  6. Configure proxy: Done
  7. Configure Ubuntu archive mirror: Done
  8. Guided storage configuration: [X] Use entire disk and [X] Set up this disk as LVM group, arrow down to done
  9. Storage configuration: Done. Confirm destructive action: Continue
  10. Profile setup: Names can be whatever you want, but make sure you remember both the username and password. Done
  11. SSH Setup: don't need to install now. Done.
  12. Featured Server Snaps: don’t need to select any, can install later if needed. Done
  13. Wait for “subiquity/Late/run” then arrow down to Reboot Now
  14. If you boot to a blinking cursor and you are using UTM, shut down the VM, go to settings (three lines with circles in top right after clicking on your virtual machine), find the USB disk drive, and delete it. Save. Then start the VM again

If you are using VMWare and you get stuck on this page:

image

Click on the settings:
Screen Shot 2023-09-14 at 12 51 10 PM

Open starter disk:
Screen Shot 2023-09-14 at 12 50 36 PM


And restart the VM:
Screen Shot 2023-09-14 at 12 50 42 PM

  1. Enter username, then password (set during profile setup)
  2. Run sudo apt update && sudo apt install tasksel && sudo tasksel install ubuntu-desktop to install GNOME (the display manager)
  3. After installing packages (100%), run sudo reboot in the terminal space at the bottom of the screen
  4. Login
  5. Livepath: don’t need to set up, Next. Help improve Ubuntu: pick then click next. Privacy: Next. Done
  6. Power off the VM:
Screenshot 2023-09-17 at 10 42 23 PM

Click on the settings:
Screen Shot 2023-09-14 at 12 51 10 PM

Open CD/DVD (SATA):
Screenshot 2023-09-17 at 10 42 43 PM

Make sure "Connect CD/DVD Drive" is not checked:
Screenshot 2023-09-17 at 10 42 52 PM

21. Press the play button and login back into the VM
22. Finally go to https://github.com/umrover/mrover-ros/wiki/2.-Install-ROS to Set Up Your SSH Key, Install ROS Natively, Update Dependencies, and Setup MRover codebase
Clone this wiki locally