macOS support in ROS 2 Galactic and beyond

Since many of the comments here mention rviz and rqt being the main blockers for macOS, I want to mention Foxglove Studio. It is a new tool we are building to interface and visualize ROS robots, and we have binary builds available for Linux, windows, and macOS (universal binary / works with M1).

This would allow you to continue developing ROS inside a docker container, but keep your visualization tools separate from your code.

We are pretty close to feature parity with rviz and rqt, but if there are any missing features you need please let us know and we are happy to take a look.

3 Likes

2 Likes

I echo the need to focus on the GUI tools, that would benefit from the graphics acceleration when running natively on macOS (my pain-point). The other ros processes can always be run in containers during development.

If we set these goals:

  1. Fix ros2 source build/install on macOS, upping support to Big Sur, M1 CPU
  2. Fix Gazebo build for Big Sur/M1 (actually I don’t know if it builds or not, haven’t tried)
  3. Binary distribution of GUI tools such as rqt, rviz, gazebo with Homebrew

then what is the appropriate tool to track this effort? A meta issue? in which repo? A github’s project? I would appreciate some direction how to organize this.

I currently have a build locally on Big Sur + M1/arm64, with rviz building and running. Lot’s of hacks/workarounds. I would like to start consolidating these workarounds so we can track the fixes in ros2 and upstream projects.

2 Likes

If the changes you have to make are across multiple repositories in ROS 2, then a meta-issue on GitHub - ros2/ros2: The Robot Operating System, is a meta operating system for robots. is appropriate. If they are all confined to rviz2, for example, then a meta-issue on GitHub - ros2/rviz: ROS 3D Robot Visualizer is best.

2 Likes

Meta issue created here. Working on filling it in and testing.

If you don’t want to wait for all the issues to be fixed, here is a post with instructions to get a working install with cli tools and rviz2: http://mamykin.com/posts/building-ros2-on-macos-big-sur-m1/

2 Likes

Despite its benefits, the install is impossible on a Mac. Is there anyone who has a simple way to install ROS? Its not useable as it is.

Hey all, we’ve recently picked up our work of making ros-galactic easy to install on Apple M1 chips :slight_smile: We’re building out packages as part of the RoboStack effort, and you can find all available packages in this table: ROS2 Galactic - RoboStack

For osx-64 it looks pretty good! For osx-arm64 (the M1 chip) we are currently running into some issues because we are cross-compiling in Azure (the host system is a osx-64 machine that compiles to osx-arm64).

Maybe some of you know why the ddsconf executable is not part of the ros-galactic-cyclonedds package? Would there be a downside in shipping it as part of that package? It could simplify the cross-compilation story here because then we don’t need to have a pre-compilation step for cyclonedds (cyclonedds needs this executable at build time).

Anyways, we’d love to chat with you all if you want to use galactic on the M1 chip. Feel free to come over to gitter.im/RoboStack/Lobby or drop an issue in github.com/robostack/ros-galactic.

6 Likes

@wolfv awesome news! Eclipse Foundation’s Cyclone DDS lead committer @eboasson develops on macOS M1. You can see it in the results for ros2 galactic patch release 1 macOS M1:




test scripts, raw data, tabulated data, plotting scripts per test detailed PDFs, summary plots are here:

2 Likes

That’s great. I currently also use a M1 and it’s really a nice machine – especially the fact that it doesn’t get hot at all and is completely silent is nice!

We are hitting some speedbumps with the cross-compilation currently – specifically in foonathan_memory. If someone knows how to get over them, please do let us know! https://dev.azure.com/robostack/ros_pipelines/_build/results?buildId=2927&view=logs&j=3485b40f-17ce-5df2-1347-ba05db7a87a8&t=daff2e70-0c43-5f80-89fb-60fff2a0db60

It’s related to this old bug (also filed by a FastRTPS / FastDDS user): set_node_size not available when cross compiling · Issue #57 · foonathan/memory · GitHub

2 Likes

“Cross-development is pointless and stupid when the alternative
is to just develop and deploy on the same platform.” — Linus Torvalds

cross-compilation is the work of the devil. Build on M1, Graviton2, ADLINK AVA Ampere Altra developer workstations, anything else.

1 Like

We are, in fact, compiling on native hardware (AWS Graviton) for linux-aarch64 (where we just completed ros-galactic-desktop-full, by the way!).

For the Apple M1 it’s more challenging as there is no Azure Agent ([Question] Azure Pipeline Agent support for Apple M1 · Issue #3184 · microsoft/azure-pipelines-agent · GitHub) and we don’t have any sponsoring for RoboStack (if we find someone
to pay for a M1 at Hetzner, which would run at around 50 Euro a month, that would be awesome).

I could also compile everything locally, but in general it’s nice to build these things on a “public” infrastructure. And cross-compilation has worked incredibly well for the entire conda-forge stack on Apple M1, which includes things like BLAS, numpy, scipy, cartographer, ompl, … and many other “hard-to-build” libraries.
In fact, I believe that making cross-compilation easy is an awesome thing.

3 Likes

This thread was really helpful so far as I am one of the Apple Silicon users working in Robotics.
Just might be out of context here but Apple Silicons are great machines for robotics devs and at the same time they are just being neglected widely in package releases.

@Katherine_Scott I was wondering if there are any maintainers for ROS2 macOS at the moment? Or how is it possible to be a maintainer?

The easiest thing to do to start being a maintainer is to look at the existing issues, and starting solving them and opening pull requests to the various repositories. If I were going to do this, I’d do the following:

  1. Take the current Rolling code, and make it compile/work on a current version of macOS.
  2. Open pull requests to the various repositories that you needed to make this work. At that point, you’ll have ROS 2 fully compiling on macOS with no additional patches.
  3. Update the documentation at macOS (source) — ROS 2 Documentation: Rolling documentation to make sure it matches what people need to do.
  4. Start working on the list of problems that I identified in the initial post in this thread.
4 Likes

I found robostack being a very viable way of having working release on macos. Most of the upstream repositories are very open to support multiple platforms, but sometimes the technical modification is quite heavy. This is especially true when GUI is involved. Robostack is well maintained and @Tobias_Fischer is doing an incredible job in keeping it running and integrating patches when the upstream modification are too difficult to integrate.

I’ve managed to build ROS 2 rolling on a M2 MacBook a little while ago. This required a few changes to CMakeList.txt files and some other workarounds. Recently some things have happened upstream (or dependencies).

I’ll try to make it work again and then I would like to submit this and hopefully help get M1 Macs as supported target for ROS 2 in the future.

Peter

Just succeeded building ROS2 with rviz2 on Mac M1 with only a few changes:

  1. In the CMakeLists.txt files of various packages (interactive_markers, tf2_eigen_kdl, mimick_vendor, rviz2, rviz_common, rviz_default_plugins, rviz_ogre_vendor, rviz_rendering, rviz_visual_testing_framework), additions were made to include necessary dependencies and directories for orocos_kdl and Qt5.

  2. For the mimick_vendor package, the VCS version was changed to ‘258ccb0a2c38a02d4e1f82357a3f7e40e9306a00’.

  3. For the rviz_ogre_vendor package, the OGRE library was configured to not build certain RenderSystem modules and precompiled headers were disabled. Also, the architectures were set to support both arm64 and x86_64.

I’m going to make a set of patches and a script that will build on Mac M1 (with the current Qt5 from homebrew)…

BR Peter

Here is my script which installs ros2 rolling on Mac M1:

1 Like