If you would like to work remotely and have a slow connection, you should look into installing the RoboCup 3D Soccer Server System on your local machine. We will be using rcssserver3d-0.6.4 and simspark 0.2.1 for this class. Note that if you'd like to install the server on your laptop or home machine, there are links to instructions on how to do this in the middle of the page at http://simspark.sourceforge.net/wiki/index.php/Main_Page .
% ps aux | grep rcssIf someone is on, you will see a line with the word "rcssserver3d" in it. (For future reference, there IS a way to run multiple servers on the same machine.)
% xhost a.cs.utexas.edu where 'a' is the name of the machine you are using.
% rcsoccersim3dIf the command rcsoccersim3d cannot be found, make sure that your PATH environment variable is set correctly (see the instructions above). You will likely see a lot of text including error messages being printed out as the simulator starts up but don't worry as you can ignore these.
% cp -r /projects/cs344M.pstone/3d/nao-agent .Then start the agent running
% cd nao-agent % ./agentspark --host=localhost --team myteam --unum 2 --paramsfile paramfiles/defaultParams.txt& [instead of myteam, use your own name]The agent should appear in the center circle of the field.
left_mouse_botton - look a, left_arrow - move left d, right_arrow - move right w, up_arrow - move forward s, down_arrow - move backward page_up - move camera up page_down - move camera down 1-7 - jump to fixed viewpointAdditional camera controls and other simulator commands can be found on page 30 of the 3d simulator manual.
% ps aux | grep agentsparkIf the agentspark process is still running go ahead and kill it by running the following:
% sh kill.shIt's a good idea to run the kill.sh script everytime after quitting the simulator to clean up potential runaway agent processes.
selectSkill()
method. You should see that it returns an eunmerated value type of SKILL_STAND
. Change this return value to be SKILL_WALK_FRONT
and save your changes to strategy.cc. Now recompile the agent with the make command:
% makeThen start the simulator and agent running again as before. After the agent appears in the center circle type 'k' to kickoff again. This time instead of just standing there the agent should start walking forward. Go ahead and quit the simulator and agent processes again as before.
selectSkill()
return SKILL_KICK_LONG_RIGHT_LEG
to see it kick the ball. The following is a list of the enumerated values you can have selectSkill() return in order to perform different actions...feel free to try some of them out!
SKILL_STAND - stand SKILL_WALK_FRONT - walk forward SKILL_WALK_BACK - walk backward SKILL_WALK_LEFT - walk sideways to the left SKILL_WALK_RIGHT - walk sideways to the right SKILL_TURN_LEFT - turn to the left SKILL_TURN_RIGHT - turn to the right SKILL_WALK_FRONT_CURVED_LEFT - forward walk that curves left SKILL_WALK_FRONT_CURVED_RIGHT - forward walk that curves right SKILL_KICK_LONG_LEFT_LEG - long kick left leg SKILL_KICK_LONG_RIGHT_LEG - long kick right leg SKILL_KICK_MED_LEFT_LEG - medium kick left leg SKILL_KICK_MED_RIGHT_LEG - medium kick right leg SKILL_DIVE_LEFT - goalie dive to the left SKILL_DIVE_RIGHT - goalie dive to the right SKILL_DIVE_CENTER - goalie dive to the center
beamX = -1; //-0.2; beamY = 1; //0.05; beamAngle = 180; //0;Now if you recompile and run the simulator and agent you should see the agent start in a different postition with it facing toward its own goal.
% cd /projects/cs344M.pstone/3d/logs % lsPick at least two of the games to watch.
% rcssmonitor3d --logfile <game> (e.g. "sparkmonitor.log")(A full game is 600 seconds. The logs are halves which go for 300 seconds (5 minutes). If the log player doesn't work, see the instructions above to make sure that nobody is running the soccer server on your computer.
$recordLogfile = trueNow repeat the sequence from "Get familiar with the 3D soccer simulator" to start the simulator and run an agent however this time make sure to run the simulator from the same directory as the simspark.rb file you edited as otherwise your change won't be processed and no log will be created. After killing the server, notice that there will be a log file in the directory from which you ran the server:
% ls *.logreplay your log:
% rcssmonitor3d --logfile <file>.log(where <file> is the name of the log displayed by the previous command) Turn in the logfile as directed on the main assignments page. During this course, you will often be sending us such logfiles as the results of your programming assignments.
Page maintained by
Patrick MacAlpine
Questions? Send me
mail