The software combines global navigation with local vision-based control.
flowchart LR
Camera[Pi Camera] --> Detector[YOLOv8 target detector]
Detector --> Color[HSV color verification]
Color --> Range[Monocular distance estimate]
Range --> Controller[Yaw / altitude / distance control]
Controller --> MAVLink[MAVLink velocity commands]
MAVLink --> FC[ArduPilot flight controller]
FC --> Telemetry[GPS / heading / altitude telemetry]
Telemetry --> Mission[Mission state logic]
Mission --> Controller
Mission --> Servo[Manipulator servo commands]
Camera --> Stream[MJPEG monitoring stream]
- Connect to the flight controller and camera.
- Navigate through configured GPS points.
- Descend to the visual-search altitude.
- Detect and verify the selected target.
- Estimate target distance from image geometry.
- Generate body-frame velocity, yaw-rate, and altitude corrections.
- Recover toward the configured target location if visual contact is lost.
- Actuate the manipulator, retreat, return, and land.
The flight parameters, control gains, camera calibration, and servo PWM values are platform-specific and must be validated for each vehicle.