Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VMWare Fusion instructions for Mac M1 #30

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

playertr
Copy link

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.

@clalancette
Copy link
Collaborator

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.

Copy link
Collaborator

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor fixes from "ROS2" -> "ROS 2" (our preferred form).

vm/README.md Outdated Show resolved Hide resolved
vm/README.md Outdated Show resolved Hide resolved
vm/README.md Outdated Show resolved Hide resolved
vm/README.md Outdated Show resolved Hide resolved
playertr and others added 4 commits May 26, 2023 10:09
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
Co-authored-by: Chris Lalancette <[email protected]>
@mabelzhang
Copy link
Collaborator

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.

@playertr
Copy link
Author

playertr commented Jun 5, 2023

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 ?

@playertr playertr marked this pull request as draft June 5, 2023 20:10
@srmainwaring
Copy link

A summary of experiments with VMs and docker on macOS:

  1. 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.
  2. In the VM Gazebo can be run using LIBGL_ALWAYS_SOFTWARE=1
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants