Basic Soccer Client for RoboCup Soccer Simulator

 

Introduction

 

This project was started because I wanted to have a RoboCup simulator that was programmed in Object Pascal, the language I have been using for a few years now. Before I used Object Pascal, I programmed everything in C and Assembler. But now I really love the Delphi IDE and the speed at which the programs compile. As a basis for the structure of the API, I used the BasicPlayer that was programmed by the late Emiel Corten. He wrote the API and documented it very well, so that I could make this implementation only using his written API specification.

The first goal was to make a standard player that can be used as a basis for a implementation. The basic player handles all the stuff like processing the messages and keeping track of visual objects.

The second goal was to be able to implement the software in Delphi and in Kylix. Kylix can be used free of charge if you want to develop Open Source projects.

 

A Word of warning

 

This Delphi implementation is made for a course at the University of Amsterdam in The Netherlands. The original C++ API was given as a start to make your own Autonomous System. Writing an API in Delphi was, of course, not part of the assignment. I had to make the BasicPlayer object just to be able to implement the real assignment. While I did my best to make a good API, I am by no means a Robocup Simulation wizard. I don’t even know if I will ever use this code again in my life. If you have improvements, bugs or something else, you will have to become a member of the project and fix it. I will try to keep administrating the project, but there are no guarantees. That said, I hope you will find all this code useful because I myself am bit proud of the result :-).

 

General

 

BasicPlayer is a standard RoboCup simulation player to be used with the soccerserver and soccermonitor. The default implementation handles the UDP/IP interface with the server, has an internal representation of the RoboCup world (with players, flags, goals, etc), and is easily extendable to make your own Player.

 

Dependencies

 

The BasicPlayer and BasicCoach both use the Indy UDP client, which is available free of charge for both Delphi and Kylix (source code is also included!).

 

Differences with the C++ API

 

Object Pascal supports the notion of ‘sets’ very well, which makes the iterating over de Visual Object Memory a little bit more intuitive. Furthermore, the Object Pascal Visual Object Memory implementation uses objects that all descend from TVisualObject. I believe that makes the code more readable. The biggest differences, however, is the decision that every player has it’s own  UDP connection with the soccerserver. In the C++ API, there is one ‘EventDispatcher’ and you can add players to that dispatcher. This result in a not very intuitive class-definition of player, because many Visual Object Memory are available using the player class (for example, the player.isBall(id) method checks if an object (given just an id) is a ball).

My implementation has a player, who has it’s own personal UDP connection and Visual Object Memory and you can access the different objects and perform checks on them (like object.isBall, etc).

 

Documentation

 

The documentation will be available in HTML right here.

 

Current Status and Download

 

You can read my progress for every day in my Project Diary.

The latest version of the BasicPlayer can be downloaded here (Version 0.9.1.x).

The complete list of versions can be found at the download page.

The changes and bugfixes can be found here.

 

 

Acknowledgements

 

First of all, the design of the API (the classes, the callback structure, the visual object memory etc) is made by the late Emiel Corten. However, many small changes have been made.

 

 

(C) Copyright 2001, Ferns Paanakker.