Autonomous Quadrocopter

From MCS Wiki
Jump to: navigation, search



Using a pre-built Quadrocopter drone with sufficient hardware and software capabilities, build a Web API that consists of functions that allows the user to create an instance of series of commands that can be sent to the drone. Upon that communication, the drone will carry out those commands in a successive manner. The API will provide a live feed from the on-board video camera of the drone as the commands are carried out.


Ever since I was younger, I have been fascinated with robots and the field of robotics. I used to create basic robot designs using the Lego Mindstorms software and hardware. I chose this type of project because even though I have basic experience with robotics, I have never done something quite as in depth and advanced as this.

Hardware and Software



  • JavaScript and HTML languages
  • Node.js Software Platform
    • Essential Node Modules Used:
      • http
      • node-ar-drone
      • dronestream
      • ardrone-png-stream
  • npm Package Manager for Node.js
  • gedit Text Editor
  • Application was tested with Google Chrome and Mozilla FireFox Web Browsers
  • Developed on Ubuntu 12.04 LTS Operating System

Research and Development

Beginning Ideas

My original idea for this project was to build a Quadrocopter drone from scratch and develop autonomous software to be implemented onto the hardware configuration that I had designed. I researched and compiled information about: the numerous parts I would need, the building process of the frame, the wiring of the hardware, and the software development. After consideration of everything I had to do, I had doubts on whether or not I could handle a project of this difficulty. After talking with a few professors, I decided that the best course would be to use a pre-built Quadrocopter drone and implement the autonomous software onto the drone. After talking to Josh Moore, Him and I decided that the Parrot AR.Drone 2.0 would be the best bet for a pre-built drone. It has numerous capabilties that would make development much easier.

Best Implementation

This project required extensive research in order to move forward. One thing that I spent countless hours researching was the different implementations of applications to the AR Drone. From C++, to Javascript, to Clojure, there are many different languages that developers have used in order to implement their own vision of a proper application. I wanted to find something that I could easily implement in a language that I best understood. I started off researching the many developments using the AR.Drone SDK published by the AR.Drone Development team. This SDK is optimized for C++, so I thought that I could easily find and implement the functionality that I needed. After weeks of pouring over extensive source code in the SDK, and the various libraries that the SDK used, I did not make much progress in development, much less understanding what I was looking at (due to the convoluted documentation). After a while of more research, I realized that I wanted to create a way for the user to better use the software I was going to develop. Instead of just having the user navigate the software by using the command prompt, I decided to create a web application so that the user could easily navigate the API. I found numerous developments on AR Drone Web APIs using JavaScript and HTML. Having a little knowledge about JavaScript and HTML, and drawing inspiration from these other developments, I decided to go with this approach.

Using Node.js

The only web development that I have done in the past has been with Python and PHP, so using Node.js was a new experience for me. The first thing that I had to research and become accustomed to was the communciation between JavaScript and HTML. This included exploring websites like W3Schools and HTML Dog. I also inquired my father, who is a software engineer that frequents Web development using JavaScript and HTML. I had to research how to set up a server for the streaming of information from from the Drone to the browser. In order to properly do this, I found that I needed some essential Node.js modules like: http, buffy, ws, and various node modules that have been developed for use with the AR. Drone.

AR. Drone Node Modules

I found that there has been some development by casual AR.Drone developers using the Node.js software platform. They packaged and deployed their developments into node modules using the npm package manager. Some of these modules proved more help than others. Their capabilities range from extracting raw data from the drone, to controlling the drone through a browser-based application. I drew the inspiration for my browser-based application from the latter. There are a few modules that I wanted to implement in my application included those that utilize image processing to track movement. But due to lack of documentation, I could not interpret the module for proper usage. A few modules that I used can be found in the Software section of the page.

Issues and Challenges

One of the main problems that I had to search through endless lines of source code in the AR.Drone SDK in order to understand what the code was doing because the documentation was either too vague, or not there at all. Also, there is such a small community of people that design software layers on top of the AR. Drone that there was little support and documentation on the various packages needed to be installed in order to use the functionality of many parts of the SDK. I would get endless, confusing errors that I could not seem to find the solution to. This led to much frustration as I was forced to switch to a different language that seemed to have more documentation. First, I started with C++ as the SDK was optimized for C++ and it is the language I was most comfortable with. After a few weeks of struggle, I decided to wipe what I had and start anew. I switched to a language called Clojure which is a dialect of Lisp, in hopes of having an easier time with the software design. After a week or two of more struggle, I had not made much progress. So once again, I decided to switch languages. This time I switched to JavaScript. This is the language I would ultimately stick with because there was enough documentation online and the design process and functionality of the language made things much simpler.

Autonomous Functionality through Image Processing

The autonomous capabilities that I wanted to implement onto the drone using image processing for proved a difficult task. I ended up having to somewhat scrap the idea for a few reasons. The best implementation that I found for that type of functionality was found using the AR.Drone SDK optimized for C++, and OpenCV image processing software. I poured through source code files of both the SDK and OpenCV, trying to make sense of the their functionality and proper implementation. I tried to develop basic programs to see if I was going in the right direction. I searched online for applications similar to the one I envisioned that used both libraries in order to get a better grasp of the direction I needed to head. After examining those applications, the only understanding that I had was based on solely on the implementation of those particular applications, not of the libraries themselves. And in order to not plagiarize their code, I decided to scrap the idea of the image processing functionality using the SDK and OpenCV libraries.

Possible Future Developments

One of the things that I wanted to include in the software was autonomous functionality using the video camera and image processing software. My vision at the beginning of project development was to have a detection-based algorithm that when the drone detects a face of a human, it locks-on to their body signature, and follows them wherever they go.

Personal tools