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

Testing the real-time streaming example #26

Closed menglaili closed 1 year ago

menglaili commented 3 years ago

I followed the user-guide steps by steps to test the streaming example at Sphinx environment, but I got the following error

Traceback (most recent call last): File "_ctypes/callbacks.c", line 234, in 'calling callback function' File "/home/tara/Documents/parrot-groundsdk/out/olympe-linux/final/usr/lib/python/site-packages/olympedeps.py", line 81, in type((lambda callback: lambda args: callback(args))( File "/home/tara/Documents/parrot-groundsdk/packages/olympe/src/olympe/arsdkng/pdraw.py", line 840, in _media_added if (media_info.contents._2.video.format != AttributeError: 'struct_pdraw_media_info' object has no attribute '_2'

As expected, there should be a new window continuously showing the FPV image from the drone. However, the window only showed black in my case.

My goal is to post-processing the FPV image, but the function show_yuv_frame seems not to be called at all. So how can I get access to the current frame? How can I fix the problem to make it work as expected in the example?

Thanks in advance

inmo-jang commented 3 years ago

I also faced the same error message when I run the streaming example. I am looking forward to hearing any response from Parrot.

haroal commented 3 years ago

Up :)

Impossible to read streaming video from Anafi running inside Sphinx simulator. The struct_pdraw_media_info seems to be empty in olympe_deps.py.

Could we have a way to fix that, please ?

Thanks

hjlevy commented 3 years ago

Also facing this same error. It's strange because I installed olympe on my desktop a couple months ago and have no problems streaming. But now that I install olympe on my laptop I suddenly have this error. Must have been from some update?

andriyukr commented 3 years ago

The issue is that for some reason it cannot find symbolic attributes.

A quick fix is to replace in pdraw.py the following attributes: