Skip to main content

A local DJI Tello simulator with a djitellopy-compatible Python API and 3D Pygame renderer.

Project description

DJI Tello Simulator

djitellopy-sim is a local simulator for DJI Tello programs. It exposes a djitellopy-style Tello and TelloSwarm API while rendering drones in a Pygame 3D scene instead of sending UDP commands to physical hardware.

Features

  • 3D projected drone renderer with altitude, yaw, tilt, rotors, shadows, trails, and extension LED color.
  • Single-drone and swarm simulation.
  • Broad compatibility with djitellopy 2.5.0 method names.
  • Simulated state packets, query commands, RC control, video frame reads, mission pad toggles, video settings, and Tello Talent extension commands.
  • PyPI-ready packaging with automatic dependency installation.
  • Uses pygame-ce for modern prebuilt wheels, including macOS universal2 wheels, while still importing the runtime module as pygame.

Installation

From a local checkout:

python -m pip install .

For development:

python -m pip install -e .

Usage

from djitellopySim import Tello

tello = Tello()
tello.connect()
tello.takeoff()
tello.move_forward(100)
tello.rotate_clockwise(90)
tello.send_expansion_command("led 0 255 255")
tello.flip_back()
tello.land()

Swarm code follows the same shape as djitellopy:

from djitellopySim import TelloSwarm

swarm = TelloSwarm.fromFile("ip.txt")
swarm.connect()
swarm.takeoff()
swarm.parallel(lambda i, tello: tello.move_up(50 + i * 10))
swarm.land()

Publishing

Update the package metadata in pyproject.toml, then build locally:

python -m pip install build
python -m build

This repository includes .github/workflows/publish.yml, which publishes to PyPI automatically when a v* tag is pushed or a GitHub Release is published.

PyPI Trusted Publishing Setup

Use PyPI Trusted Publishing so GitHub Actions can publish without a stored PyPI token.

  1. Create or log in to your PyPI account at https://pypi.org.
  2. If djitellopy-sim already exists on PyPI and you own it, open the project, go to Manage project -> Publishing, then add a GitHub Actions trusted publisher.
  3. If this will be the first upload for djitellopy-sim, open your account Publishing page and add a pending GitHub Actions publisher for the new project name.
  4. Enter these publisher values:
PyPI project name: djitellopy-sim
Owner: <your GitHub username or organization>
Repository name: <this GitHub repository name>
Workflow name: publish.yml
Environment name: pypi
  1. In this GitHub repository, create an environment named pypi under Settings -> Environments. Optional but recommended: require manual approval for deployments to that environment.
  2. Make sure pyproject.toml has the version you want to publish, commit the changes, push them to GitHub, then create and publish a GitHub Release.

API Parity

The simulator targets djitellopy 2.5.0. See PARITY.md for the implemented surface and the known differences from real hardware behavior.

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

djitellopy_sim-0.2.4.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djitellopy_sim-0.2.4-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file djitellopy_sim-0.2.4.tar.gz.

File metadata

  • Download URL: djitellopy_sim-0.2.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for djitellopy_sim-0.2.4.tar.gz
Algorithm Hash digest
SHA256 6912909bc336e8e80775042e6cba4d9a7511d99b1c5ca4a4bca07865648f22fb
MD5 2896067710e562cd0fd2319d9b821f7b
BLAKE2b-256 9f7df2f94f0b60ffcf900daca51e37b94b7eef5d5f0bfcc97a7ed379d9ce5fab

See more details on using hashes here.

Provenance

The following attestation bundles were made for djitellopy_sim-0.2.4.tar.gz:

Publisher: publish.yml on MrDaviesKellett/djitellopySim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file djitellopy_sim-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: djitellopy_sim-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for djitellopy_sim-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 251bbb88587ad5b1296c552c8161ba161e5016cb90a92a5a0370c26cb49aef6e
MD5 6a96085e902bd28b09d5d5684b5d1358
BLAKE2b-256 d533dd0d8c9755345dacd4696eaba65df911b328cb9ef330bd0e0bdbb035f055

See more details on using hashes here.

Provenance

The following attestation bundles were made for djitellopy_sim-0.2.4-py3-none-any.whl:

Publisher: publish.yml on MrDaviesKellett/djitellopySim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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