Parrot-Developers/olympe

Testing the real-time streaming example

Closed this issue · 4 comments

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/olympe_deps.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

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

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

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?

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

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

  • frame._1. with frame.pdraw_video_frame_0. on lines 252, 256, 257, 277 and 278
  • media_info.contents._2.video.format with media_info.contents.pdraw_media_info_0.video.format on lines 840, 842, 846, 848 and 849
  • media_info.contents._2.video._2.h264 with media_info.contents.pdraw_media_info_0.video.pdraw_video_info_0.h264 on line 851