3D display of the AR.Drone in a browser.
This is an in-browser 3D model of an AR.Drone that shows telemetry live using three.js.
See a demo at http://wiseman.github.io/ardrone-browser-3d/
To run it with your drone, first do
Then connect to your drone's wifi and start the app:
Now point your browser at http://localhost:3000/, pick up your drone and make it dance.
Alternately, if you don't have a drone handy, you can press the "Play" button on the page and watch the playback of some telemetry data I recorded with my drone.
This is just a simple, ugly hack:
Take the "ar drone 2.0 bleu" Sketchup model by tototech and tweak it a little.
Start with eschnou's
modify it a bit. Really I just use it to get the navdata websocket,
but this entire project could be a plugin for
Create a subclass of
THREE.Object3D that knows how to transform
rotations from the AR.Drone frame of reference/coordinate system into
the three.js coordinate system:
varTHREEObject3Dcallthis;thisaddmodel;ObjectcreateTHREEObject3Dprototype;var PI180 = MathPI / 180.0;var euler = navdatademorotation;var m = ;// I couldn't find documentation on the AR.Drone Euler angle order,// but this seems to work.mmakeRotationFromEulereulerroll * PI180euleryaw * -PI180eulerpitch * PI180'YZX';thismatrix = m;thismatrixAutoUpdate = false;thisupdateMatrixWorldtrue;;