• Get in Touch
  • nickyembrechts0@gmail.com

Robo Soccer

Introduction

Self-driving cars is a cool concept, and soccer is a popular sport. But what happens when you combine the two? Then you get robot soccer!

I and three other colleagues had the pleasure of working on robot soccer cars and environments. My colleagues focused more on mechanics, electronics and low level software. I worked on 2 major high level software components which I will explain in a bit more detail .

Bounderies

We based our project on the official robocup tournmenent https://ssl.robocup.org/, But scaled it down a little bit to make it more feasible. The idea was to have six robotic cars play soccer against each other in teams of three. This could be controlled manually through a custom software or the cars would be completely autonomous (more on that later).

Position tracking

At the tournament, they use cameras hanging above the field to track the position of the robots and the ball. We have tried to mimic this with one camera. This camera hangs above the soccer field, and will provide a stream that we can build on.

How does it work?

By sticking color combinations of post-its on the cars, we can define the cars and retrieve their coordinates and angles with the OpenCV library, you can also use colored balls as footballs. I built an easy-to-use python framework in which you can add and remove cars and balls. You can view the repo here: https://github.com/Thomas-More-Digital-Innovation/2223-DI-006-Robot-voetbal/tree/main/code/robot_coordinates.

Used technologies

  • Python
  • OpenCV

Autonomous soccer

The goal of this part of the project is to train a custom model with reinforcement learning that can control robot cars based on incoming coordinates and angles.

Where did I strand?

Currently there is a Pygame environment with Pymunk physics that should mimic the game of soccer. This environment can also be initialized in an OpenAI gym environment. You can test whether the gym environment and all its functions work. It is possible to also start training processes and monitor these sessions with a tensor board. Finallely, you can test your trained model in a fresh environment and see what it exactly does. You can view the repo here: https://github.com/Thomas-More-Digital-Innovation/2223-DI-006-Robot-voetbal/tree/main/code/model_training.

What's next?

What needs to be done first and foremost is to optimize the reward system, but this is best done during the training phase, along with a few more hyperparameters. To speed up the training process, multi-environment can also be added. Once all this is done, multi-agent training can be added to train different strategies.

Used technologies

  • Python
  • Stable Baselines 3
  • OpenAI gym
  • Pygame
  • Pymunk