A Guide to Running MrCS (pre-2008 versions)


Preface

This guide covers the installation and setup of our MrCS (Multi-robot Control System) software releases. It does not cover debugging installations of UsarSim itself, or running the CVS version of MrCS. If you need information about UsarSim installation, refer to the included documentation, available from the Sourceforge site. If you are interested in working with our CVS version of MrCS, please contact a member of our group directly.

Configuring UsarSim

Before MrCS can be run, there are several changes that need to be made to a default UsarSim installation. First, USARSim must be configured to use the robot configuration stored in our version USARBot.ini. Optionally, our default maps can also be installed.

Installing USARBot.ini

  • Unzip the MrCS release into the directory of your choice.

  • Back up your current USARBot.ini file by copying it from %UT2004_INSTALL%\System\USARBot.ini to %UT2004_INSTALL%\System\USARBot.ini.old

  • Copy the USARBot.ini file provided in the MrCS release to %UT2004_INSTALL%\System\USARBot.ini, overwriting the previous version

Installing our maps

Some MrCS releases come with two popular USARSim maps that have been modified to support Multiview. As the included configuration files contain stored initialization values for these maps, it is often convenient to install them to test the functionality of MrCS "out of the box."

  • If not already installed, install the AAA_MapBaseFiles_V3.1 and DM-RoboCup06Worlds_V3.1 packages, available from the Sourceforge site under Download -> Maps -> 3.1.

  • Copy the two map files DM-compWorldDay4b_250_mv.ut2 and DM-USAR_yellow_250_mv.ut2 to the %UT2004%\Maps directory.

Configuring MrCS

MrCS uses a simple, text-based configuration file system to control most setup parameters. Because communication is heavily socket-based, most typical setups require only a few changes to be made to the configuration file.

Changing the configuration file

The configuration file, usar.ini, contains a number of important parameters for robot control, but we can ignore most of them. The usar.ini file is stored in the MrCS release under run\run\usar.ini. If you open it, you will see a plain text file that looks something like the following:

SimHost   = 128.2.182.96
SimPort   = 3000
VideoHost   = 128.2.182.96
VideoPort = 5003
Victim_Range = 2
Link_Safe_Strength = -65.0
Link_Danger_Strength = -50.0

# mode: 1: ground truth; 2: odometry; 3: odometry+scan_match
mode = 1
# control: 1: PID control; 2: two speed control; 3: constant 
controlMode = 3

#DM_YELLOW
#Robots = {Name Bot1 Type Zerg Position 4.5,1.9,1.85 Rotation 0,0,0 Multiview 0,0}, \
#         {Name Bot2 Type Zerg Position 1.1,-0.4,1.85 Rotation 0,0,0 Multiview 1,0}, \
#         {Name Bot3 Type Zerg Position 4.5,0.6,1.85 Rotation 0,0,0 Multiview 0,1}, \
#         {Name Bot4 Type Zerg Position 1.8,0.2,1.85 Rotation 0,0,0 Multiview 1,1}
#Mapper = {Name Mapper Type ComStation Position 2.0,2.0,1.85 Rotation 0,0,0 Multiview -1,-1}

#DM_COMPDAY4
Robots = {Name Bot1 Type P2AT Position -20,17.5,-4 Rotation 0,0,3.14 Multiview 0,0}, \
         {Name Bot2 Type P2AT Position -20,16,-4 Rotation 0,0,3.14 Multiview 1,0}, \
         {Name Bot3 Type P2AT Position -21.5,17.5,-4 Rotation 0,0,3.14 Multiview 0,1}, \
         {Name Bot4 Type P2AT Position -21.5,16,-4 Rotation 0,0,3.14 Multiview 1,1}
Mapper = {Name Mapper Type ComStation Position -20,22,-4 Rotation 0,0,0 Multiview -1,-1}
...

First, the IP addresses of the SimHost and VideoHost must be updated. The SimHost is the IP address of the computer that is running USARSim. The VideoHost is the IP address of the computer that is running the ImageSrv. In most cases, these will be the same.

Next, the robot configurations must be changed. As seen above, the configurations for the two included maps are already provided. In this case, MrCS is set up to run 4 robots on the DM-compWorldDay4b_250_mv map. These settings can be changed as needed, but with the following caveats:

  • Any line starting with # will be ignored.
  • If multiple definitions of the Robots or Mapper variable are provided, the last setting in the file will be used.
  • The parser is sensitive to spacing and capitalization, and will throw errors if either are not exactly identical to the above.
  • The Robots variable is on a single line, delimited by '\' characters. If robots are added or removed, these '\' should be modified appropriately.

Compiling the configuration

To compile the current usar.ini file into binary configuration files, simply run the genCfgs.bat script.

Running MrCS

At this point, MrCS should be configured for your particular setup. All that is left is to launch the various components.

  • Start the ImageSrv application.

  • Slide the resolution slider all the way to the right.

  • Type the map name into the appropriate text box, leaving off the .ut2 extension. (Note: the name is not case-sensitive, but IS sensitive to '-' and '_')

  • Press the start button.

  • UT2004 should now load and subsequently be hidden offscreen. If you wish to verify that your installation is working properly, un-hide UT2004 and look around using the mouse. Then use Alt+Tab or Ctrl+Esc to switch out of the window, and hide it again using ImageSrv.

  • If your MrCS image has two batch scripts, start_mapper.bat and start_robots.bat, run the mapper first, wait 2 seconds, then run the robots. If you only have the start_all.bat script, simply run it and wait. The MrCS GUI should open all of its windows in a collapsed state, then resize the windows to fill the screen. This process can take up to 1 min., on slower machines. The video that the robots receive will show the wrong part of the world, but we will fix this next.

  • Use ImageSrv to open the UT2004 client. Optionally, you can take this opportunity to navigate the world manually to look at the robots. Now, left-click repeatedly to cycle through the robot viewports. Stop when you reach the viewport that shows all the robot viewpoints at the same time. At this point, the incoming video in the GUI should update to the correct robot video streams.

Shutting down MrCS

When a run is complete, MrCS is storing a large amount of data that is usually desirable to write to disk. To shut down the MrCS GUI, close the windows using either the Close button in the frame manager or by individually closing the windows. DO NOT close the shell that is running the GUI proxy, or all unwritten data will be lost. After the GUI has been completely closed, the shell can be closed safely. Closing the shell is an acceptable method to terminate the robot proxies at any time.

-- PrasannaVelagapudi - 11 Mar 2008

Topic revision: r2 - 29 Jul 2008 - 20:37:11 - PrasannaVelagapudi
UsarSim.OldMrcsGuide moved from UsarSim.MrcsGuide on 29 Jul 2008 - 20:31 by PrasannaVelagapudi - put it back
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback