script returns an assertion error

I’m trying to run this script from the user guide, but I get an Assertion Error:

import olympe
import os
from olympe.messages.ardrone3.Piloting import TakeOff, moveBy, Landing
from olympe.messages.ardrone3.PilotingState import FlyingStateChanged

DRONE_IP = os.environ.get("DRONE_IP", "")

def test_moveby2():
    drone = olympe.Drone(DRONE_IP)
    assert drone(
        >> FlyingStateChanged(state="hovering", _timeout=5)
    assert drone(
        moveBy(10, 0, 0, 0)
        >> FlyingStateChanged(state="hovering", _timeout=5)
    assert drone(Landing()).wait().success()

if __name__ == "__main__":

but I get this Error :

Traceback (most recent call last):
  File "/home/escaper/code/parrot-groundsdk/", line 25, in <module>
  File "/home/escaper/code/parrot-groundsdk/", line 12, in test_moveby2
    assert drone(

Hi escaper01, I get this same error when I use: parrot-ue4-industrial-city (version 2.5.1), and was able to avoid it increasing the timeout to 10.
However on: parrot-ue4-empty (version 2.6) I don get the error (I am using Ubuntu 18.04.6)
I recommend that you check the version of the 3D scenes you are using.
Hope it helps, best regards

1 Like

Update: I have updated parrot-ue4-industrial-city and the error still happens with timeout=5.
Hence it is not related to the version, to avoid the error just increase the timeout, 7 is doing the trick for me.

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