Difference between revisions of "RoboCup Simulator Execution"

From RoboJackets Wiki
Jump to navigation Jump to search
(Running Under Simulation)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Running Under Simulation ==
+
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.  The first scenario will start a simulator with a single robot, and the second scenario will start two teams with referee control.
* 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
+
All of the commands on this page assume you are in the <i>software/run</i> directory.
** cd doc/
+
 
** ./mcast_route lo [requires root password]
+
== Single-team Simulator Use ==
* 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.
+
In this case, we will only drive one team.  The other team's robots will remain stationary.
**cd SoccSim/bin
+
 
**./soccsim -c ../config/two_teams.xml
+
=== Starting the Simulator ===
* At this point, there is a small wireframe display of the field with robots, but it isn't particularly interactive. To actually do robot control and soccer playing, you will need to create instances of soccer for each team.
+
<pre>
**Starting from the previous step
+
./simulator [-c <config file>]
**cd ../../soccer/bin
+
</pre>
**./soccer -b -c ../config/sim.xml
+
 
*** This command starts soccer with the blue team (-b) flag, the robot configuration for the simulatorTo specify the other team, use -y instead of -b.  The sim config should be used whenever the simulator is used.
+
If no configuration file is given, it will use <i>default.cfg</i> in the current directory.  Currently, <i>default.cfg</i> creates two full teams.
 +
 
 +
You can kill the simulator with Ctrl-C.
 +
 
 +
=== Starting one team ===
 +
In another terminal, in the <i>software/run</i> directory:
 +
<pre>
 +
./soccer -sim
 +
</pre>
 +
 
 +
The status indicator in the upper right corner should be yellow and show SIMULATION.
 +
 
 +
You can now issue internal referee commands.  Either use the shortcut buttons at the top of the window for the most common commands (they have tooltips) or go to the Referee tab for a complete set of commands.
 +
 
 +
== Starting two teams ==
 +
Start another soccer program exactly like the first one.  Don't use the referee buttons yet - the two soccers won't stay in sync.
 +
Set the second soccer to run the blue team (<b>Field</b> -> <b>Team Color</b> -> <b>Blue</b>) and defend the opposite goal (<b>Field</b> -> <b>Defend Goal</b> -> <b>Vision +X</b>).
 +
 
 +
You must use the SSL referee box to control two soccers at once.
 +
 
 +
If you are not connected to a network, you must add a multicast route:
 +
<pre>
 +
../util/mcast_route lo
 +
</pre>
 +
 
 +
You can reverse this later with:
 +
<pre>
 +
../util/mcast_route
 +
</pre>
 +
but the route will typically be removed by your network manager when you get a real network connection.
 +
 
 +
Now start the SSL referee box:
 +
<pre>
 +
./sslrefbox
 +
</pre>
 +
 
 +
The referee buttons in both soccers should now be grayed out and the <i>Use external referee</i> checkbox should be checkedIf you have previously changed this checkbox manually, you will need to check it.
 +
 
 +
You can now use the SSL referee box to issue commands to both soccers at once.
 +
 
 +
[[Category: RoboCup]]

Latest revision as of 22:12, 13 June 2018

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. The first scenario will start a simulator with a single robot, and the second scenario will start two teams with referee control.

All of the commands on this page assume you are in the software/run directory.

Single-team Simulator Use

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

Starting the Simulator

./simulator [-c <config file>]

If no configuration file is given, it will use default.cfg in the current directory. Currently, default.cfg creates two full teams.

You can kill the simulator with Ctrl-C.

Starting one team

In another terminal, in the software/run directory:

./soccer -sim

The status indicator in the upper right corner should be yellow and show SIMULATION.

You can now issue internal referee commands. Either use the shortcut buttons at the top of the window for the most common commands (they have tooltips) or go to the Referee tab for a complete set of commands.

Starting two teams

Start another soccer program exactly like the first one. Don't use the referee buttons yet - the two soccers won't stay in sync. Set the second soccer to run the blue team (Field -> Team Color -> Blue) and defend the opposite goal (Field -> Defend Goal -> Vision +X).

You must use the SSL referee box to control two soccers at once.

If you are not connected to a network, you must add a multicast route:

../util/mcast_route lo

You can reverse this later with:

../util/mcast_route

but the route will typically be removed by your network manager when you get a real network connection.

Now start the SSL referee box:

./sslrefbox

The referee buttons in both soccers should now be grayed out and the Use external referee checkbox should be checked. If you have previously changed this checkbox manually, you will need to check it.

You can now use the SSL referee box to issue commands to both soccers at once.