GuidedPiloting move() function not working


I’m currently working with the ground SDK to control an Anafi (inside Sphinx).
I’ve been able to take off using the ManualCopterPilotingItf, I’m now trying to move the drone using move() function with the GuidedPilotingItf. When I run the code below (when a button is clicked), the drone starts moving but immediately stops.
The FinishedFlightInfo’s wasSuccessful() method return false but I don’t know what is the problem and how to solve it …

GuidedPilotingItf guidedPilotingItf = drone.getPilotingItf(GuidedPilotingItf.class);
if (guidedPilotingItf != null) {
    GuidedPilotingItf.RelativeMoveDirective relativeMoveDirective = new GuidedPilotingItf.RelativeMoveDirective(5, 0, 0, 0, null);
    guidedPilotingItf.move(relativeMoveDirective); // Drone starts moving but immediatly stops 

Do you know what can be the reasons for a move() call to be aborted ?



I finally found the solution, I was using both ManualCopterPilotingItf and GuidedPilotingItf to control the drone and I had an observer on the ManualItf which was changing its state and was triggered by the GuidedItf.
So its important to be careful when using multiple interfaces to control the drone.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.