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
djitellopy2.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-cefor modern prebuilt wheels, including macOS universal2 wheels, while still importing the runtime module aspygame.
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.
- Create or log in to your PyPI account at
https://pypi.org. - If
djitellopy-simalready exists on PyPI and you own it, open the project, go toManage project->Publishing, then add a GitHub Actions trusted publisher. - If this will be the first upload for
djitellopy-sim, open your accountPublishingpage and add a pending GitHub Actions publisher for the new project name. - 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
- In this GitHub repository, create an environment named
pypiunderSettings->Environments. Optional but recommended: require manual approval for deployments to that environment. - Make sure
pyproject.tomlhas 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djitellopy_sim-0.2.1.tar.gz.
File metadata
- Download URL: djitellopy_sim-0.2.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ed11f24b62ab746b7b0bde67f5e04f84a49a03255df722441b78e3e94379723
|
|
| MD5 |
7ab69829523466011b948a2e9bade30a
|
|
| BLAKE2b-256 |
6cc9208d8c4cb34552176591f12349f8cb2acd66a98e584cb7a2de3e98dcbfcb
|
Provenance
The following attestation bundles were made for djitellopy_sim-0.2.1.tar.gz:
Publisher:
publish.yml on MrDaviesKellett/djitellopySim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djitellopy_sim-0.2.1.tar.gz -
Subject digest:
4ed11f24b62ab746b7b0bde67f5e04f84a49a03255df722441b78e3e94379723 - Sigstore transparency entry: 1440029542
- Sigstore integration time:
-
Permalink:
MrDaviesKellett/djitellopySim@aedaddff595b51fd01f35992a0ffa4272e51014f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/MrDaviesKellett
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aedaddff595b51fd01f35992a0ffa4272e51014f -
Trigger Event:
push
-
Statement type:
File details
Details for the file djitellopy_sim-0.2.1-py3-none-any.whl.
File metadata
- Download URL: djitellopy_sim-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d59455fc2a9b37077f2915d16bf80517b2c28377c496ad400228ad015e00fe7
|
|
| MD5 |
6a8b2bf6e23192dd08362d23ecf25dc6
|
|
| BLAKE2b-256 |
c17e2ff6a468c49e9de17af244916e781017dd8c94312479b7b9f9930492989c
|
Provenance
The following attestation bundles were made for djitellopy_sim-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on MrDaviesKellett/djitellopySim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
djitellopy_sim-0.2.1-py3-none-any.whl -
Subject digest:
3d59455fc2a9b37077f2915d16bf80517b2c28377c496ad400228ad015e00fe7 - Sigstore transparency entry: 1440029547
- Sigstore integration time:
-
Permalink:
MrDaviesKellett/djitellopySim@aedaddff595b51fd01f35992a0ffa4272e51014f -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/MrDaviesKellett
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@aedaddff595b51fd01f35992a0ffa4272e51014f -
Trigger Event:
push
-
Statement type: