Skip to main content

A Python-based DJI Tello interface which utilizes parallel processing.

Project description

SAC-Tello

A simple library for controlling a DJI Tello Drone. Built for educational use.

Dependencies

numpy>=1.23.4

opencv-python>=4.6.0.66

face_recognition>=1.3.0

pygame>=2.2.0

Install

SAC-Tello can be install by running the following command:

python3 -m pip install SAC-Tell0

for MacOS/Linux

Or

python -m pip install SAC-Tello

for Windows

How To Use

Tello Drone

The primary interface for the drone is the TelloDrone class.

Creating a TelloDrone object is a simple as the following:

from SAC_Tello import TelloDrone
drone = TelloDrone()

A created drone object does not connect to the tello drone. This merely sets up everything that needs to be in place before a connection is made.

To connect to the Tello, the TelloDrone class has a method called start() once the Tello is connected remember to call the close() method when done.

For example a simple takeoff and land program looks like this:

from SAC_Tello import TelloDrone
drone = TelloDrone()
drone.start()
drone.takeoff()
drone.land()
drone.close()

The following are all commands that can be sent to the Tello:

Command Method Arguments
takeoff takeoff None
land land None
up up distance: int
down down distance: int
left left distance: int
right right distance: int
forward forward distance: int
backward backward distance: int
rotate cw rotate_cw degrees: int
rotate ccw rotate_ccw degrees: int
flip left flip_left None
flip right flip_right None
flip forward flip_forward None
flip backward flip_backward None
move move x: int, y: int, z: int, spd: int
emergency emergency None

Tello Heads-up Display

As an additional feature SAC-Tello gives access to a near-real time video stream while the Tello is connected. To make this stream more useful a HUD was added. This HUD shows the following:

  • Current Battery life
  • Current Time-of-Flight sensor reading
  • Artificial Horizon indicating changes in pitch rnd roll

To use the HUD simply import and create a TelloDrone object and link it with a TelloHud object:

from SAC_Tello import TelloDrone, TelloHud
drone = TelloDrone()
hud = TelloHud(drone)
drone.start()
hud.activate_hud()
hud.deactivate_hud()
drone.close()

The HUD will launch a separate window when activated. This window can be closed at anytime by pressing the X in the upper right-hand corner.

Note: Before the HUD is activated nothing will happen. Once the HUD is active you will need to deactivate before your program ends.

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

sac_tello-0.0.5.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

sac_tello-0.0.5-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file sac_tello-0.0.5.tar.gz.

File metadata

  • Download URL: sac_tello-0.0.5.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for sac_tello-0.0.5.tar.gz
Algorithm Hash digest
SHA256 71cd59185c553b88a24423d81603afeb6d1091052e90c9fbca546854303650aa
MD5 c3f637428ec5198e650cef18a08bd3f9
BLAKE2b-256 4b6b1bbe126e86cd699012e0827e236685d61d6717ee332d0c9e32a1b64faf4c

See more details on using hashes here.

File details

Details for the file sac_tello-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: sac_tello-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 44.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for sac_tello-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d1b8aa437fa4707a3f720a8c4bf81af81233e1e4595ebe7f1760fd738fcc85ae
MD5 492b5cc16f9b6fad17607ef54a2dec4b
BLAKE2b-256 ad66876b495956f0b3ae86665e62cebc9789b279645cc53d785516e217bab175

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