Skip to main content

A package for controlling a drone either via simulation or with a real Tello drone.

Project description

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!

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_drone_package-0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

my_drone_package-0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file my_drone_package-0.1.tar.gz.

File metadata

  • Download URL: my_drone_package-0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for my_drone_package-0.1.tar.gz
Algorithm Hash digest
SHA256 7d8bf5b63e76a4639ee1b27950d47b5eb7040767fa4b97220b64a6d6f4ada352
MD5 28df5f3c3dafd8c990848b9ad2b6e1c7
BLAKE2b-256 57d0cbfedc1ca24bf2c4a13d03b606411242e2a11d275dc388246f7ce8924748

See more details on using hashes here.

File details

Details for the file my_drone_package-0.1-py3-none-any.whl.

File metadata

  • Download URL: my_drone_package-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for my_drone_package-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22d0ce5b39dc2ebcab6801c23bf649a31a4d50a7ec73204f7e703d7eab8133dd
MD5 351f3cbff2de8bf59ba3dc714a66e76f
BLAKE2b-256 10e15b9b04f04cee5bea10c6e41a8abb2f6f006944221326597e12c6d8a27de5

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