Skip to content

DJI Tello drone python interface using the official Tello SDK. Feel free to contribute!

License

Notifications You must be signed in to change notification settings

jerickpmontero/DJITelloPy

 
 

Repository files navigation

DJITelloPy

DJI Tello drone python interface using the official Tello SDK and Tello EDU SDK. Yes, this library has been tested with the drone. Please see example.py for a working example controlling the drone as a remote controller with the keyboard and the video stream in a window.

This library works with python >= 3.5.

Feel free to contribute!

Install using pip

$ pip install https://github.com/damiafuentes/DJITelloPy/archive/master.zip

For Linux distributions with both python2 and python3 (e.g. Debian, Ubuntu, ...) you need to run

$ pip3 install https://github.com/damiafuentes/DJITelloPy/archive/master.zip

Install using git clone

$ pip install --upgrade pip
$ git clone https://github.com/damiafuentes/TelloSDKPy.git
$ cd TelloSDKPy
$ pip install -r requirements.txt

Usage

Simple example

from TelloSDKPy.djitellopy import Tello
import cv2
import time

tello = Tello()

tello.connect()
tello.takeoff()

tello.move_left(100)
tello.rotate_counter_clockwise(45)

tello.land()
tello.end()

Example using opencv and the video stream

Please see example.py.

The controls are:

  • T: Takeoff
  • L: Land
  • W, A, S, D: Forward, backward, left and right.
  • E, Q: Counter clockwise and clockwise rotations
  • R, F: Up and down.
  • Ctrl+C to land and exit

Swarm example

Only for Tello EDU's.

from TelloSDKPy.djitellopy import TelloSwarm

swarm = TelloSwarm.fromIps([
    "192.168.178.42",
    "192.168.178.43",
    "192.168.178.44"
])

swarm.connect()
swarm.takeoff()

# run in parallel on all tellos
swarm.move_up(100)

# run by one tello after the other
swarm.sequential(lambda i, tello: tello.move_forward(i * 20))

# making each tello do something unique in parallel
swarm.parallel(lambda i, tello: tello.move_left(i * 100))

swarm.land()
swarm.end()

Notes

  • If you are using the streamon command and the response is Unknown command means you have to update the Tello firmware. That can be done through the Tello app.
  • Mission pad detection and navigation is only supported by the Tello EDU.
  • Connecting to an existing wifi network is only supported by the Tello EDU.
  • When connected to an existing wifi network video streaming is not available.

Authors

  • Damià Fuentes Escoté
  • Jakob Löw
  • and more

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

DJI Tello drone python interface using the official Tello SDK. Feel free to contribute!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%