Monday, December 19, 2016

Progress Report 12/19

We were able to run the file from last year, the code without the input. (Drone Control No-Control.js) We tried to understand the code and took some notes on the code. We are currently in progress of taking more notes and understanding more of the code. We took notes on the first half and some of the image processing. We tried to understand what blobs are and what las year did. Last year they used something called morphological operations. We also found that last year tried to find blue and light orange, and they are trying to detect the colors and move the drone away. Please go into their code and read the readme.md. We are also in the process of making a new blog and porting everything over. Slow progress.

Sunday, December 11, 2016

Thursday, December 8, 2016

Progress Report

We were able to make more progress this week. Mr. Lin said that we have to recap what we did this week and take notes so that we won't forget what we did. This week, we were able to get image stream from the drone by using ar-drone modules. If you want, here is a link that will bring you a bunch of ar-drone modules: http://www.nodecopter.com/modules. Heres's the link to the ar-drone png module: https://github.com/Soarez/ar-drone-png-stream. Follow the instructions in the readme.md to install. We had some trouble installing the module at first, but through research we have found that the module needs to be in the folder where you installed felixge's ar-drone module. Open up terminal, then enter /Users. Go to STEM, or whatever local account you logged in. You need to place the ar-drone-png-stream module that you downloaded in there. Then, enter npm install ar-drone-png-stream-master -g. (There is a space between master and -g). It should theoretically install. When installing in terminal, do not follow the instructions. There is also some lag (about 1 second) in the image stream. Remember to connect to the drone's wifi.

Anyways, for the time now, we have also made a program which will run a whole bunch of commands at once, instead of running each command in terminal, which is what we have been doing. We followed the instructions on instructables (how to hack ar-drone). We pasted in the code into sublime text and were able to make a javascript file. To run it, go to terminal and type node, then drag the javascript file in. Make sure to press enter after this and not before node... This will make the drone follow the instructions in the script. In the meantime, we are making the powerpoint presentation and trying to improve the code and stuff.

Good luck!

Thursday, December 1, 2016

Progress Report

We have managed to make the drone fly on one of the computers, A1. We are able to send simple commands to the drone, and we are able to make it take off and land, and we are also able to make the drone hover about 3 feet off the ground. Sometimes the drone doesn't work because of connection errors, and the drone would work 1 day and not the next. However, we think that it doesn't work sometimes actually because of battery issues. We are working on making autonomous programs that will run in Text Wrangler instead of typing lines of code in Terminal, which is what we are currently doing. We will also test other commands and try to remove the altitude limit.

This is what we are able to do so far.

*Don't type the quotation marks!
Steps to make the drone take off and land:
*Connect the computer to the drone WiFi before following the steps!*
1. In terminal, type "node" in order to send javascript commands to the drone.  An icon on the screen should change to ">"
2. After that, type "var arDrone = require('ar-drone');"
There should be a return value "undefined".


3. After that, type "var client = arDrone.createClient();"
There should be another return value "undefined". 
4. You can now start sending commands to the drone. This command will make the drone take off and hover at about 3 feet. Type "client.takeoff();"
There should be another return value "true". 
5. This command will make the drone land. Type "client.land();"
There should be another return value "true". 

6. You can also make the drone spin clockwise and counterclockwise using "client.clockwise(1);" and "client.counterClockwise(1);". You can change the speed in which it rotates by changing the values in the parentheses from 0 to 1.