Running an Application in Simulator Mode

Running in simulator mode means that your input is simulated and your display windows have limited functionality. (By, “simulated input”, we mean that input is provided through windows that take keyboard and mouse input and translate that into transformations in the virtual world.) Simulator displays are limited primarily in that they cannot display stereo graphics. It is important to note that a simulator display is a special kind of VR Juggler display. Instead of basing its viewpoint on the head position of one of the users, the viewpoint is controlled by a separate “camera” that is just another positional device. The Sim Display also draws certain objects to help visualize the environment. For example, the heads of users are represented as blue spheres with gray eyes, and a wand (if present) is drawn as a green cone. Besides these common simulator objects, surface displays can be drawn. These are Juggler Displays representing projection screens or HMD viewing projections and are drawn as translucent rectangles.

As mentioned, several simulator configuration files are provided with a VR Juggler distribution. These files provide a complete simulation of an immersive environment. Please note that this documentation reflects the state of the configuration files at the time the documentation was written. For more information about the configuration files and how to view or modify the configuration, refer to the VjControl Guide. (Using VjControl is the best way to find out how a specific configuration file is set up.) The configuration files of interest for simulator mode are as follows:

For the Torus application, we only need the base configuration file, the displays configuration file and the wand mix-in configuration file.

Now it is time to run the application—finally! Make sure that all your environment variables are set properly before trying to start the application. Once you are ready, specify the name of the application and all the configuration files it needs. An example of this is:

% torus sim.base.config sim.displays.config sim.wand.mixin.config

You will notice that no paths are specified for finding the three configuration files. This is intentional to shorten the command line given in the example. In general, you always have to give the full path to the files. VR Juggler 1.0 does not have any logic for defining a path that would contain configuration files[1]. Beginning users will typically want to reference the example configuration files in $VJ_BASE_DIR/share/Data/configFiles. As you get more comfortable with VR Juggler and its configuration system, you may want to make your own modified files and put them in the directory $HOME/.vjconfig. To simplify running applications, you may want to make a shell script (or batch file as appropriate) that does all the work of passing configuration files and common command-line arguments. For now, though, use the path $VJ_BASE_DIR/share/Data/configFiles for each of the configuration files you pass on the command line.

As the application starts, you will see a plethora of output (more or less depending on how you have $VJ_DEBUG_NFY_LEVEL and $VJ_DEBUG_CATAGORIES set), and then one moderately sized simulator display window will open on the left side of your screen while three blank keyboard input windows open on the right side of your screen. The display window will be titled “SimWindow1”, and the keyboard input windows will be titled “Head Keyboard”, “Sim View Cameras Control” and “Wand Keyboard” (in order from the top of the display to the bottom). Do not worry that the keyboard windows are black—that is normal. The display window will have a purple torus, a cyan sphere and a green cone. The torus is what you have come to see; the sphere is the simulated user's head; and the cone is the simulated user's wand. In Figure 5.1, we show what this looks on an IRIX 6.5 desktop for comparison with what you are seeing. Note that the head and wand are only rendered in the simulator windows. They are present because head and wand input are being simulated, and it is typically quite helpful to see the results of that simulated input.

Figure 5.1. torus running on an IRIX desktop

So now you are probably wondering what you can do with this fancy application. Interaction is done through the keyboard windows on the right side of your desktop. Moving the head is done with the keyboard in “Head Keyboard”; moving the camera is done with with the keyboard int “Sim View Cameras Control”; and moving the wand is done with the mouse in “Wand Keyboard”. As noted above, this information is current as of this writing. For information on how to verify these settings and to view the current configuration, refer to the VjControl Guide. The following list of tables provides all the keyboard and mouse controls for the simulator when using these particular configuration files. Note that it is possible to reconfigure the simulator to suit your preferences. This is provided mainly for those who just want something that works now.

Table 5.1. Moving the simulated head

TransformationKey Press
Move head backward2 on keypad
Move head left4 on keypad
Move head right6 on keypad
Move head forward8 on keypad
Move head down7 on keypad
Move head up9 on keypad
Turn head upCTRL+2 on keypad
Turn head leftCTRL+4 on keypad
Turn head rightCTRL+6 on keypad
Turn head downCTRL+8 on keypad
Rotate head clockwise1 on keypad
Rotate head counter-clockwise3 on keypad

Table 5.2. Moving the simulated wand

TransformationMouse Input/Key Press
Move wand backwardALT+move mouse backward
Move wand forwardALT+move mouse forward
Move wand leftCTRL+move mouse left
Move wand rightCTRL+move mouse right
Move wand upCTRL+move mouse forward
Move wand downCTRL+move mouse backward
Rotate wand leftSHIFT+move mouse left
Rotate wand rightSHIFT+move mouse right
Rotate wand upSHIFT+move mouse forward
Rotate wand downSHIFT+move mouse backward
Rotate wand clockwiseRight arrow
Rotate wand counter-clockwiseLeft arrow
Wand button #1Left mouse button
Wand button #2Middle mouse button
Wand button #3Right mouse button
Wand button #44
Wand button #55
Wand button #66

Table 5.3. Moving the camera

TransformationKey Press
Move camera backward2 on keypad
Move camera left4 on keypad
Move camera right6 on keypad
Move camera forward8 on keypad
Move camera down7 on keypad
Move camera up9 on keypad
Turn camera upCTRL+2 on keypad
Turn camera leftCTRL+4 on keypad
Turn camera rightCTRL+6 on keypad
Turn camera downCTRL+8 on keypad
Rotate camera clockwise1 on keypad
Rotate camera counter-clockwise3 on keypad

Before continuing on to running an application in a full-scale VR system, we provide two asides: using a simulated glove and using a simulated analog device. The examples provided thus far have not discussed this because the information was not relevant to the particular sample application being used. Knowing how to use these simulated devices is important, however, and it is treated separately as a reference for your future endeavors in running VR Juggler applications.

Using a Simulated Glove

If you include the sim.glove.mixin.config file, your application will also have access to a simulated glove, with position and gesture inputs. The glove is controlled by a window titled “Glove Keyboard”. This window lets you control the glove position and selected gesture. Movement control of the glove uses the mouse and is the same as that of the wand. The mouse buttons are used to select gestures. The mapping of the gesture numbers to actual hand positions is controlled by the “training file” for the sim glove. The default training file is $VJ_BASE_DIR/share/Data/gesture/simpleSimGestures.dat.

Using a Simulated Analog Device

If you include the sim.analog.wandmixin.config file, your application will also have access to a set of four analog devices (devices with a value in a range from 0.0 to 1.0). The analog devices are also controlled using the “Wand Keyboard” window which means that their configuration file requires the wand configuration file.

Note

A separate file, sim.analog.mixin.config, is provided for analog input from a separate simulator window.

The key presses used for controlling the analog devices are listed in Table 5.4.

Table 5.4. Analog Device Simulator Keys

Analog Device ActionKey Press
VJAnalog0 increaseQ
VJAnalog0 decreaseA
VJAnalog1 increaseW
VJAnalog1 decreaseS
VJAnalog2 increaseE
VJAnalog2 decreaseD
VJAnalog3 increaseR
VJAnalog3 decreaseF


[1] This has been fixed for VR Juggler 1.1 and beyond.