This project is a simulation and control system developed for TEKNOFEST 25/26 Rotary-Winged UAV Category. The project includes color perception-based tasks, state machine management, and security protocols.
- 🎯 Multi-mission autonomous drone operations
- 🔍 Computer vision based object detection (red, blue, white)
- 🛡️ Failsafe mechanisms and emergency protocols
- 🗺️ State machine based mission management
- 🌍 Gazebo simulation environment
- 📊 Configurable parameters and scenarios
.
├── 📁 config/ # Configuration files
│ ├── drone_params.yaml # Drone parameters and settings
│ └── world_params.yaml # World/environment parameters
│
├── 📁 docs/ # Documentation
│ ├── 📁 setup/ # Setup guides
| | ├── python_venv_24.04 # Project Python venv Setup guide
│ │ ├── ubuntu_22.04.md # Ubuntu 22.04 installation guide
| | └── ubuntu_24.04.md # Ubuntu 24.04 installation guide
│ ├── architecture.md # System architecture documentation
│ ├── checklist.md # Development and testing checklist
│ └── simulation_notes.md # Simulation setup notes
│
├── 📁 environments/ # Gazebo simulation environments
│ ├── 📁 models/ # 3D models for simulation
│ │ ├── 📁 blue_hexagon/ # Blue hexagon shaped objects
│ │ ├── 📁 blue_square/ # Blue square objects
│ │ ├── 📁 blue_triangle/ # Blue triangle objects
│ │ ├── 📁 red_hexagon/ # Red hexagon shaped objects
│ │ ├── 📁 red_square/ # Red square objects
│ │ ├── 📁 red_triangle/ # Red triangle objects
│ │ └── 📁 white_pole/ # Tall White Pole
│ ├── 📁 worlds/ # Gazebo world files
│ │ ├── iris_default.sdf # Default simulation world of Ardupilot
│ │ ├── iris_parkour.sdf # Main simulation world
│ │ └── iris_showcase.sdf # Showcase world for testing the Model size/color
│ └── how-to-use.md # Environment usage guide
│
├── 📁 scenarios/ # Mission scenarios
│ ├── 📁 comm_loss/ # Communication loss scenarios
│ ├── 📁 gps_loss/ # GPS loss scenarios
│ ├── 📁 normal_mission/ # Normal mission scenarios
│ │ ├── 📁 first/ # First mission scenario
│ │ ├── 📁 second/ # Second mission scenario
│ │ └── 📁 third/ # Third mission scenario
│ └── 📁 weather_degraded/ # Weather degraded scenarios
│
|── 📁 scripts/ # Project Scripts
| ├── simulation_params_example # Example of how "simulation_params" should be created on scripts directory
| ├── ardupilot_sitl # Ardupilot SITL + MavLink Starter Terminal Script
| └── sauro_gz # Gazebo World Starter Terminal Script
|
├── 📁 src/ # Source code
│ ├── 📁 app/ # Application entry point
│ │ └── run.py # Main application runner
│ ├── 📁 core/ # Core functionality modules
│ │ ├── 📁 detection/ # Object detection algorithms
│ │ │ ├── blue_detection.py # Blue object detection
│ │ │ ├── red_detection.py # Red object detection
│ │ │ └── white_detection.py # White object detection
│ │ ├── 📁 failsafe/ # Safety and failsafe mechanisms
│ │ │ └── failsafe_example.py # Failsafe implementation example
│ │ ├── 📁 missions/ # Mission definitions
│ │ │ ├── first_mission.py # First mission implementation
│ │ │ ├── second_mission.py # Second mission implementation
│ │ │ └── third_mission.py # Third mission implementation
│ │ └── 📁 state_machine/ # State machine management
│ │ ├── states.py # State definitions
│ │ └── state_machine.py # State machine logic
│ └── 📁 tests/ # Application test Codes
| ├── colorDetect.py # Color Detection Python Script for detecting pole and targets
| └── openCVraw.py # OpenCV Raw Image Visualisation Script.
|
│
├── requirements.txt # Python dependencies
└── README.md # This file
- Ubuntu 22.04 LTS or Ubuntu 24.04 LTS
- Python 3.8+
- ROS 2 (Humble recommended)
- Gazebo simulation environment
- ArduPilot SITL
-
Clone the repository:
git clone <repository-url> cd <project-directory>
-
Install Python dependencies:
pip install -r requirements.txt
-
Setup simulation environment:
- Follow one of the guides in
docs/setup/( Simulation is built on 24.04 LTS ) - Configure Gazebo models and worlds
- Follow one of the guides in
# Navigate to source directory
cd src/app
# Run the main application
python run.py- Modify
config/drone_params.yamlfor drone-specific settings - Adjust
config/world_params.yamlfor environment parameters - Select scenarios from the
scenarios/directory
- First Mission: Basic navigation and object detection
- Second Mission: Advanced maneuvers and multi-target tracking
- Third Mission: Complex autonomous operations
The system follows a modular architecture:
- Detection Module: Computer vision algorithms for object recognition
- State Machine: Mission flow control and state management
- Mission Manager: High-level mission logic and coordination
- Failsafe System: Emergency protocols and safety mechanisms
- Create mission file in
src/core/missions/ - Define states in
src/core/state-machine/states.py - Add scenario configuration in
scenarios/ - Update documentation
- Use different scenarios in
scenarios/directory - Test failsafe mechanisms under various conditions
- Validate detection algorithms with different object configurations
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT
For questions and support, please refer to the documentation or open an issue in the repository.