TU Delft - Search and Rescue with AR Drone 2

__TOC__
== Introduction==
The high maneuverability and stability of a quadrotor inspired us to make an autonomous search and rescue vehicle. For this the AR Drone 2 was used. The goal of this project is thus to further develop the AR Drone2 into a robot capable of performing an autonomous search mission. This under guidance of dr. ir. M. Wisse and ir. B. D. W. Remes. All the steps taken are described on this page.
In order to achieve this goal we decided to work with raw data. The data was obtained by creating drivers capable of extracting and interpreting sensor data from the AR Drone2. Also because the programming developed by Parrot were not used, motor drivers has to be obtained. In order to get the quadrotor actually to fly, paparazzi was used. For simulation JSBSim was used, which was then visualized using Flight Gear. The final section of the page will discuss the subject of making the quadrotor autonomous.
== General project information==
This project was developed using Linux, more specific Ubuntu. So except for the simulation part all steps are explained for this operating system. But it's a free operating system, so if you want to retrace our steps you can simply download it and access it from your current operating system using virtual box. A small tutorial can be found here.
For this project a repository was used, Github. This allows multiple people to work on the same project at the same time without getting in each other's way. So all files associated with our project associated can be accessed using Github. For beginners, you can read the manual to setup Github for Ubuntu:
* Github manual for Ubuntu
Our git repository is at Github RoboticaTUDelft in the "minor1" branch. You can change to this branch by executing the following command "git checkout minor1". The related project, TU Delft - Lasergame with Autonomous AR Drone, can be found under the minor2 branch.
== Data acquisition==
So as explained in the introduction, firstly the raw data had to be extracted from the AR Drone2. So this data could be fed to paparazzi. So we started with trying to connect and pass files to the AR Drone2, which is desribed in the connecing section. The exact details of the extraction of the data is described in the NAV board section. Next the data from paparazzi had to be passed on to our actuators correctly. This is described in the motor driver section. To be able to perform better in our autonomous mission a GPS was added to the AR Drone2. The details of this are described in the GPS section.
=== Connecting===
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.
The connecting was done using Telnet.
*AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet
The actual transferring of files is done using a File Transfer Protocol (FTP).
*AR_Drone_2#Transfer_files
=== NAV board===
Throughout this project, on several different occasions, it will be apparent that the AR Drone2 was never really meant to be used as we inteded to. In addition to this, Parrot SA has a vested interest in maintaining the exclusivity of its product, rightfully so. So with what little information is publicly available, reverse engineering was a lot harder than we first thought when we began the project. However the AR.Drone2 looks a lot like the AR.Drone1, its predecessor, for which a lot of reverse engineering has allready been done by other people. Ofcourse there are differences and this is where we started reverse engineering the bits and pieces for the NAV board.
*AR_Drone_2/NAV board
=== Motor driver===
Using a similar technique as for the NAV board, the motor drivers were obtained.
*AR_Drone_2/Motor driver
=== GPS===
The GPS we use with the AR.Drone2 is the BU-353 GPS. To make good use of this GPS we had to create our own driver for it. 
*AR_Drone_2/GPS
== Paparazzi==
Now the necessary raw data can be obtained and the actuators can be controlled, it's time to focus on paparazzi. The first part deals with using Paparazzi with the AR.Drone2 The final part gives some additional information on the paparazzi architecture. More information on how to install Paparazzi can be found here.
=== Compiling and using Paparazzi===
Paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.
*AR_Drone_2#Installation
=== Paparazzi architecture===
In the near future, we'd like to add features like object avoidance. Since this isn't yet implemented in paparazzi we have to start from scratch. Therefore we tried to understand the architecture a little better than is explained on this wiki at the moment.
*Insight of paparazzi architecture
== Simulation==
Now our drone was ready to go, simulation could begin. The simulation was done in JSBSim, which was then visualized using flightgear. More information on how to install JSBSim see JSBSim. For more information on how to install Flightgear and link it to Paparazzi see Simulation#View_the_simulation_in_Flight_Gear.
=== JSBSim===
Creating A Flight Dynamics Model
In order to control the otherwise highly active dynamic nature of the quadrotor, an autopilot system will be necessary because the reaction time of the pilot will, otherwise, not be sufficient to maintain stable flight. The autopilot system will be created in Paparazzi for which a prerequisite is a proper flight dynamics model (FDM). To create the FDM the team will use JSBSIM, an open-source, platform-independent, flight-dynamics and control software library. Installing JSBSIM is covered for several different operating systems on the Paparazzi Wiki, Installing JSBSIM.
Once JSBSim had been installed, the actual work could begin. Flight Dynamics and the creation of an individual model for an aircraft is essentially a case study regarding its control, stability, and performance. To model those three dynamics aspects is essentially what JSBSIM was used for but before work could begin, JSBSIM would first need to be fed a configuration file. The configuration file is written in a .xml format and, naturally, is unique to each aircraft. Although not applicable to this project, it is worth mentioning in the event that the reader of this page is not following the instruction exactly and is using it more for reference, there is a tool on the JSBSIM page called Aeromatic, which is a capable .xml configuration file generator. For those following this project closely, a link will follow for creating a suitable JSBSIM .xml configuration file for the AR.Drone2.
*AR_Drone_2#AR.Drone Configuration File
=== Flightgear===
Without actually using the drone itself, and only the previously developed JSBSIM configuration file, a simulated drone can be flown in Flightgear. To do so, a CAD model of the drone is implemented to give a visualization to the simulated model. Flightgear is the preeminent open-source flight simulator backed by a large community of active users. Implementation for this particular project can be read about on the AR_Drone_2#Flightgear wikipage. More on the software can be found on the Flightgear website.
Category: TU Delft - Autonomous Quadrotor
Category: Minor Team 1
Category: AR Drone 2