This assignment is designed to get you familiar with the code
base that you will be using for your final project. For
this, you will have two choices:
UT Austin Villa. This is the code base from the
first three assignments. This agent made it to the second round of
Robocup 2010 in Singapore and almost made it to the quarter finals.
Little Green BATS.
Development library used as the base for the Little Green BATS 2007 and Bold Hearts 2009 RoboCup 3D simulation vice world champion teams. We are currently still working on getting this code base to run on UTCS.
Both of these teams include all of the parsing, server interaction,
and individual skills (such as walking, dribbling, kicking, etc.). The high-level strategy that was used in the competitions is
missing from both teams, however. Instead, each team has a fairly
simple "placeholder" high-level strategy.
Your goal is to create a team (6 players) of agents that can play a full game of
soccer as follows:
Each player should be given a "home position" where it returns when
the ball is not near. You choose the home positions.
When the player thinks that no teammate could get to the ball
more quickly, it should try to get to the ball.
Once it has the ball, it should choose to dribble, pass, or shoot
(kick). In all cases you will need to specify a target.
When your team is ready, have it play 2 games and turn in the
logfiles. One game should be against a team of agents that all go to
the ball (for example 6 of your assignment 2 agents). The other should be against itself.
Using UT Austin Villa
To begin using the UT Austin Villa code, follow these steps. First, copy
the code to your account:
% cp -r /projects/cs344M.pstone/3d/nao-agent
Run make to compile the code:
% make
If everything worked, you should now have a player binary in the
nao-agent/ directory called agentspark. You can run this player
like you ran your players from the previous assignments by starting
the soccer server and then typing:
Alternatively, you can run the "start.sh" script to start a whole team
of UT Austin Villa players:
% ./start.sh localhost
Remember to start the soccer server first!
% rcsoccersim3d
Help on UT Austin Villa:
Hints : You may want to look at the following files (though you are encouraged to go through every file and understand the functionality, not necessarily every detail).
1. worldmodel.cc
2. naobehavior.cc
3. strategy.cc
The player API's are mostly in naobehavior.cc and strategy.cc. In worldmodel.cc you will find run time information about the world. Some really important methods for determing your position and positions of other objects in the world from measurement calculations by a particle filter are the following:
worldModel->getMyPosition() // returns a VecPosition (use getX() and getY() methods of VecPosition to get appropriate values) of the agent's global position on the field
worldModel->getMyAngDeg() // returns the angle in degrees the
agent is facing in the X-Y plane (the orientation of the agent)
The getWorldObject() method return a WorldObject for a particular object in the world.
WorldObjects contain useful information about the location of an object in the world.
A couple if important members of WorldObject are "pos" which is a VecPosition of an objects location and
also "validPosition" which is a boolean flag stating wheter or not the value of "pos" is valid.
worldModel->getWorldObject(WO_BALL)->pos; // position of the ball as a VecPosition
worldModel->getWorldObject(WO_TEAMMATE1 /*WO_TEAMMATE#*/)->pos; // position of teammate as a VecPosition
You might also want to check out the following method for having
the agent walk to a specific location
goToTarget()
Using Little Green BATS
This code base and manual can be found here.
To begin using the Little Green BATS code, follow these steps. Begin by
downloading the code into your account from here.
Uncompress the archive:
If you're not on UTCS and have root access move the eigen directory to /usr/include and rename it to eigen2.
% mv eigen /usr/include/eigen2
On UTCS, in order to get the Eigen C++ template library in the include path of the compiler you'll need to set the CPLUS_INCLUDE_PATH environmental variable. First move the eigen directory to be inside your libbats-2.0 directory and rename it to eigen2.
% mv eigen <path_to_libbats-2.0>/eigen2
Then set the CPLUS_INCLUDE_PATH environmental variable to be your libbats-2.0 directory:
% cd <path_to_libbats-2.0>
If your shell is bash
% export CPLUS_INCLUDE_PATH=.
or if your shell is csh
% setenv CPLUS_INCLUDE_PATH .
Run configure to prepare the source code to be built.
If you are on a machine without root access (such as UTCS), then
% cd <path_to_libbats-2.0>
% ./configure --prefix=/somewhere/in/my/home/directory/libbats-install
otherwise
% cd <path_to_libbats-2.0>
% ./configure
Run make to compile the code (this will probably take several minutes):
For some reason in order to compile we also need to create a symbolic link for the Eigen directory.
% ln -s eigen2/Eigen Eigen
% make
% make install
If all goes well, you should now have a sample agent built. You can run this player like you ran your players from previous assignments by starting the soccer
server and then typing:
% cd examples/helloworld
% ./helloworld
Some details:
You can create your team with a single executable by having the
player's uniform number determine its home position.
Don't worry about making a goalie (player number 1) with special behavior (unless
you want to!).
There is A LOT of functionality in these code bases. You don't
need it all. But the point of this assignment is to try to become
familiar with one of the bases, so you know what you would like to
build on top of it for your final project.
IMPORTANT: IF YOU HAVE ANY QUESTIONS EMAIL THEM TO THE
LIST! Everyone is going to have to get familiar with one of
these code bases in order to come up with an interesting project.
Remember, the point of this assignment is just to become familiar with
the code so that you are prepared for the final project.
What to turn in:
2 logfiles of games as described above. The one against the team
of players that all go to the ball should be called
[yourlogin]-vs-herd.log. The one against itself should be called
[yourlogin]-vs-self.log. In both cases, run the game until a goal is
scored or for at least 120 seconds.
Your tarred, gzipped source code,
[yourlogin]-source.tar.gz. You only need include files you've
modified.
% tar -czvvf [yourlogin]-source.tar.gz <source_code_files>
To turn in your files, use the turnin
program with grader "patmac" and assignment label "prog4-3D". When the
assignment is there, send us an
email to that effect
with a brief description of what your team does.