Next Tutorial: Command Line
Install
These instructions are for installing only Gazebo GUI. If you're interested in using all the Gazebo libraries, not only Gazebo GUI, check out this Gazebo installation.
We recommend following the binary install instructions to get up and running as quickly and painlessly as possible.
The source install instructions should be used if you need the very latest software improvements, if you need to modify the code, or if you plan to make a contribution.
Binary Install
Ubuntu
On Ubuntu, it's possible to install Gazebo GUI as follows:
Add OSRF packages:
Install Gazebo GUI:
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 GUI:
Be sure to replace <#>
with a number value, such as 1 or 2, depending on which version you need.
Windows
Binary install is pending gz-rendering
and gz-gui
being added to conda-forge.
Source Install
Ubuntu Focal 20.04 or above
Install Prerequisites
Add OSRF packages:
Clone source code:
Install dependencies
Build from source
Build and install as follows:
macOS
Clone the repository
git clone https://github.com/gazebosim/gz-gui -b ign-gui<#>Be sure to replace
<#>
with a number value, such as 5 or 6, depending on which version you need.Install dependencies
brew install --only-dependencies ignition-gui<#>Be sure to replace
<#>
with a number value, such as 5 or 6, depending on which version you need.- Configure and build cd gz-guimkdir buildcd buildcmake ..make
- Optionally, install sudo make install
Windows
Install 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
).
Create if necessary, and activate a Conda environment:
Install dependencies:
Install Gazebo dependencies, replacing <#>
with the desired versions:
Before gz-rendering becomes available on conda-forge, follow its tutorial to build it from source.
Build from source
- Activate the Conda environment created in the prerequisites: conda activate gz-ws
- Navigate to where you would like to build the library, and clone the repository. # Optionally, append `-b ign-gui#` (replace # with a number) to check out a specific versiongit clone https://github.com/gazebosim/gz-gui.git
- Configure and build cd gz-guimkdir buildcd build
As `gz-rendering` is not yet available on conda-forge, we need to build it from source and specify the path containing `gz-rendering<#>-config.cmake` and `gz-rendering<#>-ogre-config.cmake` in `CMAKE_PREFIX_PATH`. That path could be `gz-rendering-install-path\lib\cmake`, for example.
- Optionally, install. You will likely need to run a terminal with admin privileges for this call to succeed. cmake --install . --config Release
Documentation
API documentation and tutorials can be accessed at https://gazebosim.org/libs/gui
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-gui
- Configure and build the documentation. cd gz-guimkdir buildcd buildcmake ..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
See the Writing Tests section of the contributor guide for help creating or modifying tests.