diff --git a/harmonic/install_osx.md b/harmonic/install_macos.md similarity index 65% rename from harmonic/install_osx.md rename to harmonic/install_macos.md index 3eebe7150..4cfdcc09e 100644 --- a/harmonic/install_osx.md +++ b/harmonic/install_macos.md @@ -1,15 +1,7 @@ -# Binary Installation on MacOS +# Binary Installation on macOS All the Harmonic binaries are available in Big Sur and Monterey using the -[homebrew package manager](https://brew.sh/). - -The homebrew tool can be installed using: - -```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" -``` - -After installing the homebrew package manager, Gazebo Harmonic can be installed running: +[Homebrew package manager](https://brew.sh/). After installing Homebrew, Gazebo Harmonic can be installed running: ```bash brew tap osrf/simulation diff --git a/harmonic/install_osx_src.md b/harmonic/install_macos_src.md similarity index 60% rename from harmonic/install_osx_src.md rename to harmonic/install_macos_src.md index d1bfe7256..dd64da4c2 100644 --- a/harmonic/install_osx_src.md +++ b/harmonic/install_macos_src.md @@ -12,33 +12,34 @@ The easiest way to get the sources of all libraries is to use To compile all the different libraries and gz-sim in the right order [colcon](https://colcon.readthedocs.io/en/released/) is recommended. -The colcon tool is available on all platforms using pip (or pip3, if pip fails). -## Python3 from homebrew - -Tools and dependencies for Harmonic can be installed using the [homebrew package manager](https://brew.sh/). -The homebrew tool can be installed by entering the following in a terminal: +Tools and dependencies for Harmonic can be installed using the [Homebrew package manager](https://brew.sh/). After installing Homebrew, add the `osrf/simulation` to Homebrew tap to be able to install prebuilt dependencies. ```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +brew tap osrf/simulation +brew update ``` -Harmonic is compatible with Python3; it can be installed by running the following in a terminal: +### Install compiler requirements + +Building Gazebo Libraries require at least Xcode 10 on MacOS Mojave. The Xcode Command Line Tools are sufficient, and can be installed with: ```bash -brew install python3 +xcode-select --install ``` -## vcstool and colcon from pip +## Python 3 from Homebrew -PIP is available on all platforms: +Harmonic is compatible with Python 3. Install the latest version from Homebrew: ```bash -python3 -m pip install vcstool +brew install python3 ``` +## vcstool and colcon from PyPI + ```bash -python3 -m pip install -U colcon-common-extensions +python3 -m pip install -U colcon-common-extensions vcstool ``` ## Getting the sources @@ -55,7 +56,7 @@ All the sources of gazebo-harmonic are declared in a yaml file. Download it to the workspace: ```bash -curl -O https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-harmonic.yaml +curl -OL https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-harmonic.yaml ``` Use `vcstool` to automatically retrieve all the Gazebo libraries sources from @@ -69,19 +70,10 @@ The src subdirectory should contain all the sources ready to be built. ## Install dependencies -Add `osrf/simulation` to Homebrew formulae - -```bash -brew update -brew tap osrf/simulation -``` - -Install all dependencies: - Dependency for Ogre: ```bash -brew install xquartz --cask +brew install --cask xquartz ``` General dependencies: @@ -90,42 +82,18 @@ General dependencies: brew install assimp boost bullet cmake cppzmq dartsim@6.10.0 doxygen eigen fcl ffmpeg flann freeimage freetype gdal gflags google-benchmark gts ipopt jsoncpp libccd libyaml libzzip libzip nlopt ode open-scene-graph ossp-uuid ogre1.9 ogre2.3 pkg-config protobuf qt@5 qwt-qt5 rapidjson ruby tbb tinyxml tinyxml2 urdfdom zeromq ``` -`dartsim@6.10.0` and `qt@5` are not sym-linked. To use those dependencies when building -`gz-physics7` and `gz-gui8`, run the following after installation: - -For Macs with Intel processors, add them to `/usr/local`: +`dartsim@6.10.0` and `qt@5` are "keg only" Homebrew formulae and their paths must be explicitly configured before building Gazebo: ```bash # dartsim@6.10.0 -export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/usr/local/opt/dartsim@6.10.0 -export DYLD_FALLBACK_LIBRARY_PATH=${DYLD_FALLBACK_LIBRARY_PATH}:/usr/local/opt/dartsim@6.10.0/lib:/usr/local/opt/octomap/local -export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/opt/dartsim@6.10.0/lib/pkgconfig -# qt@5 -export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/usr/local/opt/qt@5 -``` - -Note if you are on an ARM based Apple Silicon Mac machine, you will need to add them to `/opt/homebrew` instead: +export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:+$CMAKE_PREFIX_PATH:}`brew --prefix dartsim@6.10.0` +export DYLD_FALLBACK_LIBRARY_PATH=${DYLD_FALLBACK_LIBRARY_PATH:+$DYLD_FALLBACK_LIBRARY_PATH:}`brew --prefix dartsim@6.10.0`/lib:`brew --prefix octomap`/local +export PKG_CONFIG_PATH=${PKG_CONFIG_PATH:+$PKG_CONFIG_PATH:}`brew --prefix dartsim@6.10.0`/lib/pkgconfig -```bash -# dartsim@6.10.0 -export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/opt/homebrew/opt/dartsim@6.10.0 -export DYLD_FALLBACK_LIBRARY_PATH=${DYLD_FALLBACK_LIBRARY_PATH}:/opt/homoebrew/opt/dartsim@6.10.0/lib:/opt/homebrew/opt/octomap/local -export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/homebrew/opt/dartsim@6.10.0/lib/pkgconfig # qt@5 -export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:/opt/homebrew/opt/qt@5 +export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:+$CMAKE_PREFIX_PATH:}`brew --prefix qt@5` ``` -### Install compiler requirements - -The Gazebo Libraries require the Xcode 10 compiler on MacOS Mojave. - -On Mac machines, gcc is acquired by installing Xcode command line tools. -The required version of Xcode for Harmonic is Xcode 10.3, which can be downloaded from -[Apple Developer Site](https://developer.apple.com/download/more/). -You will need to sign in to your Apple account and download the Mojave version of -Xcode command line tools. Command line tools can also be obtained by downloading -Xcode from the Apple App Store (installing the full app may take over an hour). - ## Building the Gazebo Libraries Once the compiler and all the sources are in place it is time to compile them. @@ -184,16 +152,16 @@ If there are no errors, all the binaries should be ready to use. The workspace needs to be sourced every time a new terminal is used. -Run the following command to source the workspace in bash: +Run the following command to source the workspace in zsh (the default macOS shell): -```bash -. ~/workspace/install/setup.bash +```zsh +. ~/workspace/install/setup.zsh ``` -Or in zsh: +Or if you are using bash: -```zsh -. ~/workspace/install/setup.zsh +```bash +. ~/workspace/install/setup.bash ``` You should now be able to launch gazebo: