Hello everybody,
I have been playing around with olympe for a school project and I would like to set the max speed for the moveBy. To do that, I tried to set the maxTilt, wich works just fine, but the drone ignores the maxTilt setting during moveBy. How can I set the speed for the moveBy? Is there a other way to achieve this? Here is my code:
DRONE_IP = "10.202.0.1"
if __name__ == "__main__":
with olympe.Drone(DRONE_IP) as drone:
drone.connect()
# Wait for GPS fix
drone(GPSFixStateChanged(fixed=1, _timeout=30, _policy="check_wait")).wait()
drone(MaxTilt(5)).wait()
# Wait until Drone is hovering
drone(
TakeOff(_no_expect=True)
& FlyingStateChanged(state="hovering", _policy="wait", _timeout=10)
).wait()
# Fly forward
action = drone(
moveBy(800, 0, 0, 0, _no_expect=True)
& FlyingStateChanged(state="hovering", _policy="wait", _timeout=60)
)
# Print Attitude (tilt)
while not action.done():
print(drone.get_state(AttitudeChanged))
#print(drone.get_state(SpeedChanged))
drone(Landing()).wait()
drone.disconnect()
Thank you for your help in advance,
Domi