Step 2: Run Flat

Flat requires one argument, with several other optional arguments. The required argument is the environment file name, which is best specified as an absolute pathname.
  flat /u/robot/flat-root/flat5/env/taylor-4.env
But Flat needs to know the Flat Display port number in order to contact the display, so normally you will include the -dport (display port) option to specify the display port number:
  flat /u/robot/flat-root/flat5/env/taylor-4.env -dport 4500
If the Flat Display is not running on the same machine, use the -dhost option to specify the host:
  flat /u/robot/flat-root/flat5/env/taylor-4.env -dport 4500 -dhost longhorn.cs.utexas.edu
At the same time, you probably want to specify which port Flat should open so that a controller can contact it. For this, use the -cport option:
  flat /u/robot/flat-root/flat5/env/taylor-4.env -dport 4500 -cport 6100
There are several other options which are described on this page.

When Flat starts, you should see messages like the following:


Starting Flat for a linux machine

************************************************************
            Welcome to the Flat 2D Robot Simulator
                        v4.4  of  21 August 2000
  Copyright (c) 1993-2000, The University of Texas at Austin
        For information, contact  robotics@cs.utexas.edu
            http://www.cs.utexas.edu/users/qr/robotics/
*************************************************************

Reading config file...reading configuration from /home/hewett/.flat
Contacting longhorn.cs.utexas.edu:4500
Connection made.
Initializing the display.
You will need to restart Flat every time you want to make a simulation run.

Possible problems

  1. Flat can't find the environment file
    Flat will shut down if it has trouble finding or reading the environment file. Make sure the file name is correct and specified as an absolute pathname.
  2. The specified port number is unavailable
    Flat will search forward for an available port number. Be sure to watch its messages to see which port it actually uses.
  3. Can't contact the display
    Flat will shut down if it can't contact the display. Verify that you specified the display host and port number correctly in the -dhost and -dport options, and that the Flat Display is running.