Difference between revisions of "RoboCup Simulator Execution"

From RoboJackets Wiki
Jump to navigation Jump to search
Line 12: Line 12:
  
 
=== Starting the Simulator ===
 
=== Starting the Simulator ===
We will start the simulator to run in a terminal.  You can run the soccsim executable without parameters to get a small explanation of the correct arguments, if necessary.
+
We will start the simulator to run in a terminal.  You can run the soccsim executable without parameters to get a small explanation of the correct arguments, if necessary.  Note that you can choose from the config files in the SoccSim/config/ folder to try different scenarios.
  
 
<pre>
 
<pre>
Line 22: Line 22:
  
 
=== Starting the soccer interface ===
 
=== Starting the soccer interface ===
 +
Start a new terminal to run soccer from and use the following commands.  This will start the soccer engine using the simulation configuration file (soccer/config/sim.xml) and using the yellow team (use -b for blue team).
  
 +
<pre>
 +
cd [robocup root]/soccer/bin
 +
./soccer ./soccer -y -c ../config/sim.xml
 +
</pre>
  
 +
You should now see the GUI for the soccer program.  To to a simple check to ensure that everything is working, you want to enable a play to run.  Go to the plays tab and select "testBasicAttack" from the list, then click the green check button (Force Start) in the upper left of the GUI.  You should see one robot go to the goal (because goalie is enabled by default), and another robot drive at the ball and start kicking. 
  
 
+
== Using the Soccer interface ==
== Running Under Simulation ==
+
There's a lot of data available in the GUI to make debugging the robots easierThe best place to look if you want to see what the robots are doing is in the tree view tab, where all of the data logged or passed through the system is shown in realtime.
* Reroute the multicast packets - this is to keep your simulator from flooding any network you are on with vision packets.
 
** Starting from the software/trunk folder
 
** cd doc/
 
** ./mcast_route lo [requires root password]
 
* Start the simulator itself with a configuration to describe how many robots it starts with.  There are multiple configurations available in the SoccSim/config folder, but two_teams will provide the default for most soccer applications.
 
**cd SoccSim/bin
 
**./soccsim -c ../config/two_teams.xml
 
* At this point, there is a small wireframe display of the field with robots, but it isn't particularly interactiveTo actually do robot control and soccer playing, you will need to create instances of soccer for each team. 
 
**Starting from the previous step
 
**cd ../../soccer/bin
 
**./soccer -b -c ../config/sim.xml
 
*** This command starts soccer with the blue team (-b) flag, the robot configuration for the simulator.  To specify the other team, use -y instead of -b.  The sim config should be used whenever the simulator is used.
 

Revision as of 13:58, 31 January 2010

The easiest way to get started using the software is to make use of the simulator, which will be most useful for developing much of the actual system. For these instructions, you will need to be in a terminal in your robocup folder (/robocup/software/trunk). The first scenario will start a simulator with a single robot, and the second scenario will start two teams with referee control.

Before starting the simulator

To avoid flooding the network with data from your simulator, we have a script to reroute some networking processes. You will need to follow these instructions once before running the simulator, but the setting will remain correct until you reboot.

sudo ./doc/mcast_route lo

Single-team Simulator Use

In this case, we will only drive one team, the other team's robots will just remain stationary

Starting the Simulator

We will start the simulator to run in a terminal. You can run the soccsim executable without parameters to get a small explanation of the correct arguments, if necessary. Note that you can choose from the config files in the SoccSim/config/ folder to try different scenarios.

cd ./SoccSim/bin
./soccsim -c ../config/two_teams.xml &

Now the simulator should report that it is running. To stop the simulator, kill the process by typing Ctrl-C in the terminal where you started it.

Starting the soccer interface

Start a new terminal to run soccer from and use the following commands. This will start the soccer engine using the simulation configuration file (soccer/config/sim.xml) and using the yellow team (use -b for blue team).

cd [robocup root]/soccer/bin
./soccer ./soccer -y -c ../config/sim.xml 

You should now see the GUI for the soccer program. To to a simple check to ensure that everything is working, you want to enable a play to run. Go to the plays tab and select "testBasicAttack" from the list, then click the green check button (Force Start) in the upper left of the GUI. You should see one robot go to the goal (because goalie is enabled by default), and another robot drive at the ball and start kicking.

Using the Soccer interface

There's a lot of data available in the GUI to make debugging the robots easier. The best place to look if you want to see what the robots are doing is in the tree view tab, where all of the data logged or passed through the system is shown in realtime.