-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This fork of ardupilot_gazebo
incorporates
@gerkey's port to ignition
and has been updated to support Ignition Edifice.
There are two branches with Ignition support: the first uses the ArduPilot SITL-JSON backend; the second uses the ArduPilot SITL-Gazebo backend with a binary protocol. The intention is to deprecate the binary backend. Further development for Ignition (sensors, etc.) will use SIT-JSON. The set up for both is similar and described in more detail below.
Ignition Edifice is supported on Ubuntu Bionic and Ubuntu Focal. If you are running Ubuntu as a virtual machine you will need 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.
The branch ignition-edifice
uses the
ArduPilot SITL-JSON
backend and is compatible with Ignition Edifice.
Install RapidJSON
:
sudo apt-get update && sudo apt-get install rapidjson-dev -y
Clone the repo and build with:
git clone https://github.com/srmainwaring/ardupilot_gazebo.git -b ignition-edifice
cd ardupilot_gazebo
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
We assume your platform is Ubuntu and the plugin code has been cloned into $HOME/Code/ardupilot/sim/ardupilot_gazebo
. Set the ignition environment variables in your .bashrc
or the terminal used run gazebo:
export IGN_CONFIG_PATH=/usr/share/ignition
export IGN_RENDERING_RESOURCE_PATH=/usr/share/ignition/ignition-rendering5
export IGN_GAZEBO_RESOURCE_PATH=\
$HOME/Code/ardupilot/sim/ardupilot_gazebo/models:\
$HOME/Code/ardupilot/sim/ardupilot_gazebo/worlds
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=\
/usr/lib/x86_64-linux-gnu/ign-gazebo-5/plugins:\
$HOME/Code/ardupilot/sim/ardupilot_gazebo/build
$ ign gazebo -v 4 -r iris_arducopter_runway.world
$ sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --map --console
STABILIZE> mode guided
GUIDED> arm throttle
GUIDED> takeoff 5
This image shows the simulation running on an Ubuntu virtual machine hosted on macOS. The text overlay is presenting additional OpenGL information used to analyse the hardware acceleration on the VM.
The branch feature/ignition-edifice-sitl-gazebo
uses the
ArduPilot SITL-Gazebo
backend.
The procedure to set up and and run the simulation is the same as for the SITL-JSON backend except for the differences below.
Clone the repo and build with:
git clone https://github.com/srmainwaring/ardupilot_gazebo.git -b feature/ignition-edifice-sitl-gazebo
cd ardupilot_gazebo
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4
$ sim_vehicle.py -v ArduCopter -f gazebo-iris --map --console
There is experimental support for running the simulation on other platforms.