RoboCup is one of the most well known annual robotics competition. It has as a single objective incentivate and promote robotics and research in new technologies. It initially focused on the art of soccer but broadened to a much bigger spectrum of categories.
By the middle of the 21st century, a team of fully autonomous humanoid robot soccer players shall win a soccer game, complying with the official rules of FIFA, against the winner of the most recent World Cup.
The project deals with two robots that have the autonomy to play soccer according to rules of the category of RoboCup Junior International Soccer (Soccer B). In this category, teams are to compete each other, where each is allowed to have two robots on a rectangular field composed by a green carpet and measuring approximately 2.5 by 1.8 meters. On the field, the four robots (two from each team) are to play soccer, aiming to score in the opponent’s goal with a ball that emits infrared waves at 40kHz.
During the 4 years of participation, we created more than 5 versions of the robot. Here I present the latest one, which competed in the RobocCup 2015 in Hefei, China.
Each robot is equipped with:
This was also the first and only version to include a professionally made circuit board. Designed in Altium, it builds the entire middle and upper structure of the robot.
The middle layer is connected with the two other layers and contains all infrared sensors, all motor controllers, the Arduino Due processor, and the battery. The last layer, which is significantly smaller, contains the Compass sensor and the LCD.
One of the most important aspects of the robot is its movment capabilities. During the whole game, the robot has to be fast with respect to dynamic position changes, as the ball rolls with relatively high speeds on the field.
A logical movement concept would be a vis-a-vis turning robot, that is, the robot turns in direction of the ball and always moves forwards (point of contact is always facing the ball). The disadvantage of this concept is of course the time needed to turn the robot. Additionally, turning with the ball on the point of contact without losing it showed to be much more complicated than expected.
The solution was the implementation of omni wheels. Its difference from the common wheels is that it is capable of displacing itself in two perpendicular axes. The actual motor attached to it would provide the movement for one axis (tangential), and the net velocity of the other two motors would provide the other (radial) movement. This second axis of movement is possible by the implementation of various small wheels, made of rubber, that are placed perpendicular to and uniformly around the circumference of the original wheel.
The whole software was programmed in C++ using the Arduino IDE. We tried to program everything in such a way that everything can be easily changed in the future. All parts/sensors/motor controllers should be built in a modular way. In order to achieve this we created a class for each individual sensor type instead of integrating them to the main thread or merging them into one single logic block.
Finding the needed speed for each individual onmi wheel is not that complicated. Take the left front motor as an example. We want to find a relationship between the motor speed and the angle and speed at which we want to move.
The only needed thing to do is to find the projection of the velocity vector (our desired movement vector, drawn in blue) onto the omni wheel vector (red). With simple trigonometry:
$$\mathbf{v_{omni,left}(v, \theta)}=v \cdot cos(\theta-30)$$
We can do the same thing for the other two omni wheels. We end up with the following three motor speeds:
$\mathbf{v_{omni,left}(v, \theta)}=v \cdot cos(\theta-30)$
$\mathbf{v_{omni,back}(v, \theta)}=v \cdot cos(\theta+90)$
$\mathbf{v_{omni,right}(v, \theta)}=-v \cdot cos(\theta+30)$
The two robots playing are constantly communicating using the XBee module. The exchanged information is listed below: