Giter VIP home page Giter VIP logo

tellopy's Introduction

DJI Tello drone controller python package

This is a python package which controlls DJI toy drone 'Tello'. The major portion of the source code was ported from the driver of GOBOT project. For original golang version and protocol in detail, please refer their blog post at https://gobot.io/blog/2018/04/20/hello-tello-hacking-drones-with-go

photo

How to install

You can install stable version from PyPI.

$ pip install tellopy

Or install from the source code.

$ git clone https://github.com/hanyazou/TelloPy 
$ cd TelloPy
$ python setup.py bdist_wheel
$ pip install dist/tellopy-*.dev*.whl --upgrade

Documents

Please see the API docstring.

$ python
>>> import tellopy
>>> help(tellopy)
Help on package tellopy:
...

Examples

You can find basic usage of this package in example code in the examples folder.

simple_takeoff

This example let Tello take off. Tello will land automatically after a few seconds.

$ python -m tellopy.examples.simple_takeoff

video_effect

Filter and display the realtime video stream from Tello.

$ pip install av
$ pip install opencv-python
$ pip install image
$ python -m tellopy.examples.video_effect

photo

joystick_and_video

You can use PS3/PS4/XONE joystick to controll Tello. (see my video https://www.youtube.com/watch?v=MWdNFRdRuj8)

$ pip install av
$ pip install opencv-python
$ pip install image
$ pip install pygame
$ python -m tellopy.examples.joystick_and_video

photo

Tellopy side projects

Hand_motion Tello controller

You can find a hand_motion controller for the Tello in this project: https://github.com/GalBrandwine/HalloPy, and controll your tello using hand movements!

OpenCV based Tello controller

This interfaces with the drone through openCV and generates frames from the video stream for computer vision applications. It comes with a tracker that will detect a color in the scene and follow it: https://github.com/Ubotica/telloCV/

tellopy's People

Contributors

cadowd avatar danielrotaermel avatar galbrandwine avatar geaxgx avatar hanyazou avatar ibrokemycomputer avatar jordy-van-appeven avatar nicholas-gh avatar powderluv avatar shortstheory avatar squeakus avatar taylerallen6 avatar toxicfrog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tellopy's Issues

Can't call additionally created attributes in Tello class in tello.py file

When I added an additional attribute to the Tello class and call it in simple_takeoff.py, I got the response that 'Tello' object has no such attribute.

After trying to print out things in the existing attributes and not getting the desired response, I'm starting to think that there is another Tello class created somewhere else that the simple_takeoff.py function is creating an instance of.

So I guess my questions is: in simple_takeoff.py, is tello.Tello() calling the Tello class in tello.py? If so, why can't I call the additional attributes?

Error installing module av

`Microsoft Windows [versão 10.0.17134.165]
(c) 2018 Microsoft Corporation. Todos os direitos reservados.

C:\Users\dougl>pip install av
Collecting av
Using cached https://files.pythonhosted.org/packages/52/56/3ed0d68acc9d1faa92b15e7012c68fad5f21c0405315c90b337104ba7f29/av-0.4.1.tar.gz
Installing collected packages: av
Running setup.py install for av ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\dougl\appdata\local\temp\pip-install-mbxiy2\av\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\dougl\appdata\local\temp\pip-record-unow7x\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\av
copying av_init_.py -> build\lib.win-amd64-2.7\av
copying av_main_.py -> build\lib.win-amd64-2.7\av
creating build\lib.win-amd64-2.7\av\audio
copying av\audio_init_.py -> build\lib.win-amd64-2.7\av\audio
creating build\lib.win-amd64-2.7\av\codec
copying av\codec_init_.py -> build\lib.win-amd64-2.7\av\codec
creating build\lib.win-amd64-2.7\av\container
copying av\container_init_.py -> build\lib.win-amd64-2.7\av\container
creating build\lib.win-amd64-2.7\av\data
copying av\data_init_.py -> build\lib.win-amd64-2.7\av\data
creating build\lib.win-amd64-2.7\av\filter
copying av\filter_init_.py -> build\lib.win-amd64-2.7\av\filter
creating build\lib.win-amd64-2.7\av\subtitles
copying av\subtitles_init_.py -> build\lib.win-amd64-2.7\av\subtitles
creating build\lib.win-amd64-2.7\av\video
copying av\video_init_.py -> build\lib.win-amd64-2.7\av\video
running build_ext
running reflect
running config
looking for avformat_open_input... missing
looking for pyav_function_should_not_exist... missing
looking for av_calloc... missing
looking for av_frame_get_best_effort_timestamp... missing
looking for avformat_alloc_output_context2... missing
looking for avformat_close_input... missing
looking for avcodec_send_packet... missing
looking for AV_OPT_TYPE_INT...missing
looking for PYAV_ENUM_SHOULD_NOT_EXIST...missing
looking for AV_OPT_TYPE_BOOL...missing
looking for AVStream.index... missing
looking for PyAV.struct_should_not_exist... missing
looking for AVFrame.mb_type... missing

We didn't find `avformat_open_input` in the libraries.
We look for it only as a sanity check to make sure the build
process is working as expected. It is not, so we must abort.

You can see the compiler output for the reflection process via:
    python setup.py reflect --force --debug

Here is the config we gathered so far:

PyAV: 0.4.1 (unknown commit)
Python: 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
platform: Windows-10-10.0.17134
extension_extra:
    extra_link_args: ['/OPT:NOREF']
    define_macros: []
    runtime_library_dirs: []
    libraries: ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
    library_dirs: ['c:\\python27\\libs', 'c:\\python27\\PCbuild\\amd64', 'c:\\python27\\PC\\VS9.0\\amd64']
    include_dirs: ['include', 'c:\\python27\\include', 'c:\\python27\\PC']
config_macros:
    PYAV_COMMIT_STR="unknown-commit"
    PYAV_HAVE_AVCODEC_SEND_PACKET=0
    PYAV_HAVE_AVFORMAT_ALLOC_OUTPUT_CONTEXT2=0
    PYAV_HAVE_AVFORMAT_CLOSE_INPUT=0
    PYAV_HAVE_AVFRAME__MB_TYPE=0
    PYAV_HAVE_AV_CALLOC=0
    PYAV_HAVE_AV_FRAME_GET_BEST_EFFORT_TIMESTAMP=0
    PYAV_HAVE_AV_OPT_TYPE_BOOL=0
    PYAV_HAVE_LIBAVRESAMPLE=0
    PYAV_HAVE_LIBSWRESAMPLE=1
    PYAV_VERSION=0.4.1
    PYAV_VERSION_STR="0.4.1"
    inline=__inline

----------------------------------------

Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\dougl\appdata\local\temp\pip-install-mbxiy2\av\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record c:\users\dougl\appdata\local\temp\pip-record-unow7x\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\dougl\appdata\local\temp\pip-install-mbxiy2\av\

C:\Users\dougl>`

Could you please help me?

Not able to connect

laptopname:~/Desktop/Cloud_Computing$ python -m tellopy.examples.video_effect
Tello: 00:24:35.545: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:35.545: Info: state transit State::disconnected -> State::connecting
Tello: 00:24:35.545: Info: start video thread
Tello: 00:24:35.545: Info: video receive buffer size = 425984
Tello: 00:24:37.547: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:39.550: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:41.552: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:43.555: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:45.556: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:47.559: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:49.562: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:51.563: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:53.564: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:55.567: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:57.570: Info: send connection request (cmd="conn_req:9617")
Tello: 00:24:59.572: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:01.575: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:03.578: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:05.580: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:07.583: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:09.584: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:11.587: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:13.590: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:15.592: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:17.595: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:19.598: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:21.601: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:23.603: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:25.606: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:27.609: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:29.611: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:31.614: Info: send connection request (cmd="conn_req:9617")
Tello: 00:25:33.617: Info: send connection request (cmd="conn_req:9617")
Traceback (most recent call last):
File "/home/neha/.local/lib/python2.7/site-packages/tellopy/examples/video_effect.py", line 15, in main
drone.wait_for_connection(60.0)
File "/home/neha/.local/lib/python2.7/site-packages/tellopy/_internal/tello.py", line 133, in wait_for_connection
raise error.TelloError('timeout')
TelloError: TelloError::timeout
TelloError::timeout
Tello: 00:25:35.546: Info: quit
Tello: 00:25:35.546: Info: state transit State::connecting -> State::quit
Tello: 00:25:35.613: Info: exit from the video thread.
Tello: 00:25:35.620: Info: exit from the recv thread.

emergency command

hi,
is there any way to add emergency land to source cause i need it
thanks.

Can't Install

Hello,

When I type, 'pip install tellopy', I get this;

Collecting tellopy
Could not find a version that satisfies the requirement tellopy (from versions: )
No matching distribution found for tellopy

Can you help please?

Thank you

video.effect.py

So I managed to get it running, but I want to save that live video, any idea how?

joystick laggy / does not respond

hi guys,
I have a strange problem.
ubuntu 18.04 + ps4 controller
I have the video feed and the controller is only able to takeoff and go up and down and rotate clockwise.
the other commands doesn't works.
what could be the problem?

video recv: timeout

First of all I love your work and most things work perfectly but when I run anything that uses the camera I get presented with:

This shows the feed I get when using video_effect.py but I have also tested on keyboard_and_video.py and got the same output although I could still move the drone around with the keyboard.

Tello: 18:44:15.707: Info: get video stream
Tello: 18:44:15.707: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:15.805: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:15.805: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:44:15.805: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:15.805: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:44:16.740: Info: recv: log_header: id=c835, 'b'BUILD Sep 10 2018 15:58:59''
Tello: 18:44:16.787: Info: LogData: UNHANDLED LOG DATA: id=32768, length= 49
Tello: 18:44:16.787: Error: LogData: corrupted data at pos=1027, data=
Tello: 18:44:16.787: Error: LogData: corrupted data at pos=0, data=d4 9d 91 de d7 d7 c2 d4 c5 8b 91 81 9d 91 c2 d8 cb d4 8b 91 82 90 bc bb b1 d6 75 55 39 00 44 00 80 0b d6 70 00 2b 2b 2b 2b 2b 2b 3b 2b 50 47 26 59 48 56 79 6e 6a 6f 2b 6d 67 6a 78 63 2b 78 7e 68 68 6e 78 78 27 2b 68 7e 79 2b 7f 72 7b 6e 31 3a 0b 84 c9 55 29 00 a8 00 80 2a d6 70 00 0a 0a 0a 0a 0a 0a 1a 0a 71 66 07 78 69 77 14 19 1c 1e 0a 1b 1a 18 1e 0a 1b 1c 12 1e 2a db 8b 55 29 00 a8 00 80 43 d6 70 00 63 63 63 63 63 63 73 63 18 0f 6e 11 00 1e 7d 70 75 77 63 72 73 71 77 63 72 75 7b 77 43 02 a7 55 29 00 a8 00 80 5d d6 70 00 7d 7d 7d 7d 7d 7d 6d 7d 06 11 70 0f 1e 00 63 6e 6b 69 7d 6c 6d 6f 69 7d 6c 6b 65 69 5d 3c af 55 29 00 a8 00 80 77 d6 70 00 57 57 57 57 57 57 47 57 2c 3b 5a 25 34 2a 49 44 41 43 57 46 47 45 43 57 46 41 4f 43 77 fc 1e 55 3a 00 11 00 80 2c bc 76 00 0c 0c 0c 0c 0c 0c 1c 0c 77 60 01 6f 6a 6b 71 7c 61 16 4d 48 48 0c 5e 43 43 58 0c 5b 43 5e 47 16 0c 5c 41 73 43 42 73 58 45 4f 47 21 26 2c 6d de 55 37 00 98 00 80 87 bc 76 00 a7 a7 a7 a7 a7 a7 b7 a7 dc cb aa d4 c2 c9 d4 c8 d5 da dc c6 d4 d5 da e6 f4 f5 a7 ef e8 f4 f3 a7 f4 fe e9 e4 a7 f4 f3 e6 f5 f3 87 2e dd 55 41 00 84 00 80 a2 bc 76 00 82 82 82 82 82 82 92 82 f9 ee 8f f1 e7 ec f1 ed f0 ff f9 e3 f1 f0 ff d1 db cc c1 82 ca cd d1 d6 82 ce c7 c3 c6 82 cd c4 c4 d1 c7 d6 82 92 da 93 93 c3 af a8 a2 e3 91 55 31 00 32 00 80 4f bf 76 00 6f 6f 6f 6f 6f 6f 7f 6f 14 03 62 1c 0a 01 1c 00 1d 12 6f 27 38 10 39 2a 3d 6f 39 20 23 3b 2e 28 2a 75 6f 7f 4f 4c b7 55 38 00 80 00 80 c7 bf 76 00 e7 e7 e7 e7 e7 e7 f7 e7 9c 8b ea 94 8e 8a 9a b5 a2 a6 a3 e7 b7 a6 b5 a6 aa a2 b3 a2 b5 e7 b4 b2 a4 a4 a2 b4 b4 a1 b2 ab ab be e6 c7 a8 b0 55 4d 00 c9 00 80 7b c0 76 00 5b 5b 5b 5b 5b 5b 4b 5b 20 37 56 3d 36 2e 54 36 34 2f 34 29 26 09 1e 1a 1f 5b 16 14 0f 14 09 5b 1d 14 09 18 1e 5b 1f 12 08 1a 19 17 1e 5b 1d 17 1a 1c 5b 08 0e 18 18 1e 08 08 1d 0e 17 17 02 5a 7b ad 5c 55 2c 00 57 00 80 a3 c0 76 00 83 83 83 83 83 83 93 83 f8 ef 8e f0 e6 ed f0 ec f1 fe ca ce d6 83 c4 d1 cc d6 d3 93 83 cc c8 a3 d9 fe 55 3f 00 ee 00 80 c5 c0 76 00 e5 e5 e5 e5 e5 e5 f5 e5 9e 89 e8 82 9c 97 8a 9a 84 86 86 98 ac a8 b0 9a f5 e5 a2 b7 aa b0 b5 e8 fb b6 a0 ab b6 aa b7 9a ac a1 ff f4 f3 f4 fc f5 f1 e5 c5 21 35 55 47 00 2e 00 80 1e c1 76 00 3e 3e 3e 3e 3e 3e 2e 3e 45 52 33 59 47 4c 51 41 5f 5d 5d 43 79 67 6c 41 7f 7d 7d 41 7d 71 70 78 77 79 30 73 6d 7d 41 6c 7b 6f 6b 77 6c 7b 41 6d 77 7a 7b 24 36 28 2d 37 3e 14 1e 05 b8 55 48 00 36 00 80 37 c1 76 00 17 17 17 17 17 17 07 17 6c 7b 1a 73 75 70 06 6a 54 56 5b 5e 68 44 40 5e 43 54 5f 68 54 58 59 51 5e 50 19 5e 5a 42 68 47 45 58 47 52 5b 5b 52 45 68 54 56 5b 5e 0d 1f 05 1e 17 3d 37 c0 20 55 61 00 45 00 80 dd c1 76 00 fd fd fd fd fd fd ed fd 86 91 f0 9a 84 8f 92 82 9c 9e 9e 80 a9 a8 af b3 fd b2 b3 fd a9 b8 b0 ad fd be a9 af b1 f5 ed f4 f1 fd be a8 af 82 a9 b8 b0 ad e7 f0 e8 ed f3 ed f1 fd af b8 bc ae b2 b3 e7 a9 b8 b0 ad fd be a9 af b1 fd be b2 af b8 fd b4 b3 b4 a9 dd c1 d4 55 57 00 c2 00 80 04 c2 76 00 24 24 24 24 24 24 34 24 5f 48 29 43 5d 56 4b 5b 45 47 47 59 6d 69 71 5b 34 24 6b 68 60 24 69 6d 77 5b 67 be a5
Tello: 18:44:16.787: Error: LogData: corrupted data at pos=0, data=65 68 6d 5b 62 68 65 63 3e 62 62 62 62 24 69 6d 77 5b 67 65 68 6d 5b 66 6b 65 76 60 5b 62 68 65 63 3e 62 62 62 62 24 04 61 02 5b 9c
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id= 2064, length= 64
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id= 2208, length= 40
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id=10086, length= 4
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id=10085, length= 80
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id= 1710, length= 38
Tello: 18:44:16.834: Info: LogData: UNHANDLED LOG DATA: id= 1712, length= 10
Tello: 18:44:16.950: Info: LogData: UNHANDLED LOG DATA: id= 16, length= 4
Tello: 18:44:16.950: Info: LogData: UNHANDLED LOG DATA: id= 12, length= 55
Tello: 18:44:16.997: Info: LogData: UNHANDLED LOG DATA: id= 1000, length= 44
Tello: 18:44:16.997: Info: LogData: UNHANDLED LOG DATA: id= 1001, length= 16
Tello: 18:44:17.711: Error: video recv: timeout
Tello: 18:44:17.711: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:17.711: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:17.711: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:44:17.758: Info: LogData: UNHANDLED LOG DATA: id= 1002, length= 27
Tello: 18:44:17.758: Info: LogData: UNHANDLED LOG DATA: id= 112, length= 35
Tello: 18:44:18.716: Error: video recv: timeout
Tello: 18:44:18.716: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:18.732: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:18.732: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:44:19.718: Error: video recv: timeout
Tello: 18:44:19.718: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:19.765: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:19.765: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:44:20.721: Error: video recv: timeout
Tello: 18:44:20.721: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:20.737: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:20.737: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
...
...
...
Tello: 18:44:44.849: Error: video recv: timeout
Tello: 18:44:44.849: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:44:44.871: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:44:44.871: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9

I have found an opened issue with similar errors but since its been closed and mine still isn't working, thought I should open it again.

I have narrowed the problem down to this line :
container = av.open(drone.get_video_stream())

Hope someone can help out.
Thanks

TypeError in VideoData on branch 0.6.0 while running under python 2.7

Tello: 17:48:18.658: Error: video recv: unsupported operand type(s) for &: 'str' and 'int'
Traceback (most recent call last):
File "/home/peter/Work/flock_catkin_ws/src/TelloPy/tellopy/_internal/tello.py", line 661, in __video_thread
video_data = VideoData(data)
File "/home/peter/Work/flock_catkin_ws/src/TelloPy/tellopy/_internal/protocol.py", line 234, in init
if VideoData.packets_per_frame < (self.h1 & 0x7f):
TypeError: unsupported operand type(s) for &: 'str' and 'int'

mplayer to webcam

Hey, i have clone ur code and test it, it is so good, it works quite well in my windows 10, but i got a small issue which i cannot really fix it, here it is.

my background is architecture, so i am trying to import the live video from tello into architectural software-rhino or grasshopper by webcam, but i don't really know how to connect mplayer video data into webcam. can we have a discussion when u r free.

thank u so much for sharing ur tellopy platform, it did help alot. I would definitely mention ur contribution in my paper if u dont mind.

Sensor data

Hello. Thank you for sharing the good sdk.
Does tello send the imu data such as vellocity, yaw etc?
Thank you.

Drone Swarming Support

I guess TelloPy doesn't have support for multiple drones but wanted to confirm with the developers. Is there a way for me to use TelloPy for multiple drones (drone swarming)?

framework version 01.04.35.01

What version of the framework are you using?

I use the version 01.04.35.01 and the video does not work by the computer, only by the mobile app

video_effect.py sample code not working

hi.

I noticed that container = av.open(drone.get_video_stream()) never returns.
Can anyone point out potential area to debug this?

`drone.connect()
drone.wait_for_connection(60.0)

    retry = 3
    container = None
    while container is None and 0 < retry:
        retry -= 1
        try:
            container = av.open(drone.get_video_stream())
            #av.container.open(drone.get_video_stream())
            print("OPEN AV")`

log attached:

❯ python video_effect.py
Tello: 18:50:21.026: Info: start video thread
Tello: 18:50:21.027: Info: send connection request (cmd="conn_req:9617")
Tello: 18:50:21.027: Info: video receive buffer size = 524288
Tello: 18:50:21.027: Info: state transit State::disconnected -> State::connecting
Tello: 18:50:21.166: Info: connected. (port=9617)
Tello: 18:50:21.167: Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 18:50:21.167: Info: state transit State::connecting -> State::connected
Tello: 18:50:21.168: Info: get video stream
Tello: 18:50:21.168: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:50:21.319: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:50:21.319: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:50:24.050: Info: video data 978038 bytes 473.3KB/sec
non-existing PPS 0 referenced
non-existing PPS 0 referenced
decode_slice_header error
no frame!
・・・
non-existing PPS 0 referenced
non-existing PPS 0 referenced
decode_slice_header error
no frame!
non-existing PPS 0 referenced
non-existing PPS 0 referenced
decode_slice_header error
no frame!
Tello: 18:50:26.050: Info: video data 752425 bytes 367.4KB/sec
OPEN AV
[1] 59818 segmentation fault python video_effect.py

OSver:Mac OS X 10.14.5
BuildVersion: 18F132
av:6.2.0

Does the video stream function work with Wifi Adapter?

Hey really cool design. I have used the scripts well on my laptop, but when I transferred everything to my PC, which uses a Wifi adapter to communicate with Tello, the video stream function seems to be not working. The other commands such as take off and moving functions work fine, it is only the video stream function that I could not duplicate. Could you help me a bit on this?

Tello: 14:02:56.879: Info: start video thread
Tello: 14:02:56.879: Info: send connection request (cmd="conn_req:9617")
Tello: 14:02:56.880: Info: video receive buffer size = 524288
Tello: 14:02:56.880: Info: state transit State::disconnected -> State::connecting
Tello: 14:02:56.885: Info: connected. (port=9617)
Tello: 14:02:56.885: Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 14:02:56.885: Info: state transit State::connecting -> State::connected
connected
Tello: 14:02:56.885: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 14:02:56.885: Info: set exposure (cmd=0x34 seq=0x01e4)
Tello: 14:02:56.886: Info: set video encoder rate (cmd=0x20 seq=01e4)
Tello: 14:02:56.889: Info: get video stream
Tello: 14:02:56.889: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 14:02:56.936: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 14:02:56.937: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 14:02:56.938: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 14:02:56.939: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 14:02:56.939: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 14:02:56.940: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 14:02:56.941: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 14:02:56.941: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
event="time" data=52480
height= 0, fly_mode=0x01, battery_percentage=56, drone_battery_left=0x0000
event="time" data=59392
height= 0, fly_mode=0x01, battery_percentage=55, drone_battery_left=0x0000
event="time" data=1536
Tello: 14:03:02.882: Error: video recv: timeout
event="time" data=8448
event="time" data=15360
Tello: 14:03:07.882: Error: video recv: timeout
event="time" data=22272
event="time" data=29440
Tello: 14:03:12.883: Error: video recv: timeout

Video receive timeout

Hello,

I just received my tello today and I am trying this fantastic library - thank you for having ported it.

The flight example works, but I receive timeout on the video example. I will read the code and try to understand how it works. Below is the log. Any idea ?

I have the same behaviour, with python 2.7 and python3. Tested on MacOS.
The video in the Tello App is working OK, incl. video.
The GO example https://github.com/hybridgroup/gobot/blob/master/examples/tello_video.go is also giving an experience, I received a few video bytes, then nothing.

Tello firmware is 01.04.35.01

Tello: 18:34:47.939:  Info: start video thread
Tello: 18:34:47.940:  Info: send connection request (cmd="conn_req:9617")
Tello: 18:34:47.940:  Info: video receive buffer size = 524288
Tello: 18:34:47.940:  Info: state transit State::disconnected -> State::connecting
Tello: 18:34:47.944:  Info: connected. (port=9617)
Tello: 18:34:47.944:  Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 18:34:47.944:  Info: state transit State::connecting -> State::connected
Tello: 18:34:47.948:  Info: get video stream
Tello: 18:34:47.949:  Info: start video (cmd=0x25 seq=0x01e4)
Tello: 18:34:47.995:  Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:34:47.995:  Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:34:47.996:  Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 18:34:47.996:  Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 18:34:53.945: Error: video recv: timeout
Tello: 18:34:58.949: Error: video recv: timeout
Tello: 18:35:03.950: Error: video recv: timeout

No handlers could be found for logger "libav.h264

I seem to get this while running video_effect,"No handlers could be found for logger "libav.h264". It continues to show canny and imshow window, and every log on terminal is regular one, but those just freeze after first picture is shown.

Problem with pip install av

I cant install av module. First I installed visual studio and then I got this in the cmd:

`C:\Users\walcz>pip install av
Collecting av
Using cached https://files.pythonhosted.org/packages/15/80/edc9e110b2896ebe16863051e68bd4786efeda71ce94b81a048d146062cc/av-6.1.0.tar.gz
Building wheels for collected packages: av
Running setup.py bdist_wheel for av ... error
Complete output from command c:\python37\python.exe -u -c "import setuptools, tokenize;file='C:\Users\walcz\AppData\Local\Temp\pip-install-cwy5vyjv\av\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\walcz\AppData\Local\Temp\pip-wheel-vd3eg038 --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\av
copying av\datasets.py -> build\lib.win-amd64-3.7\av
copying av\deprecation.py -> build\lib.win-amd64-3.7\av
copying av_init_.py -> build\lib.win-amd64-3.7\av
copying av_main_.py -> build\lib.win-amd64-3.7\av
creating build\lib.win-amd64-3.7\scratchpad
copying scratchpad\audio.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\audio_player.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\average.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\cctx_decode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\cctx_encode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\decode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\decode_threads.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\dump_format.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\encode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\encode_frames.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\experimental.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\filmstrip.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\frame_seek_example.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\glproxy.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\graph.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\merge-filmstrip.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\player.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\qtproxy.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\remux.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\resource_use.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\save_subtitles.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\second_seek_example.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\seekmany.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\show_frames_opencv.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad_init_.py -> build\lib.win-amd64-3.7\scratchpad
creating build\lib.win-amd64-3.7\av\audio
copying av\audio_init_.py -> build\lib.win-amd64-3.7\av\audio
creating build\lib.win-amd64-3.7\av\codec
copying av\codec_init_.py -> build\lib.win-amd64-3.7\av\codec
creating build\lib.win-amd64-3.7\av\container
copying av\container_init_.py -> build\lib.win-amd64-3.7\av\container
creating build\lib.win-amd64-3.7\av\data
copying av\data_init_.py -> build\lib.win-amd64-3.7\av\data
creating build\lib.win-amd64-3.7\av\filter
copying av\filter_init_.py -> build\lib.win-amd64-3.7\av\filter
creating build\lib.win-amd64-3.7\av\subtitles
copying av\subtitles_init_.py -> build\lib.win-amd64-3.7\av\subtitles
creating build\lib.win-amd64-3.7\av\video
copying av\video_init_.py -> build\lib.win-amd64-3.7\av\video
running build_ext
running config
writing build\temp.win-amd64-3.7\Release\include\pyav\config.h
running cythonize
Compiling av\buffer.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\buffer.pyx
Compiling av\bytesource.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\cpython\buffer.pxd.
[1/1] Cythonizing av\bytesource.pyx
Compiling av\descriptor.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\descriptor.pyx
Compiling av\dictionary.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\dictionary.pyx
Compiling av\format.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\format.pyx
Compiling av\frame.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\frame.pyx
Compiling av\logging.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\logging.pyx
Compiling av\option.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\option.pyx
Compiling av\packet.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\packet.pyx
Compiling av\plane.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\plane.pyx
Compiling av\stream.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\stream.pyx
Compiling av\utils.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\utils.pyx
Compiling av_core.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av_core.pyx
Compiling av\audio\codeccontext.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\codeccontext.pyx
Compiling av\audio\fifo.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\fifo.pyx
Compiling av\audio\format.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\format.pyx
Compiling av\audio\frame.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\frame.pyx
Compiling av\audio\layout.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\audio\layout.pyx
Compiling av\audio\plane.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\plane.pyx
Compiling av\audio\resampler.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\resampler.pyx
Compiling av\audio\stream.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\audio\stream.pyx
Compiling av\codec\codec.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\codec\codec.pyx
Compiling av\codec\context.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\codec\context.pyx
Compiling av\container\core.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\container\core.pyx
Compiling av\container\input.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\container\input.pyx
Compiling av\container\output.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\container\output.pyx
Compiling av\container\pyio.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\container\pyio.pyx
Compiling av\container\streams.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\container\streams.pyx
Compiling av\data\stream.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\data\stream.pyx
Compiling av\filter\context.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\filter\context.pyx
Compiling av\filter\filter.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\filter\filter.pyx
Compiling av\filter\graph.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\filter\graph.pyx
Compiling av\filter\link.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\filter\link.pyx
Compiling av\filter\pad.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\filter\pad.pyx
Compiling av\subtitles\codeccontext.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\subtitles\codeccontext.pyx
Compiling av\subtitles\stream.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\subtitles\stream.pyx
Compiling av\subtitles\subtitle.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\subtitles\subtitle.pyx
Compiling av\video\codeccontext.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\video\codeccontext.pyx
Compiling av\video\format.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\string.pxd.
[1/1] Cythonizing av\video\format.pyx
Compiling av\video\frame.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\video\frame.pyx
Compiling av\video\plane.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\video\plane.pyx
Compiling av\video\reformatter.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\video\reformatter.pyx
Compiling av\video\stream.pyx because it depends on c:\python37\lib\site-packages\Cython\Includes\libc\stdint.pxd.
[1/1] Cythonizing av\video\stream.pyx
building 'av.buffer' extension
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\av
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Iinclude -Ic:\python37\include -Ibuild\temp.win-amd64-3.7\Release\include -Ic:\python37\include -Ic:\python37\include -Ibuild\temp.win-amd64-3.7\Release\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\av\buffer.c /Fobuild\temp.win-amd64-3.7\Release\src\av\buffer.obj
buffer.c
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" avcodec.lib avdevice.lib swresample.lib avutil.lib avfilter.lib avformat.lib swscale.lib /EXPORT:PyInit_buffer build\temp.win-amd64-3.7\Release\src\av\buffer.obj /OUT:build\lib.win-amd64-3.7\av\buffer.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\av\buffer.cp37-win_amd64.lib /OPT:NOREF
LINK : fatal error LNK1181: nie można otworzyć pliku wejściowego „avcodec.lib”
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181


Failed building wheel for av
Running setup.py clean for av
Failed to build av
Installing collected packages: av
Running setup.py install for av ... error
Complete output from command c:\python37\python.exe -u -c "import setuptools, tokenize;file='C:\Users\walcz\AppData\Local\Temp\pip-install-cwy5vyjv\av\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\walcz\AppData\Local\Temp\pip-record-wr1e1tox\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\av
copying av\datasets.py -> build\lib.win-amd64-3.7\av
copying av\deprecation.py -> build\lib.win-amd64-3.7\av
copying av_init_.py -> build\lib.win-amd64-3.7\av
copying av_main_.py -> build\lib.win-amd64-3.7\av
creating build\lib.win-amd64-3.7\scratchpad
copying scratchpad\audio.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\audio_player.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\average.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\cctx_decode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\cctx_encode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\decode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\decode_threads.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\dump_format.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\encode.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\encode_frames.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\experimental.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\filmstrip.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\frame_seek_example.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\glproxy.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\graph.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\merge-filmstrip.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\player.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\qtproxy.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\remux.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\resource_use.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\save_subtitles.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\second_seek_example.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\seekmany.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad\show_frames_opencv.py -> build\lib.win-amd64-3.7\scratchpad
copying scratchpad_init_.py -> build\lib.win-amd64-3.7\scratchpad
creating build\lib.win-amd64-3.7\av\audio
copying av\audio_init_.py -> build\lib.win-amd64-3.7\av\audio
creating build\lib.win-amd64-3.7\av\codec
copying av\codec_init_.py -> build\lib.win-amd64-3.7\av\codec
creating build\lib.win-amd64-3.7\av\container
copying av\container_init_.py -> build\lib.win-amd64-3.7\av\container
creating build\lib.win-amd64-3.7\av\data
copying av\data_init_.py -> build\lib.win-amd64-3.7\av\data
creating build\lib.win-amd64-3.7\av\filter
copying av\filter_init_.py -> build\lib.win-amd64-3.7\av\filter
creating build\lib.win-amd64-3.7\av\subtitles
copying av\subtitles_init_.py -> build\lib.win-amd64-3.7\av\subtitles
creating build\lib.win-amd64-3.7\av\video
copying av\video_init_.py -> build\lib.win-amd64-3.7\av\video
running build_ext
running config
writing build\temp.win-amd64-3.7\Release\include\pyav\config.h
running cythonize
building 'av.buffer' extension
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\av
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Iinclude -Ibuild\temp.win-amd64-3.7\Release\include -Ic:\python37\include -Ic:\python37\include -Ic:\python37\include -Ibuild\temp.win-amd64-3.7\Release\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\av\buffer.c /Fobuild\temp.win-amd64-3.7\Release\src\av\buffer.obj
buffer.c
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" avfilter.lib avcodec.lib swscale.lib avdevice.lib swresample.lib avutil.lib avformat.lib /EXPORT:PyInit_buffer build\temp.win-amd64-3.7\Release\src\av\buffer.obj /OUT:build\lib.win-amd64-3.7\av\buffer.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\av\buffer.cp37-win_amd64.lib /OPT:NOREF
LINK : fatal error LNK1181: nie można otworzyć pliku wejściowego „avfilter.lib”
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181

----------------------------------------

Command "c:\python37\python.exe -u -c "import setuptools, tokenize;file='C:\Users\walcz\AppData\Local\Temp\pip-install-cwy5vyjv\av\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\walcz\AppData\Local\Temp\pip-record-wr1e1tox\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\walcz\AppData\Local\Temp\pip-install-cwy5vyjv\av`

I have tried with conda, but this made another problem with not found module. I have windows 10

If i am trying to do this that way: python setup.py build --ffmpeg-dir=C:\ffmpeg
I am getting this:

C:\PyAV>python setup.py build --ffmpeg-dir=C:\ffmpeg2
running build
running build_py
running build_ext
running config
writing build\temp.win-amd64-3.7\Release\include\pyav\config.h
running cythonize
building 'av.buffer' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -Dinline=__inline -IC:\ffmpeg2 -Iinclude -Ibuild\temp.win-amd64-3.7\Release\include -IC:\Python37\include -IC:\Python37\include -IC:\Python37\include -Ibuild\temp.win-amd64-3.7\Release\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc\av\buffer.c /Fobuild\temp.win-amd64-3.7\Release\src\av\buffer.obj
buffer.c
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ffmpeg2 /LIBPATH:C:\Python37\libs /LIBPATH:C:\Python37\PCbuild\amd64 /LIBPATH:C:\Python37\libs /LIBPATH:C:\Python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" avcodec.lib swscale.lib avutil.lib avfilter.lib avformat.lib avdevice.lib swresample.lib /EXPORT:PyInit_buffer build\temp.win-amd64-3.7\Release\src\av\buffer.obj /OUT:build\lib.win-amd64-3.7\av\buffer.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\src\av\buffer.cp37-win_amd64.lib /OPT:NOREF
LINK : fatal error LNK1181: nie można otworzyć pliku wejściowego „avcodec.lib”
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe' failed with exit status 1181

need help with real time image

Hi! Thank you so much for your code! However I don't know how to get the real time image from the drone. In your example "video effect", the image is delayed for several seconds. Could you tell me how to get the real time image? Thank you very much!

downgrade python or anything

after wrote the line ; $ pip install dist/tellopy-0.5.0.dev*.whl --upgrade
i got the error
tellopy requires Python '>=2.7', !=3.0., !=3.1., !=3.2., !=3.3., !=3.4., !=3.5., <4' but the running is 3.5.3

How can i solve this problem ?

av.AVError: [Errno 1094995529] Invalid data found when processing input: 'VideoStream'

Hello, I'm trying to get the video from another thread. I took the code from your joystick_and_video.py example but I'm getting this:

Tello: 20:27:16.964: Info: video data 216980 bytes 105.4KB/sec loss=89
Traceback (most recent call last):
File "D:/MyProjects/Tello/test.py", line 25, in recv_thread
container = av.open(drone.get_video_stream())
File "av\container\core.pyx", line 275, in av.container.core.open
File "av\container\core.pyx", line 227, in av.container.core.Container.cinit
File "av\container\core.pyx", line 129, in av.container.core.ContainerProxy.init
File "av\container\core.pyx", line 195, in av.container.core.ContainerProxy.err_check
File "av\utils.pyx", line 105, in av.utils.err_check
av.AVError: [Errno 1094995529] Invalid data found when processing input: 'VideoStream'

video_effect.py sample code not working

Hi,

I noticed that av.open(drone.get_video_stream()) never returns.
Can anyone point out potential area to debug this?

        print("Connect Done")
        drone.wait_for_connection(60.0)
        print("Wait for Connect Done")
        container = av.open(drone.get_video_stream())
        print("AV Open Done")

Logs attached:

Tello: 12:13:03.980: Info: start video thread
Tello: 12:13:03.980: Info: send connection request (cmd="conn_req:9617")
Tello: 12:13:03.981: Info: video receive buffer size = 524288
Tello: 12:13:03.981: Info: state transit State::disconnected -> State::connecting
===Connect Done
Tello: 12:13:04.021: Info: connected. (port=9617)
Tello: 12:13:04.021: Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 12:13:04.021: Info: state transit State::connecting -> State::connected
===Wait for Connect Done
Tello: 12:13:04.055: Info: get video stream
Tello: 12:13:04.056: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 12:13:04.072: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 12:13:04.073: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 12:13:04.073: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 12:13:04.073: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 12:13:07.013: Info: video data 789925 bytes 379.9KB/sec
Tello: 12:13:09.015: Info: video data 755506 bytes 368.4KB/sec
Tello: 12:13:11.015: Info: video data 753945 bytes 368.1KB/sec
Tello: 12:13:13.015: Info: video data 752572 bytes 367.4KB/sec loss=1
Tello: 12:13:14.971: Info: video recv: 1460 bytes 5200 +784
Tello: 12:13:15.031: Info: video data 454465 bytes 220.1KB/sec loss=207
Tello: 12:13:16.759: Info: video recv: 1460 bytes 8300 +228
Tello: 12:13:16.983: Info: video recv: 1460 bytes 8a01 +105
Tello: 12:13:17.277: Info: video recv: 1460 bytes 8a06 +290
Tello: 12:13:17.277: Info: video data 590056 bytes 256.6KB/sec loss=58
Tello: 12:13:17.591: Info: video recv: 1460 bytes 9a07 +270
Tello: 12:13:17.764: Info: video recv: 1460 bytes a600 +145
Tello: 12:13:18.083: Info: video recv: 1460 bytes aa04 +279
Tello: 12:13:18.258: Info: video recv: 1460 bytes b404 +143
Tello: 12:13:18.563: Info: video recv: 1460 bytes b904 +274
Tello: 12:13:18.748: Info: video recv: 1460 bytes be07 +146
Tello: 12:13:18.920: Info: video recv: 1460 bytes c900 +140
Tello: 12:13:19.067: Info: video recv: 1460 bytes c901 +147
Tello: 12:13:19.243: Info: video recv: 1460 bytes d100 +144
Tello: 12:13:19.563: Info: video recv: 1460 bytes d703 +287
Tello: 12:13:19.563: Info: video data 188107 bytes 80.3KB/sec loss=538
Tello: 12:13:19.742: Info: video recv: 1460 bytes e005 +141
Tello: 12:13:19.988: Info: video recv: 1460 bytes e803 +215
Tello: 12:13:20.163: Info: video recv: 1460 bytes ef03 +147
Tello: 12:13:21.570: Info: video data 587037 bytes 285.6KB/sec loss=196
Tello: 12:13:23.151: Info: video recv: 1460 bytes 4a02 +177
Tello: 12:13:23.337: Info: video recv: 1460 bytes 4b00 +165
Tello: 12:13:23.668: Info: video recv: 1460 bytes 5903 +165
Tello: 12:13:23.669: Info: video data 568066 bytes 264.4KB/sec loss=108
Tello: 12:13:24.019: Info: video recv: 1460 bytes 6800 +141
Tello: 12:13:24.197: Info: video recv: 1460 bytes 6d00 +152
Tello: 12:13:24.630: Info: video recv: 1460 bytes 7600 +271
Tello: 12:13:24.814: Info: video recv: 1460 bytes 7f04 +140
Tello: 12:13:24.994: Info: video recv: 1460 bytes 8003 +164
Tello: 12:13:25.160: Info: video recv: 1460 bytes 8a00 +142
Tello: 12:13:25.332: Info: video recv: 1460 bytes 8f00 +134
Tello: 12:13:25.651: Info: video recv: 1460 bytes 9400 +278
Tello: 12:13:25.677: Info: video data 254564 bytes 123.8KB/sec loss=348
Tello: 12:13:25.828: Info: video recv: 1460 bytes 9406 +145
Tello: 12:13:26.005: Info: video recv: 1460 bytes a407 +147
Tello: 12:13:26.185: Info: video recv: 1460 bytes aa00 +164
Tello: 12:13:26.356: Info: video recv: 1460 bytes ab03 +145
Tello: 12:13:26.519: Info: video recv: 1460 bytes b500 +138
Tello: 12:13:26.661: Info: video recv: 1460 bytes b501 +141
Tello: 12:13:26.843: Info: video recv: 1460 bytes bd03 +153

Error with v0.6.0 version of keyboard_and_video.py

Last error I got when starting tellopy 0.6.0 is, with usage of:

Tello: 01:01:41.501: Error: video recv: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/home/dusan/miniconda2/lib/python2.7/site-packages/tellopy/_internal/tello.py", line 694, in __video_thread
self.__publish(event=self.EVENT_VIDEO_FRAME, data=data[2:])
File "/home/dusan/miniconda2/lib/python2.7/site-packages/tellopy/_internal/tello.py", line 154, in __publish
dispatcher.send(event, sender=self, **args)
File "/home/dusan/miniconda2/lib/python2.7/site-packages/tellopy/_internal/dispatcher.py", line 35, in send
receiver(event=sig, **named)
File "keyboard_and_video.py", line 191, in videoFrameHandler
video_player = Popen(cmd + ['-'], stdin=PIPE)
File "/home/dusan/miniconda2/lib/python2.7/subprocess.py", line 394, in init
errread, errwrite)
File "/home/dusan/miniconda2/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

this happened previously on 0.5.0 , I am not sure where to look at (both on keyboard_and_video.py). Thanks for fast solving previous issues!

converting video feed to frames

Hi, first of all thank you for this great library! I am writing some tracking code so that the tello will follow a green ball that is working with a standard opencv video stream. I would be lost without your example code.

I am building on your keyboard_and_video example, as best I understand it you set up a handler function and a thread in tello.py streams packets to it when they are received. The packets are 1460 bytes in length, these are then piped directly into the window using mplayer.

I was going to copy your video_effects implementation but it differs slightly in how it collects the frames. It creates the stream directly, wraps it in an av container and then decodes that.

Should I use two separate approaches for the frames or is there a way of parsing the packets in the videoHandler function into frames?

Any help would be greatly appreciated!

Throw takeoff

Thank you for your great work.

It seems there is no entry point for the throw takeoff (command id = 0x005d) in TelloPy.
Is there a reason for that ? Or can it be included ?

Tello realt time flight data and 2.0 SDK integration

I'm currently working on a project requiring me to read a bit more of the tello sensor data.
As i see from the code, currently the IMU data is interpolated from the log data among other things.
However, i was wondering what the time delay is between a movement and reading it in the log? Can this data be assumed to be near real time? Or is there a possibility to also get the timestamp of recording from this log?
(On a side note, in protocol the IMU data after quaternion is interpreted as vg_x, vg_y and vg_z, whereas in tellolib these values are interpreted as relative velocities N, E and D. Is there some more documentation that I could read about the log data values and their units/meaning? )

Additionally in the 1.3 SDK manual it is explained that you can receive the state over the 8890 port. This is quite interesting data. And could possibly have a shorter delay. However, I can't find any reference that it is being used in this code? Is this something that was skipped on purpose or something that I could still maybe implement and create a pull request for (this could also include integration for the 2.0 sdk and landing pad)? I can see that there is some overlapping information in the FlightData object, but I can't find a lot of documentation about the FLIGHT_MSG data structure, and what the units are for these parameters. How did you guys discover these parameters, is there some more extensive online documentation I could read?

I don't know how to get a picture I took.

Thank you for your splendid work.

I'm new to Tello and I can't understand how to take a picture and save it as image file by TelloPy.
I'm using take_picture() method as follows but got a bunch of error messages.
Should I make some variable for the return value of take_picuter() method and then convert it to img file somehow?
Can someone clarify this for me?

Thank you in advance!

import tellopy
tl = tellopy.Tello()
tl.connect()
tl.takeoff()
tl.take_picture()
tl.quit()

[Edit]
I think this might help me out.

Try opening inbound UDP ports 9000, 9617, and 6038

But, I'm not sure for the way of opening inbound UDP ports by those mentioned ports.

can i not use mplayer to play the EVENT_VIDEO_FRAME

from the example, there is the way top print the data to video_player directly. However, I cant use the mplayer.

is that possible to play the EVENT_VIDEO_FRAME data to like a cv2 frame like the example for video effect? thanks

Stop debug information

Hi,

I find the printed debugging information is not always helpful. Is there an easy way to disable this without going into the source code? I'm referring to constant messages such as
Tello: 22:58:29.034: Info: video data 754039 bytes 368.0KB/sec
Tello: 22:58:29.074: Info: counter_clockwise(val=50)
for example. Btw, nice module - works a treat after fighting with av

Regular image sampling and latency

Is there a way to slow down the for loop in the video streaming example :
"for frame in container.decode(video=0):" so we can use heavy slow computations in each iteration of the loop and keep having a regularly sampled images stream ?

Or maybe we could use http://www.scikit-video.org/stable/ for this instead ?

Tello: 13:10:59.961: Error: video recv: timeout

Hello, congratulations for the Tello initiative.

I'm having trouble trying to use these are some of the errors

Error Running joystick_and_video.py

Tello video WID: 722040
Tello: 13:10:53.959: Info: start video thread
Tello: 13:10:53.959: Info: send connection request (cmd="conn_req:9617")
Tello: 13:10:53.959: Info: video receive buffer size = 524288
Tello: 13:10:53.960: Info: state transit State::disconnected -> State::connecting
Tello: 13:10:53.960: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 13:10:53.963: Info: connected. (port=9617)
Tello: 13:10:53.963: Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 13:10:53.964: Info: state transit State::connecting -> State::connected
Tello: 13:10:53.964: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 13:10:53.964: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 13:10:54.017: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 13:10:54.018: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
Tello: 13:10:59.961: Error: video recv: timeout

Error Running joystick_and_video.py

Tello: 13:14:19.936: Info: start video thread
Tello: 13:14:19.937: Info: send connection request (cmd="conn_req:9617")
Tello: 13:14:19.937: Info: video receive buffer size = 524288
Tello: 13:14:19.937: Info: state transit State::disconnected -> State::connecting
Tello: 13:14:19.937: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 13:14:19.977: Info: connected. (port=9617)
Tello: 13:14:19.977: Info: send_time (cmd=0x46 seq=0x01e4)
Tello: 13:14:19.977: Info: state transit State::connecting -> State::connected
Tello: 13:14:19.978: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 13:14:19.978: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
ALT: 0 | SPD: 0 | BAT: 9 | WIFI: 0 | CAM: 0 | MODE: 1
Tello: 13:14:20.029: Info: recv: ack: cmd=0x34 seq=0x0000 cc 60 00 27 90 34 00 00 00 00 72 a5
Tello: 13:14:20.029: Info: recv: ack: cmd=0x20 seq=0x0000 cc 60 00 27 b0 20 00 00 00 00 42 b9
ALT: 0 | SPD: 0 | BAT: 9 | WIFI: 90 | CAM: 0 | MODE: 1
Tello: 13:14:25.940: Error: video recv: timeout
Tello: 13:14:30.941: Error: video recv: timeout
Tello: 13:14:35.941: Error: video recv: timeout
Tello: 13:14:40.942: Error: video recv: timeout
Tello: 13:14:45.943: Error: video recv: timeout
ALT: 0 | SPD: 0 | BAT: 8 | WIFI: 90 | CAM: 0 | MODE: 1
Tello: 13:14:50.943: Error: video recv: timeout
Tello: 13:14:55.944: Error: video recv: timeout
Tello: 13:15:00.944: Error: video recv: timeout
Tello: 13:15:05.945: Error: video recv: timeout

take_picture() Warn: file size: payload too small: 00

Hello,
I would like to know why i can not take a picture. I received the message:

Thank you!

Tello: 13:25:14.920: Info: unknown packet: 0030 cc 60 00 27 b0 30 00 00 00 00 02 0d
Tello: 13:25:14.921: Info: recv: file size: cc 90 00 be 88 62 00 2e 00 01 d8 d5 09 00 00 00 2b 5f
Tello: 13:25:14.921: Info: file size: num=0 bytes=644568
ALT: 10 | SPD: 0 | BAT: 61 | WIFI: 90 | CAM: 0 | MODE: 6
Tello: 13:25:14.971: Info: recv: file size: cc 60 00 27 50 62 00 2e 00 00 db ff
Tello: 13:25:14.972: Warn: file size: payload too small: 00

This is the code that is almost the same that sample you provide:

from time import sleep
import tellopy

def handler(event, sender, data, **args):
drone = sender
if event is drone.EVENT_FLIGHT_DATA:
print(data)

def test():
drone = tellopy.Tello()
try:
drone.subscribe(drone.EVENT_FLIGHT_DATA, handler)

    drone.connect()
    drone.wait_for_connection(60.0)
    drone.takeoff()
    sleep(5)
    drone.take_picture()
    sleep(5)
    drone.land()
except Exception as ex:
    print(ex)
finally:
    drone.quit()

if name == 'main':
test()

socket.close() to properly quit?

Hi, I just got a tello and playing with TelloPy.
I am able to control the drone the first time, but when I quit, change wifi to my house' wifi and change back to the drone' wifi, I will have problem connecting the drone.
Very often I have some problem when running drone.connect(), it outputs "State::disconnected -> State::connecting
Tello: 00:34:24.793: Info: send connection request (cmd="conn_req:9617")"
then repeatly outputs "Tello: ...: Info: send connection request (cmd="conn_req:9617")"

also sometimes I get error saying "address already in use".

I don't know if it's because TelloPy didn't quit properly. I am not very familiar with python sockets.
Do you think it's a good idea to have a destructor function like the following:

class Tello:
...
    def __del__(self):
        if self.sock:
            self.sock.close()
        # and close other sockets  in background threads

I dont know if this will solve my problem.

Where is the images / videos stored?

I managed to fly the tello drone using keyboard_video code and i was wondering where are the images stored? Also i have mplayer but i have no idea where is the videos are stored..

Any help is appreciated!

Weird event datas

I wanted to gather more data about flights but it seems that they are weirdly encoded when I follow the "joystick" example.

def handler(event, sender, data, **args):
    global prev_flight_data
    global video_player
    global prev_ev_connected
    global prev_EVENT_LIGHT
    global prev_EVENT_LOG
    global prev_EVENT_TIME
    global prev_FLIGHT_EVENT
    global prev_EVENT_WIFI
    drone = sender
    if event is drone.EVENT_FLIGHT_DATA:
        if prev_flight_data != str(data):
            print('les flight valent')
            print(data)
            prev_flight_data = str(data)
    elif event is drone.EVENT_LIGHT:
        if prev_EVENT_LIGHT != str(data):
            print('les EVENT_LIGHT datas valent')
            print(data)
            prev_EVENT_LIGHT = str(data)
    elif event is drone.EVENT_LOG:
        if prev_EVENT_LOG != str(data):
            print('les prev_EVENT_LOG datas valent')
            print(data)
            prev_EVENT_LOG = str(data)

I receive strings of this format : b",C\x00'\x00\x00\x00\x03\x00\x00\x00*\x00\x00\x00\x00\x00\x00\x00BUILD Apr 23 2018 12:19:39\x00\x00\x00\x00\x00\x00F\xc3#\x00\x07\x00\x00\x00\x00\x03e\x01\x1b\x16\x13`\x00eebf\x1b\x11\x00UU\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaaUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU\x90\x07\x00\x00\x8f\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00DJI_LOG_V3\x92\xdbK\t\xfd\xe9" .

"height= 2, fly_mode=0x0c, battery_percentage=74, drone_battery_left=0x0000" <- even flight datas actually aren't properly formatted.

What can I do to fix it ? Wifi strength is for example something I really needed.

question on units

Not sure if this is the correct place to ask, but I'm stumped.

Love this library, but I can't figure out the units for various movements. so when I issue a left(10) for example, is that cm, inches, etc ? but more puzzling are the rotations, so I can issue a clockwise(90) but it doesn't seem the value (which says from 1-100) is a degree.

what units are used ? Again, sorry if this is the wrong place to ask - pointers to the correct place would be appreciated !

-Matt

Manage to run the testcode, but nothing is happening with Tello

Hey

I am currently trying to get the tello to work with python. I've downloaded your zip folder and tried running the simple_takeoff-file, but it is only loading in the run window. Nothing is happening with the Tello that's on the ground.

  1. I've downloaded what you said needed to be downloaded
  2. I added the folder in the same location
  3. I connected the tello to the wifi
  4. The window is running, but nothing is happening.
  5. I also tried to change the ports and ip to 8888 and xxx.xxx.xx.2

What should I try?

Error on install OSX 10.13

I am trying to follow the examples in the readme and I get the following errors

Computer-2:~ ihf$ pip install av
Collecting av
Downloading https://files.pythonhosted.org/packages/15/80/edc9e110b2896ebe16863051e68bd4786efeda71ce94b81a048d146062cc/av-6.1.0.tar.gz (2.0MB)
100% |################################| 2.0MB 6.9MB/s
Building wheels for collected packages: av
Running setup.py bdist_wheel for av ... error
Complete output from command /Users/ihf/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-YLV_Ug/av/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-wheel-jZqY1E --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/av
copying av/init.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/main.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/datasets.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/deprecation.py -> build/lib.macosx-10.6-x86_64-2.7/av
creating build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/init.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/audio.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/audio_player.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/average.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/decode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/decode_threads.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/encode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/encode_frames.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/experimental.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/glproxy.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/graph.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/player.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/qtproxy.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/remux.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/seekmany.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
creating build/lib.macosx-10.6-x86_64-2.7/av/audio
copying av/audio/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/audio
creating build/lib.macosx-10.6-x86_64-2.7/av/codec
copying av/codec/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/codec
creating build/lib.macosx-10.6-x86_64-2.7/av/container
copying av/container/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/container
creating build/lib.macosx-10.6-x86_64-2.7/av/data
copying av/data/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/data
creating build/lib.macosx-10.6-x86_64-2.7/av/filter
copying av/filter/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/filter
creating build/lib.macosx-10.6-x86_64-2.7/av/subtitles
copying av/subtitles/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/subtitles
creating build/lib.macosx-10.6-x86_64-2.7/av/video
copying av/video/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/video
running build_ext
running config
Could not find libavformat with pkg-config.
Could not find libavcodec with pkg-config.
Could not find libavdevice with pkg-config.
Could not find libavutil with pkg-config.
Could not find libavfilter with pkg-config.
Could not find libswscale with pkg-config.
Could not find libswresample with pkg-config.


Failed building wheel for av
Running setup.py clean for av
Failed to build av
Installing collected packages: av
Running setup.py install for av ... error
Complete output from command /Users/ihf/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-YLV_Ug/av/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-record-bdS81Q/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-2.7
creating build/lib.macosx-10.6-x86_64-2.7/av
copying av/init.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/main.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/datasets.py -> build/lib.macosx-10.6-x86_64-2.7/av
copying av/deprecation.py -> build/lib.macosx-10.6-x86_64-2.7/av
creating build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/init.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/audio.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/audio_player.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/average.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/cctx_decode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/cctx_encode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/decode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/decode_threads.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/dump_format.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/encode.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/encode_frames.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/experimental.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/filmstrip.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/frame_seek_example.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/glproxy.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/graph.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/merge-filmstrip.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/player.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/qtproxy.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/remux.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/resource_use.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/save_subtitles.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/second_seek_example.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/seekmany.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
copying scratchpad/show_frames_opencv.py -> build/lib.macosx-10.6-x86_64-2.7/scratchpad
creating build/lib.macosx-10.6-x86_64-2.7/av/audio
copying av/audio/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/audio
creating build/lib.macosx-10.6-x86_64-2.7/av/codec
copying av/codec/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/codec
creating build/lib.macosx-10.6-x86_64-2.7/av/container
copying av/container/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/container
creating build/lib.macosx-10.6-x86_64-2.7/av/data
copying av/data/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/data
creating build/lib.macosx-10.6-x86_64-2.7/av/filter
copying av/filter/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/filter
creating build/lib.macosx-10.6-x86_64-2.7/av/subtitles
copying av/subtitles/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/subtitles
creating build/lib.macosx-10.6-x86_64-2.7/av/video
copying av/video/init.py -> build/lib.macosx-10.6-x86_64-2.7/av/video
running build_ext
running config
Could not find libavformat with pkg-config.
Could not find libavcodec with pkg-config.
Could not find libavdevice with pkg-config.
Could not find libavutil with pkg-config.
Could not find libavfilter with pkg-config.
Could not find libswscale with pkg-config.
Could not find libswresample with pkg-config.

----------------------------------------

Command "/Users/ihf/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-YLV_Ug/av/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-record-bdS81Q/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/y2/38gkkc0s7d52_mr_s6zfj7m80000gq/T/pip-install-YLV_Ug/av/:

Error: mplayer file or directory not found

Hi,

when I ran the file "keyboard_and_video.py" in the examples folder, an error showed "FileNotFoundError: [Errno 2] No such file or directory: 'mplayer': 'mplayer'".

However, even I installed the mplayer the result was still the same.
What is more puzzling is that there are so many kinds of mplayer files on the Internet. I don't know if I got the right one
The location of the mplayer file could be the reason of the error, yet I am just a novice in programming and have no idea which location should I install at properly.

Thanks for any help.

the full text of error massage is below:

Tello: 16:47:37.085: Info: video recv: 1460 bytes 3502 +350
Tello: 16:47:37.141: Error: video recv: [Errno 2] No such file or directory: 'mplayer': 'mplayer'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tellopy/_internal/tello.py", line 694, in __video_thread
self.__publish(event=self.EVENT_VIDEO_FRAME, data=data[2:])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tellopy/_internal/tello.py", line 154, in __publish
dispatcher.send(event, sender=self, **args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tellopy/_internal/dispatcher.py", line 35, in send
receiver(event=sig, **named)
File "/Users/ericwang/TelloPy/tellopy/examples/keyboard_and_video.py", line 191, in videoFrameHandler
video_player = Popen(cmd + ['-'], stdin=PIPE)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mplayer': 'mplayer'

get current altitude?

Just wondering if there's a method to get current altitude from the device from the IR sensors mounted on the underside? I saw #11 regarding orientation - is there a way/are there plans to add an absolute position tracking relative to its liftoff point?

Thanks,

Accessing camera in picture mode

Hi, firstly thanks for this great python-tello interface!

Is there a way to access the Tello's camera in picture mode? I'm able to save frames from the video feed. However, these are lower quality than what is possible in camera mode (at least through the app), and sometimes they capture pixelation from the video stream.

Any help would be greatly appreciated!

opencv av stream

Hi!
Thanks for amazing SDK!
There is an issue in video_effect.py: the video by default has very big lag. It tries to work on every single frame with huge resolution and it has certain delay.
I guess we could use something like this but more sophisticated like adaptive frame skip:

        while True:
            i = 0
            for frame in container.decode(video=0):
                print i
                i=i+1
                if i>300: #skip first 300 frames
                    if i%4==0: #do only 1/4 frames
                        im = numpy.array(frame.to_image())
                        im = cv2.resize(im, (320,240)) #resize frame
                        image = cv2.cvtColor(im, cv2.COLOR_RGB2BGR)
                        cv2.imshow('Original', image)
                        cv2.imshow('Canny', cv2.Canny(image, 100, 200))
                        cv2.waitKey(1)

Applying sport mode; stick command packet length might be wrong

I'm using tello edu.
I would like to enter sport mode with it, but when I set mode=1 in __send_stick_command function, it didn't enter the sport mode.

I found that tello.py __send_stick_command is sending 27 byte command.
When I captured the tello communication with wireshark, the stick command was 22 byte long.
The difference was the timestamp.
tello.py uses 2 bytes for each date element (eg. 2bytes for year, 2bytes for month and so on)
whereas tello app uses 1 bytes for each.

Alternative to Tello

Hi, maybe this question is not a good fit for this repo but wondered what the TelloPy contributors think about it. I have been looking for programmable drones through SDK, just like Tello. What I mean is that I don't want the mobile or onboard SDK, I want the server-client style SDK that I can communicate with drones through wifi network. Does any of you happen to know other off-the-shelf drones that have a good SDK support and possibly support drone swarming natively? My first programmable drone was Tello and thus it's hard for me to believe that Tello is the best option out there considering its cheap price..

Question and parameters passed

I don't see it documented anywhere - but when I used the clockwise(x) method (or any other method that has the drone rotate) - what does the 'x' represent ?

For the forward(x) method, I see the 'x' represents cm/sec speed - but I can't figure out the rotations

thanks.....Matt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.