Thursday, 09 September 2010
5:56 (CEST)
 
Programming Print

What changed since Robotstadium 2009 ?

Webots 6.2.3

You must use this version to participate to Robotstadium.

Colored pink/blue waist belts were added to the Nao robots (according to the SPL 2010 rules). The red/blue body parts were removed. This may requires some changes in your vision algorithms if your code used to detect the robots. However the goal and ball colors haven't changed since Webots 6.2.2.

The width of the penalty area was reduced from 3000 to 2200 mm (according to the SPL 2010 rules). The kick-off position was changed accordingly. In principle nothing needs to be adapted in your code.

The goals were modified to hold the net farther back from the goal posts (according to the SPL 2010 rules). So the goalkeeper's head does not get caught too easily. In principle nothing to change in your code.

Important: The "motions" directory was moved one level up. Now the standard .motion files must be accessed using this kind of code:

  motion = new Motion("../../motions/Forwards.motion");  // open a standard .motion file with Webots 6.2.3

Important: The Supervisor code was changed: it  no longer swaps the red/blue controllers, but instead it just swaps the waist belt colors. This fixes a number of issues previously caused by swapping the controllers: different Camera pixel formats used for C++ and Java, Servo configuration, Receiver's message queues, etc. Now the robot controllers will not be restarted during the half-time break. As a consequence the controllers must determine the team color and it must be able to switch the team color at run-time. The following type of code must be used to determine the team color at run-time. The playerID is passed as argument to the main() function:

C++ Example:

bool Player::isBlue() const {
  return gameControlData->teams[TEAM_BLUE].teamNumber == teamID;
}

bool Player::isRed() const {
  return gameControlData->teams[TEAM_RED].teamNumber == teamID;
}
 ...
int main(int argc, const char *argv[]) {

int playerID = atoi(argv[1]);
int teamID = atoi(argv[2]);

// choose GoalKepper/FieldPlayer role acording to playerID
Player *player = NULL;
if (playerID == 0)
player = new GoalKeeper(playerID, teamID);
else
player = new FieldPlayer(playerID, teamID);

player->run();
delete player;
}  

Java Example

  public boolean isBlue() {
return gameControlData.getTeam(RoboCupGameControlData.TEAM_BLUE).getTeamNumber() == teamID;
}

public boolean isRed() {
return gameControlData.getTeam(RoboCupGameControlData.TEAM_RED).getTeamNumber() == teamID;
}
...
public class SoccerPlayer {

public static void main(String[] args) {

// get team and player id's from controllerArgs
int playerID = Integer.parseInt(args[0]);
int teamID = Integer.parseInt(args[1]);

// choose GoalKepper/FieldPlayer role according to playerID
if (playerID == 0)
new GoalKeeper(playerID, teamID).run();
else
new FieldPlayer(playerID, teamID).run();
}
}

Webots 6.2.2

There are only few changes in Robotstadium 2010 with respect to Robotstadium 2009. Webots Java, Python, C and C++ APIs are mainly unchanged. The most important changes concerns the graphics rendering of the robotstadium.wbt world and of the NaoV3R.proto, they are more textured and the lighting and materials have been improved. As a consequence, the simulated camera images appear more realistic and therefore the image detection algorithms may need to be adapted or recalibrated for Robotstadium 2010.

Image
 
Who's Online
We have 5 guests online
Login Form





Lost Password?
No account yet? Register
 
Top! Top!