C3 - CAVE Calibration Code


The objective of this project is to redesign the calibration code for the CAVE. The new version of the calibration code is to use the three dimensional windowing toolkit for virtual reality called WorkSpace. This will allow for cleaner code, less memory leak potential, more functionality, and a nicer interface.


The CAVE is a virtual reality environment set up around large projection screens. The screen dimensions of the CAVE at the Cornell University Theory Center are 8x6x8 feet. It is composed of two screens perpendicular to each other that have their own projectors. In and around the walls surrounding the CAVE is equipment used to track the position of the individual with the control apparatus. This apparatus is composed of a converted joystick, called the wand, and a set of goggles. Both of these are connected to the tracking system via small devices that allow the hardware to determine their respective position in the CAVE. It is the position that the tracker reports that must be calibrated periodically. Magnetic fields in and around the tracking system cause it to skew it's measurements and therefore report erroneous values. With a calibration table, it is possible to correct for these errors and report the correct positions within a given epsilon. This is where a calibration program gets involved. Building a calibration table involves two primary steps that must be done in parallel for optimum results. One of the steps is recording the actual position in the CAVE. This can be done in many ways. For example, it can be as elementary as using a ruler (though not too accurate), or much more sophisticated with the use of lasers. The second step is to record the reported positions in the CAVE. This is done by the calibration software. Once the data is obtained, a table can be formed that, when given the reported position from the tracker, returns the actual position that was measured.

Calibrate Overview

The software builds a grid covering the entire space occupied by the CAVE. There are small cubes placed on foot apart in the entire world of the CAVE, it is these cubes that are to represent the points where measurements are to be taken. The buttons on the wand allow for the manipulation of the program and data table. The commands are as follows:

Trigger Button (BUTTON1)
  - Records the reported position in a table
Top Left Button (BUTTON2)
  - Increments the position being calibrated by one
Top Right Button (BUTTON3)
  - Saves the table to a file (also does Min/Max operations)
BUTTON2 & Drag
  - Adds a displacement to the table based on amount wand is dragged

Program Structure

The program structure follows the convention set forth for WorkSpace. It is it's own class and has the following method declarations.

class Calibrate : public Component {
    Calibrate(Container *, char *);
    void draw();
    int handleEvent(Event *);
    void frameFunc();
    void simpleCaveIO();
    void writeFile();

It is the handleEvent(Event *) method that performs most of the functions Calibrate uses to complete it's task.

  1. draw() Method

  2. The draw method is used to display the grid that shows the points at which to calibrate. In general, this method contains everything that must be drawn to the display.

  3. handleEvent(Event *) Method

  4. This method is similar to Microsoft Windows message processing. If you are familiar with that, then this should be a piece of cake.

    This method calls procedures that are a part of WorkSpace that allow one to obtain information from the tracking system. It is in this method that most of the functionality of Calibrate resides. For more details on what procedures are available, please refer to the AWT.h file.

    Initially we calculate the current position of the wand. Once we have this, we go on to check if any of the buttons on the wand have been pushed. If so, then their respective functions are performed. See Calibrate Overview for a list of commands and their buttons.

  5. frameFunc()

  6. Not used for Calibrate.

  7. simpleCaveIO()

  8. This method inputs the current cave correction table as well as the properties of the CAVE.

  9. writeFile()

  10. Write the data table out to a file. This data table contains the values reported by the tracking system for all the cubes in the space.

Future Improvements

There are still many things that can be done to improve the Calibrate environment. Some of the more notable possibilities include:
  1. Simplification of space movement

  2. To ease the use of navigation through Calibrate, a cube can be added to the environment that will represent the entire world volume. Then, by clicking somewhere in this cube, the world will take us to that area and appropriately shift the table coordinates as well.

  3. Placement of text in the virtual world

  4. Currently, text in the three dimensional environment has been extremely tricky. However, once it is simplified, a window within the environment of Calibrate will be created that contains all the text based information needed while running the application.

Copyright 1998
E-mail questions to Rishi Khanna