I am currently using the following code to try to fly the anafi. The anafi will connect takeoff, send the moveBy command, wait the 25 seconds, land and then disconnect. The anafi just will not move. I read that if may have problem in doors, so I took it out on the back porch and it still would not fly.
I get a moveByEnd with error code “Ok”.
The moveByEnd shows no change in the dx, dy, dz
I’m using a raspberry pi and with an olympe enviroment.
-- coding: UTF-8 --
import olympe
from olympe.messages.ardrone3.Piloting import TakeOff, moveBy, Landing
from olympe.messages.ardrone3.PilotingState import FlyingStateChanged
from olympe.enums.ardrone3.PilotingState import FlyingStateChanged_State
drone = olympe.Drone(“192.168.42.1”)
print("\n\n connection command\n\n")
drone.connection()
print("\n\n Take off command\n\n")
drone(TakeOff() >> FlyingStateChanged(state=“hovering”, _policy=“wait”, _timeout=15)).wait()
print("\n\n",drone.get_state(FlyingStateChanged)[“state”],"\n\n")
print("\n\nMove by command\n\n")
drone(moveBy(0.5, 0, 0, 0) >> FlyingStateChanged(state=“hovering”, _policy=“wait”, _timeout=25)).wait()
print("\n\n",drone.get_state(FlyingStateChanged)[“state”],"\n\n")
print("\n\n Landing command\n\n")
drone(Landing()).wait()
print("\n\n Disconnect command\n\n")
drone.disconnection()