Skip to content
Carlos Henrique Craveiro Aquino Veras edited this page Dec 4, 2024 · 6 revisions

Welcome to the Auto-Aiming System Wiki!

This project implements an automatic targeting system utilizing a combination of an ESP32 microcontroller, a Raspberry Pi 4, a Raspberry Pi Camera V2, and a 3D-printed pan-tilt mechanism controlled by two 9G servos. The system demonstrates real-time image processing, discrete PID control, and precise actuation for dynamic target tracking.

Auto-Aiming System

Developed as part of the SEL0630 - Embedded Systems Projects course taught by Prof. Dr. Pedro Oliveira, this project was collaboratively created by a team of engineering students. The system integrates concepts of computer vision, control systems, and embedded systems design.

System Overview

The project pipeline includes:

  1. Image Acquisition: The Raspberry Pi requests a video frame from the Raspberry Pi Camera via a GStreamer pipeline.
  2. Target Segmentation: Using OpenCV, the Raspberry Pi processes the frame to segment the target and compute its centroid.
  3. Error Calculation: The offset between the target's centroid and the image center is calculated.
  4. Communication: The error values are sent to the ESP32 via I2C for real-time control.
  5. PID Control: The ESP32 implements a discrete PID controller to calculate precise servo actuation based on current and previous errors.
  6. Servo Actuation: The 9G servos adjust the pan-tilt mechanism to center the target in the camera's field of view, effectively closing the control loop.

The wiki includes the following sections:

  • System Setup

    Details on hardware assembly, 3D printing components, and wiring connections.

  • Image Processing

    Explanation of the OpenCV-based algorithms for target segmentation and centroid computation.

  • Control System

    Insights into the discrete PID controller implementation on the ESP32.

  • ESP32 ‐ WROOM

    Explanation of the messages passed by I2C to the ESP32 and its implementations on the ESP32 side.

  • Results and Analysis

    Performance evaluation of the system, with discussions on accuracy and responsiveness.

Explore the Wiki to learn more about the Auto-Aiming System, its components, and the methodology behind its development!

Clone this wiki locally