Nodecopter Pivotal

Nodecopter Pivotal

8ddbf811da78bb0daeeb3cacd7cf743f?s=128

Andrew Nesbitt

July 29, 2014
Tweet

Transcript

  1. Nodecopter

  2. andrew

  3. None
  4. Felix Geisendörfer

  5. AR Drone 2.0

  6. HD Camera Downfacing camera Gyroscope Wifi 1GHz CPU Linux Accelerometer

    Magnetometer Ultrasound
  7. ardrone2.parrot.com/developer-zone

  8. None
  9. Node.js is a platform built on Chrome's JavaScript runtime for

    easily building fast, scalable network applications. Node.js uses an event-driven, non- blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  10. None
  11. Server-side Javascript Asynchronous Runs on v8 from Chrome Perfect for

    network programs
  12. http://nodejs.org/download/ ! nodejs.org/download v0.10.29 $ node $ NPM install ar-drone

  13. var arDrone = require('ar-drone');
 var client = arDrone.createClient();
 
 client.takeoff();


    
 client
 .after(3000, function() {
 this.up(1);
 })
 .after(2000, function() {
 this.stop()
 this.clockwise(1);
 })
 .after(3000, function() {
 this.stop();
 this.land();
 });
  14. shama.github.com/voxel-drone

  15. Demo Time

  16. WARNING WARNING

  17. QR CodeR

  18. Dance Mat Drone

  19. Kinect Drone

  20. robot laser pong

  21. matador-copter

  22. $ telnet 192.168.1.1

  23. # busybox | head BusyBox v1.14.0 () multi-call binary Copyright

    (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko and others. Licensed under GPLv2. See source distribution for full notice. ! ! # cat /proc/version Linux version 2.6.32.9-g1dd1a2a (stephane@stephane-pc) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #1 PREEMPT Thu May 30 19:21:53 CEST 2013 ! ! # uname -a Linux uclibc 2.6.32.9-g1dd1a2a #1 PREEMPT Thu May 30 19:21:53 CEST 2013 armv7l GNU/Linux ! # df -h Filesystem Size Used Available Use% Mounted on ubi1:system 26.3M 21.7M 3.3M 87% / tmp 57.7M 644.0K 57.1M 1% /tmp dev 57.7M 0 57.7M 0% /dev ubi0:factory 4.8M 76.0K 4.5M 2% /factory ubi2:update 13.2M 28.0K 12.5M 0% /update ubi2:data 53.5M 14.0M 36.8M 28% /data
  24. $ ftp -u ftp://anonymous:anonymous@192.168.1.1/file file ! $ telnet 192.168.1.1 !

    # ls /data/video ! # file ! ** bug in tar unpacking ** ! # ls /data/video/usb
  25. None
  26. # ls /data/video/usb ! ar-drone ! # cp -r /data/video/usb/ar-drone

    /data/video/
  27. https://github.com/felixge/node-cross-compiler

  28. # https://github.com/felixge/node-cross-compiler ! $ git clone git://github.com/felixge/node-cross-compiler.git $ cd node-cross-compiler

    $ ./helpers/ardrone2.sh
  29. #!/bin/bash set -eu ! if [ ! -e build/bin/node ];

    then echo "-> Spinning up VM" vagrant up echo "-> Building node binary" vagrant ssh -c "cd cross-compiler && ./setup-vm.sh && make ardrone2" echo "-> Halting VM" vagrant halt echo "-> To completely remove the VM, please execute 'vagrant destroy'" else echo "-> Skipping build (node binary exists)" fi ! echo "Would you like to install node on the drone? (Connect now) [Y/n]" read a if [[ $a == "Y" || $a == "y" || $a = "" ]]; then echo "-> Uploading binary" ftp -u ftp://anonymous:anonymous@192.168.1.1/node build/bin/node echo "-> Installing" { echo "cd /data/video && mv ./node /bin && chmod u+x /bin/node && rm -rf node && exit"; sleep 1; } | telnet 192.168.1.1 echo "-> Installation completed!" else echo "-> Build completed!" fi
  30. var arDrone = require('..'); var http = require('http'); ! var

    client = arDrone.createClient(); client.disableEmergency(); ! navData = {} ! client.on('navdata', function(data){ navData = data; }); ! var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Type': 'application/json'}); res.end(JSON.stringify(navData)); }); ! server.listen(8080, function() { console.log('started server on http://192.168.1.1:8080') });
  31. var arDrone = require('..'); var http = require('http'); ! var

    client = arDrone.createClient(); client.disableEmergency(); ! navData = {} ! client.on('navdata', function(data){ navData = data; }); ! var server = http.createServer(function(req, res) { res.writeHead(200, {'Content-Type': 'application/json'}); res.end(JSON.stringify(navData)); }); ! server.listen(8080, function() { console.log('Serving latest png on port 8080 ...'); client.takeoff(); ! client .after(5000, function() { this.clockwise(0.5); }) .after(5000, function() { this.stop(); }) .after(1000, function() { this.stop(); this.land(); }); console.log('started server on http://192.168.1.1:8080') });
  32. https://gist.github.com/maxogden/4152815

  33. None
  34. virus-copter github.com/substack/virus-copter

  35. None
  36. CoderDojo

  37. None
  38. None
  39. None
  40. None
  41. None
  42. nodecopter.com

  43. robotsconf.com December 6-7 2014 Florida

  44. Thank You @teabass

  45. Thank You @teabass