http://wiki.paparazziuav.org/w/api.php?action=feedcontributions&user=Titus&feedformat=atomPaparazziUAV - User contributions [en]2024-03-29T10:56:03ZUser contributionsMediaWiki 1.37.1http://wiki.paparazziuav.org/w/index.php?title=Debug_Probes&diff=23964Debug Probes2017-11-28T11:32:05Z<p>Titus: </p>
<hr />
<div><br />
__TOC__<br />
<br />
These various debug probes can be used for flashing and debugging Paparazzi hardware, some can even be used as USB-UART adapters. <br/><br />
Most are compatible with the current STM32 platform, some are also compatible with the older LPC 21xx.<br />
<br />
Debug probes for Atmel/AVR and SiLabs (ESC Controller chips) are located on the [[ESC]] page. Since those Microcontrollers are not used more as main processors.<br />
<br />
==Debug Protocols / Interfaces==<br />
<br />
There are two different relevant Protocols / Interfaces for flashing and debugging for STM32:<br/><br />
<br />
Note: Some STM32 MCUs can also be flashed via Serial and or USB DFU! But SWD and JTAG provide much better debugging capabilities.<br />
<br />
===SWD===<br />
<br />
[http://www.arm.com/products/system-ip/debug-trace/coresight-soc-components/serial-wire-debug.php ARM Serial Wire Debug (SWD)] is a program and debug protocol for ARM processors. It's a low pin count and high-performance alternative to JTAG.<br />
<br />
===JTAG===<br />
<br />
JTAG is an industry standard on-chip debugging protocol. It can be used for one or more chips (daisy chained), for interfacing with the chip as well as flashing software.<br />
<br />
[[DevGuide/OpenOCD]] can be used for interfacing with JTAG hardware (e.g. FTDI chips).<br />
<br />
=JTAG Hardware=<br />
<br />
==Black Magic Probe==<br />
<br />
[[Image:BMPM_1_top.jpg|500x500px]][[Image:BMPM_1_bottom.jpg|500x500px]]<br />
<br />
This is the original [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe] from [http://www.blacksphere.co.nz Black Sphere Technologies], a JTAG and SWD Adapter used for programming and debugging ARM Cortex MCUs.<br />
The Black Magic Probe is available for purchase in the [http://1bitsquared.com/products/black-magic-probe 1BitSquared Store]. <br />
<br />
<br style="clear:both"><br />
<br />
===Black Magic Probe firmware===<br />
<br />
First, get the VID/PID for your FT2232 device using 'lsusb'. Edit the file<br />
'src/libftdi/platform.h' and change the VID/PID to match your hardware.<br />
Compile the application with the command:<br />
<br />
make PROBE_HOST=libftdi<br />
<br />
===Black Magic Probe usage===<br />
<br />
In the wiki (under [[Developer_Guide]]) is some helpful information:<br />
* Use Black Magic Probe with Eclipse [[RT_Paparazzi#Debugging_with_an_Eclipse_IDE]].<br />
* General OpenOCD/GDB commands in reagards of the BMP, also about SWD [[DevGuide/GDB_OpenOCD_Debug#Debugging_with_GDB_over_JTAG]] [[DevGuide/GDB_OpenOCD_Debug#Black_Magic_Probe]].<br />
<br />
===Upgrade BMP firmware===<br />
<br />
Check firmware version:<br />
$ arm-none-eabi-gdb<br />
(gdb) target extended-remote /dev/ttyACM0<br />
(gdb) monitor version<br />
<br />
Download source from git, compile:<br />
$ git clone https://github.com/blacksphere/blackmagic<br />
$ cd blackmagic<br />
$ git submodule init<br />
$ git submodule update<br />
$ make<br />
$ cd src<br />
$ make clean<br />
$ make PROBE_HOST=native<br />
$ cd ../scripts<br />
Connect the Black Magic Probe to USB while holding down the button for firmware update, then start "stm32_mem.py".<br />
$ ./stm32_mem.py ../src/blackmagic.bin<br />
<br />
You can build different targets (Hardware Platforms), default value is;<br />
<br />
$ make PROBE_HOST=native<br />
<br />
===Documentation===<br />
<br />
For more information visit [http://www.blacksphere.co.nz/main/index.php/blackmagic Black Sphere Technologies] <br />
or visit the [https://github.com/blacksphere/blackmagic Black Magic Probe Git Code Reposoitory].<br />
<br />
<br />
===Where to Purchase===<br />
<br />
Black Magic Probe Mini is available through the [[File:1bitsquared_logo.png|50px|link=http://1bitsquared.com/products/black-magic-probe]] [http://1bitsquared.com/products/black-magic-probe 1BitSquared Store].<br />
For $65<br />
<br />
==[[CricketProbe/v1.00 | CricketProbe v1.00]]==<br />
<br />
[[Image:CricketProbe_v100.jpg|300px|left|link=CricketProbe/v1.00 |CricketProbe v1.00 page]]<br />
<br />
The CricketProbe is a programming and debugging tool for ARM Cortex MCU, based on the [http://www.blacksphere.co.nz Black Sphere Technologies] [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe].<br />
<br />
<br style="clear:both"><br />
<br />
==Lyorak Probe==<br />
<br />
[[Image:Lyorak_front.jpg|300px|Lyorak probe]] <br />
[[Image:Lyorak_pinout.jpeg|500px|Lyorak probe pinout]] <br />
<br />
The Lyorak probe is a programming and debugging tool for ARM Cortex MCU, based on the [http://www.blacksphere.co.nz/main/blackmagic Black Magic Probe]. <br/><br />
Designed with 1206 SMD components for easy assmbly and a CAN interface.<br />
<br />
<br style="clear:both"><br />
<br />
===Documentation===<br />
<br />
[https://github.com/molnarkares/blackmagic/tree/master/hardware/contrib/lyorak molnarkares/blackmagic git repo (fork from blackmagic)]<br />
<br />
==[[STLink]]==<br />
<br />
[[Image:St-link.jpg|300px]]<br />
<br />
Most STM discovery / eval boards comes with a [http://www.st.com/web/catalog/tools/FM146/CL1984/SC724/SS1677/PF251168 ST-Link V2] on board, with one exception; the STM32VL version, that board comes with ST-Link V1.<br />
<br />
These can be used with [https://github.com/texane/stlink texane’s] tools, or reflashed with [[STLink#Update_the_ST-Link_to_blackmagic_probe| the blackmagic firmware]].<br />
<br />
<br style="clear:both"><br />
<br />
===Clones===<br />
<br />
There are some variations of the STLink available. Some with the same STM32F103C8T6 MCU, some with a STM32F101C8T6.<br/><br />
More informations on the [[STLink#Clones]] page.<br/><br />
Likely possible to use them with (texanes) STLink or Blackmagic software.<br />
<br />
==FLOSS JTAG==<br />
<br />
[[Image:Jtag-up.jpg|400px|FLOSS JTAG top]]<br />
[[Image:Jtag-down.jpg|400px|FLOSS JTAG bottom]]<br />
<br />
The FLOSS JTAG is based on an FTDI 2232HL chip that allows two simultaneous USB connections, which means that FLOSS JTAG allows JTAG and UART connections simultaneously.<br/><br />
<br />
The upper side contains the JTAG connector and two sets of RX/TX LEDs for JTAG and UART/COM interface separately. The JTAG connector is 2x5 pins, 0.05-inch pitch, and is compatible with the Samtec FFSD-05-D-06.00-01-N-RW-R ribbon cable.<br />
<br />
On the bottom side there is 4 pin UART connector, which contains (from top to bottom on the image, or color dots): Ground (black), RX (orange), TX (yellow), and +5V (red) <br />
<br />
<br style="clear:both"><br />
<br />
It can be used with [[DevGuide/OpenOCD]] software.<br />
<br />
===Documentation===<br />
<br />
[http://randomprojects.org/wiki/Floss-JTAG randomprojects.org/wiki/Floss-JTAG]<br />
<br />
=== Availability ===<br />
<br />
Floss JTAG is currently discontinued and not in production. We recommend buying the [http://1bitsquared.com/products/black-magic-probe Black Magic Probe Mini] instead.<br />
<br />
==FT2232H Mini Module==<br />
<br />
[[Image:AlternativeFlossJtag.png|300px|FT2232H Mini Modules as JTAG adapter]]<br />
[[Image:FT2232H_Mini_Module_front.jpg|200px|Top with all necessary connections]]<br />
[[Image:FT2232H_Mini_Module_back.jpg|200px|Bottom with pin headers]]<br />
<br />
<br style="clear:both"><br />
<br />
The FT2232H Mini modules can be used with blackmagic firmware or as FLOSS-JTAG device. <br/><br />
<br />
'''Important'''<br />
<br />
Out of the box, there is NO power supply for the FT2232H because this can either done with USB or external 5V.<br/><br />
The pictures above show two different PCB versions. The suggested connections only apply to the right (latest) layout.<br />
<br />
Connect: (for power supply over USB)<br />
* CN3 pin 1 to CN3 pin 3<br />
* CN2 pin group 1,3,5 to CN2 pin group 11,21 and to CN3 pin group 12,22<br />
<br />
'''Pinout'''<br />
<br />
{|border="1" cellspacing="0" style="text-align:center" cellpadding="6"<br />
|+'''Power'''<br />
!''Use''!!''Pin''<br />
|-<br />
|3V3||CN2-1<br />
|-<br />
|3V3||CN2-3<br />
|-<br />
|3V3||CN2-5<br />
|-<br />
|GND||CN2-2<br />
|-<br />
|GND||CN2-4<br />
|-<br />
|GND||CN2-6<br />
|-<br />
|GND||CN3-2<br />
|-<br />
|GND||CN3-4<br />
|}<br />
<br />
{|border="1" cellspacing="0" style="text-align:center" cellpadding="6"<br />
|+'''UART'''<br />
!''Use''!!''Pin''!!''Name''<br />
|-<br />
|UART1 RX ||CN2-10||ADBUS1<br />
|-<br />
|UART1 TX ||CN2-7||ADBUS0<br />
|-<br />
|UART2 RX ||CN3-25||BDBUS1<br />
|-<br />
|UART2 TX ||CN3-26||BDBUS0<br />
|}<br />
<br />
{|border="1" cellspacing="0" style="text-align:center" cellpadding="6"<br />
|+'''JTAG'''<br />
!''Use''!!''Pin''!!''Name''<br />
|-<br />
|JTAG1 TCK ||CN2-7||ADBUS0<br />
|-<br />
|JTAG1 TDI ||CN2-10||ADBUS1<br />
|-<br />
|JTAG1 TDO ||CN2-9||ADBUS2<br />
|-<br />
|JTAG1 TMS ||CN2-12||ADBUS3<br />
|-<br />
|JTAG2 TCK ||CN3-26||BDBUS0<br />
|-<br />
|JTAG2 TDI ||CN3-25||BDBUS1<br />
|-<br />
|JTAG2 TDO ||CN3-24||BDBUS2<br />
|-<br />
|JTAG2 TMS ||CN3-23||BDBUS3<br />
|}<br />
<br />
<br />
===Use as FLOSS-JTAG===<br />
<br />
With the tool "FT_Prog" change the description the FT2232H to "FLOSS-JTAG".<br />
<br />
===Documentation===<br />
<br />
[http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232H.pdf FT2232H Datasheet] <br/><br />
[http://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_FT2232H_Mini_Module.pdf FT2232H Mini Module Datatsheet] <br/><br />
[http://at.mouser.com/ProductDetail/FTDI/FT2232H-MINI-MODULE/?qs=sGAEpiMZZMvOu2nvEqRMlAhGRrWaSCdm Mouser shop 22€]<br />
<br />
<br />
[[Category:Hardware]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23963TU Delft - Search and Rescue with AR Drone 22017-11-28T11:03:49Z<p>Titus: </p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2#Transfer_files]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
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 [[installation|here]].<br />
<br />
=== Compiling and using Paparazzi===<br />
<br />
Paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[AR_Drone_2#Installation]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2#AR.Drone Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23961TU Delft - Search and Rescue with AR Drone 22017-11-28T10:47:27Z<p>Titus: </p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2#Transfer_files]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
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 [[installation|here]].<br />
<br />
=== Compiling and using Paparazzi===<br />
<br />
Paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[AR_Drone_2#Installation]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2#AR.Drone Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23956TU Delft - Search and Rescue with AR Drone 22017-11-28T10:36:57Z<p>Titus: </p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2#Transfer_files]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
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 [[installation|here]].<br />
<br />
=== Compiling and using Paparazzi===<br />
<br />
Paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[AR_Drone_2#Installation]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2/JSBSIM .xml Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&diff=23954TU Delft - Lasergame with Autonomous AR Drone2017-11-28T10:30:54Z<p>Titus: </p>
<hr />
<div>[[File:Robotics_Minor_Group_2.png|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 2]]__TOC__<br />
<br />
== Introduction ==<br />
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.<br />
<br />
<br />
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.<br />
<br />
=== Github ===<br />
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:<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi Github RoboticaTUDelft] in the "minor2" branch. You can change to this branch bij executing the following command "git checkout minor2". Because most of the work inside paparazzi between our implementation and the one from "minor1" is the same, it can be possible that some parts aren't merged between the two branches.<br />
<br />
== The Laser Gaming Setup ==<br />
<br />
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:<br />
* 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<br />
* Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are<br />
* 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<br />
* 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<br />
<br />
===Implementation===<br />
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.<br />
<br />
== Simulation ==<br />
<br />
=== Model ===<br />
<br />
*Setting up FlightGear such that it loads your model. See [[AR_Drone_2#Flightgear]].<br />
<br />
=== Combining Paparazzi with FlightGear and JSBSim ===<br />
<br />
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.<br />
*Install the ground station. See [[Installation]].<br />
*Install JSBSim. See [[JSBSim]].<br />
*Install FlightGear and link it to Paparazzi. See [[Simulation#View_the_simulation_in_Flight_Gear]].<br />
<br />
== Getting information ==<br />
<br />
<br />
=== Getting Started ===<br />
This project is developed by using Linux, ubuntu. We don't support information for other linux distributions, but feel free to try it out.<br />
* Follow the instructions described in the "Getting the cross-compiler".<br />
* Get the source from our github which is explained in the section above.<br />
* Build the paparazzi source (for more information: [http://paparazzi.enac.fr/wiki/Installation/FromScratch])<br />
* You are ready to develop with our project.<br />
<br />
=== The cross-compiler === <br />
# Download the cross-compiler from [http://taghof.github.com/Navigation-for-Robots-with-WIFI-and-CV/downloads/codesetup.sh]<br />
# Open the terminal and direct to your home directory.<br />
# Type the following commands (without the $):<br />
<br />
$ sudo chmod +x codesetup.sh<br />
$ sudo ./codesetup.sh<br />
<br />
Wait a few minutes and you're done!<br />
<br />
=== AT Commands ===<br />
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at [[AR_Drone_2/AT Commands]].<br />
<br />
=== Navdata ===<br />
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at [[AR_Drone_2/NAV board]].<br />
<br />
=== GPS signals ===<br />
To let our AR.Drone 2 communicate with Paparazzi an external [[GPS/BU 353]] is used. For the implementation see [[AR_Drone_2/GPS]].<br />
<br />
=== Telnet ===<br />
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 [[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]].<br />
<br />
=== FTP ===<br />
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 [[AR_Drone_2#Transfer_files]].<br />
<br />
== Programming ==<br />
<br />
=== AR.Drone 2 internal communication ===<br />
We use internal communcation to control the AR.Drone 2 and receive 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).<br />
<br />
=== Using the GPS signals ===<br />
We will use an external GPS reciever which will be connected to the AR.Drone 2 usb or telnet usb port. We still have to figure out if it is possible to adjust the default driver for the USB port on the AR.Drone 2, because this is configured as an external disk which is accesable with FTP.<br />
When we have figured out if this is possible, the default usb-connector of the GPS reciever doesn't need to be modified to fit the telnet usb port at the bottom of the AR. Drone 2.<br />
<br />
Because of the great support of GPS modules inside paparaazi, we don't have to implement the GPS module inside paparazzi ourself.<br />
<br />
=== AR.Drone 2 Sign convention ===<br />
* [[AR_Drone_2#Sign_conventions]]<br />
<br />
== Manuals and guides ==<br />
* [[Developer_Guide]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]] [[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&diff=23953TU Delft - Lasergame with Autonomous AR Drone2017-11-28T10:28:59Z<p>Titus: </p>
<hr />
<div>[[File:Robotics_Minor_Group_2.png|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 2]]__TOC__<br />
<br />
== Introduction ==<br />
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.<br />
<br />
<br />
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.<br />
<br />
=== Github ===<br />
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:<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi Github RoboticaTUDelft] in the "minor2" branch. You can change to this branch bij executing the following command "git checkout minor2". Because most of the work inside paparazzi between our implementation and the one from "minor1" is the same, it can be possible that some parts aren't merged between the two branches.<br />
<br />
== The Laser Gaming Setup ==<br />
<br />
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:<br />
* 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<br />
* Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are<br />
* 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<br />
* 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<br />
<br />
===Implementation===<br />
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.<br />
<br />
== Simulation ==<br />
<br />
=== Model ===<br />
<br />
*Setting up FlightGear such that it loads your model. See [[AR_Drone_2#Flightgear]].<br />
<br />
=== Combining Paparazzi with FlightGear and JSBSim ===<br />
<br />
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.<br />
*Install the ground station. See [[Installation]].<br />
*Install JSBSim. See [[JSBSim]].<br />
*Install FlightGear and link it to Paparazzi. See [[Simulation#View_the_simulation_in_Flight_Gear]].<br />
<br />
== Getting information ==<br />
<br />
<br />
=== Getting Started ===<br />
This project is developed by using Linux, ubuntu. We don't support information for other linux distributions, but feel free to try it out.<br />
* Follow the instructions described in the "Getting the cross-compiler".<br />
* Get the source from our github which is explained in the section above.<br />
* Build the paparazzi source (for more information: [http://paparazzi.enac.fr/wiki/Installation/FromScratch])<br />
* You are ready to develop with our project.<br />
<br />
=== The cross-compiler === <br />
# Download the cross-compiler from [http://taghof.github.com/Navigation-for-Robots-with-WIFI-and-CV/downloads/codesetup.sh]<br />
# Open the terminal and direct to your home directory.<br />
# Type the following commands (without the $):<br />
<br />
$ sudo chmod +x codesetup.sh<br />
$ sudo ./codesetup.sh<br />
<br />
Wait a few minutes and you're done!<br />
<br />
=== AT Commands ===<br />
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at [[AR_Drone_2/AT Commands]].<br />
<br />
=== Navdata ===<br />
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at [[AR_Drone_2/NAV board]].<br />
<br />
=== GPS signals ===<br />
To let our AR.Drone 2 communicate with Paparazzi an external [[GPS/BU 353]] is used. For the implementation see [[AR_Drone_2/GPS]].<br />
<br />
=== Telnet ===<br />
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 [[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]].<br />
<br />
=== FTP ===<br />
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 [[AR_Drone_2#Transfer_files]].<br />
<br />
== Programming ==<br />
<br />
=== AR.Drone 2 internal communication ===<br />
We use internal communcation to control the AR.Drone 2 and receive 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).<br />
<br />
=== Using the GPS signals ===<br />
We will use an external GPS reciever which will be connected to the AR.Drone 2 usb or telnet usb port. We still have to figure out if it is possible to adjust the default driver for the USB port on the AR.Drone 2, because this is configured as an external disk which is accesable with FTP.<br />
When we have figured out if this is possible, the default usb-connector of the GPS reciever doesn't need to be modified to fit the telnet usb port at the bottom of the AR. Drone 2.<br />
<br />
Because of the great support of GPS modules inside paparaazi, we don't have to implement the GPS module inside paparazzi ourself.<br />
<br />
=== AR.Drone 2 Sign convention ===<br />
* [[AR_Drone_2#Sign_conventions]]<br />
<br />
== Manuals and guides ==<br />
* [[Developers Manual]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]] [[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&diff=23949TU Delft - Lasergame with Autonomous AR Drone2017-11-28T10:15:31Z<p>Titus: </p>
<hr />
<div>[[File:Robotics_Minor_Group_2.png|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 2]]__TOC__<br />
<br />
== Introduction ==<br />
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.<br />
<br />
<br />
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.<br />
<br />
=== Github ===<br />
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:<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi Github RoboticaTUDelft] in the "minor2" branch. You can change to this branch bij executing the following command "git checkout minor2". Because most of the work inside paparazzi between our implementation and the one from "minor1" is the same, it can be possible that some parts aren't merged between the two branches.<br />
<br />
== The Laser Gaming Setup ==<br />
<br />
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:<br />
* 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<br />
* Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are<br />
* 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<br />
* 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<br />
<br />
===Implementation===<br />
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.<br />
<br />
== Simulation ==<br />
<br />
=== Model ===<br />
<br />
*Setting up FlightGear such that it loads your model. See [[AR_Drone_2#Flightgear]].<br />
<br />
=== Combining Paparazzi with FlightGear and JSBSim ===<br />
<br />
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.<br />
*Install the ground station. See [[Installation]].<br />
*Install JSBSim. See [[JSBSim]].<br />
*Install FlightGear and link it to Paparazzi. See [[Simulation#View_the_simulation_in_Flight_Gear]].<br />
<br />
== Getting information ==<br />
<br />
<br />
=== Getting Started ===<br />
This project is developed by using Linux, ubuntu. We don't support information for other linux distributions, but feel free to try it out.<br />
* Follow the instructions described in the "Getting the cross-compiler".<br />
* Get the source from our github which is explained in the section above.<br />
* Build the paparazzi source (for more information: [http://paparazzi.enac.fr/wiki/Installation/FromScratch])<br />
* You are ready to develop with our project.<br />
<br />
=== The cross-compiler === <br />
# Download the cross-compiler from [http://taghof.github.com/Navigation-for-Robots-with-WIFI-and-CV/downloads/codesetup.sh]<br />
# Open the terminal and direct to your home directory.<br />
# Type the following commands (without the $):<br />
<br />
$ sudo chmod +x codesetup.sh<br />
$ sudo ./codesetup.sh<br />
<br />
Wait a few minutes and you're done!<br />
<br />
=== AT Commands ===<br />
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at [[AR_Drone_2/AT Commands]].<br />
<br />
=== Navdata ===<br />
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at [[AR_Drone_2/NAV board]].<br />
<br />
=== GPS signals ===<br />
To let our AR.Drone 2 communicate with Paparazzi an external [[GPS/BU 353]] is used. For the implementation see [[AR_Drone_2/GPS]].<br />
<br />
=== Telnet ===<br />
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 [[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]].<br />
<br />
=== FTP ===<br />
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 [[AR_Drone_2#Transfer_files]].<br />
<br />
== Programming ==<br />
<br />
=== AR.Drone 2 internal communication ===<br />
We use internal communcation to control the AR.Drone 2 and receive 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).<br />
<br />
=== Using the GPS signals ===<br />
We will use an external GPS reciever which will be connected to the AR.Drone 2 usb or telnet usb port. We still have to figure out if it is possible to adjust the default driver for the USB port on the AR.Drone 2, because this is configured as an external disk which is accesable with FTP.<br />
When we have figured out if this is possible, the default usb-connector of the GPS reciever doesn't need to be modified to fit the telnet usb port at the bottom of the AR. Drone 2.<br />
<br />
Because of the great support of GPS modules inside paparaazi, we don't have to implement the GPS module inside paparazzi ourself.<br />
<br />
=== AR.Drone 2 Sign convention ===<br />
* [[AR_Drone_2#Sign_conventions]]<br />
<br />
== Manuals and guides ==<br />
* [[Step by step guide for beginners]]<br />
* [[Developers Manual]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]] [[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23948TU Delft - Search and Rescue with AR Drone 22017-11-28T10:08:32Z<p>Titus: /* Flightgear */</p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2#Transfer_files]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
Now the necessary raw data can be obtained and the actuators can be controlled, it's time to focus on paparazzi. This section consists of three parts. The first part deals with integrating the AR.Drone2 into the paparazzi libraries, the second part deals with compiling paparazzi for the drone. The final part gives some aditional information on the paparazzi architecture. More information on how to install paparazzi can be found [[installation|here]].<br />
<br />
=== Using Paparazzi===<br />
<br />
This parts describes the process of adapting the paparazzi libraries to make them compatible with the AR.Drone’s hard en software.<br />
<br />
*[[AR_Drone_2/Paparazzi_Integration]]<br />
<br />
=== Compiling===<br />
<br />
Finally paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[compiling paparazzi for the AR.Drone2]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2/JSBSIM .xml Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&diff=23947TU Delft - Lasergame with Autonomous AR Drone2017-11-28T10:07:47Z<p>Titus: link fix</p>
<hr />
<div>[[File:Robotics_Minor_Group_2.png|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 2]]__TOC__<br />
<br />
== Introduction ==<br />
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.<br />
<br />
<br />
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.<br />
<br />
=== Github ===<br />
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:<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi Github RoboticaTUDelft] in the "minor2" branch. You can change to this branch bij executing the following command "git checkout minor2". Because most of the work inside paparazzi between our implementation and the one from "minor1" is the same, it can be possible that some parts aren't merged between the two branches.<br />
<br />
== The Laser Gaming Setup ==<br />
<br />
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:<br />
* 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<br />
* Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are<br />
* 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<br />
* 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<br />
<br />
===Implementation===<br />
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.<br />
<br />
== Simulation ==<br />
<br />
=== Model ===<br />
<br />
*Setting up FlightGear such that it loads your model. See [[AR_Drone_2#Flightgear]].<br />
<br />
=== Combining Paparazzi with FlightGear and JSBSim ===<br />
<br />
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.<br />
*Install the ground station. See [[Installation]].<br />
*Install JSBSim. See [[JSBSim]].<br />
*Install FlightGear and link it to Paparazzi. See [[Simulation#View_the_simulation_in_Flight_Gear]].<br />
<br />
== Getting information ==<br />
<br />
<br />
=== Getting Started ===<br />
This project is developed by using Linux, ubuntu. We don't support information for other linux distributions, but feel free to try it out.<br />
* Follow the instructions described in the "Getting the cross-compiler".<br />
* Get the source from our github which is explained in the section above.<br />
* Build the paparazzi source (for more information: [http://paparazzi.enac.fr/wiki/Installation/FromScratch])<br />
* You are ready to develop with our project.<br />
<br />
=== The cross-compiler === <br />
# Download the cross-compiler from [http://taghof.github.com/Navigation-for-Robots-with-WIFI-and-CV/downloads/codesetup.sh]<br />
# Open the terminal and direct to your home directory.<br />
# Type the following commands (without the $):<br />
<br />
$ sudo chmod +x codesetup.sh<br />
$ sudo ./codesetup.sh<br />
<br />
Wait a few minutes and you're done!<br />
<br />
=== AT Commands ===<br />
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at [[AR_Drone_2/AT Commands]].<br />
<br />
=== Navdata ===<br />
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at [[AR_Drone_2/NAV board]].<br />
<br />
=== GPS signals ===<br />
To let our AR.Drone 2 communicate with Paparazzi an external [[GPS/BU 353]] is used. For the implementation see [[AR_Drone_2/GPS]].<br />
<br />
=== Telnet ===<br />
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 [[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]].<br />
<br />
=== FTP ===<br />
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 [[AR_Drone_2#Transfer_files]].<br />
<br />
== Programming ==<br />
<br />
=== AR.Drone 2 internal communication ===<br />
We use internal communcation to control the AR.Drone 2 and receive 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).<br />
<br />
=== Using the GPS signals ===<br />
We will use an external GPS reciever which will be connected to the AR.Drone 2 usb or telnet usb port. We still have to figure out if it is possible to adjust the default driver for the USB port on the AR.Drone 2, because this is configured as an external disk which is accesable with FTP.<br />
When we have figured out if this is possible, the default usb-connector of the GPS reciever doesn't need to be modified to fit the telnet usb port at the bottom of the AR. Drone 2.<br />
<br />
Because of the great support of GPS modules inside paparaazi, we don't have to implement the GPS module inside paparazzi ourself.<br />
<br />
=== AR.Drone 2 Sign convention ===<br />
* [[AR_Drone_2/sign_convention]]<br />
<br />
== Manuals and guides ==<br />
* [[Step by step guide for beginners]]<br />
* [[Developers Manual]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]] [[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Lasergame_with_Autonomous_AR_Drone&diff=23941TU Delft - Lasergame with Autonomous AR Drone2017-11-28T09:30:24Z<p>Titus: /* Getting information */</p>
<hr />
<div>[[File:Robotics_Minor_Group_2.png|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 2]]__TOC__<br />
<br />
== Introduction ==<br />
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.<br />
<br />
<br />
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.<br />
<br />
=== Github ===<br />
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:<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi Github RoboticaTUDelft] in the "minor2" branch. You can change to this branch bij executing the following command "git checkout minor2". Because most of the work inside paparazzi between our implementation and the one from "minor1" is the same, it can be possible that some parts aren't merged between the two branches.<br />
<br />
== The Laser Gaming Setup ==<br />
<br />
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:<br />
* 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<br />
* Scout: The AR.Drone will survey a certain area streaming back its video, allowing players to know where enemies are<br />
* 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<br />
* 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<br />
<br />
===Implementation===<br />
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.<br />
<br />
== Simulation ==<br />
<br />
=== Model ===<br />
<br />
*Setting up FlightGear such that it loads your model. See [[AR_Drone_2/Flightgear]].<br />
=== Combining Paparazzi with FlightGear and JSBSim ===<br />
<br />
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.<br />
*Install the ground station. See [[Installation]].<br />
*Install JSBSim. See [[JSBSim]].<br />
*Install FlightGear and link it to Paparazzi. See [[Simulation#View_the_simulation_in_Flight_Gear]].<br />
<br />
== Getting information ==<br />
<br />
<br />
=== Getting Started ===<br />
This project is developed by using Linux, ubuntu. We don't support information for other linux distributions, but feel free to try it out.<br />
* Follow the instructions described in the "Getting the cross-compiler".<br />
* Get the source from our github which is explained in the section above.<br />
* Build the paparazzi source (for more information: [http://paparazzi.enac.fr/wiki/Installation/FromScratch])<br />
* You are ready to develop with our project.<br />
<br />
=== The cross-compiler === <br />
# Download the cross-compiler from [http://taghof.github.com/Navigation-for-Robots-with-WIFI-and-CV/downloads/codesetup.sh]<br />
# Open the terminal and direct to your home directory.<br />
# Type the following commands (without the $):<br />
<br />
$ sudo chmod +x codesetup.sh<br />
$ sudo ./codesetup.sh<br />
<br />
Wait a few minutes and you're done!<br />
<br />
=== AT Commands ===<br />
The AR.Drone 2 has a self made protocol for controlling the AR.Drone 2 remotly over wifi. More information can be found at [[AR_Drone_2/AT Commands]].<br />
<br />
=== Navdata ===<br />
The AR.Drone 2 also has a self made protocol for sending navdata to the client over wifi. More information can be found at [[AR_Drone_2/NAV board]].<br />
<br />
=== GPS signals ===<br />
To let our AR.Drone 2 communicate with Paparazzi an external [[GPS/BU 353]] is used. For the implementation see [[AR_Drone_2/GPS]].<br />
<br />
=== Telnet ===<br />
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 [[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]].<br />
<br />
=== FTP ===<br />
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 [[AR_Drone_2#Transfer_files]].<br />
<br />
== Programming ==<br />
<br />
=== AR.Drone 2 internal communication ===<br />
We use internal communcation to control the AR.Drone 2 and receive 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).<br />
<br />
=== Using the GPS signals ===<br />
We will use an external GPS reciever which will be connected to the AR.Drone 2 usb or telnet usb port. We still have to figure out if it is possible to adjust the default driver for the USB port on the AR.Drone 2, because this is configured as an external disk which is accesable with FTP.<br />
When we have figured out if this is possible, the default usb-connector of the GPS reciever doesn't need to be modified to fit the telnet usb port at the bottom of the AR. Drone 2.<br />
<br />
Because of the great support of GPS modules inside paparaazi, we don't have to implement the GPS module inside paparazzi ourself.<br />
<br />
=== AR.Drone 2 Sign convention ===<br />
* [[AR_Drone_2/sign_convention]]<br />
<br />
== Manuals and guides ==<br />
* [[Step by step guide for beginners]]<br />
* [[Developers Manual]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]] [[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23937TU Delft - Search and Rescue with AR Drone 22017-11-28T09:25:20Z<p>Titus: Fixed links</p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2#login_to_console_on_AR.Drone2_via_telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2#Transfer_files]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
Now the necessary raw data can be obtained and the actuators can be controlled, it's time to focus on paparazzi. This section consists of three parts. The first part deals with integrating the AR.Drone2 into the paparazzi libraries, the second part deals with compiling paparazzi for the drone. The final part gives some aditional information on the paparazzi architecture. More information on how to install paparazzi can be found [[installation|here]].<br />
<br />
=== Using Paparazzi===<br />
<br />
This parts describes the process of adapting the paparazzi libraries to make them compatible with the AR.Drone’s hard en software.<br />
<br />
*[[AR_Drone_2/Paparazzi_Integration]]<br />
<br />
=== Compiling===<br />
<br />
Finally paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[compiling paparazzi for the AR.Drone2]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2/JSBSIM .xml Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23934TU Delft - Search and Rescue with AR Drone 22017-11-28T09:14:21Z<p>Titus: /* General project information */</p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2/Telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2/FTP]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
Now the necessary raw data can be obtained and the actuators can be controlled, it's time to focus on paparazzi. This section consists of three parts. The first part deals with integrating the AR.Drone2 into the paparazzi libraries, the second part deals with compiling paparazzi for the drone. The final part gives some aditional information on the paparazzi architecture. More information on how to install paparazzi can be found [[installation|here]].<br />
<br />
=== Using Paparazzi===<br />
<br />
This parts describes the process of adapting the paparazzi libraries to make them compatible with the AR.Drone’s hard en software.<br />
<br />
*[[AR_Drone_2/Paparazzi_Integration]]<br />
<br />
=== Compiling===<br />
<br />
Finally paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[compiling paparazzi for the AR.Drone2]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2/JSBSIM .xml Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=TU_Delft_-_Search_and_Rescue_with_AR_Drone_2&diff=23933TU Delft - Search and Rescue with AR Drone 22017-11-28T09:13:18Z<p>Titus: /* Introduction */</p>
<hr />
<div>[[Image:2012-10-03 12.40.46.jpg|thumb|right|400px|TU Delft Minor Robotics: Quadrotor Group 1]]__TOC__<br />
<br />
== Introduction==<br />
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.<br />
<br />
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, [https://wiki.paparazziuav.org/wiki/Main_Page 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.<br />
<br />
== General project information==<br />
<br />
This project was develloped 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 [[ Virtualbox 4.1.22 for Windows Hosts & Ubuntu 12.04 LTS| here]].<br />
<br />
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 eachother's way. So all files assosiated with our project assosiated can be accesed using Github. For beginners, you can read the manual to setup Github for Ubuntu:<br />
<br />
* [[Github manual for Ubuntu]]<br />
<br />
Our git repository is at [https://github.com/RoboticaTUDelft/paparazzi 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.<br />
<br />
== Data acquisition==<br />
<br />
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.<br />
<br />
=== Connecting===<br />
<br />
<br />
For our project the operating system Ubuntu was used, so all the steps described here are for an Ubuntu operating system.<br />
<br />
The connecting was done using Telnet.<br />
<br />
*[[AR_Drone_2/Telnet]]<br />
<br />
The actual transferring of files is done using a File Transfer Protocol (FTP).<br />
<br />
*[[AR_Drone_2/FTP]]<br />
<br />
=== NAV board===<br />
<br />
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.<br />
<br />
*[[AR_Drone_2/NAV board]]<br />
<br />
=== Motor driver===<br />
<br />
Using a similar technique as for the NAV board, the motor drivers were obtained.<br />
<br />
*[[AR_Drone_2/Motor driver]]<br />
<br />
=== GPS===<br />
The GPS we use with the AR.Drone2 is the [[GPS/BU_353|BU-353 GPS]]. To make good use of this GPS we had to create our own driver for it. <br />
<br />
*[[AR_Drone_2/GPS]]<br />
<br />
== Paparazzi==<br />
<br />
Now the necessary raw data can be obtained and the actuators can be controlled, it's time to focus on paparazzi. This section consists of three parts. The first part deals with integrating the AR.Drone2 into the paparazzi libraries, the second part deals with compiling paparazzi for the drone. The final part gives some aditional information on the paparazzi architecture. More information on how to install paparazzi can be found [[installation|here]].<br />
<br />
=== Using Paparazzi===<br />
<br />
This parts describes the process of adapting the paparazzi libraries to make them compatible with the AR.Drone’s hard en software.<br />
<br />
*[[AR_Drone_2/Paparazzi_Integration]]<br />
<br />
=== Compiling===<br />
<br />
Finally paparazzi can be compiled and be put on the AR.Drone 2. This is describes in this section.<br />
<br />
*[[compiling paparazzi for the AR.Drone2]]<br />
<br />
=== Paparazzi architecture===<br />
<br />
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.<br />
<br />
*[[Insight of paparazzi architecture]]<br />
<br />
== Simulation==<br />
<br />
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]].<br />
<br />
=== JSBSim===<br />
'''Creating A Flight Dynamics Model'''<br />
<br />
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 [http://jsbsim.sourceforge.net/ 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, [[JSBSim|Installing JSBSIM]].<br />
<br />
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 [http://jsbsim.sourceforge.net/aeromatic2.html 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.<br />
<br />
*[[AR_Drone_2/JSBSIM .xml Configuration File]]<br />
<br />
=== Flightgear===<br />
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 [http://www.flightgear.org/ Flightgear website].<br />
<br />
== Autonomous Search and Rescue Mission==<br />
<br />
This section deals with the final stage of our project of making the further developing the AR.Drone2 into a quadrotor performing an autonomous search and rescue mission. First autonomous flight is discussed, next the features in order to perform a search and rescue mission are discussed. <br />
<br />
{delete}<br />
<br />
=== Search and Rescue Features===<br />
<br />
*[[AR_Drone_2/Mapping]]<br />
*[[AR_Drone_2/Hull Desing]]<br />
*[[AR_Drone_2/Image recognition]]<br />
<br />
[[Category: TU Delft - Autonomous Quadrotor]]<br />
[[Category: Minor Team 1]]<br />
[[Category: AR Drone 2]]</div>Titushttp://wiki.paparazziuav.org/w/index.php?title=AR_Drone_2/AT_Commands&diff=23932AR Drone 2/AT Commands2017-11-28T09:11:06Z<p>Titus: Fix links</p>
<hr />
<div>{|align=right<br />
|-<br />
|<categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>AR Drone 2</categorytree><br />
|}<br />
<br />
The AR.Drone 2 AT command protocol is used to control the AR.Drone 2 over wifi. The full documentation can be found in the documentation of The AR.Drone open API which is available at [http://developer.parrot.com/ Parrot Developer]. The developer guide in the Docs folder of the SDK should explain everything. The basic information is shown below.<br />
<br />
<br />
== Setting up a connection ==<br />
To be able to send AT commands to the AR.Drone 2 you need to connect to the AR.Drone 2 wifi. When connected to the AR.Drone 2 wifi you need to create a connection to the AR.Drone 2 UDP port 5556, where all the AT command will be send over. Because of the latency it is advised to send AT commands every 30 milliseconds and to prevent WIFI connection lost you must send a constructive AT command every 2 seconds.<br />
<br />
== AT commands ==<br />
The AT commands are encoded as 8-bit ASCII characters with a carriage return "<CR>" as a newline delimeter. All AT commands start with "AT*" followed by a command name, a equals sign, a sequence number(starting with 1, which also resets the sequence number), and optionally a list of comma-seperated arguments for the command.<br />
<br />
Here is a short reference of all the available AT commands, for more information see the AR.Drone open API documentation.<br />
* AT*REF (input) - Takeoff/Landing/Emergency stop command<br />
* AT*PCMD (flag, roll, pitch, gaz, yaw) - Move the drone<br />
* AT*PCMD_MAG (flag, roll, pitch, gaz, yaw, psi, psi accuracy) - Move the drone (With Absolute Control support)<br />
* AT*FTRIM - Sets the reference for the horizontal plane (The drone must be on the ground)<br />
* AT*CONFIG (key, value) - Configuration of the AR.Drone 2<br />
* AT*CONFIG_IDS (session, user, application ids) - Identifiers for AT*CONFIG commands<br />
* AT*COMWDG - Reset the communication watchdog<br />
* AT*CALIB (device number) - Aks the drone to calibrate the magneto meter (The drone must be flying)<br />
<br />
[[Category: AR Drone 2]]</div>Titus