ArDrone SDK 1.8 added
[mardrone] / mardrone / ARDrone_SDK_Version_1_8_20110726 / Examples / Android / ardrone / README
1
2 This is a quick'n'dirty demo app for controlling an AR drone with an
3 Android phone. It was originally based on the "San Angeles" NDK demo app.
4 It was written to quickly test the following implementation choices:
5
6  * display video stream in native code using OpenGL ES
7  * retrieve events (touch, trackball, orientation sensor) in Java code and
8  pass data to native threads
9
10 The native application itself is derived from a sample linux PC code (not from
11 the iPhone app), it consists in a few threads:
12  - the "AT commands" thread sends control frames to AR drone
13  - the "NAV data" thread receives navigation and status data from AR drone
14  - the video thread receives a compressed video stream (encoded in a
15    proprietary codec, UVLC) from AR drone
16
17 Note: this demo app should *not* be used as a basis for a real port of the
18 iPhone AR drone application.
19
20 HOW TO USE
21 ----------
22 1) Setup wifi connection to drone in ad-hoc mode (currently not possible in
23 Android), or to an access point, ONLY if drone has been flashed in "PC mode".
24 2) Launch AR drone app; a video stream should be displayed
25 3) Hold your phone in landscape mode with the trackball on the left
26 4) Tap the screen on the bottom left corner to take off/land
27 5) Touch the right part of the screen to control gas (up/middle/bottom)
28 6) While touching the screen or pressing the trackball, you can use phone
29 orientation to control flight
30 7) Press and roll the trackball to control yaw
31 8) Release touchscreen and trackball to return the drone back into fix-point
32 mode
33
34 TODO/NOTES
35 ----------
36 - implement proper thread resource management and synchronization
37 - adjust thread prorities (AT commands should get the highest prio)
38 - Use RENDERMODE_WHEN_DIRTY in order to render video only when a new frame has
39 been decoded; this probably means calling requestRender() from native code.
40 - understand Wi-Fi issues: we seem to have a lot of trouble connecting from
41 Android phone to AR drone via an Access Point.
42 We should probably try ad-hoc mode like in the iPhone app, but this does not
43 seem to be supported in Android ?
44 - improve control ergonomy
45 - Nexus One trackball seems to miss press/release events (?), thus it is not
46 usable as an orientation mode switch; keep a finger on the touch screen to use
47 orientation mode.