GAPTER: Set-up GapterSim Environment

A. Prerequisites

  1. Ubuntu 14.04 LTS (Trusty Tahr)
  2. Ros indigo

Configure Ubuntu

sudo apt-get update
sudo apt-get install gawk make git curl cmake -y

ROS dependencies and required packages:

sudo apt-get install python-rosinstall ros-indigo-octomap-msgs ros-indigo-joy ros-indigo-geodesy ros-indigo-octomap-ros ros-indigo-mavlink  ros-indigo-control-toolbox  ros-indigo-transmission-interface ros-indigo-joint-limits-interface unzip ros-indigo-mavros-msgs ros-indigo-mavros-extras ros-indigo-mavros -y


Install dependencies

sudo apt-get install g++ python-pip python-matplotlib python-serial python-wxgtk2.8 python-scipy python-opencv python-numpy python-pyparsing ccache realpath libopencv-dev -y

Install MavProxy

sudo pip install future
sudo apt-get install libxml2-dev libxslt1-dev -y
sudo pip2 install pymavlink catkin_pkg --upgrade
sudo pip install MAVProxy==1.5.2

B. Ardupilot

mkdir -p ~/gapter_sim
cd gapter_sim
git clone -b sim_ros_gazebo

C. Creating ros work space

mkdir -p ~/gapter_sim/ros_ws/src
cd ~/gapter_sim/ros_ws/src
cd ..

Now download all repositories required

cd src/
git clone
git clone -b sonar_plugin
git clone
git clone
git clone
git clone
git clone
git clone -b indigo-devel

D. Installing Gazebo

Setup your computer

sudo sh -c 'echo "deb `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'

Setup Keys

wget -O - | sudo apt-key add -

Install gazebo

sudo apt-get update
sudo apt-get remove '.*gazebo.*' '.*sdformat.*' '.*ignition-math.*'
sudo apt-get update
sudo apt-get install gazebo4 libgazebo4-dev drcsim -y

E. Compile workspace

source ~/gapter_sim/ros_ws/devel/setup.bash
cd ~/gapter_sim/ros_ws
catkin_make --pkg mav_msgs mavros_msgs gazebo_msgs
source devel/setup.bash
catkin_make -j 4

F. launch Gapter Simulation

Open the terminal and type following:

source ~/gapter_sim/ros_ws/devel/setup.bash
user $: cd ~/gapter_sim/gapter_ardupilot/ArduCopter
user $: ../Tools/autotest/ -j 4 -f Gazebo

In another terminal lauch following:

source ~/gapter_sim/ros_ws/devel/setup.bash
roslaunch ardupilot_sitl_gazebo_plugin gapter_spawn.launch

Once mavproxy launched completely in the first terminal load parameters from Ardupilot directory

param load /your home directory/gapter_sim/gapter_ardupilot/Tools/Frame_params/gapter.param
param set ARMING_CHECK 0

Takeoff gapter

In mavproxy terminal type following:

mode Guided
arm throttle
takeoff 5

You can see in gazebo that gapter flying at 5 meter height.