ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

rviz crash on macOS Sierra

asked 2016-12-22 10:39:32 -0500

ZOU Lu gravatar image

updated 2016-12-30 05:13:17 -0500

gvdhoorn gravatar image

Hi,

After lots of tweaks, I've finally made it to setup ROS Kinetic on my MacBook Air, with mac OS Sierra. Everything works fine except rviz. It crashes on startup. I tried with this command:

rosrun rviz rviz -l

And the output is:

[ INFO] [1482424510.671672000]: rviz version 1.12.4
[ INFO] [1482424510.671803000]: compiled against Qt version 5.7.0
[ INFO] [1482424510.671830000]: compiled against OGRE version 1.7.4 (Cthugha)
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ INFO] [1482424511.705687000]: Creating resource group General
[ INFO] [1482424511.705788000]: Creating resource group Internal
[ INFO] [1482424511.705827000]: Creating resource group Autodetect
[ INFO] [1482424511.705940000]: SceneManagerFactory for type 'DefaultSceneManager' registered.
[ INFO] [1482424511.706240000]: Registering ResourceManager for type Material
[ INFO] [1482424511.706289000]: Registering ResourceManager for type Mesh
[ INFO] [1482424511.706321000]: Registering ResourceManager for type Skeleton
[ INFO] [1482424511.706382000]: MovableObjectFactory for type 'ParticleSystem' registered.
[ INFO] [1482424511.706445000]: OverlayElementFactory for type Panel registered.
[ INFO] [1482424511.706476000]: OverlayElementFactory for type BorderPanel registered.
[ INFO] [1482424511.706510000]: OverlayElementFactory for type TextArea registered.
[ INFO] [1482424511.706549000]: Registering ResourceManager for type Font
[ INFO] [1482424511.706587000]: ArchiveFactory for archive type FileSystem registered.
[ INFO] [1482424511.706612000]: ArchiveFactory for archive type Zip registered.
[ INFO] [1482424511.706637000]: DDS codec registering
[ INFO] [1482424511.706691000]: FreeImage version: 3.17.0
[ INFO] [1482424511.706724000]: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
[ INFO] [1482424511.706908000]: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,rgb,rgba,bw,exr,j2k,j2c,jp2,pfm,pct,pict,pic,3fr,arw,bay,bmq,cap,cine,cr2,crw,cs1,dc2,dcr,drf,dsc,dng,erf,fff,ia,iiq,k25,kc2,kdc,mdc,mef,mos,mrw,nef,nrw,orf,pef,ptx,pxn,qtk,raf,raw,rdc,rw2,rwl,rwz,sr2,srf,srw,sti,x3f,webp,jxr,wdp,hdp
[ INFO] [1482424511.706943000]: Registering ResourceManager for type HighLevelGpuProgram
[ INFO] [1482424511.707169000]: Registering ResourceManager for type Compositor
[ INFO] [1482424511.707464000]: MovableObjectFactory for type 'Entity' registered.
[ INFO] [1482424511.707513000]: MovableObjectFactory for type 'Light' registered.
[ INFO] [1482424511.707546000]: MovableObjectFactory for type 'BillboardSet' registered.
[ INFO] [1482424511.707575000]: MovableObjectFactory for type 'ManualObject' registered.
[ INFO] [1482424511.707607000]: MovableObjectFactory for type 'BillboardChain' registered.
[ INFO] [1482424511.707636000]: MovableObjectFactory for type 'RibbonTrail' registered.
[ INFO] [1482424511.707859000]: *-*-* OGRE Initialising
[ INFO] [1482424511.707901000]: *-*-* Version 1.7.4 (Cthugha)
[ INFO] [1482424511.707944000]: Loading library /usr/local/Cellar/ogre/1.7.4/lib/libRenderSystem_GL
[ INFO] [1482424511.715310000]: Installing plugin: GL RenderSystem
[ INFO] [1482424511.715470000]: OpenGL Rendering Subsystem created.
[ INFO] [1482424511.715731000]: Plugin successfully installed
[ INFO] [1482424511.715784000]: Loading library /usr/local/Cellar/ogre/1.7.4/lib/libPlugin_OctreeSceneManager
[ INFO] [1482424511.722139000]: Installing plugin: Octree & Terrain Scene Manager
[ INFO] [1482424511.722224000]: Plugin successfully installed
[ INFO] [1482424511.722266000]: Loading library /usr/local/Cellar/ogre/1.7.4/lib/libPlugin_ParticleFX
[ INFO] [1482424511.728896000]: Installing plugin: ParticleFX
[ INFO] [1482424511.728966000]: Particle ...
(more)
edit retag flag offensive close merge delete

Comments

Still waiting for helps~~~

ZOU Lu gravatar image ZOU Lu  ( 2016-12-28 07:11:49 -0500 )edit

It may very well be that you are running into an issue that not many / no one else is running into to. That could explain the lack of response.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-28 08:07:48 -0500 )edit

@ZOU Lu: I've moved your answer to your OP, as it was not really an answer, but an update.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-30 05:14:00 -0500 )edit

It would be great if you posted your tweaks, I'm still struggling to get kinetic installed under Sierra.

Gorbag gravatar image Gorbag  ( 2017-04-29 09:55:10 -0500 )edit

@Gorbag I actually fixed almost every issues, including rviz. But I found it's still inconvenient to run ROS on macOS, such as manually compile all packages from src. I recommend you to try install Ubuntu as a virtual machine on your Mac. Using a light weight WM like i3wm, it should run fast.

ZOU Lu gravatar image ZOU Lu  ( 2017-04-30 06:18:49 -0500 )edit

I don't remember how to tweak them all, some tweaks were ugly, so the best way would be run a virtual machine. Developing under Ubuntu is like a breeze. I don't like Ubuntu actually, but it do improved my productivity. By the way, QtCreator is another Swiss Knife you should give a try.

ZOU Lu gravatar image ZOU Lu  ( 2017-04-30 06:24:17 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-01-14 17:21:38 -0500

dischu gravatar image

The problem is that rviz erroneously sets macAPI to carbon although it is cocoa - qt5 (5.7.1) is missing the define QT_MAC_USE_COCOA. After editing rviz/src/rviz/ogre_helpers/render_system.cpp, I got rviz to start.

I replaced

// Set the macAPI for Ogre based on the Qt implementation
#ifdef QT_MAC_USE_COCOA
  params["macAPI"] = "cocoa";
  params["macAPICocoaUseNSView"] = "true";
#else
  params["macAPI"] = "carbon";
#endif

by

// Set the macAPI for Ogre based on the Qt implementation
  params["macAPI"] = QT_QPA_DEFAULT_PLATFORM_NAME;
  params["macAPICocoaUseNSView"] = "true";

I am using ogre 1.7.4 by the way.

edit flag offensive delete link more

Comments

I believe there is logic to detect and set this flag in the CMakeLists, so you can probably update that logic instead of modifying the source code.

ahendrix gravatar image ahendrix  ( 2017-01-14 21:51:24 -0500 )edit

In case you are using the ros-install-osx install script, you can just add -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -DQT_MAC_USE_COCOA" to the catkin config call. This is brute force, but prevents any modification inside the source tree.

dischu gravatar image dischu  ( 2017-01-15 06:42:49 -0500 )edit
0

answered 2016-12-29 13:56:50 -0500

William gravatar image

Unfortunately there are still a few issues with rviz's OS X support, specifically you need to use a patched version of Ogre-1.9 and a branch of rviz itself (osx_ogre_1_9), see:

https://github.com/ros-visualization/...

For more details. I'm not sure which formula for ogre 1.9 is best to use right now, but you might look at what they do in this repository: https://github.com/mikepurvis/ros-ins...

edit flag offensive delete link more

Comments

I've trie to compile the osx_ogre_1_9 branch. However, this branch haven't seen an update for about 3 years. It's designed during the indigo era and relies on qt4. I hacked into the CMakeLists.txt files and source codes to make it compile, but sip still failed to run properly.

ZOU Lu gravatar image ZOU Lu  ( 2016-12-30 03:41:21 -0500 )edit
0

answered 2016-12-28 12:19:41 -0500

ahendrix gravatar image

updated 2016-12-28 12:20:01 -0500

I remember seeing some tickets about rviz behaving poorly on new version of OSX, so I had a look through the tickets on the rviz bug tracker on github.

According to this: https://github.com/ros-visualization/... , newer versions of rviz require Ogre 1.8 or newer. It sounds like the recommendation is to upgrade to a newer version of Ogre, or downgrade your version of rviz.

edit flag offensive delete link more

Comments

I followed your suggestion to install ogre 1.9. But rivz still crashes on the same spot. The ogre 1.9 is installed via brew from source

ZOU Lu gravatar image ZOU Lu  ( 2016-12-29 12:15:10 -0500 )edit

Does rviz startup show that it's using Ogre 1.9? if it doesn't, you probably need to recompile rviz to use the new version of ogre.

ahendrix gravatar image ahendrix  ( 2016-12-29 12:21:14 -0500 )edit

@ZOU Lu: in particular, we're looking for

[ INFO] [148..]: compiled against OGRE version 1.7.4 (Cthugha)

But then with 1.9.x.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-30 03:09:02 -0500 )edit

@ahendrix Yes, ogre 1.9 is indeed used, like this:

[ INFO] [1483090649.681563000]: compiled against OGRE version 1.9.0 (Ghadamon)
ZOU Lu gravatar image ZOU Lu  ( 2016-12-30 03:38:09 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2016-12-22 10:39:32 -0500

Seen: 1,108 times

Last updated: Dec 30 '16