Basic Simulator Help: Getting started

Getting the Code:

To get the code you need to check it out from the CVS repository. The repository is located on calvin.prodigy.cs.cmu.edu. You need to have an account set up on calvin. Accessing the code is then done via ssh as follows: Set up the CVSROOT and CVS_RSH environment variables as (for TCSH):

~/mydir> setenv CVSROOT :ext:calvin.prodigy.cs.cmu.edu:/home/small/repository ~/mydir> setenv CVS_RSH ssh

BASH and ZSH will be:

~/mydir> export  CVSROOT=:ext:calvin.prodigy.cs.cmu.edu:/home/small/repository ~/mydir> export  CVS_RSH=ssh

Now you check out the code by running cvs as:

~/mydir> cvs co dragons

This will create the dragons directory with all the code Then all you need to do is compile and run it. If you have any difficulties getting the code email the brett , Mike , or Jim for help.

If you already have the code and want to update your copy then run:

~/mydir> cvs upd -d

This will update all the code. Pass in -n -q if you want to see what it will change first without actually changing anything. Running man cvs will give you the meaning behind all these commands. Alternatively, run the check command in the dragons directory or the the update command to do the same thing.

Making the Code:

To compile the code you need to go to the top-level dragons directory and run make. This will automatically make all the submodules and link the binaries located in the bin directory to the appropriate executables. run 

~/mydir>/dragons; make

You will then get a whole lot of output. If you get any errors the make program should halt and report what that error was. If it was a fresh checkout/update then something is wrong and you should contact the guy in charge.

Running the Code:

To run the code go to the bin directory. I usually run with 3 windows, one for each executing program.

  1. The first step is to run the simulator or the rsever. The ./simulator runs the simulation package and the ./rsever runs the real robots and must run on calvin. Both have various command line options. Run them with -h to find out what the options are.
  2. Next run the main soccer program from the bin directory. Do this by executing ./soccer in the bin directory. If you are not running soccer on calvin you need to specify what machine it can connect to to find the rserver or simulator. You do this via the -V < host > command line option. As with all programs -h will list all the options.
  3. The next step is to run the GUI. This can be done from any machine. Execute the command ./gui from teh bin directory to start it. If you are not running on calvin you need to specify what machine to connect to for vision -V < host > and soccer -S < host >
  4. Now choose the players by clicking on the yellow and blue tool bar icon (this is meant to be a team of robots). Hold the mouse of the button to get the tool tip if you are not sure. When you click this a side panel will show up that has a range of edit boxes. Type how many opponents you want. Then type the robot cover ...something like:
    • Diffbot 0 enter cover 1 and click the check button 
    • Diffbot 1 enter cover 2 and click the check button 
    • Diffbot 2 enter cover 3 and click the check button 
    • Omnibot 0 enter cover 4 and click the check button 
    • Omnibot 1 enter cover 5 and click the check button

    Then click set. You should get 5 robots appearing on the field with however many opponents you selected.

  5. To move them by hand click and drag with the left mouse button. To orient click and drag with teh right mouse button. To get them to go to a point click and drag with the middle mouse button To drive them manually click on one and use i, k forward and backwards, j, l sideways on the omnibot a, s turn left and right
  6. The debug level controls the debug display. It is something like:
    • 10 allows all - kalman filter position, obstacle avoidance, kicking 
    • 5 or 6 - obstacle avoidance and kicking

    play around with it and see what you get.

  7. To run a particular tactic type the name and its parameters in the tactics box. To run the team type strategy 4 3 2 1 0. Click on the GC toolbar icon to get the game control panel. Then click move to kickoff us or kickoff them. Then click start to make it all happen. Currently the opponents don't actually move....this is going to happen soon.

Brett Browning
Last modified: Sun Apr 21 18:40:01 EDT 2002