dji-sdk / Tello-Python

This is a collection of python modules that interact with the Ryze Tello drone.
Other
1.34k stars 642 forks source link

Python 3 (again) #57

Open f41ardu opened 4 years ago

f41ardu commented 4 years ago

Any thoughts to migrate the Tello-Python code to Python 3.X

I managed to migrate the H264 that it can be used with Python 3.X on my Raspberry PI. The rest is straightforward. So if someone could help to build the H264 dll or pyc from my fork could be helpful.

See my gist. udp video stream can be encoded by opencv:

https://gist.github.com/f41ardu/b75da46dae383e5c835295600deef604

RahilRehan commented 4 years ago

I'm a beginner, but I would like to help. I want this project to be in python 3 for my project.

f41ardu commented 4 years ago

Stay tuned. I've nearly finalised it either on Raspberry x86 implementation. The implementation on my native Raspberry isn't completed yet. Be aware, video performance on a Raspberry PI3+ isn't perfect. But I assume that it will work on Linux, too. See my fork for further details.

Update: Test on Raspberry PI 3B. Videoperformance is slwo and I got still decoding errors:

[h264 @ 0x25a8c50] error while decoding MB 52 12, bytestream -7 [h264 @ 0x25a8c50] concealing 1977 DC, 1977 AC, 1977 MV errors in P frame [h264 @ 0x25a8c50] left block unavailable for requested intra mode [h264 @ 0x25a8c50] error while decoding MB 0 41, bytestream 1998 [h264 @ 0x25a8c50] concealing 289 DC, 289 AC, 289 MV errors in P frame [h264 @ 0x25a8c50] error while decoding MB 55 39, bytestream -8 [h264 @ 0x25a8c50] concealing 354 DC, 354 AC, 354 MV errors in P frame

dji-dev commented 4 years ago

Public comment from Ho.Yan in Zendesk ticket #31175:

Dear Developer, Thank you for contacting DJI.

This question you can contact RYZE Tello's technical support: support.cn@ryzerobotics.com

Warm Regards, DJI Developer Support

woofwoof commented 4 years ago

Hi,

Thanks for trying to port this to Python 3.X. I tried to install the original 2.7 version but received a warning that 2.7 is no longer supported (as of Jan 1st 2020, apparently). I'd like to get video_test up and running. I can help test for you but I'm probably not as good a Python programmer as yourself! :)

I saw @f41ardu that you are experiencing the decode problems - does this mean that the video_test isn't working yet in Python 3.X please? To be honest I don't think I really need video but would more likely need a still image from the stream...

Thanks again. WW.

woofwoof commented 4 years ago

I should have also mentioned that the 'one click install' couldn't install openCV either - not sure if that's related to Python 2.7 or something else. I haven't tried a manual install just yet though. Cheers, WW.

f41ardu commented 4 years ago

My fork works fine using Python3, only on PI 3+ is somewhat slow. But there is a wrong path in my README for the boost lib for Raspberry. Stay tuned I'll update soon. Do we have information on the performance in Ubuntu or ???

f41ardu commented 4 years ago

udp video stream can be encoded by opencv:

https://gist.github.com/f41ardu/b75da46dae383e5c835295600deef604

No need to use the h264 lib any longer. Migration to Phyton3 could become fairly easy.

jstolp commented 4 years ago

So can we run this with Python3 or not? I'm sure I can manage. But any official support would be appreciated.

justingrayston commented 2 years ago

Any update on a Python3 version or progress of one we could create a PR. It looks a bit like this repo is abandoned by DJI.

juanmill4 commented 1 year ago

very latancy with video stream how remove the latency?