 Hello everyone, I am Sharmila Devi. I am going to talk about playing a drone autonomously with the help of JavaScript. Consumer drones have arrived. They are really starting to make a huge impact in the market. So what are these drones? The drones are playing objects that you can programmatically control. For that the JavaScript is increasingly becoming more easier to use on a drone and there are lots of libraries that are coming up. Those libraries not only let you do the basic flying, they let you build on top of it and make some cool stuff. Let's discuss about computer vision. Computer vision is a field of understanding images. It has been considered the holy grail of autonomous vehicles. How about being able to mix the computer vision and the drone together? If we mix, we will get the ability to fly a drone autonomously. So that is and let's see how we are using the JavaScript here. This is my talk here. First I will walk through the library called Airdrone Autonomy. This is used to control your flight autonomously. And then I will walk through the library node OpenCV. This has the bindings of OpenCV which is used for image processing. And then I finally I will demo with some interesting stuff with my drone. This is a drone that I'm going to use which is Parrot Airdrone 2.0. Let's discuss about library Airdrone Autonomy. It is an autonomous flight library. This is built on top of Node Airdrone library. This Node Airdrone library is used for controlling your flight. And this Airdrone Autonomy library uses extended Kalman filter that is EKF and TID controller. This extended Kalman filter is used to estimate your drone's position more accurately. And this EKF is using onboard tag detection to estimate drone's position. And this Airdrone Autonomy library has a built in TID controller. This TID controller is used for controlling your drone's movements. And then this library also let you plan and execute a mission autonomously. Now we will have a small demo using this Airdrone Autonomy library. Let's look at the code first. Here I'm going to create a REPL, redevaluate print loop out of Airdrone Autonomy library. And I'm assigning the autonomous controller to the REPL context. Let's try to take off the drone now. First I need to connect the drone's Wi-Fi. So I have created REPL. Now let's take off the drone. It takes off. Let's try to move this drone up for half meter. It moves up. Let's try to rotate this drone in clockwise direction for 45 degree. Yeah, it rotates. Let's try to rotate in counterclockwise direction. Let's land it. Now you come to know how to control the drone using Airdrone Autonomy library. Let's move on to image processing part of things. We have OpenCV, which is open source computer vision library. This is written using C++. And this OpenCV gives you many algorithms, many computer vision algorithms repackaged with it. So our node OpenCV gives you bindings of OpenCV and for node environment. So with that you can control many algorithms like face reduction, object tracking, reduct shapes, etc. Now let's try to connect the drone with OpenCV. Let's first discuss about the code. This PN stream is stream of images that comes from drone. This listener is listening for images and saving the image in image stream object, sorry image stream variable. I am giving this image stream as an input to OpenCV and asking it to detect object using direct object algorithm and I am asking it to find faces in the image using face underscore cask n model. After finding the faces, I will draw ellipse around each faces. Let's run this code and see it in browser. I am sorry it's an old image, it is moving up, wait for few seconds it will take photo, time out. I will try one more time, sorry some problem, anyone try to connect this drone's Wi-Fi? No right? No. Okay we will try one more time and then, no, no, okay, actually it should have done like this. This one was taken in the regressors, okay let's move on to next. It should find a face and make ellipse like this, next we will try to make little more fun. I think it's going to be very fun, this face tracking next we will try to make face tracking and this we will make the drone to look for your face and orient itself towards your face. I think we can try another battery, okay let's discuss about the code for face tracking this is same as like what we have seen in the last demo, we are listening for image streams and we are detecting faces and we need to take a biggest face among the directed faces and we need to find the distance between center of face, I mean directed biggest face and the center of the whole image, if the difference, if the y-axis difference is negative we need to move the drone in downwards, if it is positive we need to move the drone in upwards, if the x-axis difference is negative we need to rotate the move in clockwise direction, if it is positive we need to move the drone in counterclockwise direction, let's try this, it is not coming. It is moving up, okay I will show you a video, that is how it should work, it is moving up, now it started to detect, I mean track his face, he is making, he is trying to make a circle, trying to sit, the drone also comes down, now he went totally out of the drone's camera image, so it stopped detecting, this is how it should work, but I don't know my bad luck, no it did work yesterday right, yeah yesterday when we did the regressors it worked, yeah last week we both came here and tested everything, sorry, yeah I think this is not because of the lightings, maybe some problem with the drone wifing, yeah we don't have time for Q and A, and I have borrowed or used these libraries and images, thank you.