Skip to main content

Drone Control - Simulation and Real Drone

This project allows you to control a drone either in a simulation environment using the DroneBlocksTelloSimulator or control a real Tello drone using the easyTello library. You can switch between simulation and real drone modes based on your requirements.

Project Structure

  • simulated_tello.py: Contains the class for controlling the simulated drone using DroneBlocksTelloSimulator.
  • real_tello.py: Contains the class for controlling the real Tello drone using the easyTello library.
  • main.py: The main entry point for the project. This file prompts the user to choose between simulation or real drone control and allows the user to run different lessons to practice drone control commands.
  • README.md: This documentation file.

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/drone-control.git
    cd drone-control
    
  2. Install Dependencies:

    First, make sure you have Python installed. Then, install the required dependencies:

    • For the simulator:

      pip install DroneBlocksTelloSimulator
      
    • For the real Tello drone:

      pip install easytello
      

How to Use

  1. Run the main.py File:

    python main.py
    
  2. Choose Between Simulation or Real Drone:

    When prompted, select your option:

    • Press 1 to use the simulated drone.
    • Press 2 to use the real Tello drone.
  3. Lessons: The code contains several pre-defined lessons, each with different drone commands to control the drone.

    To run a lesson, simply uncomment the respective section in main.py and run the file.


Lessons

The main.py file contains different lessons for learning and practicing drone commands. Each lesson is commented out, and you can uncomment the code to run the lesson.

Here is an overview of the lessons:

  1. Lesson 1: Basic Drone Commands

    • Connect to the drone
    • Take off
    • Move up, forward, and rotate
    • Perform a flip
    • Land
  2. Lesson 2: Advanced Movement Commands

    • Move left, right, backward
    • Rotate counterclockwise
    • Land
  3. Lesson 3: Speed and Flipping

    • Set speed
    • Move forward with the new speed
    • Perform different flips
    • Land
  4. Lesson 4: Flying to Coordinates (Go and Curve)

    • Fly to specific coordinates using the go command
    • Fly in a curve between two points
    • Land
  5. Lesson 5: Monitoring and Battery

    • Check battery level (mocked in the simulator)
    • Land
  6. Lesson 6: Full Control with Rotation and Flipping

    • Full control with moving up, down, forward, backward
    • Rotate clockwise and counterclockwise
    • Perform flips
    • Land

Running on Simulated Drone

If you select 1 during the prompt, the program will run on the simulated drone. Make sure you have the DroneBlocksTelloSimulator installed.

Example: To run Lesson 1 on the simulator:

  1. Open main.py.
  2. Uncomment the code for Lesson 1.
  3. Run the script.
  4. Select 1 when prompted to use the simulator.
  5. Enter your simulator key when prompted.

Running on Real Tello Drone

If you select 2 during the prompt, the program will control the real Tello drone using the easyTello library.

Example: To run Lesson 1 on the real drone:

  1. Open main.py.
  2. Uncomment the code for Lesson 1.
  3. Run the script.
  4. Select 2 when prompted to use the real Tello drone.

Contributing

Feel free to fork this repository, make changes, and submit pull requests if you'd like to contribute to this project.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Contact

If you have any questions or need further assistance, feel free to reach out:


Let me know if you need any changes or additions to the README.md file!

Metadata

Release files for my-drone-package 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for my-drone-package 0.1
File Size Uploaded
my_drone_package-0.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for my-drone-package 0.1
File Interpreter ABI Platform
my_drone_package-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / my_drone_package-0.1.tar.gz

Download URL my_drone_package-0.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7d8bf5b63e76a4639ee1b27950d47b5eb7040767fa4b97220b64a6d6f4ada352
BLAKE2b-256 checksum
How to use checksums
57d0cbfedc1ca24bf2c4a13d03b606411242e2a11d275dc388246f7ce8924748
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / my_drone_package-0.1-py3-none-any.whl

Download URL my_drone_package-0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22d0ce5b39dc2ebcab6801c23bf649a31a4d50a7ec73204f7e703d7eab8133dd
BLAKE2b-256 checksum
How to use checksums
10e15b9b04f04cee5bea10c6e41a8abb2f6f006944221326597e12c6d8a27de5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page