Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flying robots over a 10.000 mile distance with ...

Flying robots over a 10.000 mile distance with JavaScript.

Talk given remotely for the Sydney JS Usergroup. Unfortunately my screen recording didn't work out : /.

Felix Geisendörfer

November 21, 2012
Tweet

More Decks by Felix Geisendörfer

Other Decks in Programming

Transcript

  1. @felixge felixge What is NodeCopter? • Started as a one-time

    event in Berlin on Oct 5th, 2012 • 60 programmers to program 25 AR Drones for a full day • Amazing venue, old swimming hall with 13m ceilings • Non-profit / cheap tickets (25 EUR)
  2. @felixge felixge 1 day • Computer vision • Voice recognition

    • Gesture recognition • Hardware controls
  3. @felixge felixge 1 day • Computer vision • Voice recognition

    • Gesture recognition • Hardware controls • and more
  4. @felixge felixge Previous Events • Berlin, Oct 5th, 2012 •

    Dublin, Oct 20th, 2012 • San Francisco, Oct 31st, 2012 • Seattle, Nov 8th - 9th, 2012 • Brighton, Nov 10th, 2012
  5. @felixge felixge Upcoming Events • San Francisco, Dec 1st, 2012

    • Florida, May 30, 2013 • + Summer of Drones
  6. @felixge felixge Summer of Drones • 4 weeks in June

    2013 • 10+ NodeCopter events, and 20+ MiniNodeCopter events
  7. @felixge felixge Summer of Drones • 4 weeks in June

    2013 • 10+ NodeCopter events, and 20+ MiniNodeCopter events
  8. @felixge felixge Summer of Drones • 4 weeks in June

    2013 • 10+ NodeCopter events, and 20+ MiniNodeCopter events • North America, Europe, South America and Asia
  9. @felixge felixge Summer of Drones • Drone games / competitions

    • Half autonomous / half human controlled
  10. @felixge felixge Summer of Drones • Drone games / competitions

    • Half autonomous / half human controlled
  11. @felixge felixge Summer of Drones • Drone games / competitions

    • Half autonomous / half human controlled • Spectators for the tournaments
  12. @felixge felixge The Specs • WiFi (b/g/n) Router • 1

    GHz 32Bit ARM Cortex A8 processor • 125 MB DDR2 Memory
  13. @felixge felixge The Specs • WiFi (b/g/n) Router • 1

    GHz 32Bit ARM Cortex A8 processor • 125 MB DDR2 Memory • Linux 2.6.32 you can telnet into it (Busybox)
  14. @felixge felixge The Specs • WiFi (b/g/n) Router • 1

    GHz 32Bit ARM Cortex A8 processor • 125 MB DDR2 Memory • Linux 2.6.32 you can telnet into it (Busybox) • 720p front facing camera (30 FPS)
  15. @felixge felixge The Specs • WiFi (b/g/n) Router • 1

    GHz 32Bit ARM Cortex A8 processor • 125 MB DDR2 Memory • Linux 2.6.32 you can telnet into it (Busybox) • 720p front facing camera (30 FPS) • 240p vertical camera (60 FPS)
  16. @felixge felixge The Specs • WiFi (b/g/n) Router • 1

    GHz 32Bit ARM Cortex A8 processor • 125 MB DDR2 Memory • Linux 2.6.32 you can telnet into it (Busybox) • 720p front facing camera (30 FPS) • 240p vertical camera (60 FPS) • USB 2.0 connector
  17. @felixge felixge The Specs • 3 axis gyroscope (2000°/second precision)

    • 3 axis accelerometer (+-50mg precision) • 3 axis magnetometer (6° precision)
  18. @felixge felixge The Specs • 3 axis gyroscope (2000°/second precision)

    • 3 axis accelerometer (+-50mg precision) • 3 axis magnetometer (6° precision) • Pressure sensor (+-10 Pa precision)
  19. @felixge felixge The Specs • 3 axis gyroscope (2000°/second precision)

    • 3 axis accelerometer (+-50mg precision) • 3 axis magnetometer (6° precision) • Pressure sensor (+-10 Pa precision) • Ultrasound sensors
  20. @felixge felixge The Specs • 3 axis gyroscope (2000°/second precision)

    • 3 axis accelerometer (+-50mg precision) • 3 axis magnetometer (6° precision) • Pressure sensor (+-10 Pa precision) • Ultrasound sensors • Fully reparable - all components can be ordered
  21. @felixge felixge The Idea Parrot AR Drone 2.0 @SydJS Laptop

    @SydJS WiFi @SydJS Router Ethernet Router @Berlin Laptop @Berlin THE INTERNET WiFi
  22. @felixge felixge Reverse SSH Tunnel ssh -NT \ -R 2023:192.168.1.1:23

    \ [email protected] • Connect to my laptop in Berlin ([email protected]) • Forward port 2023 on my laptop to port 23 at 192.168.1.1 (the AR Drone) • -N (do not execute a cmd) -T (disable pseudo-tty)
  23. @felixge felixge netcat udp forwarding # @sydjs ssh -NT \

    -R 6556:localhost:6556 \ [email protected] & mkfifo navdata.fifo nc -l localhost 6556 < navdata.fifo \ | nc -u 192.168.1.1 5556 > navdata.fifo # @berlin mkfifo navdata.fifo nc -l -u localhost 5556 < navdata.fifo \ | nc localhost 65556 > navdata.fifo
  24. @felixge felixge In Sidney • SSH Reverse tunnel for telnet

    and video (ports 23 and 5555) • SSH Reverse tunnel for udp (port 2024) • node.js TCP server on port 2024 listening for incoming connection from Berlin • Incoming tcp data = udp messages • Forwards messages received on tcp server via udp to drone • Also forwards udp messages from drone back to berlin via tcp
  25. @felixge felixge In Berlin • node.js UDP server listening on

    port 5554 (navdata) and 5556 (control) • node.js TCP connection to port 2024 on localhost which is hooked up to port 2024 in sidney • Incoming UDP messages are send to Sidney via TCP • Data received via TCP from Sidney is resend as UDP locally
  26. @felixge felixge Problem • UDP guarantees atomic messages • TCP

    does not (one message may be split into multiple parts, or merged with others)
  27. @felixge felixge Simple Protocol • 4 Bytes: Message Length •

    2 Bytes: Source UDP Port • 2 Bytes: Destination UDP Port • <Message Length>: Message