Skip to main content

Tello drone integration with Jetson

Project description

jetson-tello

Jetson plus Tello

Utility code for using the NVIDIA Jetson and tello-asyncio to interact with the Tello EDU drone.

The primary function so far is to pipe video frame data from the drone through to neural networks running on the Jetson, typically for object or face detection.

Created for my autonomous drone hobby project, drone-braain, which is very much in its infancy.

Package jetson-tello on PyPi.

Full documentation on Read the Docs.

Prerequisites

There are two prerequisites that require manual installation:

Example code

The flying_drone_face_and_object_detection.py example demonstrates feeding video frames to object and face detection neural nets

#!/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)
object_detector = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)


def detect_faces_and_objects(drone, frame, cuda):
    face_detections = face_detector.Detect(cuda)
    object_detections = object_detector.Detect(cuda)

    print('faces:')
    for d in face_detections:
        print(d)

    print('objects:')
    for d in object_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_and_objects)

Which typically outputs a stream of results like this (along with a fair amount of spam from the h.264 decoder):

    faces:
    <detectNet.Detection object>
       -- ClassID: 0
       -- Confidence: 0.809878
       -- Left:    434.667
       -- Top:     0
       -- Right:   702.267
       -- Bottom:  302.5
       -- Width:   267.6
       -- Height:  302.5
       -- Area:    80949
       -- Center:  (568.467, 151.25)
    objects:
    <detectNet.Detection object>
       -- ClassID: 7
       -- Confidence: 0.500977
       -- Left:    0
       -- Top:     7.30054
       -- Right:   959
       -- Bottom:  719.04
       -- Width:   959
       -- Height:  711.74
       -- Area:    682559
       -- Center:  (479.5, 363.171)

Version history

1.0.0

  • Decode h.264 video frame data from the drone and load into NumPy arrays and CUDA memory
  • Face and object detection neural net examples
  • Common Objects in Context (COCO) classes

1.1.0

  • Fly drone and process CUDA frames app utility function
  • Decoded frame data object

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jetson_tello-1.1.8.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

jetson_tello-1.1.8-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file jetson_tello-1.1.8.tar.gz.

File metadata

  • Download URL: jetson_tello-1.1.8.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for jetson_tello-1.1.8.tar.gz
Algorithm Hash digest
SHA256 7beaab3b4bd7e6ac04bf87149beb0cbc3916b0240cbea91536e992f3e80759f2
MD5 d50ebc009928d98dc1a615d32c45f7c8
BLAKE2b-256 e6336a862e4900d571721c95dcff9584b632dcc4bbfa9dbbb323b5265d16352e

See more details on using hashes here.

File details

Details for the file jetson_tello-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: jetson_tello-1.1.8-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for jetson_tello-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 97c80650f07ab986b8974488bfb9db0b84b5dbedcc946e6ac8d67c73a8739dc3
MD5 e20d8cbb5f1d686e06d0636d0fc809a7
BLAKE2b-256 76e83a6341d4bae92fbec3183b5c0f3b4838f3a5ae236c66025e1555b2510d1d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page