RoboCup Simulator Execution

From RoboJackets Wiki
Jump to navigation Jump to search

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.