-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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.
Developed as part of the SEL0630 - Embedded Systems Projects course taught by Prof. Dr. Pedro Oliveira and the SSC0715 - Intelligent Sensors course taught by Prof. Dr. Fernando dos Santos Osório, this project was collaboratively created by Matheus Henrique Dias Cirillo - 12547750 and Carlos Henrique Craveiro Aquino Veras - 12547187, students of the Computer Engineering program at the University of São Paulo (USP), São Carlos campus. This interunit program is jointly offered by the Escola de Engenharia de São Carlos (EESC) and the Instituto de Ciências Matemáticas e Computação (ICMC). The system integrates concepts of computer vision, control systems, embedded systems design, and intelligent sensing.
The project pipeline includes:
- Image Acquisition: The Raspberry Pi requests a video frame from the Raspberry Pi Camera via a GStreamer pipeline.
- Target Segmentation: Using OpenCV, the Raspberry Pi processes the frame to segment the target and compute its centroid.
- Error Calculation: The offset between the target's centroid and the image center is calculated.
- Communication: The error values are sent to the ESP32 via I2C for real-time control.
- PID Control: The ESP32 implements a discrete PID controller to calculate precise servo actuation based on current and previous errors.
- 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:
-
Details on hardware assembly, 3D printing components, and wiring connections.
-
Explanation of the OpenCV-based algorithms for target segmentation and centroid computation.
-
Insights into the discrete PID controller implementation on the ESP32.
-
Explanation of the messages passed by I2C to the ESP32 and its implementations on the ESP32 side.
Explore the Wiki to learn more about the Auto-Aiming System, its components, and the methodology behind its development!