MoveTo after takeoff not working

Hi.
I’m trying to using MoveTo command. but it’s not working.
Here an example code where the MoveTo doesn’t do anything:

import olympe
import os, csv, time, tempfile
import olympe.enums.move as mode
from olympe.messages.ardrone3.Piloting import TakeOff, Landing, moveTo
from olympe.messages.ardrone3.PilotingState import FlyingStateChanged,moveToChanged
from olympe.enums.ardrone3.PilotingState import MoveToChanged_Status as status
from olympe.enums.ardrone3.Piloting import MoveTo_Orientation_mode

DRONE_IP = “192.168.42.1”
drone = olympe.Drone(DRONE_IP)

if name == “main”:
drone = olympe.Drone(DRONE_IP)
drone.connect()
assert drone(
TakeOff()
>> FlyingStateChanged(state=“hovering”, _timeout=5)
).wait().success()
assert drone(
moveTo(21.522743,160.323640,3.0,MoveTo_Orientation_mode.TO_TARGET,0.0)
>> moveToChanged(status=“RUNNING”, _timeout=10)
).wait().success()
assert drone(Landing()).wait().success()
drone.disconnect()

Thank you.

This topic was automatically closed after 30 days. New replies are no longer allowed.