Automated Robotic Soccer
Published on
My final year project utilizing Python OpenCV and ESP32, featuring object detection and target-following. I had two group members: Maaz Ali Khan and Arham Mahbub Khan.
Source code
The source code of the project is publicly available here under the GNU General Public License.
Summary of the project
The project’s aim was to design and implement a real-time planning and execution system for robots, specifically focusing on robotic soccer as it offers a dynamic and practical testing ground.
The project journey consisted of multiple iterations and prototypes. The original approach used IMUs for localization and the calculation of the robot’s acceleration, velocity, and orientation. However, sensor noise resulted in a high error rate and drift in position over time. This caused a change of methodology.
Due to the shortcomings in the IMU-based localization and the inavailability of other means in the region, we shifted our project to an image processing approach using a mobile camera to capture a live video feed of the playing field and processing it with OpenCV. This significantly improved the accuracy and reliability of the localization system, as we were able to identify different objects based on their color and determine their location by extracting their coordinates from the video. The result was a successful navigation of the robot towards the ball.
Sequence Diagram of the project
The project had the following sequence of execution:
Flow diagram for the image processing
Circuit diagram for the car
Note
The final robot did not include the MPU6050 module, and the L298N motor driver was replaced by the TB6612FNG motor driver.
Why switch to TB6612FNG
L298N is an old motor driver which uses Bipolar Junction Transistors. Because of this, it has a large voltage drop and generates excessive heat. We switched to TB6612FNG, which has a smaller voltage drop and generates far less heat.
Final robot car

Final robot car working video
lFuture Plans
The project holds significant potential for learning robotic path finding algorithms. I still believe we were not able to complete the project in its true form and I would definitely like to return to this project in the future and make it even better.