Robotstadium contest logo

Robotstadium On-Line Competition

Robotstadium is a realistic simulation league based on Webots and Urbi corresponding to the Robocup Nao Standard League.

The competition is open to anyone free of charge from September 1st, 2008.

The winner will receive a software package including Webots PRO and Urbi for Webots.

This competition is sponsored by Cyberbotics, Gostai and Aldebaran Robotics.

 

Program with Urbi

You will find here all the informations to program your Nao with Urbi and UObjectJava for the robotstadium contest.

Prerequisites

To use Urbi for Webots for this contest you need to download and install:

You will find the documentation on how to install and use Urbi for Webots here.

Program your Nao with Urbi

You will find all the informations on how to program in Urbi in the tutorial.

The competition is based on the world robotstadium.wbt in Webots. You will find it in the directory webots/projects/contests/nao_robocup/worlds/. To program the Nao, you need to modify the files located in webots/projects/contests/nao_robocup/controllers/nao_soccer_player_blue/. You can upload any file ending in .u on the robostadium site, they will be copied to the nao_robocup/nao_soccer_player_blue (or nao_soccer_player_red) folder, on the robotstadium server, for the match.

 

You must at least modify and upload nao.u.

You can create any extra .u file, and upload them, they will be copied in the nao_robocup/nao_soccer_player_blue (or nao_soccer_player_red) folder.

You are not allowed to modify: URBI.INI, CLIENT.INI, nao.ini.

Here is an example of a really basic nao.u that you should use to start programming your Nao for the contest. Since you cannot know if during the match your Naos will be red or blue, you should implement the same behaviour for the red and blue player.

Use UObject Java

Download the UObject java sdk:

The package we provide contains the libraries you need to develop UObjects in Java, and some examples of such UObjects. We also provide an Eclipse project that you can use to open and run the examples in Eclipse.

Before trying to develop your own UObjects Java please have a look at the documentation. Give a special attention to how you open and run the examples we provide in Eclipse here.

 

Run your UObjects Java with webots

In order to be able to use your UObjects in Webots, you have to:

  • open robotstadium.wbt, wait for the Urbi servers to be launched for every Nao robots
  • launch your UObjects Java on every Urbi server

So since robotstadium.wbt contains 8 Naos, thus launch 8 Urbi servers, you have to open eclipse 8 times and configure the 8 uobjects java program to connect each one on each robots (adress localhost, ports from 54001 to 54008).

 

Use your UObjects Java in nao_player.u

When you open the world robotstadium.wbt, the file nao_player.u is loaded by the Urbi servers of the Naos. The problem that arise is that if in your nao_player.u file you want to use your UObjects Java, you have to wait for them to be started (since your first open the .wbt world, then you wait for the Urbi servers to start, then you start your UObjects with Eclipse).

Waiting for the UObjects Java to be loaded is in fact really easy to do in Urbi. Just wrap the Urbi code that use your UObjects Java in an "at" command:

at (MyUObjectJavaName.load == 1) {

/// Code using the UObject "MyUObjectJavaName"

},

 

For example with the Adder UObject (see the examples UObject we provide):

 

at (Adder.load == 1) {

myadder = new Adder (42);

myadder.add (8) ;

/// Will display 50

},

 

Export your Java UObjects to a Jar file.

We explain how to export you Java files to a JAR with eclipse here. Please name your JAR file "uobjectjava.jar" and then upload it on Robotstadium website.