Thursday, November 29, 2012

Got the ar.drone node.js stuff running!

More details to follow, but some quick notes on what we needed to do to get things up and running.  Got up to the suggested first steps, having an application capture video from the ar.drone front camera and do facial recognition.  Images were fed out through a node.js server, which I thought was a pretty clever idea. I'm so happy in the picture coz it took about an hour to figure out how to get the image displayed.  If you're in node.js, serve it up in a browser!

In case you can't puzzle it out, the circled object is Andreas' face, as detected by Open CV. Detection parameters were set to "boyish good looks" of course!

So, we're on track for the droneolympics on Saturday!  Andreas is working on a PID package which looks pretty good so far. I was pretty happy with our progress... we basically started on Wed and last night was the first time we had an ar.drone to work with.

Here's a video of the first test flight, running the example ardrone program.

Following is some blabbage on what I did to get the software installed and running on a mac.  After spending 30-40 minutes trying to figure out how node.js packages work, I ended up hardcoding paths to everything... I'll try and fix that later.

    configure --prefix=/Users/mh/nodejs
    make; make install
    export PATH=/Users/mh/nodejs/bin:$PATH

  OpenCV-2.3.1a.tar.bz2, as per nodejs opencv docs
  edit CMakeLists.txt
  ## change /usr/local to /Users/mh/nodejs
  cmake -G "Unix Makefiles"; make; make install
  export DYLD_LIBRARY_PATH=/Users/mh/nodejs/lib

  npm install git:// -g


  ## requires OpenCV 2.3.1
  npm install opencv -g
  ?? export PKG_CONFIG_PATH=/Users/mh/nodejs/lib/pkgconfig


  1. hey could you tell me how to install node.js.
    Do i install it on my computer or on the drone.
    and where do i install the node-ar-drone thing.
    I am new to this.


    1. You bet... everything you need is here. The ar.drone runs a custom version of linux, so it's easy to install directly onto the unit.

    2. Thanks. but still I dont understand. Where do I install node.js on my laptop or on my drone itself?

  2. Your article seems to be more informative. Drone nodes have the ability to recognise faces and that is awesome. The face will be recognised only if the images are fed to a controller laptop.
    Drone Nodes