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 usingDroneBlocksTelloSimulator.real_tello.py: Contains the class for controlling the real Tello drone using theeasyTellolibrary.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
-
Clone the Repository:
git clone https://github.com/your-username/drone-control.git cd drone-control
-
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
-
Run the
main.pyFile:python main.py -
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.
-
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.pyand 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:
-
Lesson 1: Basic Drone Commands
- Connect to the drone
- Take off
- Move up, forward, and rotate
- Perform a flip
- Land
-
Lesson 2: Advanced Movement Commands
- Move left, right, backward
- Rotate counterclockwise
- Land
-
Lesson 3: Speed and Flipping
- Set speed
- Move forward with the new speed
- Perform different flips
- Land
-
Lesson 4: Flying to Coordinates (Go and Curve)
- Fly to specific coordinates using the
gocommand - Fly in a curve between two points
- Land
- Fly to specific coordinates using the
-
Lesson 5: Monitoring and Battery
- Check battery level (mocked in the simulator)
- Land
-
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:
- Open
main.py. - Uncomment the code for Lesson 1.
- Run the script.
- Select 1 when prompted to use the simulator.
- 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:
- Open
main.py. - Uncomment the code for Lesson 1.
- Run the script.
- 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:
- Email: b.gada@umbc.edu
- GitHub: bhavyabgada (https://github.com/bhavyabgada)
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)
| File | Size | Uploaded | |
|---|---|---|---|
| my_drone_package-0.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|