In RCJ Soccer Simulation, the corner is a triangle that can change the angle of the ball moving. In a normal ball prediction algorithm, the ball will reflect along the x and y wall.

However, along a corner, the ball does not reflect along this wall, but rather at a pi/4 diagonal member. This 45 degree angled triangle can prove costly if the ball prediction algorithm does not take this into account. A robot’s ball prediction algorithm is automatically wrong when the ball approaches a corner, and thus, has less ball control. The Junior Robotics Team at TFA has looked into this problem, and found a way to detect the corner.

By detecting a corner, robots can achieve a better ball prediction algorithm and meet the ball up faster to score goals or defend better. In tight matches, a good corner ball prediction can mean the difference between a win and a loss. 

TFA Junior Robotics’ algorithm is to switch the x and y axis’. This is essentially the same as reflecting the ball at a diagonal point. However, there are intricacies with detecting when the ball will hit the corner. For this, there are a few ways to accomplish this, however, Victor made an algorithm by calculating if the given GPS point is inside the area of the triangle. Since the three corner points and the current ball position is given, a simple formula for calculating if a point is inside a triangle can be used. Therefore, the ball prediction knows when the ball will hit, and where it will land. 

 

In this video, you can see TFA Junior Robotics’ ball prediction along the corner. The robot predicts the location that the ball will end up at in a set number of timesteps away. 

The above image is a possible implementation of a ball prediction along the corner algorithm. A robot can shoot a ball along the wall, hit the corner, and be kicked in by another robot.