Skip to content

Latest commit

 

History

History
83 lines (65 loc) · 2.21 KB

installing_gazebo_arduplugin.md

File metadata and controls

83 lines (65 loc) · 2.21 KB

Installing Gazebo and ArduPilot Plugin

Overview

Robot simulation is an essential tool in every roboticist's toolbox. A well-designed simulator makes it possible to rapidly test algorithms, design robots, perform regression testing, and train AI system using realistic scenarios. Gazebo offers the ability to accurately and efficiently simulate populations of robots in complex indoor and outdoor environments. At your fingertips is a robust physics engine, high-quality graphics, and convenient programmatic and graphical interfaces. Best of all, Gazebo is free with a vibrant community.

for more infromation on gazebo checkout http://gazebosim.org/

Install Gazebo [18.04-20.04]

Setup your computer to accept software from http://packages.osrfoundation.org:

sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'

Setup keys:

wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -

Reload software list:

sudo apt update

Install Gazebo:

Ubuntu [18.04]

sudo apt install gazebo9 libgazebo9-dev

Ubuntu [20.04]

sudo apt-get install gazebo11 libgazebo11-dev

for more detailed instructions for installing gazebo checkout http://gazebosim.org/tutorials?tut=install_ubuntu

Install Gazebo plugin for APM (ArduPilot Master) :

cd ~
git clone https://github.com/khancyr/ardupilot_gazebo.git
cd ardupilot_gazebo

Ubuntu 18.04 only checkout dev

git checkout dev

build and install plugin

mkdir build
cd build
cmake ..
make -j4
sudo make install
echo 'source /usr/share/gazebo/setup.sh' >> ~/.bashrc

Set paths for models:

echo 'export GAZEBO_MODEL_PATH=~/ardupilot_gazebo/models' >> ~/.bashrc
. ~/.bashrc

Run Simulator

NOTE the iris_arducopter_runway is not currently working in gazebo11. The iq_sim worlds DO work

In one Terminal (Terminal 1), run Gazebo:

gazebo --verbose ~/ardupilot_gazebo/worlds/iris_arducopter_runway.world

In another Terminal (Terminal 2), run SITL:

cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-iris --console