A Guide to Running MrCS (post-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

Choosing a map

MrCS uses the ImageSrv application and a Multiview object to split camera views up for each robot. Many recent UsarSim maps include this object by default, but some do not. Details on using and adding Multiview to maps can be found in the UsarSim users manual, available from the Sourceforge site under Download -> Documentation.

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. There are two configuration files, usar.ini and bots.ini. The usar.ini file contains robot setup parameters, such as the location of sensors, wheel speeds, and other physical constants. This file only needs to be modified when robot configurations are changed. The bots.ini file contains instance information about which robots to spawn, where to spawn them, etc. This is usually the only file that needs to be changed when running MrCS.

Changing the configuration file

The bots.ini file is stored in the MrCS release under run\run\bots.ini. If you open it, you will see a plain text file that looks something like the following:

SimHost = 128.2.177.55
SimPort = 3000
VideoHost = 128.2.177.55
VideoPort = 5003

#############################
# DM_COMPDAY4 Configuration #
#############################

# ROBOT CONFIGURATION
Robots = Bot1, Bot2, Bot3, Bot4
Mappers = Mapper1

Bot1.Type = P2AT
Bot1.Position = 0.69,8.35,1.5
Bot1.Rotation = 0,0,1.2
Bot1.Multiview = 0,0

Bot2.Type = P2AT
Bot2.Position = 17.36,6.41,1.0
Bot2.Rotation = 0,0,3.1
Bot2.Multiview = 1,0

Bot3.Type = P2AT
Bot3.Position = 17.9,-2.71,1.0
Bot3.Rotation = 0,0,2.4
Bot3.Multiview = 0,1

Bot4.Type = P2AT
Bot4.Position = 23.17,6.28,1.0
Bot4.Rotation = 0,0,1.2
Bot4.Multiview = 1,1

# MAPPER CONFIGURATION
Mapper1.Type = ComStation 
Mapper1.Position = 3.5,10,1.5
Mapper1.Rotation = 0,0,-1.57 

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 a 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 identical to the above.

Compiling the configuration

To compile the current bots.ini file into binary configuration files, simply run the genCfgs.bat/sh 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.

  • MrCS has two batch scripts, start_mapper.bat/bash and start_robots.bat/bash. Run the mapper first, wait 2 seconds, then run the robots. The MrCS GUI should open all of its windows in a collapsed state, then resize the windows to fill the screen. The first time MrCS is run, this process can take several minutes as Java caches the class files that are loaded. Subsequent runs should only take a few seconds to load. The video that the robots receive may 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 - 29 Jul 2008

Topic revision: r1 - 29 Jul 2008 - 20:50:26 - PrasannaVelagapudi
 
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