ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Is anyone using ROS2 GUI tools like rviz on macOS?

@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: https://answers.ros.org/question/355447/issues-installing-ros2-foxy-fitzroy-on-macos-1015-rcutils/

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.

I think keeping projects separated is good practice. Although in this case you might have saved the 40 hours if you tried to install it as close to the instructions as possible, eliminating factors such as the venv.

I had the exact same issue with sip but I can’t quite remember exactly how I solved it, something to do with qt4 and qt5 linkage and brew. I will get back to it tomorrow and see if I can write a more detailed set of commands and instructions.

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.

Agreed.

Hi,
So I looked into the whole brew and sip deal and was not able to find what I was looking for unfortunately.

thanks for following up @servetcoskun

Over here, I’m getting into something of a rhythm using FUSE to mount the ubuntu drives on mac for file editing, and SSH for terminal work.

I use the same flow and it’s great to work with. sshfs and ssh and you are ready to go! :slight_smile:

It should be noted that links to the osrf/ros2 Docker hub repo (hosting ROS developer images, for nightly or from scratch builds), and not the Official Library repo for ROS on DockerHub (hosting ROS user images, for building with released binaries).

Regardless of what base image you use, if you’d like to keep projects isolated on a dev machine, but are using GUI software and Linux, rocker CLI could also help you there:

Hello all! I was able to build ROS2 packages using colcon build --symlink-install command on MacOS Catalina 10.15 all except for the rviz_default_plugins which I had to add a COLCON_IGNORE due to it not being able to find the cmake file for interactive markers.

This was the specific error message:

CMake Error at CMakeLists.txt:62 (find_package):
  By not providing "Findinteractive_markers.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "interactive_markers", but CMake did not find one.

  Could not find a package configuration file provided by
  "interactive_markers" with any of the following names:

    interactive_markersConfig.cmake
    interactive_markers-config.cmake

  Add the installation prefix of "interactive_markers" to CMAKE_PREFIX_PATH
  or set "interactive_markers_DIR" to a directory containing one of the above
  files.  If "interactive_markers" provides a separate development package or
  SDK, be sure it has been installed.


---
Failed   <<< rviz_default_plugins [33.3s, exited with code 1]

I tried searching for the cmake file on my computer to see if I can add the prefix, but that did not work. I believe I do not have it on my system. Being on mac, I can’t install via sudo, so I am unsure what to do next.

Any assistance on this?

1 Like

Hey @raghavauppuluri13,

For some reason your source installation didn’t find the ros_visualization package interactive_makers. To fix this, cd to the src folder in your installation workspace and then cd into the ros-visualization folder. Next, you will need to clone the interactive_markers ROS 2 package from GitHub using the following command

~$ git clone -b foxy https://github.com/ros-visualization/interactive_markers.git

This should download the missing package. cd back to your workspace folder and run colcon build --symlink-install.

If you still have issues, you are free to message me on this platform.