tello-asyncio
A library for controlling and interacting with the Tello EDU drone using modern asynchronous Python. All operations are implemented as awaitable coroutines, completed when the drone sends acknowledgment of the command message.
Package tello-asyncio on PyPi.
$ pip3 install tello-asyncio
import asyncio
from tello_asyncio import Tello
async def main():
drone = Tello()
try:
await drone.connect()
await drone.takeoff()
await drone.turn_clockwise(360)
await drone.land()
finally:
await drone.disconnect()
asyncio.run(main())
See the examples directory for more usage example scripts.
Requires Python 3.6+. Developed and tested with Python 3.9.4 in Mac OS and 3.6.9 in Ubuntu 18.04 on a Jetson Nano. The tello_asyncio package has no other dependencies (and never will have any), but some examples need other things to be installed to work.
Full documentation is available on Read the docs
(If Rust is more your thing, there is also an equivalent aynchronous Rust library tello-edu)
Tello SDK Support
- Tello SDK 2.0 (Tello EDU) - complete support
- Tello SDK 3.0 (RoboMaster TT) - complete support, but
EXTcommands for controlling LEDs etc must be formatted by the user
A Note on Awaiting
The Tello SDK command/response model is a natural fit for the asynchronous python awaitable idea, but the drone will get confused if commands are sent before it's had a chance to respond. Each command should be awaited before sending the next.
It works best sequentially like this...
await drone.takeoff()
await drone.land()
...but not concurrently (which will not work as expected)
await asyncio.gather(
drone.takeoff(),
drone.land()
)
Version History
1.0.0
Basic drone control
- UDP connection for sending commands and receiving responses (default AP mode only - you must join the drone's own WiFi network)
- take off and land
- rotate clockwise and counter-clockwise
- move up, down, left, right, forward and back
1.1.0
Drone state
- listens for and parses UDP state messages (not yet including the mission pad related values)
- access via the read only
stateobject attribute, or via shortcuts likeheight,temperatureetc - constructor takes an optional
on_statecallback argument for notification of new state - or use the asynchronous generator
state_streamfor an infinite stream of updates
1.2.0
Advanced drone control
- flips
- go/curve to relative position
- emergency stop
Video
- start/stop video stream
- video url
Error handling
- handles error command responses from drone
1.3.0
Complete SDK
- mission pads
- wifi
- remote control
Video
- raw video frame data via callback or async generator
Error handling
- detects command/response mismatch
1.3.1
- Documentation
1.3.2
- Documentation on Read the docs
1.4.0
- Video frame data reassembled properly from UDP packet chunks
- Working video frame decoding example
1.4.1
- Video in OpenCV example
1.5.0
- Python 3.6 support
1.6.0
- Drone instance passed to state and video callbacks
- Wait for WiFi network (Linux only)
2.0.0
- Tello SDK 3.0 support
2.1.0
- Wait for Wifi network implemented for macOS as well as Linux
- Mission pad fixes & example improvement (thanks @jsolderitsch!)
2.1.1
- Examples ask the user for the WiFi name prefix
2.1.2
- Don't wait for a response from remote control (
rc x x x x) commands
2.1.3
- Various SDK 3.0 fixes (thanks @jdelfino!)
- Handle "forced stop" message which arrives out of sequence
Metadata
Release files for tello-asyncio 2.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tello_asyncio-2.1.3.tar.gz | 23.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tello_asyncio-2.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.8 kB
Release files / tello_asyncio-2.1.3.tar.gz
| Download URL | tello_asyncio-2.1.3.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f4329a4c68023fd72785a50003b0c2251eece345190240205d1a96f37df0581
|
|
BLAKE2b-256 checksum How to use checksums |
eebb8cc68c0df4fc0b4b38c245992f7fc9fa889090dab4e80f6dce8cc89b71aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / tello_asyncio-2.1.3-py3-none-any.whl
| Download URL | tello_asyncio-2.1.3-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1262381a57d7e2d7bcec2b5e24ed6da830d6ae49e13a8a8f21937cb94cbedf9c
|
|
BLAKE2b-256 checksum How to use checksums |
836b218752be7d4013c87857e9fba241bf526336690bb08b6b43350573538039
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Security for tello-asyncio 2.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.