I've been trying to work with my Bebop drone to do a simple task: Move by a sequence of relative vectors. We've been having trouble with the callback---it seems to be called inconsistently. In essence, the design flow is that a moveByRelative command is called, and another one is called in its callback. Below is the relevant code (pastebin for formatting):
Some information about what happens:
Without the moveCommands in the callback
The first moveCommands is called successfully (after the take off state is changed to flying).
We noticed it is necessary to put a dummy relative move first (0,0,0,0). Then, the callback occurs after inputting the moveCommands, but the dx, dy, dz, dpsi do not match what we input. If, however, the drone is told to land, then the callback is called, and dx, dy, dz, dpsi match.
With the moveCommands in the callback
Because the callback is called with seemingly random dx, dy, dz, dpsi, moveCommands is called hundreds of times.
We'd love help on this, because it really seems like this should be working---but the API seems to be holding us back. We have a work around at the moment, but it's a bit messy to work with.
Product: Bebop Drone
Product version: HW_11
SDK version: 3.3.0
Use of libARController: YES
SDK platform: Unix
Reproductible with the official app: N/A