Skip to main content

A simulator of a tello drone using python SDK in turtle graphics

Project description

Welcome!

This is the fancy Turtle Tello Simulator!
If you are using this project, you should be familiar with both python Turtle Graphics and python Tello drones.

What does it do?

This project is an attempt to simulate a tello drone through turtle, allowing those with limited access to drones to test their code beforehand.
The syntax of the Tello object is exactly the same as easytello.tello, so code can be ready to go instantly! turtle example

But wait...

One might feel the need to point out an issue with this ambitious project: tello drones work in a 3d environment, and turtle is only 2 dimentional.
In effort to make the turtle workspace as effective as possible, the turtle will act as a drone with the window being a top view (above the drone). To show height, a meter will be on the side. If exact data is neccessary, the "get_height" method is still available.

You are ready to get started!

With the basic idea in place, pop in some code into the main.py file and get going!

It is highly recommended you take a brief look through the turtleTello module, as it provides an explanation for each method. If you would like a more detailed list of the capabilities and limitations of this project specifically you may continue reading.

Let's look at some specifics...

  • Measurements in turtle pixels are directly proportional to the tello cm parameters for simplicity. If a drawing ends up smaller or larger than wanted, an optional "scaleFactor" parameter is available when the Tello object is created. The value is based on a percentage (100=normal).
  • Due to the nature of turtle, the turtle can only move forward and back. to allow for the drone ability of moving side to side, basic trigonometry has been put in place for the turtle to go to the correct xy coodinate that would correspond.
  • To ensure there are no bugs with code pasted in, every function has been made available. Any function that is pointless to the simulation simply outputs nonsense :)
  • To make the speed as realistic as possible, the turtle has been set to the slowest speed and must wait a second between each called method.
  • The meter in the bottom right is run by a second turtle that moves up or down in direct proportion to the up and down method. Both the meter turtle and the drone turtle increase in brightness when moved up and decrease in brightness when moved down. If one would prefer, an option to remove the meter turtle is available when the Tello object is called.
  • With version 2.0 came much improved curves. Now, any 2-dimensional curve is ready to go, and is still great when moved along the z axis a bit. However, curves that are largely vertical get a bit confusing. If it is directly vertical, the drone will just move to the two points, which is what you would actually see from a top view. If the curve is just offset, a small circle will be drawn while a real curve like that from an overhead perspective would look like a partial ellipse. Regardless, this still portrays the positioning correctly. Movement along the z plane is rendered at the end, but future versions will have it live time while the drone is flying through the x and y planes.
  • If one were to try calling movement methods on a drone before taking off, the drone would reply with a "motor stop." To help remind people to takeoff, the same has been implemented here, and most functions will not work until "takeoff" has been called.
  • Total traveled distance is tracked (mostly) and can be called with the "tof" method, just like the drones.
  • Speed can be changed and read, but the actual speed of the turtle will not change because it's slowest speed is still too fast for the drone.
  • Be sure to check out the link in the "streamon" method for actual footage of a drone's flight!

Shoutout to the amazing Mr. Kunz of Utah County Academy of Sciences who brings the wonderful world of mechatronics and physics to his students!

Brought to you by Christopher Beadle, UCAS class of 2023. Be sure to comment and ask questions on this project or directly to me :)

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

turtleTello-2.6.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

turtleTello-2.6-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file turtleTello-2.6.tar.gz.

File metadata

  • Download URL: turtleTello-2.6.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for turtleTello-2.6.tar.gz
Algorithm Hash digest
SHA256 60746cc7c4bb86d850e202c6f7d9f44185be48ada24c53477add23f982e5137e
MD5 1b528dd3c7573ff9cdfdc2954a32311a
BLAKE2b-256 3e1ba9ef5df6e7a2b3773fbba05857f7944065b3b35318abd968f2b0a690d53d

See more details on using hashes here.

File details

Details for the file turtleTello-2.6-py3-none-any.whl.

File metadata

  • Download URL: turtleTello-2.6-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for turtleTello-2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7f718b866a4402f2e788c395b7b253579add3d5793cc8e02eb253b5dce05fa78
MD5 2465d8ffb565ed424da4512a6c4a433e
BLAKE2b-256 51f22bf2dd9ebcd1c82088bd328952872a98a6a5269c8e32aab7ae2e741d04fc

See more details on using hashes here.

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