Is anyone using ROS2 GUI tools like rviz on macOS?

Following the same pattern as this thread - please say ‘hi’ if you’re using ROS2 tools on a mac to visualize and simulate your data!

I’d love to help move the state of mac support forward if possible, specifically for the data visualization GUI tools.

In spite of macOS being considered a Tier 1 platform, I’ve spent four frustrating days unsuccessfully trying to get things running. This included rebuilding my environment about a dozen times trying different environment configurations, and posting a couple questions [1, 2].

I was pointed to this post which looks promising but concludes “RQT tools not loading without starting rqt first and selecting plugin really slows down workflow”, and I couldn’t even get that far!

Have others had similar experiences? I’m happy to help contribute fixes or updates to documentation if this is something that others are working on also.

5 Likes

Hi,

I’m trying to get ROS2 working on MacOS Catalina. How successful were you in following the blog post that you linked?

1 Like

Hi, I am using ROS2 tools on a mac to visualize and simulate our data!

I use a mac as my primary and only tool for developing robotics using ROS 2. I use rviz daily although it is not a completely smooth experience it works surprisingly well. I remember having issues with brew linking qt4 instead of qt5, or vice versa, but after solving that rviz and other ROS 2 tools have been working OK. I’d be happy to help anywhere I can.

3 Likes

Hi,

I’m new to ROS and ROS2. It took me also a few days and I left attempts to compile, switching to the binary release of Eloquent:
https://index.ros.org/doc/ros2/Installation/Eloquent/macOS-Install-Binary/

after fixing a lot of broken symbol links like:
Library not loaded: /usr/local/opt/poco/lib/libPocoFoundation.63.dylib
solving using:
ln -s /usr/local/opt/poco/lib/libPocoFoundation.71.dylib /usr/local/opt/poco/lib/libPocoFoundation.63.dylib

I was able to begin to go over tutorials up to colcon requiring ability to compile things.

Hope it helps.

1 Like

Excited to see these responses - sounds like there’s some hope! I had just last night started setting up an Ubuntu desktop solely for ROS2 dev, and that’s still my plan B.


@APadmanabhan I was not able to get things running based on the blog post. I ran into two problems before calling it quits:

  1. rcutils didn’t build, and I believe the problem had something to do with the way that this cmake module detects python environments interacting poorly with my pyenv + pipenv environment.
  2. The post recommends passing in --cmake-args CMAKE_OSX_SYSROOT=... to colcon but that resulted in some errors and mangled paths due to what appeared to be improper argument parsing.

I’ll make another try of debugging these issues soon.


@servetcoskun that’s awesome to hear! Mind if I pelt you with some questions about your setup?

  • What versions of macOS, ROS, and Python do you use?
  • Did you leave System Integrity Protection enabled?
  • What OS runs on your robot, how does your debug/test workflow look?
  • What aspects of the experience are not smooth?

@balzes thanks I’ll take a look at the Eloquent binary this weekend. If I’m understanding correctly, you were unable to proceed with tutorials that required colcon builds, correct? That sounds like a blocker.

3 Likes

@33thou actually, I think that I didn’t try it as I switched to C++ tutorials on reaching this step:) I hope to get back to ROS2 in few weeks. Sorry, I don’t know how to check colcon now without spending too much time.

Overall it worked, with some stability issues and some problems with labels and icons on buttons in GUIs.

I also tried to run Ubuntu via VirtualBox on MacOS Catalina. It worked but was extremely laggy when running 3D probably due to lack HW acceleration and I wasn’t able to configure VirtualBox to make things smoother.

1 Like

I think you know @mikeferguson figured it out http://www.robotandchisel.com/2020/08/10/rviz2-on-mac/

So have hope, my friends run ros2 foxy, rviz, et al. on catalina. There is no need for virtualbox. there’s a large number of committed macOS users. For example rmw_cyclonedds & cyclonedds is mostly developed in Xcode IDE on Catalina and that seems to be working ok for people https://iot.eclipse.org/adopters/#iot.cyclonedds

Your testing, feedback and PRs would help us all get ros2 and the nightly CI updated for Catalina

1 Like

@joespeed It appears that a significant outstanding issue relates to System Integrity Protection, which as noted in the blog post still causes issues. See also this open issue: REP 2000: Mac target platform does not mention SIP

I’m continuing to investigate my (I think unrelated) Python environment + cmake issues today and will see how far that gets me.

Another possible path forward I’ve been considering is running most of ROS2 inside the official headless docker container (which was quite easy), and trying to compile/run just the GUI tools on the mac host.

3 Likes

This was the biggest Mac build issue I encountered: https://github.com/ros-visualization/qt_gui_core/issues/212

Also, upgrading the version of dependent libraries with brew upgrade can break ROS2:


My takeaway was that when I tried using it, ROS 2 on macOS was “Tier 1 in name only”.

1 Like

Did you figure out the fix for the colcon step error? I’m running into the same, and I have no success debugging it. Any help will be much appreciated! Thank you.

Sure thing @33thou

  • mac OS Mojave Version 10.14.6
  • ROS Foxy Fitzroy
  • Python 3.8.5 I believe :slight_smile:
  • I have not touched System Integrity Protection, so I believe I left it enabled, I can check later if you want
  • Rviz is running in a very fragile state, often if I save a configuration then close and try to open rviz later with the new configuration it will fail immediately with a segmentation error because it does not see some topics being published etc (that is an assumption). I usually leave it open with my usual topics for the whole day, and I do not save any config. That way I avoid the crashing error.
  • Some ROS 2 python libraries have not been ported to mac so I have branches specifically for mac systems where does dependencies are commented out in the package.xml dependencies list, an example is the python-serial library which is used for reading encoders and more.
1 Like

Which error? There are so many to choose from :wink: I did manage to solve my rcutils build error and wrote my findings here: issues installing ros2 foxy fitzroy on macos 10.15 - rcutils - ROS Answers: Open Source Q&A Forum

TL;DR: ros2 uses python3-config in a cmake file to get info about the python environment, and this command returns incorrect information for certain combinations of brew and pyenv/pipenv python installations.

1 Like

Thanks @servetcoskun that’s very helpful context.

Looks like you’re running an old version of macOS though, which is a blocker for most people.

Sorry to say:
for me, an OSX Version is not available…
too many pitfalls and pain.

Disabling OSX security as requirement - NO WAY.

Next issue: without OSX default installer or dmg, ROS(v1 or v2) is not available for me.
Source compilation and brew is a solution for hardcore developers.

ROS core for OSX ??? For what ? LOL

OSX ROS-GUI would be nice, but it seems to be a dream

Cheers
Chrimo, OSX User since the first hour.

1 Like

Glad to assist @33thou.

I have now upgraded to macOS Catalina Version 10.15.6. Rviz experience seems to have improved even though I will need further testing to make sure. It definitely shutdowns in a more clean manner than before where I would always get an alloc error when closing in Mojave.

Let me know how I can help otherwise :slight_smile:

1 Like

@servetcoskun I’m curious what your brew/Python environments look like, and how you’ve installed Qt and PyQt?

I’ve gotten to the point where many things build, but the qt_gui_cpp package fails with the error

ModuleNotFoundError: No module named 'sipconfig'

Researching, I’m a bit confused because it looks like sipconfig was for pyqt4, not pyqt5…

I make heavy use pyenv and pipenv to manage lots of parallel Python projects, and I’m thinking this might be confusing PyQt. I’ve even tried compiling PyQt from scratch which took hours and didn’t help.

(╯°□°)╯︵ ┻━┻

In my environment, I’ve installed Qt explicitly with brew. I didn’t explicitly install pyqt or sip with brew, but they seem to be installed based on other dependencies.

I did install pyqt and sip with pip in my virtual environment. I can import QtCore but not sipconfig in a Python shell.

Mine works on Catalina with SIP on. Qt and PyQt is always an issue, however you can build from source without Qt if you just want a base ROS2 Setup for communication and dev work. I built most of my multi-agent RL frameworks using just a base install without Qt. I was able to get RQt working after an update by Qt for macOS.

The following is a method of installing without needing Qt from a twitter thread I made.


When you download the ROS2 Foxy files using vcs, cd into the src folder and you should see this when you list everything (ls):

Next, add COLCON_IGNORE files to these two directories to enable our minimal install of ROS2. The first is ros-visualization/ and the second is: ros2/rviz

To add the COLCON_IGNORE file, change directory to the first of these directories and run the command touch COLCON_IGNORE as shown below.

When you list what’s in the directory (ls) that file should pop up.

Now change directory back to your src folder with cd .. and go to the ros2/rviz folder using cd to add the COLCON_IGNORE folder as shown below.

I have used the ls command to show the before and after of adding the file.

Eb7vSm7UwAIOa_9

That’s it! You have enabled a minimal install of ROS2 by forcing colcon to ignore (thus the name “COLCON_IGNORE”) when compiling your ROS2 install. Change directory back to your workspace (ros2_foxy) with the cd ../../.. command and continue with the rest of the ROS2 installation guide.

2 Likes

Thanks for the response @zmk5. While my main goal is actually to run Qt apps, out of curiosity I tried ignoring rviz and ros-visualization as you described, and I still have a number of failing packages:

  1 package failed: sip
  4 packages aborted: ament_cmake_core ament_flake8 ament_pyflakes test_osrf_testing_tools_cpp

Trying to avoid the sunk cost fallacy, I bit the bullet and set up a desktop computer running Ubuntu 20.04 alongside my mac.

In this new environment, I was able to get ROS2 up and running in a couple hours. (Compare this with literally more than 40 hours trying and failing to get things running on macOS.)

  • Pro: I can finally start working.
  • Cons: I cannot use my carefully-configured terminal environment, editors, OS keyboard shortcuts that I’ve built up over the last 10 years. I also now have two computers, monitors, keyboards, and mice on my tiny desk which is super annoying.

I appreciate that others have had more luck than me. I have ~15 years of software dev experience but have never used ROS before, and that might be working against me. I also appreciate that Ubuntu may have been easier because it’s a “throwaway” environment and I was willing to install dependencies globally, whereas I use my mac for many projects and cannot afford to pollute the global environment.

For maintainers of ROS2: I would highly recommend you put some big warnings on the pages that claim support for macOS. I feel somewhat gaslit and misled into believing that it’s a tier-1 platform, and that my difficulties have been my fault. Please recommend that people use Ubuntu until the Mac developer experience has been improved.

For mac users hoping to run ROS2 natively: Expect to spend a lot of extra time setting up, and potentially not succeeding. A second physical machine or VM might be preferable depending on your needs. The official Docker images are super easy to set up if you don’t need the GUI.

I sincerely wish I was able to contribute more to this effort. The most I was able to do was to answer my own question here. However this has become a huge time sink for me and I can no longer justify the effort.

Good luck all!

Hi @33thou, my installation is working with (without SIP enabled and Catalina) rviz and rqt to the point that I can make my own plugins to work. I noticed in the ROS Answers forum you posted that you are trying to source install but installed all of your python dependencies in a virtual environment. Have you tried installing the packages on the system and not the python venv? I believe downloading sip from homebrew will not automatically allow that installation to be used with the packages in the python virtual environment.

No, this isn’t an option because I work on many Python projects, and I need to maintain isolated environments. Above I mentioned:

I also appreciate that Ubuntu may have been easier because it’s a “throwaway” environment and I was willing to install dependencies globally, whereas I use my mac for many projects and cannot afford to pollute the global environment.

It may be that my challenges are less to do with Mac, and more to do with trying to keep projects isolated on a dev machine.