The YADrone distribution ships with a demo application called Paper Chase to demonstrate how to build applications and to use the API.
What it's about ?This application is similar to a real Paper chase, a kind of racing game. You are designated the hare and the drone is the hound. The hare starts off placing several shreds (QR codes) on the ground or on walls. Later on, the hound starts and has to find all the shreds. The faster the better.
This is a game you can either play with your drone (e.g. one after another against each other) or you can use it to test some intelligent algorithms to let the drone autonomously find the shreds.
How does it work ?At first, you have to print several QR Codes (download [ here ]) and stick them somewhere to the ground or to walls. Afterwards you start the Paper Chase application (see de.yadrone.apps.paperchase.PaperChase). The application will connect to your drone and display the video stream of the vertical camera (if the drone resides on the ground, it's mostly black or gray). Depending on whether you are looking for shreds on the ground or sticked to the wall you can toggle between different camera streams by clicking on the video.
You can now control the drone using your keyboard (see the keyboard layout for key settings). Navigate to an arbitrary shred and try to get it focused. If it's focused, you will see a triangle indicating it's code and on the screen the corresponding shred-ID is highlighted in green. Once all shreds have been found, the game is over. You can see the overall time it took in the upper right corner of the screen.
DifficultiesThe vertical camera only has a resolution of 320x240 pixels (QVGA). The horizontal camera uses real VGA (640x480) and therefore it is much easier to detect tags. To raise the level of difficulty use smaller shreds. The direction of a shred is not of importance. QR codes are recognized even if they are rotated.
Autonomous FlightIt's fun to fly with the drone, but it's also fun to program the drone to fly autonomously, to stray around and look for tags all by itself. YADrone is well suited to implements such behaviour. The demo application ships with an auto-controller (see de.yadrone.apps.paperchase.controller.PaperChaseAutoController which tries to achieve this. But, it's a dumb controller based on slight random movement. Nevertheless, you can use it as a basis to implement more sophisticated behaviour.
[ Back ]