Details

A basic explanation of atan, and how it relates to the RoboCup 2D SServer.

To understand Atan it is necessary that you understand the basics of the Soccer Server first. The following picture gives you a rough overview of the SServer and some of the objects it uses.

SServer players communicate via a UDP-Connection with external programs that control the player, dictating how the player performs. These external programs communicate with SServer using interface strings, which are described in the SServer manual (avaliable here).

Atan is a Java package that helps you to write such external programs, by interfacing with SServer for you. You dont have to worry about how to establish a UDP connection, how command strings can be parsed to get information from SServer, and how to generate command strings in order to control the corresponding player. You don't even have to worry about which side of the pitch you are currently playing on, Atan handles all this for you by translating SServer messages to be relative to your own side. That means you dont see a left or right goal (as per SServer output) but rather you see an own or an other goal. You dont see top or bottom flags but left or right flags, all depending on what side you are currently playing.

In order to use Atan, all you have to do is to implement the com.github.robocup_atan.atan.model.ControllerPlayer interface, which provides you with all the information your players need, and use the com.github.robocup_atan.atan.model.SServerPlayer interface in order to control your players. The idea here, is that your controller will receive information via the methods defined in the Controller interface (infoSeeFlag() etc etc), decide how to act on that information, and then use the Player interface to inform SServer how they wish to act.