Nov 2, 2013

Drone programming

I spent a little time learning how to program a Quadcoptor or Hexacoptor UAVs. We had a small workshop today at GMU. I just started learning how to fly/move/land etc a quadcoptor UAV (Parrot AR Drone 2.0). Quick summary to get things started:
  • Install node.js (build on javacript runtime to make network application)
    • Proceed to installing it with the following steps in terminal
    • ./configure
    •  make
    • sudo make install
  • Download ar-drone library (An implementation of the networking protocols used by the Parrot AR Drone 2.0.)
    • You can do it by another software npm (Node Packaged Modules) which allows user to get node.ja application via command line. Install it first (if you don't have it), then get the ar-drone library using npm:
    • sudo apt-get install npm
    • npm install ar-drone
  • Now create a simple program e.g., test_drone.js which will allow the ar-drone to takeoff and stay hovering for some seconds then land down on earth.
    • var arDrone = require('ar-drone');
      var client  = arDrone.createClient();
      client.takeoff();

      client.after(8000, function() {
          this.stop();
          this.land();
         });
  • Run the javascript from command prompt
    • node test_drone.js
  • Congratulations your drone is flying. You can continue building (see the tutorial) on the program to do some more fun stuffs such as receiving the video output from the drone and make an amazing video of your campus. Here (taken from Quadcoptor and Hexacoptor UAVs) is one that is done in our George Mason University, Fairfax campus.
  • Other reference

No comments:

Down with the Dictatorship!

    "Let them hate me, so that they fear me" - Caligula 41AD