I am trying to get Gazebo to run on Mac OS X Sierra. Gazebo works great when I install everything using homebrew, but I can't get it to work with a build from source. The compilation and install seem to complete successfully, but nothing happens when I run the gazebo executable from the terminal. Here are the steps I've taken:
brew install caskroom/cask/xquartz
brew tap osrf/simulation
brew install gazebo9 --only-dependencies
brew install mercurial
hg clone https://bitbucket.org/osrf/gazebo /tmp/gazebo
cd /tmp/gazebo
mkdir build
cd build
hg up gazebo9
cmake -DCMAKE_BUILD_TYPE=Debug ../
make -j4
make install
source /usr/local/share/gazebo/setup.sh
gazebo --verbose
Which produces the following output:
Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.10.195.121
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.10.
but then nothing happens... I also tried starting the Gazebo server
gzserver
but it just segfaults... So I ran the debugger and it halts on line 442 of the RenderEngine.cc file where it tries to load an OGRE plugin.
this->dataPtr->root->loadPlugin(*piter+extension);
image description http://answers.gazebosim.org/upfiles/15259855454401078.png
I am not sure how to proceed from here. Any help would be greatly appreciated.
Originally posted by drrt on Gazebo Answers with karma: 21 on 2018-05-10
Post score: 0
Original comments
Comment by Jose Luis Rivero on 2018-05-13:
The debuggers shows the full path to the plugin that it is trying to load (RenderSystemGL): does it exist with the .dylib extension?
Comment by drrt on 2018-05-13:
Yes, the file RenderSystem_GL.dylib does exist in the directory that the path is pointing to.
Comment by drrt on 2018-05-14:
Since the Exception shown is EXC_BAD_ACCESS and the address=0x0, then I figured a NULL pointer is getting dereferenced somewhere.
I fixed the segfault by modifying the source code a little at the end of function void RenderEngine::Load()
so that this->dataPtr->root->initialise(false); gets called before this->LoadPlugins()
Comment by drrt on 2018-05-14:
It does not segfault anymore, but now when I run either gazebo or gzerver with the --verbose flag it shows the following error:
[Err] [server_main.cc:54] Ogre Error:OGRE EXCEPTION(1:InvalidStateException): Cannot initialise - no render system has been selected. in Root::initialise at /tmp/ogre1.9-20180417-89133-1ftu64a/sinbad-ogre-108ab0bcc696/OgreMain/src/OgreRoot.cpp (line 650)
Comment by scpeters on 2018-05-14:
there might be some clues in ~/.gazebo/ogre.log
Comment by Jose Luis Rivero on 2018-05-14:
I can not reproduce the error on my Sierra system. Probably something bad with the local Ogre installation or other rendering error.
Comment by drrt on 2018-05-15:
https://git.io/vp5Mg Here are the contents of ~/.gazebo/ogre.log