CN104408989A - Rearview mirror simulation method for vehicle driving simulation system - Google Patents

Rearview mirror simulation method for vehicle driving simulation system Download PDF

Info

Publication number
CN104408989A
CN104408989A CN201410707114.XA CN201410707114A CN104408989A CN 104408989 A CN104408989 A CN 104408989A CN 201410707114 A CN201410707114 A CN 201410707114A CN 104408989 A CN104408989 A CN 104408989A
Authority
CN
China
Prior art keywords
rearview mirror
vehicle
coordinate
texture
simulation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410707114.XA
Other languages
Chinese (zh)
Other versions
CN104408989B (en
Inventor
郭新
李春广
冯新颖
马忠明
许网俊
周仁旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRRC Nanjing Puzhen Rail Transport Co Ltd
Original Assignee
CSR Nanjing Puzhen Rail Transport Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CSR Nanjing Puzhen Rail Transport Co Ltd filed Critical CSR Nanjing Puzhen Rail Transport Co Ltd
Priority to CN201410707114.XA priority Critical patent/CN104408989B/en
Publication of CN104408989A publication Critical patent/CN104408989A/en
Application granted granted Critical
Publication of CN104408989B publication Critical patent/CN104408989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B9/00Simulators for teaching or training purposes
    • G09B9/02Simulators for teaching or training purposes for teaching control of vehicles or other craft
    • G09B9/04Simulators for teaching or training purposes for teaching control of vehicles or other craft for teaching control of land vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/36Circuit design at the analogue level
    • G06F30/367Design verification, e.g. using simulation, simulation program with integrated circuit emphasis [SPICE], direct methods or relaxation methods

Abstract

The invention discloses a rearview mirror simulation method for a vehicle driving simulation system. The method comprises the following steps: firstly, obtaining specific position and coordinate of a vehicle according to vehicle motion, capturing a rearview mirror scene by a rearview mirror camera to obtain a rearview mirror top point coordinate required to be drawn, connecting top points in sequence to form a rearview mirror surface which is rearview mirror texture, and finally pasting the rearview mirror texture onto a rearview mirror model; during driving simulation, pre-binding initial texture, replacing old texture with new texture in real time through a created pointer function, and finally finishing simulation of a whole rearview mirror. According to the method, the rearview mirror effect is creatively displayed on a vehicle model in a three-dimension manner, so that the trouble caused by occupation of main view angle can be avoided, the refresh rate of the system can be reduced, and the vividness of whole driving simulation can be improved; the method has good commercial values.

Description

A kind of rearview mirror emulation mode for vehicle simulation control loop
Technical field
The present invention relates to a kind of rearview mirror emulation mode for vehicle simulation control loop, being specifically related to one can according to riding manipulation needs, and manual control also can in the rearview mirror effect of the upper dynamic simulation vehicle of display (or display screen).
Background technology
At present, in vehicle simulation control loop, wherein the research of rearview mirror emulation is less, only have by windows display technology at present, in driver visual angle, increase a rearview mirror passage, although can accomplish that rearview mirror emulates like this, but take visual angle, front, and if window is too small, it is clear that rearview mirror is not fogging; Window is excessive, has covered front sight line.
During actual driving, rearview mirror is very crucial safety component for driver.Because whole analogue system is drive simulating, driver is when handling real vehicle or controlling virtual vehicle, have stronger stereoscopic sensation and feeling of immersion, the important component part of driving simulation is not only in rearview mirror emulation, is also an important channel of improving whole control loop verisimilitude.
The principle of the anatomy that the Yang Xiujie of Shenyang Univ. of Science and Engineering is comparatively detailed in document " application of OpenGL technology in vehicle mirrors imaging " virtual emulation rearview mirror in vehicle simulation is driven and main process, it utilizes OpenGL imaging mechanism, manufacture larger improvement to rearview mirror imaging is limited, but still have deficiency.The rearview mirror emulation that it produces takies driver's main perspective, and does not have stereoscopic sensation, a just window.The rearview mirror imaging of design just can need obtain through six large conversion, and process is comparatively loaded down with trivial details; And according to simulated effect figure, two auxiliary viewports occupy main viewport, have blocked the sight line of front buildings, therefore this rearview mirror effect is not very desirable.
According to the shortcoming of above-mentioned document and in conjunction with actual rearview mirror situation, need the rearview mirror emulation realized will have stereoscopic sensation and stronger verisimilitude, and be consistent with actual rearview mirror.And visual angle, driver front can not be taken, comprise the scenery in vehicle window and front; In sum, a kind of such rearview mirror emulation mode must be designed independently, could above-mentioned requirements be met.
Summary of the invention
Object: in order to overcome the deficiencies in the prior art, the invention provides a kind of rearview mirror emulation mode for vehicle simulation control loop.
Technical scheme: for solving the problems of the technologies described above, the technical solution used in the present invention is:
For a rearview mirror emulation mode for vehicle simulation control loop, rearview mirror image adopts texture phase, realizing rearview mirror effect, specifically comprising the following steps by dynamically replacing texture in real time:
1), obtain vehicle drive time scene coordinate, utilize vehicle dynamic model obtain vehicle at three-dimensional system of coordinate x, the coordinate in y, z, and running attitude three-dimensional perspective α, beta, gamma, arranges simulation step length T; The basic exercise of vehicle can be divided into straight line and turning: controlled vehicle can carry out the driving under any operating mode in a program, and comprising advances keeps straight on, and turns to and drives and brake and reversing, by setting up vehicle dynamic model to realize;
2), utilize rearview mirror relative to the inactive of vehicle body, obtain rearview mirror camera coordinates, wherein rearview mirror camera is rotatable, is convenient to the scene catching rear view of vehicle; Arrange rotation matrix, in conjunction with coordinate and the running attitude three-dimensional perspective α of vehicle location, beta, gamma, adjusts rearview mirror camera;
3), scene read in frame buffer and create rearview mirror texture, rectangle is roughly in conjunction with actual rearview mirror shape, set up a rectangle initial texture and bound, its memory value is needed to empty before binding, definition initial texture is true value, and initial texture is set to dynamically, when vehicle movement, the rearview mirror texture of establishment is replaced in real time;
4), by newly-generated texture undertaken intercepting and change, the coordinate figure on rearview mirror four summits being carried out algebraic manipulation and obtains rearview mirror texture size; In order to rearview mirror texture can be allowed correctly to show rearview mirror scene, and meet real vision, the vision of people should be that nearly person is large, farther is little, by arranging view frustums and carrying out projective transformation, projective transformation matrix is set, projective transformation matrix and rotation matrix premultiplication have just been carried out projective transformation;
5) conversion, between increase rearview mirror texture coordinate and screen coordinate, ensures that the texture of generation and actual rearview mirror scene match,
6), by texture coordinate be mapped on rearview mirror model, finally play up whole scene; In order to prevent the phenomenon of the rearview mirror image retention that vehicle mutation movement produces, pointer function head it off is set; By the initial texture of pointed, and the whole process of replacing in real time texture is encapsulated as a R function, achieves by this function of bar repeatedly the object that cycle alternation exports rearview mirror effect.
Preferably, step 1) in " controlled vehicle can carry out the driving under any operating mode in a program, and comprising advances keeps straight on, and turns to and drives and brake and reversing, by setting up vehicle dynamic model to realize " refer to:
1a), straight line model adopts Euler method emulation to obtain instantaneous velocity and the coordinate of vehicle; Suppose that the acceleration of vehicle remains unchanged in a simulation step length T, then the travel speed change discrete model of vehicle is:
v ( t + 1 ) = v ( t ) + a ( t ) T = v ( t ) + T δ · m [ F t ( t ) - F b ( t ) - F f ( t ) - F i ( t ) - F w ( t ) ]
Wherein, v (t+1), v (t) is for vehicle is at the instantaneous velocity of t+1, t; T is simulation step length; δ is vehicle rotary quality coefficient; M is motor vehicle equipment quality; F tfor Automobile drive power; F bfor automobile acceleration resistance; F ffor automobile resistance to rolling; F ifor automobile grade resistance; F wfor air resistance of automobile;
Just the concrete coordinate of t+1 moment vehicle can be obtained according to the algebraic manipulation of t vehicle coordinate and speed;
1b), vehicle is when occurring to turn, and utilizes steering angle θ to obtain the coordinate of angle and the particular location residing for vehicle of turning; Suppose that certain moment automobile driving speed is v (t), front wheel angle rotates δ ' angle, then have:
ω r δ , = v ( t ) / L 1 + Kv ( t ) 2
K is stability factor; L is vehicle wheel base; ω rfor stable state yaw velocity;
After elapsed time dt, automobile turns over d θ on inceptive direction, then motor turning mathematical model is:
dθ dt = ω r = v ( t ) L 1 + Kv ( t ) 2 · δ ,
Again arrange:
dθ = v ( t ) / L 1 + Kv ( t ) 2 · δ , · dt
Just the coordinate after turn inside diameter can be calculated by angle θ;
1c), when vehicle is in pitching, yaw, side direction, Full Vehicle Dynamics model is utilized to obtain running attitude three-dimensional perspective α, beta, gamma.
Preferably, step 2) in " arrange rotation matrix, in conjunction with coordinate and the running attitude three-dimensional perspective α of vehicle location, beta, gamma, adjusts rearview mirror camera " specifically refer to:
With vehicle body direction for x-axis, horizontal vertical is y-axis in vehicle body direction, and system vertical is that z-axis sets up three-dimensional cartesian coordinate system in direction, ground; If earth axes XYZ is that { A}, rearview mirror camera coordinates system xyz (or vehicle body coordinate system) are { B}, so rearview mirror camera coordinates system { any point P in B} bat earth axes { the coordinate P in A} acan be calculated by following relation:
M ( z , α ) = cos α - sin α 0 sin α cos α 0 0 0 1
M ( y , β ) = cos β 0 sin β 0 1 0 - sin β 0 cos β
M ( x , γ ) = 1 0 0 0 cos γ - sin γ 0 sin γ cos γ
Wherein M (z, α) is for rearview mirror camera is around the rotation matrix at z-axis rotation alpha angle, and M (y, β) to rotate the rotation matrix at β angle for camera around y-axis, and M (x, γ) to rotate the rotation matrix at γ angle for camera around x-axis; When vehicle pose changes, camera also synchronously makes corresponding change, connects successively after calculating the coordinate on backsight minute surface 4 summits.
Preferably, step 4) in projective transformation matrix as follows:
M P = 2 n r - l 0 - r + l r - l 0 0 2 n t - b - t + b t - b 0 0 0 f f - n - fn f - n 0 0 1 0
T, b, l, r are the vertical range of backsight minute surface to top, upper and lower, left and right; N is the distance of viewpoint to view frustums hither plane; F is the distance of viewpoint to view frustums far plane.
Preferably, step 5) in conversion between rearview mirror texture coordinate and screen coordinate in the following way:
A x = B x × width 2 + width 2
A y = height 2 - B y × height 2
Wherein, A xfor the lateral coordinates of texture coordinate, A yfor the longitudinal coordinate of texture coordinate, B x, B ybe respectively screen coordinate lateral coordinates and longitudinal coordinate, Width is the length of rearview mirror model, and Height is the wide of rearview mirror model.
Described a kind of rearview mirror emulation mode for vehicle simulation control loop, is characterized in that: the stereo display of rearview mirror effect is on vehicle mirrors model; The emulation of this rearview mirror does not take main perspective, i.e. driver visual angle; When searching out vehicle mirrors model and meeting related request, program judges and maps, otherwise continue repeat step 1)-step 6) and action.
Described a kind of rearview mirror emulation mode for vehicle simulation control loop, is characterized in that: vision simulation refresh rate can not lower than 24hz, and whole emulation does not affect main line process, does not namely affect real-time; By pointed initial texture, and the whole process of replacing in real time texture is encapsulated as a R function, realizes by bar R function repeatedly the object that cycle alternation exports rearview mirror effect, simultaneously also not influential system frame per second.
Beneficial effect: a kind of rearview mirror emulation mode for vehicle simulation control loop provided by the invention, based on the rearview mirror emulation that dynamic texture maps, utilize the geo-stationary of rearview mirror and vehicle movement, by virtual reality technology by the scene stereo display of rear view of vehicle and below on rearview mirror, and can on rearview mirror, make adjustment timely according to vehicle change and upgrade, be not only vehicle to be kept in motion, be applicable to vehicle stationary state too, be also applicable to rearview mirror effect when vehicle movement is undergone mutation; Therefore be a kind ofly drive with actual vehicle the rearview mirror also more true to nature that matches and emulate.Compare the research of original forefathers, stereo display, in real time dynamic mapping, not acceptor's angle limitations, the emulation that can realize under various working are several large novel point of the application; The development of virtual reality technology, vehicle simulation is driven becomes possibility.By virtual reality technology in conjunction with computer simulation technology, a lot of problems in vehicle simulation driving can be solved.Have the following advantages: effectively can improve system frame per second does not affect real-time, and the vehicle drive (keep straight on, turn, reversing, and above-mentioned several mixing are driven) under various operating mode can be realized.
Compare existing method, combined by computer programming with dimensional Modeling Technology, achieve the emulation of this rearview mirror, this is also the invention part of this patent.Compare, because stereo display is on rearview mirror, do not take main perspective space, i.e. driver visual angle; Size and shape is not had to limit to rearview mirror itself yet; Solid is presented on vehicle intuitively, both improves verisimilitude, also meets maneuverability.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention;
Fig. 2 and Fig. 3 is rearview mirror texture coordinate flow path switch figure of the present invention;
Fig. 4 and Fig. 5 is practical function figure of the present invention;
Fig. 6 is operation frame per second part design sketch of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further described.
As shown in Figure 1 to Figure 3, a kind of rearview mirror emulation mode for vehicle simulation control loop, rearview mirror image adopts texture phase, realizing rearview mirror effect, specifically comprising the following steps by dynamically replacing texture in real time:
1), obtain vehicle drive time scene coordinate, utilize vehicle dynamic model obtain vehicle at three-dimensional system of coordinate x, the coordinate in y, z, and running attitude three-dimensional perspective α, beta, gamma, arranges simulation step length T; The basic exercise of vehicle can be divided into straight line and turning: controlled vehicle can carry out the driving under any operating mode in a program, and comprising advances keeps straight on, and turns to and drives and brake and reversing; By setting up vehicle dynamic model to realize,
1a, straight line model adopt Euler method emulation to obtain instantaneous velocity and the coordinate of vehicle; Suppose that the acceleration of vehicle remains unchanged in a simulation step length T, then the travel speed change discrete model of vehicle is:
v ( t + 1 ) = v ( t ) + a ( t ) T = v ( t ) + T δ · m [ F t ( t ) - F b ( t ) - F f ( t ) - F i ( t ) - F w ( t ) ]
Wherein, v (t+1), v (t) is for vehicle is at the instantaneous velocity of t+1, t; T is simulation step length, and this emulation T gets 0.05s; δ is vehicle rotary quality coefficient; M is motor vehicle equipment quality; F tfor Automobile drive power; F bfor automobile acceleration resistance; F ffor automobile resistance to rolling; F ifor automobile grade resistance; F wfor air resistance of automobile;
Just the concrete coordinate of t+1 moment vehicle can be obtained according to the algebraic manipulation of t vehicle coordinate and speed;
When 1b, vehicle occur to turn, the coordinate of the angle utilizing steering angle θ to obtain turning and the particular location residing for vehicle; Suppose that certain moment automobile driving speed is v (t), front wheel angle rotates δ ' angle, then have:
ω r δ , = v ( t ) / L 1 + Kv ( t ) 2
K is stability factor; L is vehicle wheel base; ω rfor stable state yaw velocity;
After elapsed time dt, automobile turns over d θ on inceptive direction, then motor turning mathematical model is:
dθ dt = ω r = v ( t ) L 1 + Kv ( t ) 2 · δ ,
Again arrange:
dθ = v ( t ) / L 1 + Kv ( t ) 2 · δ , · dt
Just the coordinate after turn inside diameter can be calculated by angle θ;
1c, when vehicle is in pitching, yaw, side direction, Full Vehicle Dynamics model is utilized to obtain running attitude three-dimensional perspective α, beta, gamma;
Rearview mirror emulation must change according to vehicle-state in real time, and when namely during riding manipulation, vehicle is driven, rearview mirror must accomplish consecutive variations; During emergency brake of vehicle, rearview mirror scene must be static, and picture can not be had to be detained; Adopt rearview mirror rotation and dynamic texture to replace to realize:
2), utilize rearview mirror relative to the inactive of vehicle body, obtain rearview mirror camera coordinates, wherein rearview mirror camera is rotatable, is convenient to the scene catching rear view of vehicle; Arrange rotation matrix, in conjunction with coordinate and the running attitude three-dimensional perspective α of vehicle location, beta, gamma, adjusts rearview mirror camera;
With vehicle body direction for x-axis, horizontal vertical is y-axis in vehicle body direction, and system vertical is that z-axis sets up three-dimensional cartesian coordinate system in direction, ground; If earth axes XYZ is that { A}, rearview mirror camera coordinates system xyz (or vehicle body coordinate system) are { B}, so rearview mirror camera coordinates system { any point P in B} bat earth axes { the coordinate P in A} acan be calculated by following relation:
M ( z , α ) = cos α - sin α 0 sin α cos α 0 0 0 1
M ( y , β ) = cos β 0 sin β 0 1 0 - sin β 0 cos β
M ( x , γ ) = 1 0 0 0 cos γ - sin γ 0 sin γ cos γ
Wherein M (z, α) is for rearview mirror camera is around the rotation matrix at z-axis rotation alpha angle, and M (y, β) to rotate the rotation matrix at β angle for camera around y-axis, and M (x, γ) to rotate the rotation matrix at γ angle for camera around x-axis; When vehicle pose changes, camera also synchronously makes corresponding change, connects successively after calculating the coordinate on backsight minute surface 4 summits.
3), as shown in Figure 3, scene is read in frame buffer and creates rearview mirror texture, be roughly rectangle in conjunction with actual rearview mirror shape, set up a rectangle initial texture and bound, before binding, need its memory value to empty, definition initial texture is true value, arrange texture size be the integer power of 2 and ensure that texture size and rearview mirror size match, can reading speed be accelerated like this, and initial texture is set to dynamically, when vehicle movement, the rearview mirror texture of establishment is replaced in real time;
4), as shown in Figure 2, newly-generated texture carried out intercepting and changes, the coordinate figure on rearview mirror four summits being carried out algebraic manipulation and obtains rearview mirror texture size; In order to rearview mirror texture can be allowed correctly to show rearview mirror scene, and meet real vision, the vision of people should be that nearly person is large, and farther is little, and by arranging view frustums and carrying out projective transformation, arrange projective transformation matrix, projective transformation matrix is as follows:
M P = 2 n r - l 0 - r + l r - l 0 0 2 n t - b - t + b t - b 0 0 0 f f - n - fn f - n 0 0 1 0
T, b, l, r are the vertical range of backsight minute surface to top, upper and lower, left and right; N is the distance of viewpoint to view frustums hither plane; F is the distance of viewpoint to view frustums far plane;
Projective transformation matrix and rotation matrix premultiplication have just been carried out projective transformation;
5), increase conversion between rearview mirror texture coordinate and screen coordinate, ensure that the texture that generates and actual rearview mirror scene match, the conversion between rearview mirror texture coordinate and screen coordinate in the following way:
A x = B x × width 2 + width 2
A y = height 2 - B y × height 2
Wherein, A xfor the lateral coordinates of texture coordinate, A yfor the longitudinal coordinate of texture coordinate, B x, B ybe respectively screen coordinate lateral coordinates and longitudinal coordinate, Width is the length of rearview mirror model, and Height is the wide of rearview mirror model.
6), by texture coordinate be mapped on rearview mirror model, finally play up whole scene; In order to prevent the phenomenon of the rearview mirror image retention that vehicle mutation movement produces, pointer function head it off is set; Create the pointer function that is pointed to rearview mirror, by binded texture with the address mark of a definition, and by the initial texture of pointed, a R function is encapsulated as with the whole process of replacing texture in real time, when vehicle location coordinate changes, new texture is assigned with the address of new storage, original address that old texture still retains, pointer will point to new address, makes rearview mirror camera change like this and changes synchronous realization with vehicle movement.
By described above, when searching out vehicle mirrors model and meeting related request, program judges and maps, otherwise continue repeat step 1)-step 6) and action.
Vision simulation refresh rate can not lower than 24hz, and whole emulation does not affect main line process, does not namely affect real-time; By pointed initial texture, and the whole process of replacing in real time texture is encapsulated as a R function, realizes by bar R function repeatedly the object that cycle alternation exports rearview mirror effect, simultaneously also not influential system frame per second.
By pointed initial texture, and the whole process of replacing in real time texture is encapsulated as a R function, achieves by this function of bar repeatedly the object that cycle alternation exports rearview mirror effect.
The present invention realizes by PC or driving simulation system.To the minimalist configuration requirement of computer be: Windows XP/2003,1G internal memory, video card Intel 3000 or more, VC++6.0 or more.The allocation of computer of this this program of commissioning test is as follows: CPU 2430M 2.4GHz, storer 2G, video card 2G Intel 3000, operating system Windows XP SP3, development platform Visual Studio.NET2003, simulated environment is Vega Prime 2.2 modeling software is Multigen Creator 3.2.Vehicle related parameters is as follows: vehicle mass m=1400kg, wheelbase L=2.46m, final driver ratio i m=4.31,1 ~ 5 gear ratio of gear is respectively 3.267,1.769,1.147,0.872,0.679, and the initial speed of a motor vehicle is 25m/s, simulation step length T=0.05s.
Concrete operations comprise the following steps:
1) check PC operating system and associated software platforms, confirm to have installed MicrosoftVisual Studio.NET and the renewal of relevant VC++ assembly.
2) scene initialization: initial vehicle position is set, display window size, and relevant road scene;
3) double-click exe program or enter Visual Studio interface, click and run, waiting system can enter master routine picture after debugging about 1-3 second;
4) maneuver vehicle carries out vehicle virtual driving, can see rearview mirror effect comparatively clearly in left side.
Program needs to call VC++ when running, and after entering master routine interface, can see dynamic reversing mirror effect comparatively clearly by steering vehicle in vehicle left side.And rearview mirror imaging and actual driving situation match when running.Preliminary proof the present invention has certain ageing and feasibility, also reaches expection object.By setting up whole vehicle kinetic model at Matlab, become C Plus Plus to be compiled in Visual Studio the m integrating documents of this model, make calling program can motion capture to three-dimensional vehicle coordinate, comprise the coordinate of rearview mirror.
When program is run, main thread is as follows:
If Fig. 4 to Fig. 6 is simulated effect figure, rearview mirror emulation mode for vehicle simulation control loop provided by the invention, rearview mirror emulation changes according to vehicle-state in real time, create the pointer function that is pointed to rearview mirror, when vehicle location coordinate changes, the address stored also changes, and rearview mirror camera is changed and changes synchronous realization with vehicle movement.Whole emulation does not affect real-time; By creating dynamic texture, and being mapped on rearview mirror model, utilizing frame buffer technology draw simultaneously and discharge texture, improve the output of frame rate preferably.The stereo display of rearview mirror effect is on vehicle mirrors model; Rearview mirror emulation does not take main perspective, i.e. driver visual angle; Size and shape is not had to limit to rearview mirror itself yet; Solid is presented on vehicle intuitively, and rearview mirror can emulate in the driving under controlled vehicle in a program any operating mode.
The present invention has the verisimilitude of height and higher commercial value.This emulation mode also can be used in various driving game, especially vehicle drive game.
The above is only the preferred embodiment of the present invention; be noted that for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (7)

1. for a rearview mirror emulation mode for vehicle simulation control loop, rearview mirror image adopts texture phase, realizing rearview mirror effect, specifically comprising the following steps by dynamically replacing texture in real time:
1), obtain vehicle drive time scene coordinate, utilize vehicle dynamic model obtain vehicle at three-dimensional system of coordinate x, the coordinate in y, z, and running attitude three-dimensional perspective α, beta, gamma, arranges simulation step length T; The basic exercise of vehicle can be divided into straight line and turning: controlled vehicle can carry out the driving under any operating mode in a program, and comprising advances keeps straight on, and turns to and drives and brake and reversing, by setting up vehicle dynamic model to realize;
2), utilize rearview mirror relative to the inactive of vehicle body, obtain rearview mirror camera coordinates, wherein rearview mirror camera is rotatable, is convenient to the scene catching rear view of vehicle; Arrange rotation matrix, in conjunction with coordinate and the running attitude three-dimensional perspective α of vehicle location, beta, gamma, adjusts rearview mirror camera;
3), scene read in frame buffer and create rearview mirror texture, rectangle is roughly in conjunction with actual rearview mirror shape, set up a rectangle initial texture and bound, its memory value is needed to empty before binding, definition initial texture is true value, and initial texture is set to dynamically, when vehicle movement, the rearview mirror texture of establishment is replaced in real time;
4), by newly-generated texture undertaken intercepting and change, the coordinate figure on rearview mirror four summits being carried out algebraic manipulation and obtains rearview mirror texture size; In order to rearview mirror texture can be allowed correctly to show rearview mirror scene, and meet real vision, the vision of people should be that nearly person is large, farther is little, by arranging view frustums and carrying out projective transformation, projective transformation matrix is set, projective transformation matrix and rotation matrix premultiplication have just been carried out projective transformation;
5) conversion, between increase rearview mirror texture coordinate and screen coordinate, ensures that the texture of generation and actual rearview mirror scene match,
6), by texture coordinate be mapped on rearview mirror model, finally play up whole scene; In order to prevent the phenomenon of the rearview mirror image retention that vehicle mutation movement produces, pointer function head it off is set; By the initial texture of pointed, and the whole process of replacing in real time texture is encapsulated as a R function, achieves by this function of bar repeatedly the object that cycle alternation exports rearview mirror effect.
2. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, it is characterized in that: step 1) in " controlled vehicle can carry out the driving under any operating mode in a program; comprising advance keep straight on; turn to drive and brake and reversing, by setting up vehicle dynamic model to realize " refer to:
1a), straight line model adopts Euler method emulation to obtain instantaneous velocity and the coordinate of vehicle; Suppose that the acceleration of vehicle remains unchanged in a simulation step length T, then the travel speed change discrete model of vehicle is:
v ( t + 1 ) = v ( t ) + a ( t ) T = v ( t ) + T δ · m [ F t ( t ) - F b ( t ) - F f ( t ) - F i ( t ) - F w ( t ) ]
Wherein, v (t+1), v (t) is for vehicle is at the instantaneous velocity of t+1, t; T is simulation step length; δ is vehicle rotary quality coefficient; M is motor vehicle equipment quality; F tfor Automobile drive power; F bfor automobile acceleration resistance; F ffor automobile resistance to rolling; F ifor automobile grade resistance; F wfor air resistance of automobile;
Just the concrete coordinate of t+1 moment vehicle can be obtained according to the algebraic manipulation of t vehicle coordinate and speed;
1b), vehicle is when occurring to turn, and utilizes steering angle θ to obtain the coordinate of angle and the particular location residing for vehicle of turning; Suppose that certain moment automobile driving speed is v (t), front wheel angle rotates δ ' angle, then have:
ω r δ ′ = v ( t ) / L 1 + Kv ( t ) 2
K is stability factor; L is vehicle wheel base; ω rfor stable state yaw velocity;
After elapsed time dt, automobile turns over d θ on inceptive direction, then motor turning mathematical model is:
dθ dt = ω r = v ( t ) L 1 + Kv ( t ) 2 · δ ′
Again arrange:
dθ = v ( t ) / L 1 + Kv ( t ) 2 · δ ′ · dt
Just the coordinate after turn inside diameter can be calculated by angle θ.
3. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, it is characterized in that: step 2) in " rotation matrix is set; in conjunction with coordinate and the running attitude three-dimensional perspective α of vehicle location; β; γ, adjusts rearview mirror camera " specifically refer to:
With vehicle body direction for x-axis, horizontal vertical is y-axis in vehicle body direction, and system vertical is that z-axis sets up three-dimensional cartesian coordinate system in direction, ground; If earth axes XYZ is that { A}, rearview mirror camera coordinates system xyz (or vehicle body coordinate system) are { B}, so rearview mirror camera coordinates system { any point P in B} bat earth axes { the coordinate P in A} acan be calculated by following relation:
M ( z , α ) = cos α - sin α 0 sin α cos α 0 0 0 1
M ( y , β ) = cos β 0 sin β 0 1 0 - sin β 0 cos β
M ( x , γ ) = 1 0 0 0 cos γ - sin γ 0 sin γ cos γ
Wherein M (z, α) is for rearview mirror camera is around the rotation matrix at z-axis rotation alpha angle, and M (y, β) to rotate the rotation matrix at β angle for camera around y-axis, and M (x, γ) to rotate the rotation matrix at γ angle for camera around x-axis; When vehicle pose changes, camera also synchronously makes corresponding change, connects successively after calculating the coordinate on backsight minute surface 4 summits.
4. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, is characterized in that: step 4) in projective transformation matrix as follows:
M P = 2 n r - l 0 - r + l r - l 0 0 2 n t - b - t + b t - b 0 0 0 f f - n - fn f - n 0 0 1 0
T, b, l, r are the vertical range of backsight minute surface to top, upper and lower, left and right; N is the distance of viewpoint to view frustums hither plane; F is the distance of viewpoint to view frustums far plane.
5. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, is characterized in that: step 5) in conversion between rearview mirror texture coordinate and screen coordinate in the following way:
A x = B x × width 2 + width 2
A y = height 2 - B y × height 2
Wherein, A xfor the lateral coordinates of texture coordinate, A yfor the longitudinal coordinate of texture coordinate, B x, B ybe respectively screen coordinate lateral coordinates and longitudinal coordinate, Width is the length of rearview mirror model, and Height is the wide of rearview mirror model.
6. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, is characterized in that: the stereo display of rearview mirror effect is on vehicle mirrors model; The emulation of this rearview mirror does not take main perspective, i.e. driver visual angle; When searching out vehicle mirrors model and meeting related request, program judges and maps, otherwise continue repeat step 1)-step 6) and action.
7. a kind of rearview mirror emulation mode for vehicle simulation control loop according to claim 1, is characterized in that: vision simulation refresh rate can not lower than 24hz, and whole emulation does not affect main line process, does not namely affect real-time; By pointed initial texture, and the whole process of replacing in real time texture is encapsulated as a R function, realizes by bar R function repeatedly the object that cycle alternation exports rearview mirror effect, simultaneously also not influential system frame per second.
CN201410707114.XA 2014-11-27 2014-11-27 A kind of rearview mirror emulation mode for vehicle simulation control loop Active CN104408989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410707114.XA CN104408989B (en) 2014-11-27 2014-11-27 A kind of rearview mirror emulation mode for vehicle simulation control loop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410707114.XA CN104408989B (en) 2014-11-27 2014-11-27 A kind of rearview mirror emulation mode for vehicle simulation control loop

Publications (2)

Publication Number Publication Date
CN104408989A true CN104408989A (en) 2015-03-11
CN104408989B CN104408989B (en) 2016-10-12

Family

ID=52646615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410707114.XA Active CN104408989B (en) 2014-11-27 2014-11-27 A kind of rearview mirror emulation mode for vehicle simulation control loop

Country Status (1)

Country Link
CN (1) CN104408989B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574268A (en) * 2015-12-16 2016-05-11 上汽通用五菱汽车股份有限公司 Modality optimization method of outside rear-view mirror of automobile
CN108520672A (en) * 2018-03-01 2018-09-11 吉林大学 A kind of drive simulation analogue system with multi-screen three-dimensional imaging
CN108734671A (en) * 2017-09-12 2018-11-02 武汉天际航信息科技股份有限公司 Three-D grain method of modifying and its system, automatic chart pasting method and its system
CN108982117A (en) * 2018-07-04 2018-12-11 长安大学 A kind of unmanned vehicle test macro and method
CN109263653A (en) * 2018-11-14 2019-01-25 江铃汽车股份有限公司 A kind of driver's forward view angle confirmation method
CN110663068A (en) * 2017-05-23 2020-01-07 皇家Kpn公司 Coordinate mapping for rendering panoramic scenes
CN112417694A (en) * 2020-11-24 2021-02-26 长安大学 Virtual rearview mirror adjusting method and device
CN114419949A (en) * 2022-01-13 2022-04-29 武汉未来幻影科技有限公司 Automobile rearview mirror image reconstruction method and rearview mirror
CN117274956A (en) * 2023-11-17 2023-12-22 深圳市航盛电子股份有限公司 Vehicle side view generation method, device, terminal equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838611B1 (en) 2021-06-11 2023-12-05 T-Mobile Usa, Inc. Vehicle display device with simulated mirror and wireless connectivity

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3056256B2 (en) * 1994-06-17 2000-06-26 株式会社ナムコ Three-dimensional simulator device and image synthesizing method
JP2007323001A (en) * 2006-06-05 2007-12-13 Toyota Motor Corp Image display device
CN101251958A (en) * 2007-07-06 2008-08-27 浙江大学 Method for implementing automobile driving analog machine facing to disciplinarian
CN102867454A (en) * 2012-10-15 2013-01-09 湖南大学 Teaching experiment platform of automobile body network control system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3056256B2 (en) * 1994-06-17 2000-06-26 株式会社ナムコ Three-dimensional simulator device and image synthesizing method
JP2007323001A (en) * 2006-06-05 2007-12-13 Toyota Motor Corp Image display device
CN101251958A (en) * 2007-07-06 2008-08-27 浙江大学 Method for implementing automobile driving analog machine facing to disciplinarian
CN102867454A (en) * 2012-10-15 2013-01-09 湖南大学 Teaching experiment platform of automobile body network control system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
孙亮: ""汽车驾驶模拟器视景仿真系统关键技术研究"", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 *
王宝茹: ""驾驶仿真系统中环境构建的研究与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574268B (en) * 2015-12-16 2018-11-30 上汽通用五菱汽车股份有限公司 A kind of automobile outer rear-view mirror modal Optimization method
CN105574268A (en) * 2015-12-16 2016-05-11 上汽通用五菱汽车股份有限公司 Modality optimization method of outside rear-view mirror of automobile
CN110663068A (en) * 2017-05-23 2020-01-07 皇家Kpn公司 Coordinate mapping for rendering panoramic scenes
CN110663068B (en) * 2017-05-23 2024-02-02 皇家Kpn公司 Coordinate mapping for rendering panoramic scenes
CN108734671A (en) * 2017-09-12 2018-11-02 武汉天际航信息科技股份有限公司 Three-D grain method of modifying and its system, automatic chart pasting method and its system
CN108734671B (en) * 2017-09-12 2020-07-24 武汉天际航信息科技股份有限公司 Three-dimensional texture modification method and system, automatic mapping method and system
CN108520672A (en) * 2018-03-01 2018-09-11 吉林大学 A kind of drive simulation analogue system with multi-screen three-dimensional imaging
CN108982117A (en) * 2018-07-04 2018-12-11 长安大学 A kind of unmanned vehicle test macro and method
CN109263653A (en) * 2018-11-14 2019-01-25 江铃汽车股份有限公司 A kind of driver's forward view angle confirmation method
CN109263653B (en) * 2018-11-14 2020-08-11 江铃汽车股份有限公司 Method for confirming front view angle of automobile driver
CN112417694A (en) * 2020-11-24 2021-02-26 长安大学 Virtual rearview mirror adjusting method and device
CN114419949A (en) * 2022-01-13 2022-04-29 武汉未来幻影科技有限公司 Automobile rearview mirror image reconstruction method and rearview mirror
CN117274956A (en) * 2023-11-17 2023-12-22 深圳市航盛电子股份有限公司 Vehicle side view generation method, device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN104408989B (en) 2016-10-12

Similar Documents

Publication Publication Date Title
CN104408989A (en) Rearview mirror simulation method for vehicle driving simulation system
CN108803607B (en) Multifunctional simulation system for automatic driving
CN104765280B (en) The three-dimensional aobvious control comprehensive training system of no-manned plane three-dimensional
CN103413473B (en) Driving simulation system of underground mine hinged trolley
US20100279255A1 (en) Vehicle simulator system
CN106484982A (en) Method for designing based on virtual reality and VR system during automobile product development
CN102542868B (en) Visual simulation method and device
CN100504788C (en) Software emulation method of self-determination driving vehicle running process
CN106981232A (en) A kind of virtual driving simulator based on unity3D
CN109686165A (en) A kind of the train lightweight simulation system and its construction method of multiple motion platforms
CN107273617A (en) A kind of utilization shallow water equation obtains the real time simulation method and system that fluid motion is flowed on surface
EP0845130B1 (en) Atmospheric effects simulation
CN103295444A (en) Method and system for simulating and training elevating fire truck operation
JP3658421B2 (en) Vehicle simulation device
CN115113639B (en) Unmanned aerial vehicle flight control and simulation training method and device
CN103456039A (en) Large-scale scene virtual sky modeling method under condition of multi-viewpoint multi-view-angle view field displaying
CN211124496U (en) Flight simulator
Jia et al. Development and realization of a street driving simulator for virtual tour
Tseng et al. Implementation of a driving simulator based on a stewart platform and computer graphics technologies
CN110879660A (en) VR-based tire crane training system and method
Hooi-Siang et al. Virtual reality for low-cost automotive driving simulator in vehicle engineering research
Redmill et al. Virtual environment simulation for image processing sensor evaluation
Yang et al. Traffic accident reconstruction technology research
CN117472753A (en) Distributed simulation test system based on ros
Burnette et al. Developing highway driving simulations using virtual reality modeling language

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 210031, 68 North Pearl Road, Taishan Park, Nanjing hi tech Development Zone, Jiangsu, China

Applicant after: NANJING ZHONGCHE PUZHEN URBAN RAIL VEHICLE CO., LTD.

Address before: 210031 hi tech Development Zone, Jiangsu, Nanjing

Applicant before: CSR Nanjing Puzhen Mass Transit Vehicle Co., Ltd

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant