Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

New Python library - tello-asyncio

robagar

Active member
Joined
Apr 17, 2021
Messages
28
Reaction score
12
Hi all - I've just made the first release of my new library tello-asyncio, using modern asynchronous Python to control the drone.

It's very basic at the moment with just simple control of the drone - take off, fly around and land like this

Python:
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())

...but things like drone status and video will be coming soon :)
 

robagar

Active member
Joined
Apr 17, 2021
Messages
28
Reaction score
12
tello-asyncio 1.1.0 is up on pypi :D

Drone state
- listens for and parses UDP state messages (not yet including the mission pad related values)
- access via the read only `state` object attribute, or via shortcuts like `height`, `temperature` etc
- constructor takes an optional `on_state` callback argument for notification of new state
- or use the asynchronous generator `state_stream` for an infinite stream of updates
 
Joined
May 2, 2021
Messages
2
Reaction score
0
Hi all - I've just made the first release of my new library tello-asyncio, using modern asynchronous Python to control the drone.

It's very basic at the moment with just simple control of the drone - take off, fly around and land like this

Python:
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())

...but things like drone status and video will be coming soon :)
Love it! :) Great work! I've been reading the Python Docs related to your code and coding all evening, and it's now 1:01am. I get my Tello EDU in a few days. Have you heard of uvloop? What do you think?
 

robagar

Active member
Joined
Apr 17, 2021
Messages
28
Reaction score
12
Glad you like it!

I've not tried uvloop, but it does sound useful. Are there any performance comparisons with the latest python built in asyncio? I think there were some speed optimizations in recent releases so it might have caught up a bit
 

robagar

Active member
Joined
Apr 17, 2021
Messages
28
Reaction score
12
tello-asyncio 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
 

robagar

Active member
Joined
Apr 17, 2021
Messages
28
Reaction score
12
tello-asyncio 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
 

New Threads

Members online

Forum statistics

Threads
5,111
Messages
36,952
Members
13,813
Latest member
Ramen