TU Delft - Lasergame with Autonomous AR Drone
- 1 Introduction
- 2 The Laser Gaming Setup
- 3 Simulation
- 4 Getting information
- 5 Programming
- 6 Manuals and guides
Our focus in the development of the autonomous AR.Drone is focused on the lasergaming industry. In this field our goal is to implement the AR.drone as a observing and later on in the project participating member of the game. We feel that there is quite a lot of potential for an implementation of the quad rotor, because we believe that using it we can create a new dimension in laser gaming. With its manoeuvrability it will be able to easily get around the laser game obstacle course and its futuristic looks will integrate perfectly with the laser game environment.
In our project we have chosen to work with the Standard Development Kit (SDK), which is already present on the AR.Drone. To get this done we needed to combine Paparazzi with the programs JSBSim and FlightGear.
For this project we used a repository, Github. Developers often use a repository for developing their software projects. When using a repository, developers can upload and download the code developed for the project. This allows multiple people to work on the same project at the same time without getting in eachother's way. It is in this case very useful and we will use Github, a populair open source repository site. For beginners, please read the manual to setup Github for Ubuntu:
The Laser Gaming Setup
The exact way in which we are going to implement the AR.Drone in the laser gaming industry will be decided later on in the process. We currently have four options, varying in difficulty and achievability:
- Enemy: The AR.Drone will be used as an interactive, shooting player that can be shot as well, possibly working in teams of multiple quad rotors
- Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are
- Mine-deployer: To allow for a more fast-paced game the AR.Drone will find a player and hover around its position. It will then begin counting down, which means the player needs to move or risk getting hit by the virtual explosion of the AR.Drone
- Observer: As there are nearly always people waiting while other people are playing, the AR.Drone can be used as a tool to live-stream the current game to a beamer for everyone to see. Games could also be taped and watched by the players after the game is over, and could even be sold
During the test phase we want to have an adjustable system that we can tweak while working. This is the reason that we made a PIC based design. For testing we are going to use a system based on the RC-5 protocol by Phillips. The RC-5 protocol is used for remote controls. We are going to use it for sending and receiving information about the players.
Combining Paparazzi with FlightGear and JSBSim
To get the AR.Drone to fly autonomously a model of the system is required. This can be created using paparazzi combined with JSBSim and FlightGear. The following steps will guide you through the process of setting up an environment to simulate the AR.Drone 2 controlled by Paparazzi. This will describe how to set up the simulation environment in Linux. It has been tested using Ubuntu, but it should work under any recent distro.
- Install the ground station. See Installation.
- Install JSBSim. See JSBSim.
- Install Flightgear and link it to Paparazzi. See Simulation#View_the_simulation_in_Flight_Gear.
This project is developed by using Linux, ubuntu. Following these steps are at your own risk. You can only perform these steps if you use ubuntu. Before the developing part will start, the following installations are required:
- Download the SDK from Ardrone.org
- Download and install Paparazzi, see the installation guide for help:  Do not follow the instructions from 4), we use another cross-compiler for this project.
- Follow the instructions described in the "Getting the cross-compiler".
- Download the cross-compiler from 
- Open the terminal and direct to your home directory.
- Type the following commands (without the $):
$ sudo chmod +x codesetup.sh $ sudo ./codesetup.sh
Wait a few minutes and you're done!
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at AT Commands AR.Drone 2.
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at Navdata AR.Drone 2.
The AR.Drone 2 has a telnet interface that opens a root shell on the AR.Drone 2, which is needed to test and install software. More information can be found at Telnet AR.Drone2.
The AR.Drone 2 also has a FTP server running, which makes it possible to upload files like programs to the AR.Drone 2. More information can be found at FTP AR.Drone2.
AR.Drone 2 internal communication
We use internal communcation to control the AR.Drone 2 and recieve the navigation data from the AR.Drone 2. This is done by using the AT commands and the navdata with a socket connection to "localhost". The control and navigation data run in seperate threads inside paparazzi, to make sure that both connections are kept alive. The navigation data thread sends all the information is has to paparazzi each update. The control thread waits for paparazzi to send commands and keeps the connection alive by sending a dummy command every second(because the timeout is 2 seconds).