Overview
These instructions are for installing only Gazebo Tools. If you're interested in using all the Gazebo libraries, check out this Gazebo installation.
We recommend following the Binary Installation instructions to get up and running as quickly and painlessly as possible.
The Source Installation instructions should be used if you need the very latest software improvements, you need to modify the code, or you plan to make a contribution.
Binary Installation
Ubuntu Linux
Setup your computer to accept software from packages.osrfoundation.org:
Setup keys:
Install Gazebo Tools:
Be sure to replace <#>
with a number value, such as 1 or 2, depending on which version you need.
macOS
On macOS, add OSRF packages:
Install Gazebo Tools:
Be sure to replace <#>
with a number value, such as 1 or 2, depending on which version you need.
Windows
Install Conda package management system. Miniconda suffices.
Create if necessary, and activate a Conda environment:
Install:
Be sure to replace <#>
with a number value, such as 1 or 2, depending on which version you need.
Source Installation
Source installation can be performed by first installing the necessary prerequisites followed by building from source.
Prerequisites
Gazebo Tools requires:
- Gazebo CMake
- Ruby. Refer to the Ruby Documentation for installation instructions. On Ubuntu systems
apt-get
can be used to install Ubuntu Packageruby-dev
:
Ubuntu Linux
Windows 10
First, follow the gz-cmake tutorial for installing Conda, Visual Studio, CMake, and other prerequisites, and also for creating a Conda environment.
Building from Source
Ubuntu
- Install tools sudo apt install -y build-essential cmake git gnupg lsb-release wget
- Install dependencies sudo apt -y install \$(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | tr '\n' ' '))
- Clone the repository Be sure to replacegit clone https://github.com/gazebosim/gz-tools -b gz-tools<#>
<#>
with a number value, such as 1 or 2, depending on which version you need. - Configure and build cd gz-toolsmkdir buildcd buildcmake ..make
- Optionally, install sudo make install
macOS
- Clone the repository Be sure to replacegit clone https://github.com/gazebosim/gz-tools -b gz-tools<#>
<#>
with a number value, such as 1 or 2, depending on which version you need. - Install dependencies Be sure to replacebrew install --only-dependencies gz-tools<#>
<#>
with a number value, such as 1 or 2, depending on which version you need. - Configure and build cd gz-toolsmkdir buildcd buildcmake ..make
- Optionally, install sudo make install
Windows
- Navigate to
condabin
if necessary to use theconda
command (i.e., if Conda is not in yourPATH
environment variable. You can find the location ofcondabin
in Anaconda Prompt,where conda
). Activate the Conda environment created in the prerequisites:conda activate gz-ws Install dependencies
You can view available versions and their dependencies:
conda search libgz-tools* --channel conda-forge --infoSee the Conda release repository for more information.
Install dependencies, replacing
<#>
with the desired version:conda install backward-cpp ruby libgz-cmake<#> --channel conda-forge- Navigate to where you would like to build the library, and clone the repository. # Optionally, append `-b gz-tools#` (replace # with a number) to check out a specific versiongit clone https://github.com/gazebosim/gz-tools.git
- Configure and build cd gz-toolsmkdir buildcd buildcmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\installcmake --build . --config Release
- Optionally, install cmake --install . --config Release
Documentation
API and tutorials can be found at https://gazebosim.org/libs/tools.
You can also generate the documentation from a clone of this repository by following these steps.
- You will need Doxygen. On Ubuntu Doxygen can be installed using sudo apt-get install doxygen
- Clone the repository git clone https://github.com/gazebosim/gz-tools
- Configure and build the documentation. cd gz-tools; mkdir build; cd build; cmake ../; make doc
- View the documentation by running the following command from the build directory. firefox doxygen/html/index.html
Testing
Follow these steps to run tests and static code analysis in your clone of this repository.
- Follow the source install instruction.
- Run tests. make test
- Static code checker. make codecheck