ofxARDrone build

Hello all, I just have a quick question.

So I’m having trouble building the ofxARDrone addon for working with the Parrot 2.0. I went back and downloaded the last compatible version of OF as well as thenecessary addons but am still having some setbacks in getting a successful build.

I was wondering if anyone has used this addon successfully and if so could you offer advice?

Just got this drone and really excited to start programming it !

Hey Maurice,

I was just able to get ofxARDrone working with OF v0.9.3 with the following steps:

  1. Download ofxARDrone into OF_ROOT/addons
  2. Download ofxARDroneOscBridge into OF_ROOT/addons
  3. Regenerate the Xcode project file with the project generator. If you’ve never done this before you simply point the project path to OF_ROOT/addons/ofxARDrone and make project name example. Once you do this you will see the “generate” button transform into the “update” function and the Addons field will be pre-filled with the necessary addons (ofxARDrone, ofxARDRoneOscBridge, ofxKinect, ofxNetwork, ofxOpenCV, ofxOsc, ofxXmlSettings).

Lastly I had a to modify four lines of code in ofxARDrone::OscBridge::update() (lines 132 - 135 in ofxARDroneOscBridge.h). The compiler can’t find method ofxDrone::State::isFlyingMillis() so I commented out the lines that used it:

        m.clear();
        m.setAddress("/ofxARDrone/isCalibratingMagnetometer");
        m.addIntArg(drone->state.isCalibratingMagnetometer());
        b.addMessage(m);
        
//     COMMENT THIS BLOCK OUT
//        m.clear();
//        m.setAddress("/ofxARDrone/isFlyingMillis");
//        m.addIntArg(drone->state.isFlyingMillis());
//        b.addMessage(m);
        
        m.clear();
        m.setAddress("/ofxARDrone/isTakingOffMillis");
        m.addIntArg(drone->state.isTakingOffMillis());
        b.addMessage(m);

I don’t have an Parrot drone to test with so idk if this is a detrimental change or negligible but it disables the /ofxARDrone/isFlyingMillis OSC address. If this causes a problem I would create an issue on the ofxARDroneOscBridge github repo.

Does following these steps fix your problem? If not could you please post specifics (console output logs, screenshots, etc…) about exactly what is going wrong?

I can confirm my solution was the same as @brannondorsey. The isFlyingMillis() function does not exist, so one of the addons is probably out of date. Everything else should work though, I’d assume.

Sweet I was able to get it up and running following your instructions, thanks again dude!

1 Like