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.
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())
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.
Tello SDK Support¶
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() )