[robocup-msrs] changing the number of Robudog players in the simulator

Kyle Johns kylej at microsoft.com
Thu Jun 21 03:02:32 EDT 2007


You are mostly right.  To run just a single player, comment out all but one player in the manifest and change the number of PlayersPerTeam value in SimulatedSoccer.Referee.Config.xml to 1 and change the AutoStart value to false.  Then, the referee will start the match when a single player announces itself.  The other robudogs will still appear on the field.  You can delete them by pressing F5 and then locating the entities you don't want in the upper-left pane and selecting them and pressing Delete.  Press F5 again to resume the game.

The code that you reference below is simply searching in the name of the current service to see if it has the word "goalkeeper" in it.  If it does, it assumes that it is the goalkeeper and takes on that role.

-Kyle

________________________________
From: robocup-msrs-bounces at cc.gatech.edu [robocup-msrs-bounces at cc.gatech.edu] On Behalf Of Andrew Williams [jayhawkeye at gmail.com]
Sent: Wednesday, June 20, 2007 6:25 PM
To: robocup-msrs at cc.gatech.edu
Cc: Whitney O'Banner
Subject: [robocup-msrs] changing the number of Robudog players in the simulator

Hello,
How do you change the number of players that are on the playing field of the simulator? For example, if we only want to run the Blue Team Offensive player, do we comment out the other players in the manifest and then change the number of players in the referee manifest to one per team and only list one team?

Also, not sure how the following works (with the manifest URI?) to get the role of the player:
if (ServiceInfo.Service.IndexOf("goalkeeper") != -1)
            {
                _state.Role = player.SoccerPlayerRole.GoalKeeper;
            }
            else
            {
                _state.Role = player.SoccerPlayerRole.Offense;
            }

-- Andrew


More information about the robocup-msrs mailing list