Configure other input devices

In addition to moving around within an environment, users will also want to interact with the application in some way. There are many sorts of devices that can be used in a VR system. Wands and joysticks of various sorts are very popular. These are simple handheld devices, usually with a position tracking sensor attached to them, and with a number of buttons that the user can press to send commands to an application (such as "fly forward" or "pick up the object I'm touching"). Gloves that sense the user's hand movements are also popular (see the section called “Using Fakespace Pinch Gloves”, below, for an example). In surround-screen VR systems, it is also possible to bring physical devices - for example, a bicycle or the cab of a truck - into the VR system. In this case, the user can interact with the application by manipulating pedals, handlebars, or steering wheels.

In VR Juggler, we divide most of these devices into digital or analog inputs. Digital devices are buttons, like on a mouse or joystick, and simply have on and off values. Analog devices return a range of data, and can be used for steering wheels or foot pedals, among other things.

Several tracking system manufacturers include handheld wand-style devices that can be used as a regular sensor in their hardware. For example, see the section called “Using InterSense trackers” at the end of this article for information about using digital inputs supplied by an InterSense tracking system.

At VRAC, we have hooked up a large variety of custom devices via the IBox, a simple input device manufactured by Immersion Corp. The IBox connects to the serial port of a computer, and provides four digital inputs and four analog inputs. See Figure 2.3 for an IBox ConfigChunk.

Figure 2.3. Configuration for the Immersion Ibox.

It is also possible to use simulated devices to achieve the same functionality. One of the wands in use at VRAC is in fact a wireless 2D mouse attached to a spare computer. We can configure VR Juggler applications to open a simulator input window on the spare computer (using an exported X Windows display) and map the wireless mouse's buttons to a simulated digital device. This is a fairly extreme example of the flexibility provided by VR Juggler's input system.

Creating Digital and Analog Proxies

As with tracking devices, VR Juggler applications do not use input devices directly. Instead, proxies are used to provide a generic interface to each device. For each digital and analog input source in each of the devices, the configuration file should include a Digital Proxy or Analog Proxy ConfigChunk.

These two kinds of ConfigChunks are simpler than Position Proxies, since they do not include the transformation properties needed for positional data. The only properties that must be filled in are the name of the device, and the unit number, which is used to distinguish between multiple analog or digital inputs available from a single device.

Many VR Juggler applications (including the test and sample programs packaged with the VR Juggler source and binary distributions) expect there to be a set of digital inputs available with names of the form "VJButton0", "VJButton1", etc., which correspond to the buttons on a handheld wand.

Fewer of the VR Juggler sample applications make use of analog devices, but when they do a similar naming convention (e.g. "VJAnalog0") is used. Of course, nothing about these proxy names is hardcoded - the only requirement is that the config file provide the names that the particular application requests.

As with Position Proxies, Digital and Analog Proxies can be given additional names with the use of Proxy Alias ConfigChunks.