HowTo get started with assignment 1 =================================== Created 2003-08-27 by Peter Andersson Last updated 2012-08-27 by Cyrille Berger The purpose of this HowTo is to describe how to check out the RoboSoc library from the CVS, have a short walk through of it and getting ready for the first assignment. 0. Log onto your brand new aipXX account 1. Add the module /home/TDDD10/modulefiles/tddd10 by issuing the following commands > module add /home/TDDD10/modulefiles/tddd10 > module initadd /home/TDDD10/modulefiles/tddd10 Note: now the module is only loaded in the terminal where you executed the module add command. The next time you log in the module will be loaded in all the terminals. 2. Check out the RoboSoc libraries from the CVS > cd > cvs -d /home/TDDD10/cvsroot co RoboSoc Note: This code is checked out mainly for reference, any compiling will be done with pre-compiled shared libraries. (The RoboSoc Library takes ~30-60 minutes to compile). 3. Enter the RoboSoc directory > cd RoboSoc 4. Browse around and check where things are RoboSoc/Framework This directory contains things which might be interesting to you. It contains templates for creating teams, skills, example agents and implementations of some higher level functionality. RoboSoc/BasicSystem In the BasicSystem is low level basic functionality located. If something needs changing here, please contact a course assistant. Other things can be largely ignored. 5. Make a local copy of the TDDD10 template code > cd > cp -r RoboSoc/Framework/template/tddd10 team > cd team > find . -name 'CVS' | xargs \rm -Rf 6. Import the team skeleton into your subversion repository (don't forget to change aipXX to your group number, i.e. aip1, aip2, ...) > cd > svn import team https://svn-und.ida.liu.se/courses/TDDD10/2012-ht1/aipXX/team/trunk -m "Imported team skeleton." 7. Check out the skeleton code from the subversion repository > cd > \rm -r team > svn co https://svn-und.ida.liu.se/courses/TDDD10/2012-ht1/aipXX/team/trunk team 8. Generate the configure-script > cd ~/team > ./bootstrap 9. Run the configure-script to generate the makefiles > ./configure 10. Make the example agent > make 11. Add files in each directory which should not be in the repository to the property svn:ignore. This is done with the subversion command svn pe svn:ignore . The command will open an emacs window where you can enter the files which should not be under version control. When you are done save the file and close emacs. Do not forget to commit the changes. > cd ~/team > svn pe svn:ignore . The files: .deps .libs Makefile Makefile.in aclocal.m4 autom4te.cache config.h config.h.in config.log config.status configure libtool stamp-h1 Team > svn pe svn:ignore config The files: depcomp missing config.guess config.sub ltmain.sh install-sh > svn ci -m "Updated svn:ignore." 12. Configure the soccer simulator to allow several groups to run the server on the same machine > rcsoccersim Close or kill the soccer server. (The soccer simulator creates the conf files you should edit if not already present). > emacs ~/.rcssmonitor.conf Change port to 60XX where XX is your group number Save and exit > emacs ~/.rcssserver/server.conf Change server::port to 60XX where XX is your group number Change server::coach_port to 61XX where XX is your group number Change server::olcoach_port to 62XX where XX is your group number Save and exit > porttest X To see if the ports are specified correctly (where x is your group number). The output should be: "Monitor: port OK Server: port OK Server: coach port OK Server: old coach port OK" 13. Run the score challenge test cases > test_score XX ./Team (where XX is your group number) 14. Try the example agent without running the test scenario (Start another console, referred to as console2) Console2: > rcsoccersim Note: If the command isn't found it probably means you haven't loaded the tddd10 module in that terminal. Either load the module explicitly with 'module add /home/TDDD10/modulefiles/tddd10' or log out and then in again. Console1: > cd ~/team > ./Team -port 60XX (where XX is your group number) Note: The agent will not start until it is PLAY_ON, to get to this, press kick_off and then use middle button to drop ball in front of the agent. 15. Add your email addresses to a file called .forward in the root directory. You can add multiple addresses seperated by a comma. This is necessary since feedback from the tournament will be sent to your aip account email address. > emacs ~/.forward 16. To submit your code to the skill tournament call the script 'submit-skill' with the SVN revision id of the code you would like to submit. Your code is automatically checked out and compiled by the tournament system and if the compilation is successful your current entry in the tournament is updated. If the compilation fails an error report is emailed to your aip account. To get the currently checked in revision you can use 'svn info' in your team directory and find the line Last Changed Rev. The output from SVN is language dependent and if you use Swedish then the line starts with "Senast ?drad i revision". > cd ~/team > svn info > submit-skill To check that a particular revision really can be checked out and compiled you can use the script 'checkout-and-compile' which takes a revision id as argument. > checkout-and-compile To get the revision id of your current entry in the skill tournament use the 'current-skill' script. > current-skill It should be noted that it takes a while before the submitted code is checked out and compiled by the tournament system. When it is done, an email is sent to your aip account. To submit a team use 'submit-team' and to get the revision id of your current team tournament entry use 'current-team'. 17. Check the files that came with the template. team/Team.cc In this file you can turn on/off logging and use different strategies for seeing/hearing/etc. team/TeamDecision.cc TeamDecision.h This is where the higher level decisions of an agent take place. The code handles the messages from the coach regarding the test cases for the skill and team assignments. Based on the message from the coach different skills will be tested. For the skill assignment you don't need to change anything in this file, but you may do so if you like. team/BlockPassAngle.cc BlockScoreAngle.cc CatchBall.cc ClearBall.cc Dribble.cc InterceptBall.cc MakePassable.cc Pass.cc PositionGoalkeeper.cc Score.cc TakeBall.cc The implementation files for the skills you are supposed to implement in the skill assignment. The template files contain extremly simple implementations of the skills. Now you should be somewhat familiarized with how to compile and start an agent. You can now delve into the TeamDecision and Score skill to implement a great scorer. For more info on how to start the tests, check the skill assignment web page. Good luck!