Two autonomous drone projects: AI-powered fire detection & Vision-guided precision landing
yolo_dronkit_yangin_tespit.mp4 |
opencv-dronekit.mp4 |
This repository contains two autonomous drone projects built with DroneKit and computer vision. Both run in ROS Gazebo simulation and demonstrate different real-world applications of drone autonomy.
Autonomous fire detection system using YOLOv4 deep learning
- Flies autonomously at set altitude
- Processes live camera feed with YOLOv4
- Detects fires in real-time
- Shows visual alerts with bounding boxes
- Continues patrol mission while monitoring
- 🔥 Real-time Fire Detection - YOLOv4 trained model for fire recognition
- 🤖 Autonomous Flight - Independent navigation and monitoring
- 📹 Live Processing - Instant video analysis through ROS
- ⚡ Fast Response - High-confidence detection alerts
File: yolo_dronkit_yangın_tespit.py
Vision-guided autonomous landing on colored target
- Searches for green square target
- Tracks target using color detection
- Automatically centers above target
- Performs precision landing
- All fully autonomous!
- 🟢 Color Detection - HSV-based green target recognition
- 🎯 Center Alignment - Automatic positioning over target
- 📐 Precision Control - Real-time position adjustment
- 🛬 Auto Landing - Smooth and accurate touchdown
File: opencv-dronekit.py
Both projects share:
- DroneKit-Python - MAVLink flight control
- ROS Noetic - Robot operating system
- Gazebo 11 - Realistic simulation
- OpenCV - Computer vision processing
- PyMAVLink - Communication protocol
Environment:
- Ubuntu 20.04 LTS
- ROS Noetic
- Gazebo 11
- Python 3.8+
Python Packages:
pip install dronekit pymavlink opencv-python numpy
pip install rospkg cv-bridgeFor Fire Detection Only:
# YOLOv4 weights and config files required
# See yolo/ directory# Start ROS and Gazebo
roscore
# Launch drone simulation in another terminal
# Run fire detection
python3 yolo_dronkit_yangın_tespit.py# Start ROS and Gazebo
roscore
# Launch drone simulation in another terminal
# Run precision landing
python3 opencv-dronekit.pyCommon Settings:
connection_string = "127.0.0.1:14550" # SITL connection
webcam = "/webcam/image_raw" # Camera topicFire Detection:
confidence > 0.5 # Detection thresholdPrecision Landing:
hız = 1 # Flight speed (m/s)
# Green HSV range: [40,50,50] to [80,255,255]├── yolo/
│ ├── my_yolov4.cfg # YOLOv4 config
│ ├── my_yolov4_final.weights # Trained weights
│ └── _darknet.names # Class names
├── yolo_dronkit_yangın_tespit.py # Fire detection
├── opencv-dronekit.py # Precision landing
└── README.md
Bu repo, DroneKit ve bilgisayarlı görü ile geliştirilmiş iki otonom dron projesi içeriyor. Her ikisi de ROS Gazebo simülasyonunda çalışıyor ve dron otonomisinin farklı gerçek dünya uygulamalarını gösteriyor.
YOLOv4 derin öğrenme ile otonom yangın tespit sistemi
- Belirlenen irtifada otonom uçuyor
- Canlı kamera görüntüsünü YOLOv4 ile işliyor
- Gerçek zamanlı yangın tespit ediyor
- Sınırlayıcı kutularla görsel uyarı veriyor
- İzleme yaparken devriye görevine devam ediyor
- 🔥 Gerçek Zamanlı Yangın Tespiti - Yangın tanıma için eğitilmiş YOLOv4 modeli
- 🤖 Otonom Uçuş - Bağımsız navigasyon ve izleme
- 📹 Canlı İşleme - ROS üzerinden anlık video analizi
- ⚡ Hızlı Tepki - Yüksek güvenilirlikli tespit uyarıları
Dosya: yolo_dronkit_yangın_tespit.py
Görüntü güdümlü renkli hedefe otonom iniş
- Yeşil kare hedefi arıyor
- Renk tespiti ile hedefi takip ediyor
- Otomatik olarak hedefin üstüne merkezleniyor
- Hassas iniş gerçekleştiriyor
- Tamamen otonom!
- 🟢 Renk Tespiti - HSV tabanlı yeşil hedef tanıma
- 🎯 Merkez Hizalama - Hedef üzerinde otomatik konumlanma
- 📐 Hassas Kontrol - Gerçek zamanlı konum ayarlama
- 🛬 Otomatik İniş - Yumuşak ve hassas iniş
Dosya: opencv-dronekit.py
Her iki proje de şunları paylaşıyor:
- DroneKit-Python - MAVLink uçuş kontrolü
- ROS Noetic - Robot işletim sistemi
- Gazebo 11 - Gerçekçi simülasyon
- OpenCV - Bilgisayarlı görü işleme
- PyMAVLink - İletişim protokolü
Ortam:
- Ubuntu 20.04 LTS
- ROS Noetic
- Gazebo 11
- Python 3.8+
Python Paketleri:
pip install dronekit pymavlink opencv-python numpy
pip install rospkg cv-bridgeSadece Yangın Tespiti İçin:
# YOLOv4 ağırlık ve config dosyaları gerekli
# yolo/ dizinine bakın# ROS ve Gazebo'yu başlat
roscore
# Başka bir terminalde dron simülasyonunu başlat
# Yangın tespitini çalıştır
python3 yolo_dronkit_yangın_tespit.py# ROS ve Gazebo'yu başlat
roscore
# Başka bir terminalde dron simülasyonunu başlat
# Hassas inişi çalıştır
python3 opencv-dronekit.pyOrtak Ayarlar:
connection_string = "127.0.0.1:14550" # SITL bağlantısı
webcam = "/webcam/image_raw" # Kamera topicYangın Tespiti:
confidence > 0.5 # Tespit eşiğiHassas İniş:
hız = 1 # Uçuş hızı (m/s)
# Yeşil HSV aralığı: [40,50,50] - [80,255,255]├── yolo/
│ ├── my_yolov4.cfg # YOLOv4 konfigürasyon
│ ├── my_yolov4_final.weights # Eğitilmiş ağırlıklar
│ └── _darknet.names # Sınıf isimleri
├── yolo_dronkit_yangın_tespit.py # Yangın tespiti
├── opencv-dronekit.py # Hassas iniş
└── README.md