0

Can someone clarify how to make a drone fly using the DroneProxy API class? I'm using AR.Drone 2.0.

What I want to make is an indoor independent flying application. I want to input coordinates like a 2 meters left, then 3 meters right, turn right, then 10 meter to front, turn left, and few meters to front.

I tried to do this via methods below, but I cannot understand why it flies just for a few centimeters by one value input.

/**
 * Sends ArDrone the gaz value. Makes drone to move up or down
 *
 * @param value - value between -1 and 1.
 */
public void setGaz(final float value) {
    droneProxy.setControlValue(CONTROL_SET_GAZ, value);
}

/**
 * Sends ArDrone the Roll value. Makes drone to move left or right
 *
 * @param value - value between -1 and 1.
 */
public void setRoll(final float value) {
    droneProxy.setControlValue(CONTROL_SET_ROLL, value);
}

/**
 * Sends ArDrone the Pitch value. Makes drone to move forward or backward
 *
 * @param value - value between -1 and 1.
 */
public void setPitch(final float value) {
    droneProxy.setControlValue(CONTROL_SET_PITCH, value);
}

/**
 * Sends ArDrone the gaz value. Makes drone to turn left or right
 *
 * @param value - value between -1 and 1.
 */
public void setYaw(final float value) {
    droneProxy.setControlValue(CONTROL_SET_YAW, value);
}
ctuffli
  • 3,559
  • 4
  • 31
  • 43
D.K.
  • 1,315
  • 2
  • 11
  • 20
  • these methods look pretty clear. you tell it how much you want in roll, pitch, yaw, gaz, and it does that. – njzk2 Dec 17 '15 at 00:47
  • 1
    now, if you want it to be autonomous, or to be able to move to a specific position, you need a feedback loop, i.e. reading from sensors to interprete and translate into adjustements to the commands. but without the complete api, it is hard to imagine how to do that – njzk2 Dec 17 '15 at 00:49

1 Answers1

0

I suggest, use methods instead:

            droneControlService.moveDown(0);
            droneControlService.moveUp(0);
            droneControlService.turnRight(0);
            droneControlService.turnLeft(0);
            droneControlService.moveForward(0);
            droneControlService.moveBackward(0);
SanB
  • 11