This directory contains the source code for the computer vision version
of the walking robot simulation.  This version shows a six-legged robot 
walking thorough a maze guided only by what it sees from a head mounted
camera.

The display of the simulation is composed of 3 windows.   The larger one
shows the floor, the maze and the robot.   The middle one displays the
scene seen by the robot from the view point of a head mounted camera
located on the robot's forehead (the red sphere on the robots forehead).
The third window shows a black and white image which corresponds to the
result of passing an edge detection operator thru the center of the middle
window(that is, only the edges on the middle window appear.)

The maze is contained in an ascii file and different maze configurations
can be loaded in to generate different simulations.

A more detailed description of the simulation and the vision algorithms
used can be found in the latex file called: vision.tex.   To print it,
run it through latex to generate a .dvi file and use: dvips, to generate
a postscript version of it.  Then just print the .ps file as usual.

This simulation was written in 'C' and makes use of the Silicon Graphics(SGI)
Graphics Library, and therefore will only run in a SGI machine.
Also, since the vision algorithms examine pixel by pixel of the processed
image, it might not work for some SGI machines because of the way the machine
does dithering.  Minor modifications of the vision algorithms may be made
to have the program run in other SGIs.  This version of the program is guaranted
to run correctly on the SGI Reality Engine Crimson.


Here is some information about the simulation.

1. Files

     C code: insectv.c
     Header: insectv.h
     Maze file: maze.dat
     Text: vision.tex

2. Compile by typing: make

3. Run by typing: insect maze.dat

4. Control the program by typing the following keys:

     Type       Function

      G       Starts the robot going forward
      S       Stops the simulation
      C       Resets the robot to its original position
      Q       Quits the program

