node c:\Drone\video.js Go to your web browser (any one will work) and go to the following website (you can just copy/paste it): You will now be getting a stream of the video that your drone is viewing through the front camera! You can see a picture of what mine was viewing along with some of my bookmarks :) CONGRATS! You are now set to begin doing some awesome stuff with you drone. after(5000, function() ) Now run this program by typing the following line into the command line window that opened when you ran ffmpeg. down(speed) - makes the drone reduce altitude clockwise(speed) - drone spins clockwise counterClockwise(speed) - drone spins counter-clockwise front(speed)/back(speed) - changes the pitch causing horizontal movement left(speed)/right(speed) - changes the roll causing horizontal movement stop() - keeps the drone hovering in place (for complex functions like flips and manuevers, check out the README file linked above) All of these functions can be used in a long list with a dedicated time between them by using the format: client. takeoff() - has the drone takeoff and hover above the ground land() - has the drone land up(speed) - has the drone gain altitude at a speed between 1 (max speed) and 0 (still). You should also check out Felixge's README file that was included with the ar-drone library as it has tons of beneficial information. Below I show the name and describe what they do. To write more complicated programs you will just have to know a few functions that the drone is capable of. Now you have everything you need to autonomously fly your drone. Check the next step on how to run this program. This will have the drone takeoff, hover for a few seconds, and then land. Then when saving the program make sure to save the file with '.js' at the end of the name and it will automatically become a JavaScript file! For now copy my simple program in the picture and save it as 'test.js'. Just download it and then upon opening it will open a new file we will type all the lines of our code directly into Sublime Text, as shown in the picture for this step. We will need a text editor to write our code in, I recommend Sublime Text. If you are interested you can read up on it HERE. Don't fear if you don't know JavaScript we will mostly be using the same cut and paste commands. To do this we will need to write programs in JavaScript. This is a huge advantage over what we just did because rather than typing the code line by line we can send a whole program to the drone and it will execute it sequentially for some flawless and exciting flight. Now the exciting part! We will make some autonomous programs for the drone. As long as Terminal doesn't throw any errors you are all set to start controlling the drone with your computer! For help using Terminal check this resource. Once open type the following line of code and hit enter: sudo npm install ar-drone This will give you access to Felixge’s node.js library so that you can use high level commands such as 'takeoff()' and 'leftFlip' to control the drone. Then just click on the program called Terminal. The easiest way to open it is to click in the Spotlight search bar in the upper right hand of your desktop screen and type 'Terminal'. FOR MAC: The command line program on a mac is called Terminal. As long as the Command Prompt doesn't throw any errors you are all set to start controlling the drone with your computer! For help using the Command Prompt check this resource. Once you have the program open type the following line of code and then hit enter: npm install ar-drone This will give you access to Felixge’s node.js library so that you can use high level commands such as 'takeoff()' and 'leftFlip' to control the drone. FOR WINDOWS: The command line program is called 'Command Prompt' and on recent windows versions can be opened by going to 'Start' and searching through the programs or viewing 'all apps'. Follow the instructions for your type of computer. This is a great showcase of how real-time custom AI can run on edge devices, such as a drone.Now we will do a bit of work with the command line. The drone is then able to fly around and send an alert to Azure IoT Hub every time it successfully identifies an animal. These containers were then deployed to Azure IoT Edge and then pushed to a drone running a custom board and a Nvidia GPU. We then pushed the images into Custom Vision service and trained a model to identify each type of animal in the field.įrom there we exported the trained model into TensorFlow format and pushed it into Docker containers. We then created a Python script to fly the drone around the simulated environment and take many pictures of the animals. For this search and rescue scenario, we created a 3D-generated environment in AirSim to simulate the soccer field on Microsoft campus and placed stuffed animals on the field.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |