Next Tutorial: C++ Get Started
These instructions are for installing only Gazebo Messages. 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
On Ubuntu systems, apt-get
can be used to install gz-msgs
:
Be sure to replace <#>
with a number value, such as 2 or 3, depending on which version you need.
macOS
On macOS, add OSRF packages:
Install Gazebo Msgs:
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 gz-msgs
:
Be sure to replace <#>
with a number value, such as 2 or 3, depending on which version you need.
Source Installation
Ubuntu
Prerequisites
Install required dependencies as follows:
Building from Source
Standard installation can be performed in UNIX systems using the following steps:
Uninstallation
To uninstall the software installed with the previous steps:
macOS
- Clone the repository Be sure to replacegit clone https://github.com/gazebosim/gz-msgs -b ign-msgs<#>
<#>
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-msgs<#>
<#>
with a number value, such as 1 or 2, depending on which version you need. - Configure and build cd gz-msgsmkdir buildcd buildcmake ..make
Optionally, install
sudo make installTo uninstall the software installed with the previous steps:
cd build/sudo make uninstall
Windows
Prerequisites
First, follow the gz-cmake tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment.
Navigate to condabin
if necessary to use the conda
command (i.e., if Conda is not in your PATH
environment variable. You can find the location of condabin
in Anaconda Prompt, where conda
).
Activate the Conda environment:
Install prerequisites:
Install Gazebo dependencies:
You can view lists of dependencies:
Install dependencies, replacing <#>
with the desired versions:
Building from Source
This assumes you have created and activated a Conda environment while installing the Prerequisites.
- Navigate to where you would like to build the library, and clone the repository. # Optionally, append `-b ign-msgs#` (replace # with a number) to check out a specific versiongit clone https://github.com/gazebosim/gz-msgs.git
- Configure and build cd gz-msgsmkdir buildcd buildcmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\installcmake --build . --config Release
- Optionally, install cmake --install . --config Release
Documentation
API documentation and tutorials can be accessed at https://gazebosim.org/libs/cmake
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-cmake
- Configure and build the documentation. cd gz-cmakemkdir buildcd buildcmake ..make doc
- View the documentation by running the following command from the
build
directory.firefox doxygen/html/index.html
Documentation Release
- Upload documentation to gazebosim.org. cd buildsh upload.sh
- If you're creating a new release, then tell gazebosim.org about the new version. For example: curl -k -X POST -d '{"libName":"msgs", "version":"1.0.0", "releaseDate":"2017-10-09T12:10:13+02:00","password":"secret"}' https://api .gazebosim.org/1.0/versions
Testing
Run tests as follows:
Tests are automatically built. To disable them, run cmake
as follows:
Test coverage
To run test coverage:
- Install LCOV sudo apt-get install lcov
- Build with coverage cd build/cmake .. -DCMAKE_BUILD_TYPE=coveragemake
- Run tests make test
- Generate coverage make coverage
- View results firefox coverage/index.html
See the Writing Tests section of the Gazebo documentation for help creating or modifying tests.