{"id":21805778,"url":"https://github.com/studas/rpi_auto_aim","last_synced_at":"2026-04-12T17:55:56.926Z","repository":{"id":264713651,"uuid":"894177292","full_name":"studas/rpi_auto_aim","owner":"studas","description":"An automatic aiming system for a Raspberry Pi camera couples to a panoramic tilt structure controlled by servo motors, using ESP32, GStreamer and OpenCV","archived":false,"fork":false,"pushed_at":"2024-12-04T00:54:34.000Z","size":2235,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T05:45:25.462Z","etag":null,"topics":["auto-aim","esp32","gstreamer-pipeline","i2c","opencv","pan-tilt","raspberry-pi-4","raspberry-pi-camera","rpi4"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/studas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-25T22:25:26.000Z","updated_at":"2025-05-08T09:51:02.000Z","dependencies_parsed_at":"2025-06-25T05:54:28.155Z","dependency_job_id":null,"html_url":"https://github.com/studas/rpi_auto_aim","commit_stats":null,"previous_names":["studas/rpi_auto_aim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/studas/rpi_auto_aim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studas%2Frpi_auto_aim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studas%2Frpi_auto_aim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studas%2Frpi_auto_aim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studas%2Frpi_auto_aim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/studas","download_url":"https://codeload.github.com/studas/rpi_auto_aim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studas%2Frpi_auto_aim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265179107,"owners_count":23723406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-aim","esp32","gstreamer-pipeline","i2c","opencv","pan-tilt","raspberry-pi-4","raspberry-pi-camera","rpi4"],"created_at":"2024-11-27T12:15:35.950Z","updated_at":"2026-04-12T17:55:51.888Z","avatar_url":"https://github.com/studas.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto-Aiming System - rpi-auto-aim\n\n## Overview\n\nThe **Auto-Aiming System** is an embedded project designed to track and aim at a target in real time using computer vision and motion control. The system integrates a **Raspberry Pi 4**, **ESP32**, **Raspberry Pi Camera V2**, and a **3D-printed pan-tilt mechanism**.\n\n![Workstation](https://github.com/studas/rpi_auto_aim/blob/main/images/workstation.jpg)\n\nDeveloped for the **[SEL0630 - Embedded Systems Projects](https://uspdigital.usp.br/jupiterweb/obterDisciplina?sgldis=SEL0630\u0026codcur=97001\u0026codhab=0)** course (Prof. Dr. Pedro Oliveira) and **[SSC0715 - Intelligent Sensors](http://wiki.icmc.usp.br/index.php/SSC-715-2024(fosorio))** course (Prof. Dr. Fernando dos Santos Osório), this project demonstrates concepts in computer vision, PID control, and embedded systems. It was created by:\n\n- **Matheus Henrique Dias Cirillo** - 12547750\n- **Carlos Henrique Craveiro Aquino Veras** - 12547187\n\nStudents of the Computer Engineering program at USP São Carlos (EESC and ICMC).\n\n---\n\n## Features\n\n- Real-time target detection and tracking using OpenCV (C++).\n- Discrete PID control for precise motion adjustments.\n- Customizable and modular 3D-printed hardware.\n\nFor detailed information, see the **[Wiki](https://github.com/studas/rpi_auto_aim/wiki/)**.\n\n---\n\n## Getting Started\n\n### Hardware Requirements\n- Raspberry Pi 4\n- Raspberry Pi Camera V2\n- ESP32\n- Two 9G servo motors\n- 3D-printed pan-tilt mechanism ([Thingiverse](https://www.thingiverse.com/thing:4710301))\n\n### Software Setup\n1. **Raspberry Pi**:\n   - Install OpenCV (C++): `sudo apt install libopencv-dev`\n   - Install GStreamer: `sudo apt install gstreamer1.0-tools gstreamer1.0-plugins-*`\n2. **ESP32**:\n   - Upload the PID control code via Arduino IDE.\n\n---\n\n## System Architecture\n\n1. **Image Processing**:\n   - Captures frames via GStreamer:\n     ```bash\n     libcamera-vid --inline --width 640 --height 480 --timeout 0 -o - | gst-launch-1.0 fdsrc ! decodebin ! videoconvert ! appsink\n     ```\n   - Processes frames using OpenCV to calculate the target's centroid.\n2. **Control Signal Generation**:\n   - Sends error values via I2C to the ESP32.\n3. **PID Control**:\n   - Adjusts servo motors for pan and tilt based on error values.\n\n---\n\n## Usage\n\n1. Start the camera feed with the GStreamer pipeline.\n2. Run the image processing script on the Raspberry Pi.\n3. Power the ESP32 to enable servo control.\n4. Observe the system automatically tracking the target.\n\n---\n\n![hardware](https://github.com/studas/rpi_auto_aim/blob/main/images/auto_aim_hardware.jpg)\n\n## License\n\nThis project is licensed under the **GNU General Public License v3.0 (GPL v3)**. For details, see the [LICENSE](LICENSE) file.\n\nThe 3D-printed pan-tilt design uses the **Servo Pan Tilt - Raspberry Pi Camera** model from [Thingiverse](https://www.thingiverse.com/thing:4710301), licensed under **Creative Commons - Attribution - Share Alike (CC BY-SA)**.\n\n---\n\nFor further details, including setup, code structure, and analysis, visit the **[Wiki](https://github.com/studas/rpi_auto_aim/wiki/)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudas%2Frpi_auto_aim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudas%2Frpi_auto_aim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudas%2Frpi_auto_aim/lists"}