JFall 2014 - A Storm of Drones
-
Upload
dennis-vredeveld -
Category
Software
-
view
105 -
download
2
Transcript of JFall 2014 - A Storm of Drones
![Page 1: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/1.jpg)
![Page 2: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/2.jpg)
Inleiding
• Verdieping van Game of Drones • Technische uitleg van het systeem
• Frameworks, libraries, componenten • Problemen en uitdagingen
• Anders dan standaard JEE • Besturing vereist AI
2
![Page 3: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/3.jpg)
Artificial Intelligence 101
3
Nodig voor autonome drones
Basisopzet van een AI-systeem: • Sensing: zintuigen,
“aanvoelen” van de omgeving
• Interpreting: interpreteren van de waargenomen waardes, bepalen acties
• Acting: uitvoeren van acties
Interpreting (Behaviors)
Acting(Drone
aansturing)
Sensing(Analyzers)
![Page 4: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/4.jpg)
Subsumption architecture
4
Sensors'
Actuators'
Scenario'
Behaviour1'
Behaviour2'''''''
Besturing van meerdere drones en de presentatie “Mastermind” van het geheel
Besturing van een enkele drone, autonome operatie Directe interactie met een drone
Opdeling in herbruikbare tasks en behaviors die tasks combineren,
uitschakelen of beïnvloeden
![Page 5: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/5.jpg)
Sensing: opzet
• Verschillende sensoren • Video, hoogte, gyroscoop…
• Analyzers • Sensing implementatie o.b.v. sensordata drones • Bv. patroonherkenning
• Verschil tussen analyse van eigen sensoren en externe apparaten • Eigen: continue stroom • Extern: event gebaseerd
5
![Page 6: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/6.jpg)
Sensing: blackboard pattern
6
Verzamelplek van features
Verschillende analyzers als knowledge source die “Features” op het blackboard plaatsen
Interpretation deel: activeert Analyzers en interpreteert “Features”
![Page 7: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/7.jpg)
Sensing probleem: lokalisering
• Indoor == GPS onbruikbaar • Geen absolute informatie behalve hoogte
• Behaviors vereisen dit wel • Relatieve informatie te onnauwkeurig • Oplossing: patroonherkenning
• Gezichtsdetectie: OpenCV • Kleurherkenning: home made
• Confidence • Scale back
• Focussen en details7
![Page 8: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/8.jpg)
Interpreting - Behaviors
• Interpreting: • Goal - Sensing == ERROR
• Behavior: autonoom stukje gedrag • Bepaalt goal en daarmee besturing
• Javascript/Java koppeling • Scenario’s en Behaviors zijn steeds
verschillend • Realisatie veel trial-and-error • Verkorten van de develop/build/run cycle
8
![Page 9: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/9.jpg)
Demo
9
![Page 10: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/10.jpg)
Interpreting probleem: stabiliteit
• Automatische besturing noodzakelijk • Geen menselijke correcties meer • Wegregelen verstoringen en vertraging
• Probleem: stabiliteit, overshoot • Oplossing: betere feedback loop
• Vele kleine correcties • PID regelaar
10
![Page 11: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/11.jpg)
Interpreting: PID
11
• Proportioneel, integraal, afgeleide
• Extra: reageren (I) en anticiperen (D)
• Makkelijk te realiseren, moeilijk te configureren • Trial & error
• x,y-as, z-as, rotatie
![Page 12: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/12.jpg)
Acting
• Beperkte mogelijkheden • Hardware constraints
• Onnauwkeurigheid • Extern (bv. wind) en intern (bv. wrijving) • Sensing detecteert daadwerkelijke resultaat
• Relatieve besturing • “Ga 0,5s naar rechts met 25% vermogen”
12
![Page 13: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/13.jpg)
Opzet
13
![Page 14: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/14.jpg)
Componenten
14
![Page 15: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/15.jpg)
Voorbeeld: Kong
15
1
2
Wijs drones toe aan teams
![Page 16: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/16.jpg)
Voorbeeld: Kong
16
1, 2
Start Kong scenario
3
![Page 17: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/17.jpg)
Voorbeeld: Kong
17
1, 5
Start game
2
3 4
![Page 18: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/18.jpg)
Voorbeeld: Kong
18
1
Playing game
2 3
4
![Page 19: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/19.jpg)
Voorbeeld: Kong
19
1
Einde scenario
2 3
4
![Page 20: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/20.jpg)
Frameworks
20
YADrone: •Java-implementatie van ARDrone SDK
Vert.X: •Remoting, Eventing en Bus
OpenCV: •Standaard Library voor implementatie computer vision
Augmenters & video streaming
Reveal.js, AngularJS •HTML5 Presentatie framework
![Page 21: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/21.jpg)
Vert.x
21
JVM/Vert.x Container
Bus (Hazelcast)
events
Verticle Behavior Verticle
Timer
Analyzer
new Thread() .start()
![Page 22: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/22.jpg)
YADrone
• 100% java-based framework voor ARDrone • Reverse engineered vanaf
ARDrone SDK • Veel bugs
• CommandManager, ConfigurationManager VideoManager, NavDataManager • Listener-producer • Vertaling naar AT-Commandos
22
![Page 23: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/23.jpg)
Augmenters & Video streaming
• Video pipeline implementatie • Augmenters voor presentatie
23
Analyzers
Augmenters Encoder
![Page 24: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/24.jpg)
Presentatie
• Reveal.js als HTML5 presentatie framework • Externe interactie —> Integratie met
AngularJS • Draait als verticle binnen Vert.x • Interactie scenario’s - presentatie
• —> Go to slide x • —> Start video stream • —> Start muziek • <— Start scenario
24
![Page 25: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/25.jpg)
Problemen
25
![Page 26: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/26.jpg)
dd Defcon
Video streaming
• MJPEG stabiliteit • Delay/encoding (RTMP) • Latency
26
• Stabiliteit: • Socket timeouts (tickle) • Video en navdata hick-ups • Config aanpassingen
• Latency in YADrone • Bandbreedte bij meerdere
drones
![Page 27: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/27.jpg)
Netwerk & Security• Elke drone heeft eigen AP
• unencrypted • first come, first serve
• ARDrone via WPA2 koppelen aan Airport • firmware aanpassing noodzakelijk • m.b.v. Android app
27
![Page 28: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/28.jpg)
Vragen?
28
![Page 29: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/29.jpg)
Links• YADrone: http://vsis-www.informatik.uni-hamburg.de/oldServer/teaching//
projects/yadrone/ • YADrone (Salves versie met bugfixes): https://github.com/ronsmits/YADrone • ARDrone WPA: https://github.com/daraosn/ardrone-wpa2 • ARDrone SDK: https://projects.ardrone.org/ • Subsumption architecture: http://en.wikipedia.org/wiki/
Subsumption_architecture • Java ScriptEngine: http://docs.oracle.com/javase/7/docs/api/javax/script/
ScriptEngine.html • PID Controllers: http://en.wikipedia.org/wiki/PID_controller
• MindWave - http://store.neurosky.com/products/mindwave-1 • Reveal.JS: http://lab.hakim.se/reveal-js/#/ • Vert.x: http://vertx.io/ • OpenCV: http://opencv.org/
29
![Page 30: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/30.jpg)
Backupslides
30
![Page 31: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/31.jpg)
PID: Kp
31
![Page 32: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/32.jpg)
PID: Ki
32
![Page 33: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/33.jpg)
PID: Kd
33
![Page 34: JFall 2014 - A Storm of Drones](https://reader033.fdocument.pub/reader033/viewer/2022052912/55a1d8c31a28ab160b8b45bd/html5/thumbnails/34.jpg)
Optioneel: YADrone opzet
34