Parrot-Developers / olympe

Python controller library for Parrot Drones
https://developer.parrot.com/docs/olympe/index.html
BSD 3-Clause "New" or "Revised" License
80 stars 36 forks source link

Maxtilt.py #5

Closed ghost closed 5 years ago

ghost commented 5 years ago

When executing the example script here I get the following error

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/home/shu18/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympe_deps.py", line 42, in <lambda>
    type_((lambda callback: lambda *args: callback(*args))(bound_fields[name]))
  File "/home/shu18/parrot-groundsdk/packages/olympe/src/olympe/arsdkng/drone.py", line 406, in _recv_cmd_cb
    raise RuntimeError("Unknown message id {}".format(message_id))
RuntimeError: Unknown message id 2550136849

Is this a problem with the versions or is it with the script.

from __future__ import print_function
import olympe
from olympe.messages.ardrone3.PilotingSettings import MaxTilt

drone = olympe.Drone("10.202.0.1")
drone.connection()
maxTiltAction = drone(MaxTilt(10)).wait()
if maxTiltAction.success():
    print("MaxTilt(10) success")
elif maxTiltAction.timedout():
    print("MaxTilt(10) success")
else:
    print("MaxTilt(10) is still in progress")
maxTiltAction = drone(MaxTilt(1)).wait()
if maxTiltAction.success():
    print("MaxTilt(1) success")
elif maxTiltAction.timedout():
    print("MaxTilt(1) timedout")
else:
    print("Maxtilt(1) is still in progress")
drone.disconnection()

I am currently using the following environment Ubuntu 16.04 python 3.5.2 Parrot-Sphinx 1.2.1

Thanks,

ghost commented 5 years ago

I actually had the same error when running the moveby.py script. And from carefully reading, it seems like the drone.py file in the groundsdk isn't working well. I will close this comment for now as well because its something going on in a different location.

Sorry to bother.