Simulation-Gazebo Reference

Auterion offers a meta debian package for Ubuntu called simulation-gazebo. This can be run in conjunction with Virtual Skynode.

The Virtual FMU app version v1.1.1 currently expects the Gazebo Garden distribution to be used by the developer. This dependency may change in future releases.

simulation-gazebo acts as a wrapper for default Gazebo Sim. It sets several environmental variables that are required to create a network connection between Gazebo and the Virtual FMU app.

Installation

If you haven't already installed Gazebo Sim, you'll need to add its GPG key before installing simulation-gazebo, as simulation-gazebo depends on Gazebo Sim:

sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null

You're then ready to install simulation-gazebo:

sudo apt update
sudo apt install simulation-gazebo

In case the Gazebo Sim GPG key address changes and apt has trouble finding dependencies, refer to the official Gazebo Sim documentation: https://gazebosim.org/docs/garden/install_ubuntu

Usage

After installing the package, simulation-gazebo can be launched by executing the following command:

simulation-gazebo

When intending to run custom vehicle models or simulation worlds, you have to ensure that Gazebo can find them. Since worlds also need to be accessible to PX4, it is necessary to place worlds in the ~/.simulation-gazebo/worlds directory. For models, you can use the --model_store flag to point simulation-gazebo to the correct directory location.

The open-source PX4 Autopilot provides several example worlds here.

If you provide a custom --model_store path, ensure that it ends in a /models directory. For instance, the default model_store is set to ~/.simulation-gazebo/models

Available Launch Flags

All flags mentioned below are optional.

Below is a list of all currently supported flags for simulation-gazebo package:

FlagDefaultDescription

--world

default

A string variable that leads to the sdf file which runs the simulation world. This is a required argument

--gz_partition

virtual_skynode_relay

A string variable that sets the gazebo partition to run in

--gz_ip

10.41.200.1

A string variable that sets the IP of the outgoing network interface

--interactive

False

A boolean variable that requires the ability to run the code in interactive mode, allowing for custom paths for --model_download_source. If this is not set, --model_download_source will only download from the default Github repo.

--model_download_source

https://github.com/PX4/PX4-gazebo-models/archive/refs/heads/main.zip

A string variable setting the path to a directory from where models are to be imported. At the moment this can only be a local file directory or a http address. The source should end with the zipped model file. (e.g. https://path/to/simulation/models/models.zip)

--model_store

~/.simulation-gazebo

A string variable setting the path to the model storage directory. This is where the zip file provided in model_download_source will be placed.

--overwrite

False

A boolean variable providing the ability to overwrite existing directories with new data.

--dryrun

False

A boolean variable that can be set when running test cases. It will not provide any interactivity and will not start Gazebo simulation.

Last updated