Tutorials to .com

Tutorials to .com » Mechine » Dsp » Based on virtual reality technology, bicycle Roaming System Research and Implementation of

Based on virtual reality technology, bicycle Roaming System Research and Implementation of

Print View , by: iSee ,Total views: 15 ,Word Count: 2900 ,Date: Wed, 26 Aug 2009 Time: 10:01 PM

Virtual reality is computer-generated, giving a variety of sensory stimulation of the virtual world (environment), is an advanced man-machine interaction system. The ideal virtual reality system should allow users to interact with the virtual environment acts feelings and real-world experience exactly the same. Most of the existing roaming system, two-dimensional interface, namely, using the mouse (two-dimensional input) and keyboard (linear type) as the interactive device, follow the "windows - icons - menus - the designated" (Windows-Icon-Menu -Pointer, referred to as WIMP) operating paradigm, interactive ways sub-harmonic, unnatural. In this paper, a tool for fitness as a human-computer interaction to design a real-time bike roaming system VR-BWS. The system is based on virtual reality technology, the integrated use of sensor technology, dsp control technology, using multi-threaded, non-blocking data in real-time communications technology, and through three-dimensional display technology such as multi-channel interaction with people in a virtual environment roaming, so that the participants in the virtual scene constructed by a computer obtained as in the real world experience in the cycling is to virtual reality technology used in the actual a useful attempt, a very broad application prospects.

A system structure and principle

When the participants on the exercise bike riding, bicycle speed, direction, halter up to mention the time and effort as well as the rider's own weight and other data, real-time collection through the sensor, and then transmitted via DSP control circuit to the host computer, and after analysis and processing, so that the screen simulation and virtual scene to be displayed inside the virtual scene to achieve performance results; the same time, when the screen scene changes, such as uphill, downhill and so on, through the control software can also be fed back to the bike controller to generate damping / driving force, so that the rider resulting from the above-mentioned scenario, the downhill feeling, to gain a good sense of immersion. System structure shown in Figure 1.

Based on virtual reality technology, bicycle Roaming System Research and Implementation of

Two key technologies

2.1 Human-Computer Interaction sensor technology

In this bike roaming system, mainly through a variety of sensors in real time on the bike capture the human body resulting from a variety of motion parameters input into the computer, acting on the virtual environment, and realize the interaction between man and virtual environments.

VR-BWS photoelectric sensor used in the encoder, angular displacement sensor and force sensors. Shi turn with the wheels simultaneously, and to incremental encoding method records a bike wheel rotation angle corresponding to the pulse, and then detected pulse data replaced by the rotation of the wheel a few laps, or cycling of a reference point relative to the instantaneous location; VR-BWS angular displacement sensor used in the detection of the corner handlebars to control the scene viewpoint and line of sight direction; in scenes designed without the width of ravines and natural moat, according to the rider's weight and speed to determine whether the red In the past, simulation over the Great Wall and the Yellow River and so on, so the bike's handlebars and seat to install a raised edge and used to measure the body weight of the force sensor.

2.2 DSP Control Technology

Low-level control by the DSP system to complete. DSP processing system of the CPU using TI produced TMS320LF2407A, use the chips in order to ensure the host computer and the next bit plane between the sensor data and terrain data in real-time two-way transmission, reducing motion tracking and information feedback loops of the delay.

2.2.1 Real-time sensor data collection

In the DSP-event manager EV module, there is a quadrature encoder pulse circuit QEP. This circuit is enabled, you can count in the code and enter the pin produced by the optical encoder quadrature encoder pulse. Quadrature encoder pulse circuit-based general-purpose timers can be provided in the program as directed by General Timer counting mode, and in quadrature encoder pulse circuit as a clock source. By the angular displacement sensor and force sensor data collected by the angle and force data are analog signals, through the DSP's analog-digital conversion module (ADC) will be collected the data after the analog-digital conversion into the result register.

Based on virtual reality technology, bicycle Roaming System Research and Implementation of

2.2.2 multi-threaded, non-blocking, real-time communications technology

TMS320LF2407A serial communication interface SCI modules can be RS232 conversion chip asynchronous communication with the PC machine. Because real-time collection by the sensor to the DSP-SCI serial data transmitted through the host computer for processing, while the virtual scene came under the terrain data needs to control the output torque of the purpose of implementing agencies to simulate people riding bicycles on the downhill when the feel it in the program set to full duplex mode.

The use of multiple sensors that act as the point of view three-dimensional scene roaming tracking sensors must be kept separate ways from the serial port the sensor state data collection to track the observer location and line of sight to the point of view the direction of change. There are usually two ways: (1) create a timer in the application; (2) using multi-threaded application framework. The first method is based on a fixed control unit due to the frequency of transmission to the host state data, so select the appropriate timing for the timer cycle is the key, it will be very easily lead to data loss. In addition, because the application needs to continue to respond to the timer function, so three-dimensional scene rendering speed is bound to be affected. I used the second method, as follows:

In the vc environment has developed a real-time communication based on RS232 protocol software, and virtual environments software components can be connected directly, using a multi-threaded, non-blocking, real-time roaming framework for the secondary thread to monitor serial port, the data arrives to rely on event-driven, read into the data report to the main thread; and WaitCommEvent (), ReadFile (), WriteFile () are used in non-blocking communications technology, relying on overlapping (overlapped) to read and write operations, so that serial read and write operations in the background run. Whenever the main thread is received from the secondary thread a pass over the new data, the first to judge it only when it is compared to the changes in a state data exceeds the threshold case, can begin to update the user as the mouth of the scene showed that the participants in order to avoid because of the tiny movements caused unnecessary redraw the scene.

2.3 Construction and real-time virtual scene display technology

At present, from a technical point of view, the biggest difficulty is roaming modeling and real-time rendering, the model needs to map the extent and speed of fine to take a compromise, it is necessary to guarantee the quality of the drawing, but also does not result in the user's movement discomfort. In the modeling and real-time display area used a variety of techniques to ensure real-time.

Based on virtual reality technology, bicycle Roaming System Research and Implementation of

2.3.1 Construction of the virtual scene

Each object in the virtual environment that contains the shape and appearance of the two areas used to store the virtual environment, geometric model of the model file should be able to provide both information. At the same time to satisfy the virtual modeling technology of the three commonly used indicators - interactive display capabilities, interactive manipulation capabilities, the ability to easily construct a virtual object model requirements. Open GL is very easy to implement models in a variety of transformations, coloring, light, texture, interaction and animation, but it can only provide the basic geometric elements of the modeling function, making the relative difficulty of modeling complex models. 3DMAX such as three-dimensional graphics modeling tools can facilitate the establishment of various special physical model of the complex, but it is difficult to process control. Therefore, the author in the 3DMAX tools such as complex models to establish a good after the Open GL to achieve control and transform their convenience.

The system (VR-BWS) software components need to enjoy a variety of open 3D data format, while also associated with the database, VR-BWS data flow diagram shown in Figure 2.

2.3.2 three-dimensional model of the real-time display

The 3DMAX and other modeling tools to establish a good complex models, you can use a variety of file formats is stored. Taking into account the Open GL provides a basic three-dimensional model constructed by the polygonal method, it is stored in a triangle network. VR-BWS software part is based on object-oriented technology. Three-dimensional graphics class, rendering an essential attribute of the scene categories such as: color class, texture class, material class, the object surface light source Dengjun method used Open GL function package (shown in Figure 3), software, various groups into the module uses the OCX controls and COM interfaces as a standard. This can greatly save development time, but also improve the rendering speed.

The most important feature of virtual reality is a human interaction in the random changes in the scene under the control feel dynamics. And improve the display performance of the technology, including hardware and software aspects. On the hardware side, using high-speed DSP chip for real-time data collection and transmission; software established a multi-threaded, non-blocking roaming framework and use the following methods to improve the screen refresh rate of the scene.

(1) double-buffering mechanism. Also displays the establishment of two video buffers, one for the background refresh the screen, one for the foreground paint. When you need to update, switch the two buffer originally used for refreshing slow of a District used to map a new frame, while the original buffer is used for drawing display for the refresh. The more complex the scene, using double-buffering mechanism for the superiority of the better time to be reflected. And double-buffering mechanisms can solve the screen shows the process of serious "splash screen" phenomenon.

(2) LOD (Level of Detail) details of the level of technology. According to two different types of judgments to select the level of detail different models: One is the distance from the point of view near objects with high precision drawn from the point of view far objects are drawn with a lower precision; two speed setting by bicycle different thresholds, according to the threshold models select a different precision, and then smooth transition of technology to display.

(3) examples of technology. Scenarios often require the same number of virtual objects, such as the exact same trees. Recurring need for such special body, the use of Open GL library display list functions, respectively, will be defined as a separate display list, pre-generated three-dimensional entity; then obtained through the geometric transformation of the special body of other locations. In the graphical display, just call the required display list to display the corresponding three-dimensional solid, substantial savings in memory to enhance graphics display speed.

(4) pretreatment technology. On some complex scene models, such as high-rise buildings along the road and so on, in the pre-processing stage, only to calculate the field of view displayed in the viewer within the scene and stored in a dynamic display eliminates the need for invisible objects and falls defined by the observation of space objects beyond the drawing, thereby greatly reducing the dynamic display visibility when the testing and calculation.

(5) instead of three-dimensional model using two-dimensional texture. Roaming the scene of the details of very complex objects, such as vegetation on the slopes, if three-dimensional model that it would need a lot of polygons, but the actual dynamic display when not necessary to show them very precise, so the use of two-dimensional texture instead of three-dimensional model. The method is complex and special body image pasted on a plane and placed in the scene, in the three-dimensional complex scenes in real time is displayed, so that the plane of law has always been to point to the observation point. Thus, the formation of these complex objects with the observed changes in the direction of rotation, to improve the scene shown in real time.

Three-dimensional display technology

Three-dimensional display technology, one of the key technologies of virtual reality. To achieve three-dimensional landscape stereoscopic display, first of all must be consistent with three-dimensional features of the stereo image pair. About film of the past generation can follow the traditional single mesh generation method of three-dimensional graphics were generated, that is, first calculating eye point of view about vectors, and separate point of view and the first color conversion processing, can be obtained left eye images. However, as films about the relevance of a strong image, objects in the left diagram is usually only a parallax d, while its color and brightness values of the difference is very small, can take advantage of it to achieve three-dimensional piece of the resulting fast algorithm.

Suppose the scene at any point F (x, y, z), respectively, the left and right pieces of the imagery is P1 (xl, yl), Pr (xr, yr), you can get:

Based on virtual reality technology, bicycle Roaming System Research and Implementation of

L on behalf of the focus around which the spacing between, f on behalf of the focal length, d on behalf of two of the parallax. First, were calculated to be about eye point of view vector and its transformation matrix, and then in the right eye diagram generated at the same time, using equation (2) The calculation of the left eye diagram. In this process, right from the viewpoint of the special body is not used nearly formula (2) calculations, which were calculated with the method of generation. This can produce both left and right without losing the authenticity of film, but also has fast.

Segmentation method using pieces of stereo display. When the display to progressive scan, it will turn around the image sequence by site shows that in the computer screen image with the LCD ways to achieve sub-image, through the use of liquid crystal glasses and take advantage of human visual delay can get stereo vision. Stereoscopic monitor display images of high and low refresh rate is directly related to the stability of the image that shows whether the image will appear flicker. Use of the monitor refresh rate of 120Hz, so that the left and right eye view of the refresh rate to maintain 60Hz. In this article, the horizontal line of sight with different parameters, two perspective images of real-time display is achieved through software control.

4 test results and conclusions

This experiment hardware configuration for the Pentium IIII 2.4GHz CPU, RAM 2GB, HDD 80GB, stereoscopic display cards Quadro4 750XGL128MB, fitness selection of luxury cars shock absorber, big flywheel, using the ViewSonic 120Hz refresh rate for the 21-inch flat-screen monitor, with a loaded has an infrared transmitter active stereo glasses. The operating system is Windows 2000. Three-dimensional image generation software, and stereoscopic display interface software using Visual c + + 6.0 written in the standard three-dimensional image using Open GL, 3D modeling tools used 3Dmax and ArcInfo8.0.2. According to the principles discussed in this article and method. Successfully designed and implemented PC-based platform, a bike-dimensional three-dimensional scene roaming system. Experiments show that the system can simulate the real environment in the feeling of riding. The design principle and method can be used treadmills, rowing machines and many other aspects.


Digital Signal Processing Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.