Welcome

Welcome to the JavaSoccer information page: http://www.cc.gatech.edu/~tucker
This documentation is also included with the JavaSoccer and JavaBots distribution in JavaSoccer/docs/index.html.

JavaSoccer is freely distributable, but it is copyrighted by the Georgia Tech Research Corporation. Please see the file EDU/gatech/cc/is/COPYRIGHT.html for detailed copyright information.

JavaSoccer simulates the dynamics and dimensions of a regulation RoboCup small size robot league game. Two teams of five robots compete on a ping-pong table by pushing and kicking an orange golf ball into the opponent's goal.

Contents

A JavaSoccer kick-off.

Introduction

This software was developed in the Georgia Tech Intelligent Systems and Robotics Group by Tucker Balch. JavaSoccer is part of the JavaBots software distribution which is composed of two Java applications and several Java packages targeted for mobile robotics research. If you are interested in the other software in the JavaBots distirbution, consult the JavaBots documentation.

JavaSoccer runs in the JavaBotSim application using a configuration file that tailors it for soccer games. Other types of robots and tasks can also be simulated in JavaBotSim, including the Nomadic Technologies' Nomad 150 robots Georgia Tech is using to compete in the AAAI-97 mobile robot contest. The same control systems that run in simulation can also operate real robot hardware using the JavaBotHard application. At present, this capability is limited to Nomad 150s.

While no significant bugs are known to exist, this is a beta distribution and it is subject to change. It is offered at this early stage in the hope that that others in the RoboCup community will make suggestions as it develops.

Finally, JavaSoccer was developed separately and is distinct from Itsuki Noda's SoccerServer I'd like to thank Itsuki for providing an excellent example of how to build a great soccer simulation. Thanks are also due to Peter Stone and Hiroaki Kitano for their advice in this endeavor.

How to install JavaSoccer

JavaSoccer is part of the JavaBots distribution. When you install JavaBots you automatically get JavaSoccer. Please consult the JavaBots installation instructions.

About the demo

By typing "demo" you execute the command line "java JavaBotSim robocup.dsc 511 300". This starts JavaBotSim and tells it to read environmental information from the robocup.dsc descriptionfile, and to set up a 511x300 pixel display area for the simulation. You can use a larger or smaller area if you like, but keep the 511/300 ratio as that is the aspect ratio of the soccer field.

The default demonstration runs the SchemaDemo team against the BasicTeam. Neither team is really very good (I hope to develop better teams soon), but they illustrate the capabilities of the simulator fairly well.

JavaSoccer rules and dynamics

These rules are drawn primarily from RoboCup's regulations for small size robot league with differences noted.

Field dimensions
The field is 152.5cm by 274cm. Each goal is 50cm wide. The defense zone, centered on the goal, is 100cm wide by 22.5cm deep. In the coordinate system used in the simulation, the center of the field is (0,0) with +x to the right (east) and +y up (north). The team that starts on the left side is called the "west" team and the team on the right is called the "east" team.

Robots
Robots are circular and 12cm in diameter. In RoboCup 15cm is the maximum size. The simulated robots can move at 0.3 meters/sec and turn at 360 degrees/sec. (I would like to base these numbers on real soccer robot specifications, please send them to me if you know them).

Team
A team consists of no more than 5 robots.

Ball
The simulated ball represents an orange golf ball. It is 40mm in diameter and it can move at a maximum of 0.5 meters/sec when kicked. It declerates at 0.1 meters/sec/sec. Ball collisions with walls and robots are perfectly elastic. (If anyone has real measured numbers for these parameters, please send them to me!).

Coloring
Coloring of the field doesn't really matter in the simulation, but the image drawn on your screen matches the RoboCup regulations.

Length of the game
For now, once the game starts, it runs forever. This will soon be changed to conform to the rules of RoboCup: two 10 minute halves.

Wall
A wall is placed around all the field, except the goals. Ball collisions with walls are perfectly elastic. Robots may "slide" along walls if they aren't headed directly into them.

Defense zone
A defense zone surrounds the goal on each side. It is 22.5cm from the goal line and 100cm wide. Only one defense robot can enter this area. Note: this is not enforced by JavaSoccer, but it will be eventually.

Robot marking
Robots are marked with a two-color checkerboard pattern. In RoboCup rules they are marked with two colored ping-pong balls.

Communication
There is presently no facility for robot to robot communication, but this may be added if people are interested in it.

Goal keepers
At present, the goal keeper has no means for grasping the ball. The system may be improved later to allow for this.

Kick-off/Restart/Stop
Kick-off, restart and stop of the game are managed automatically. The west team gets to kick-off fist, with subsequent kick-offs made by the scored-against team.

Robot positions at kick-off
The robots are automatically positioned as shown below at kick-off. The numbers indicate values returned by the getPlayerNumber method.

kick-off                         receive
                   |
                 2 | 2 
                   |      1
 0         1     3 o                   0
                   |      3
                 4 | 4
Specific positions are not specified in the RoboCup rules, except that only the kick-off team can be within 15cm of the ball.

Fouls/Charging
Currently no fouls are enforced by JavaSoccer. There is however a "shot clock." At the begining of a point, the clock is set to countdown from 60 seconds. If no score occurs in that time, the ball is returned to the center of the field. The ball is also returned ot the center if it gets stuck for a period of time.

Those types of fouls that can be evaluated objectively by the running program will eventually be added. RoboCup enforces several fouls and charging violations.

How JavaSoccer works

The description file
As mentioned earlier, JavaSoccer runs under the JavaBotSim simulator. At runtime, JavaBotSim reads in a description file that tells it what sorts of objects will be in the present simulation and where they should appear in the environment. Obstacles, small soccer robots, Nomad 150 robots, golf balls and squiggle balls have all been implemented to date. You don't really need to worry about the description file for now because one appropriate to the soccer simulation comes with the distribution in the JavaSoccer directory (robocup.dsc). But you will need to make some simple modifications to it if you want to compete with your own team or change the colors of the robots.

The simulation kernel
Each object in the simulation includes two important components: 1) a drawing method and 2) a dynamics simulation method. The simulation kernel, or core, runs in a loop calling the two methods for all the objects in the simulation at each step. It also keeps track of time, and passes elapsed time to the dynamics methods, so they knows how far to move their associated simulated objects. The simulation can run in real-time or faster or slower than real-time according to how the time variable is set in the description file.

Robot control systems
In addition to the drawing and dynamics methods, robots have a control system object that considers sensor inputs and makes actuator outputs. The control system is what you need to modify if you want experiment with different soccer strategies. The control system has no way of knowing whether it is running in a simulation or on real robot hardware. This is convenient because you don't need to modify your control software between simulation and real runs. Unfortunately, the capability for running small soccer robot control systems on real hardware is not available yet, but you can develop and run systems for Nomad 150 robots if you like (they don't quite fit on a ping-pong table!).

Capabilities of a JavaSoccer robot

The interface between the robot's control system or "brain," and its sensors and actuators is provided by the API called SocSmall, a Java class. The most complete description of the interface is provided by the javadoc-generated documentation for SocSmall, and SocSmall's parent class Simple. A synopis is provided here:

Sensors

Actuators

Developing your own soccer team

Overview
To build your own team you need to 1) extend the ControlSystemSS class to define your team strategy and 2) edit the robocup.dsc file so that JavaBotSim will load your team instead of the default teams (and to adjust the colors of the robots to your liking). The robocup.dsc file is verbosely commented, so #2 is easy.

Copy an existing team!
The easiest way to accomplish #1 is to make a copy of one of the existing teams in the JavaSoccer/teams directory. Here is the javadoc documentation for the examples. Some of these teams were developed using Clay, a behavior-based configuration system. You are welcome to use Clay for your own purposes, but this is not necessary. If you don't want to use Clay, start with one of the example teams that don't import the EDU.gatech.cc.is.clay package.

If you look at one of the teams, you will notice two methods are implemented: Configure() and TakeStep(). Configure is called once at set-up time to allow you to do whatever initialization you need. TakeStep() is called repeatedly by the simulation kernel to allow you to read sensors and select actions. Senors are read by calls to the abstract_robot.get* methods, actuator commands are sent by calls to abstract_robot.set* methods.

Sensor example:

abstract_robot.getBall(curr_time)
reads the ball sensor and returns a 2-dimensional vector towards it. The curr_time parameter is a timestamp that helps prevent redundant sensor accesses (this is more important for use on real robots than in simulation).

Actuator example:

abstract_robot.setSteerHeading(curr_time,0)
will point the robot east. Look at the example teams for more clues on the other sensor and actuator methods.

Compiling
As the name JavaSoccer implies, the software is written in Java. Standard Java coding practices and conventions apply. We have compiled and run all the software on Linux, Solaris and Irix.

To make compiling with dependencies a little easier, the distribution includes a gmake-based Makefile with the following functionality:

You will need to edit the make file so that it will compile your files. We'd like to include any teams you develop in future releases of JavaSoccer, but please be sure to adhere to good programming practices!

Future directions

The following items are on the to do list: Please contribute by sending me your suggestions! (tucker@cc.gatech.edu).