Gazebo and several of its dependencies can be compiled on OS X with Homebrew using the osrf/simulation tap. Gazebo is straightforward to install on Mac OS X 10.11 (El Capitan) or higher. Installation on older versions requires changing the default standard library and rebuilding dependencies due to the use of c++11. For purposes of this tutorial, I will assume OS X 10.11 or greater is in use.
curl -ssL http://get.gazebosim.org | sh
Install homebrew, which should also prompt you to install the XCode command-line tools:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install XQuartz, which provides X11 support and is required by Gazebo and OGRE
Run the following commands to install gazebo quickly with a precompiled binary:
brew tap osrf/simulation brew install gazebo9 gazebo
The Gazebo formula has an optional dependency on the DART physics engine, which must be installed using the following procedure prior to installing Gazebo9 without using the precompiled binary:
brew tap dartsim/dart brew install dartsim # Gazebo will be built with DART (autodetected), bullet and simbody brew install gazebo9 --build-from-source
The formula currently installs version 9.0 of Gazebo. Version 8 can be
installed using the
gazebo8 formula and Gazebo 7
gazebo7. To install the latest version of Gazebo's default branch:
brew install gazebo9 --HEAD