Flying the Tello drone with CUDA video processing

I’m proud to a announce a new Python library jetson-tello for controlling and interacting with the Tello EDU drone using modern, asynchronous Python.

The primary aim is to make it simple to program the drone’s movement while feeding video frames to CUDA programs like face and object detection, without falling behind the live video stream.

Built and tested with the Tello EDU drone and a 2GB Jetson Nano.

The related tello-asyncio library provides the asyncio-based drone control, while CUDA functionality is from NVIDIA’s jetson-inference.

Free for non-commercial use (LGPL).

Here’s an example - take off, look around and look for faces:

#!/usr/bin/env python3

import asyncio
import jetson.inference
from jetson_tello import run_jetson_tello_app


face_detector = jetson.inference.detectNet("facenet", threshold=0.5)


def detect_faces(drone, frame, cuda):
    face_detections = face_detector.Detect(cuda)

    for d in face_detections:
        print(d)


async def fly(drone):
    await drone.takeoff()
    for i in range(4):
        await drone.turn_clockwise(90)
        await asyncio.sleep(3)
    await drone.land()


run_jetson_tello_app(fly, process_frame=detect_faces)
1 Like