Input Devices for 3-D Interactions

Input Devices for 3-D Interactions

[Previous Chapter][Table of Contents][Next Chapter]


Chapter 6

The Application

In this chapter I will discuss the application that was created to test the device interface. A description of some of the code that is specific to the application will be provided. An in-depth look at the devices and how they are mapped will also be provided.

In order to test the efficacy of the overall system, an application was created to evaluate the architecture’s overall performance. The requirements of the system were that navigation be controlled by any of the four input devices. The four input devices chosen for the application were the glove, magnetic tracker, voice input, and keyboard. There was also an additional requirement that any of these input devices be used to control one of a set of object properties. The properties chosen are the object’s position, scale, and color. These properties should be controllable concurrently by different input devices. This would allow one object’s position to be controlled by one device (such as the magnetic tracker), and another object's color to be controlled by another input device (such as the keyboard).

Figure 9 shows a snapshot of the virtual world used for the application. The different pieces of furniture (sofa, chair, table, lamp) can be moved, scaled, and colored. Using the Device Mapper GUI (see Figure 8) input devices can be mapped to the various properties of the object being manipulated. The input devices can also be mapped to the users viewpoint, to navigate in the virtual room.

The next section will describe the different devices and how they were mapped to the required tasks.

Figure 9: A snapshot of the world.

6.1 The Devices

6.1.1 Glove Input

The glove used is the 5DT data glove that is available from the General Reality Company. There are 7 bytes of information that are used from the glove: The bend value of each finger plus the hand pitch and roll from the glove's orientation sensor.

The device driver fetches the seven bytes of information that is then read by the device interface. The device interface packages it as an array of integers (length 5) from the fingers bend values, and an orientation vector for the orientation sensor. Also, the glove interface runs gesture recognition software to attempt to determine if a gesture has been made. In this application the gesture recognition software was trained to recognize the following gestures:

One Finger

Two Fingers

Fist

Flat Hand

Figure 10: Different Hand Gestures

For navigation the gestures and tilt sensor orientation information is used. The gestures are mapped to different speeds: slow, fast, back, and none. The tilt sensors are mapped to the rotation. See table below.

Table 3: Glove Data Mapping for Navigation

 

Glove Data

Navigation Commands

Gesture

Roll

Move Forward

Slow

Fast

 

= "One Finger"

= "Two Fingers"

 

-

-

Move Backward

= "Fist"

-

Stop

= "Flat Hand"

-

Turn Right

= any

> 45°

Turn Left

= any

< -45°

 

As one rotates the hand to the right, the view moves to the right, and similarly for the left. The figure below shows the mapping of hand orientation to view orientation.

Figure 11: Mapping Hand Rotation to Change in Orientation

When manipulating the properties of an object the information from the fingers were used essentially as sliders. Sliders as typically used on windows dialog boxes are bars that are moved along a straight line that allow the choice of values between a maximum and a minimum. A volume control for a sound player may use a slider bar, for example. The fingers are used in this same way. The flex of the finger has a maximum and a minimum flex value. This value is mapped to the property that it is controlling. See table below.

Table 4: Glove Data Mapping for Object Manipulation

 

Glove Data

Manipulation Commands

F1

F2

F3

F4

F5

Set Position

-

X

Y

Z

-

Set Scale

-

X

Y

Z

-

Set Color

-

R

G

B

-

Note: F1, F2, …, F5 correspond to the thumb, index, …, and pinky fingers respectively.

There are other ways to map this data. This seemed to be the most straightforward at the time of implementation. Another way to control object properties would be by using the different gestures. The gestures could map to controls such as "increase" and "decrease". This interaction technique would result in an entirely different means of interaction. With the device interface other glove interaction ideas can be quickly prototyped and tested.

6.1.2 Magnetic Tracker Input

The magnetic tracker used is the Polhemus Fastrak. The device driver for the Polhemus returns six bytes of information: three bytes for position and three bytes for orientation. The data from the device driver is packaged by the Polhemus interface into a position vector and an orientation vector.

The device mapping stage uses the information from the device interface to generate the following mappings:

Table 5: Magnetic Tracker Mapping for Navigation

 

Magnetic Tracker Data

Navigation Commands

Position

Orientation

Move Forward

Y < 10

-

Move Backward

Y > 20

-

Turn Right

-

yaw > 45°

Turn Left

-

yaw < -45°

Stop

10 <=Y =< 20

-

 

As the table above illustrates, moving the sensor forward or backward controls navigational speed. At the moment the speed is a switch function. You are either going forward, or backward, or you are not moving. It would be easy enough to change this mapping to a proportional or exponential controller as a function of the Y coordinate. The navigation orientation is controlled by the yaw value of the orientation sensor. The figure below demonstrates how this mapping is computed.

Figure 12: Polhemus Mapping Hand Rotation to Change in Orientation

All object property manipulation is done using the position vector of the sensor. In the case of position, the object in the virtual world is mapped to move in correspondence with the movement of the tracker sensor. As the sensor is moved to the right the virtual object will also move to the right. In the case of scaling, only coordinate values in the positive quadrant are mapped. Since negative scales do not make sense (unless it is used to invert the shape), only positive scale values are accepted.

Table 6: Magnetic Tracker Mapping for Object Manipulation

Manipulation Commands

X

Y

Z

Set Position

X

Y

Z

Set Scale

SX

SY

SZ

Set Color

R

G

B

 

In order to change the color of an object, the color cube interaction technique was used. With the color cube, the three color components (red, green, and blue) are mapped to each axis of the cube. In one corner lies the (0,0,0) coordinate that maps to black. At the other extremity is (1,1,1) which maps to white. If you translate along one of the axis, the corresponding color component will change. Mapping the tracker input to the color cube was easy as it is a direct mapping. In this case, as with object scaling, only values in the positive quadrant were accepted.

6.1.3 Speech Recognition Input

Speech input was emulated using a dialog box (see Figure 13). The mapping however does not change. In the case of a voice recognition system, you would program the system to accept a set of voice commands. The voice emulator program provides access to a set of simulated voice commands that are contained in a dialog box list. In both cases a command is a result of the stimulus. For this reason the device mapping to a command will remain constant, as it will only be the device interface that changes.

Figure 13: Snapshot of Voice Emulator Dialog Box

The commands in the dialog box list (see Figure 13) are used to map to the navigation and object manipulation. Table 7 shows that the mapping is direct in its meaning. The only mapping that is required is converting a command into a message for the client (Table 8).

Table 7: Speech Recognition Data Mapping for Navigation

Navigation Commands

Voice Command

Move Forward

"Move Forward"

Move Backward

"Move Backward"

Turn Right

"Turn Right"

Turn Left

"Turn Left"

Table 8: Speech Recognition Data Mapping for Object Manipulation

Manipulation Commands

Voice Command

Set Position

 

X

"Translate X / -X"

Y

"Translate Y / -Y"

Z

"Translate Z / -Z"

Set Scale

 

Increase Scale

"Scale Up"

Decrease Scale

"Scale Down"

Set Color

 

Red

"Make Red"

Green

"Make Green"

Blue

"Make Blue"

 

6.1.4 Keyboard Input

The keyboard can also be used as an input device, as it is the most widely used input device for computers. Although keyboards may not be ideal inputs for 3D interaction, it is a common interface and one that should be addressed. The keyboard input maps similarity as voice input. A set of key presses are interpreted and mapped to a set of commands.

The keys used for navigation are the same as are used in many popular 3D games (such as Quakeä ). The way in which it is mapped, however, is different. An increase speed command, does just that, increase the speed. In conventional interfaces in order to move forward, one must repeatedly press the up arrow. In order to reduce the overall bandwidth of the system only single speed values are sent to the client. The client will set the current speed to a value and continue moving at that speed until it receives a command that tells it to do otherwise. In order to stop, the user must slow down, or press the down arrow key. The same logic holds true for changes in orientation. Only start rotate and stop rotate commands are used, as opposed to continually streaming orientation change commands to the client.

Table 9: Keyboard Data Mapping for Navigation

Navigation Commands

Voice Command

Increase Speed

UP Arrow

Decrease Speed

DOWN Arrow

Turn Right

RIGHT Arrow

Turn Left

LEFT Arrow

 

For object manipulation most operations require six degrees of freedom or three degrees of freedom if rotation is not needed. X, Y, and Z position changes have been mapped to the right/left arrows, up/down arrows, and page up/down keys respectively. A similar mapping is done for color manipulation.

Table 10: Keyboard Data Mapping for Object Manipulation

v

Manipulation Commands

Voice Command

Set Position

 

X

RIGHT/LEFT Arrows

Y

UP/DOWN Arrows

Z

PGUP/PGDN Arrows

Set Scale

 

SX

RIGHT/LEFT Arrows

SY

UP/DOWN Arrows

SZ

PGUP/PGDN Arrows

Set Color

 

Red

RIGHT/LEFT Arrows

Green

UP/DOWN Arrows

Blue

PGUP/PGDN Arrows

6.2 System Performance

What was been shown thus far is an architecture and toolkit that add interaction functionality to VRML-based worlds. In this regard, the client/server architecture can be used with VRML applications and a number of different input devices can be easily used, and tested for 3D interaction. The next issue I will discuss is system performance using the test configurations described above to enable the use of alternative input devices (e.g. keyboard, speech, position tracker, and glove) to navigate and manipulate objects within the world described in Figure 9.

    6.2.1 Testbed

    The following computer was used for the evaluation of the system:

    System Component

    Information

    CPU

    Manufacturer

    Model

    Speed

     

    AMD

    K6 MMX

    233MHz

    System Component

    Information

    Memory

    128 MB

    Operating System

    Windows 95 (4.00.950)

    Graphics Card

    Manufacturer

    Model

    Memory

     

    Hercules

    Stingray 128/3D

    4 MB

     

    6.2.2 System Tests

    Commands are sent from server to client in a packet. A packet is simply a way to package data to be sent over a network. The packet delay is a function of a number of parameters: CPU speed, memory size, and transmission rate. These parameters all influence the performance of the system. In this test the number of packets per second is varied to determine the impact on the system performance. The packet delay is a measure of the elapsed time from the transmission of a packet on the server side, to the reception of the packet on the client side.

    Figure 14: Packet Data Rate vs. Packet Delay

    Figure 14 shows that the delay of the packets is relatively constant for packet rates under 115 Hz (see Appendix C for test data). As one increases the packet rate above 115 Hz the packet delay rises exponentially.

    I then tested the CPU usage of the system as a function of the packet data rate. CPU usage was calculated with the windows resource monitor program VBSys. This software does not have a numerical readout, so all CPU usage values are approximate readings from a thermometer-like display.

    Figure 15: Packet Data Rate vs. CPU Usage

     

    Figure 15 shows that the CPU usage rises at a fairly constant rate until it reaches about 125 Hz where it reaches its maximum value of 100 percent.

    If you plot both Figure 14 and 15 on top of each other (see Figure 16) a correlation is shown between CPU usage and packet delay. The CPU usage increases constantly and while there are CPU resources available, the packet delay remains constant. As the CPU usage reaches its maximum (100%), the packet delay rises exponentially. This is due to the fact that packets are being generated and queued faster than the CPU can process and send them to the client. In order to increase the packet rate, a faster CPU (or multiple CPUs) would need to be used.

    Figure 16: Packet Delay and CPU Usage

    The RAM usage was also tested, however the RAM utilization never rose above 50% of available. The reason that the RAM did not fill while the number of packet produced was higher than what the CPU could handle, is because Java restricts the queue to a maximum size. Once this maximum has been reached all new packets must wait until there is room in the queue.

    Overall the packet delay varied from 1ms to 220 ms (in the usable range). The average packet delay is 159 ms. Memory usage was not an issue as utilization never rose above 50% of available. The IDS system does place an additional load on the CPU. Twenty percent extra load at 1 Hz, 50 % at 45 Hz, and 100% above 125 Hz. Using a faster microprocessor or multiple processors will allow the system to be used at higher data rates.