Add VMWare Fusion instructions for Mac M1
Tutorial addition
Adds VMware Fusion instructions for Mac, to create a full virtual machine with all of the tutorial dependencies installed.
I'm leary of adding an additional installation pathway to maintain, but I fiddled with Docker for a few hours trying to get X forwarding to work and was not able to on M1. This VM technique could allow more people to access the tutorial. I won't be offended if others disagree and we decide not to merge this PR.
These instructions are written assuming that we will be able to distribute the ~5 GB compressed VMBundle file via USB sticks at the event. I pushed the compressed VMBundle to https://drive.google.com/file/d/112Rr7ntzAiPKK5D8Gsrv-7xCgMG-c8KA/view?usp=sharing.
I haven't tested this out on a fresh Mac and would like your support doing so before merging. Also, I'm not sure whether we are allowed to distribute the VMWare Fusion binaries themselves, so the instructions currently advise folks to download that. It would be easy to distribute the .dmg file.
Also, I'm not sure whether we are allowed to distribute the VMWare Fusion binaries themselves, so the instructions currently advise folks to download that. It would be easy to distribute the .dmg file.
Yeah, I don't think we should distribute it. I'm not sure of the legality of that, so it is safer to not do it.
Overall, thanks for this contribution. I don't have a mac so I can't really test out the instructions. I'll discuss with @mabelzhang what we want to do here.
We could merge this if we want, as some instruction is better than no instruction. I don't have a M1 to test it though.
@srmainwaring mentioned he has a different setup. I don't know if he has additional / alternative suggestions here.
FYI we have plans to reuse the materials from this tutorial for... anywhere from 1-3 other places. It could be 0 if they don't happen. But there's some incentive to keep this repo updated in the near term.
I tested out my technique again and realized that Gazebo GUI didn't work. Rhys mentioned a workaround that might fix it: if you start out the VMWare image using Ubuntu Server 23.04 instead of 22.04, it has better support for graphical environments in containers and gives you GPU-accelerated rendering. You might have to build from source though IIRC. I haven't had a chance to run through the new procedure. Does this sound right @srmainwaring ?
A summary of experiments with VMs and docker on macOS:
- Gazebo will not run with hardware acceleration on a VM, in principal it should because the latest version of VMware fusion (13) has OpenGL 4.3 support but there are still issues.
- In the VM Gazebo can be run using LIBGL_ALWAYS_SOFTWARE=1
- Ubuntu 23.04 has updated mesa drivers which allow the updated OpenGL support in VMware 13 to be utilised. This allows hardware acceleration for the ROS Humble gui apps (rviz2) to be used.
- An Ubuntu 23.04 VM can run the ICRA docker image and examples including the MoveIt2 demo. Works on Intel and M1 macs. On the latter you need to build the docker image with an arm64 base.
- A good set up might be to run Gazebo natively with Metal rendering, either from the brew binaries, or a source build. Both options work on macOS versions Big Sur to Ventura (some fixes are required with the most recent updates to brew qt@5). And run ROS on a VM using docker. The two can communicate by setting up a relay, with the ros_gz bridge running in docker.
- Finally, ROS Humble can run natively on macOS with a number of patches and a source build. Not for everyone and has a maintenance overhead with brews rolling updates.