Switch branches/tags
Nothing to show
Find file History
Pull request Compare This branch is 1108 commits behind GoogleChrome:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
lib
scripts
styles
third-party
README.md
index.html
main.js
manifest.json

README.md

Parrot AR.Drone 2.0 Controller

This app uses the Gamepad API and the chrome.socket API to communicate with a Parrot AR.Drone 2.0.

The SDK specifies that there are 4 socket connections:

  • UDP 5554: Receiving navdata, i.e. battery, velocities, control state
  • TCP 5555: Receiving H264 video [not implemented]
  • UDP 5556: Sending AT commands for tilt, rotation and elevation
  • UDP 5559: Sending Admin commands

The app connects to port 5556 and sends commands to the Drone depending on which buttons are pressed on the gamepad. The commands themselves are AT commands, which are essentially strings in a specific format. The command strings are concatenated and converted to an ArrayBuffer and sent over the socket connection. Since the protocol in use is UDP there is no guarantee of packet delivery so all commands are sent approximately every 30ms.

When data comes back in it is parsed according to the navdata specification in the Drone SDK documentation. The navdata comes back in as an ArrayBuffer from which numbers are read from fixed byte positions. This includes data on the control state of the drone (flying, hovering, landing, taking off), the battery percentage, its angles, altitudes and velcocities.

Please note: this has only been tested with an Xbox 360 controller

Resources

Thanks to felixge for the Node AR Drone lib, which served as a helpful reference.