This is ArduPilot official plugin for Ignition Gazebo. It replaces the old Gazebo plugin to bring support of the next gen Gazebo simulator. It also brings support for more features :
- more flexible data exchange between SITL and Ignition with JSON data sharing.
- more sensors supported.
- true Simulation lockstepping. It is now possible to use GDB to stop the Ignition time for debugging.
- Better 3D rendering
The project is composed of an Ignition plugin to connect to ArduPilot SITL (Software In The Loop) and some example models and worlds.
The plugin is currently working, but we are working into bringing support for more feature and refine the API.
Ignition Edifice is supported on Ubuntu Bionic and Focal. If you are running Ubuntu as a virtual machine you will need at least Ubuntu 20.04 (Focal) in order to have the OpenGL support required for the ogre2
render engine.
Follow the instructions for a binary install of ignition edifice and verify that ignition gazebo is running correctly.
Set up an ArduPilot development environment. In the following it is assumed that you are able to run ArduPilot SITL using the MAVProxy GCS.
Install Ignition Gazebo Edifice development libs and rapidjson:
sudo apt install rapidjson-dev libignition-gazebo5-dev
Clone the repo and build with:
git clone https://github.com/ArduPilot/ardupilot_gazebo
cd ardupilot_gazebo
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
Set the ignition environment variables in your .bashrc
or .zshrc
or in the terminal used to run gazebo:
Assuming that you have clone the repository in $HOME/ardupilot_gazebo
:
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:$IGN_GAZEBO_SYSTEM_PLUGIN_PATH
export IGN_GAZEBO_RESOURCE_PATH=$HOME/ardupilot_gazebo/models:$HOME/ardupilot_gazebo/worlds:IGN_GAZEBO_RESOURCE_PATH
Assuming that you have clone the repository in $HOME/ardupilot_gazebo
:
echo 'export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$HOME/ardupilot_gazebo/build:${IGN_GAZEBO_SYSTEM_PLUGIN_PATH}' >> ~/.bashrc
echo 'export IGN_GAZEBO_RESOURCE_PATH=$HOME/ardupilot_gazebo/models:$HOME/ardupilot_gazebo/worlds:${IGN_GAZEBO_RESOURCE_PATH}' >> ~/.bashrc
Reload your terminal with source ~/.bashrc
ign gazebo -v 4 -r iris_arducopter_runway.world
The -v 4
parameter is not mandatory, it shows the debug informations.
To run an ArduPilot simulation with Gazebo, the frame should have gazebo-
in it and have JSON
as model. Other commandline parameters are the same as usal on SITL.
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --map --console
STABILIZE> mode guided
GUIDED> arm throttle
GUIDED> takeoff 5
Ignition documentation is already providing some help on most troubleshooting frequent issues