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

New Python library - tello-asyncio

robagar

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
5
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

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
5
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

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
5
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

Member
Joined
Apr 17, 2021
Messages
6
Reaction score
5
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
 

New Threads

Members online

No members online now.

Forum statistics

Threads
5,027
Messages
36,363
Members
13,454
Latest member
DrCaligarius