CN110109552B - Modeling method of virtual driving scene based on real environment - Google Patents
Modeling method of virtual driving scene based on real environment Download PDFInfo
- Publication number
- CN110109552B CN110109552B CN201910434833.1A CN201910434833A CN110109552B CN 110109552 B CN110109552 B CN 110109552B CN 201910434833 A CN201910434833 A CN 201910434833A CN 110109552 B CN110109552 B CN 110109552B
- Authority
- CN
- China
- Prior art keywords
- scene
- virtual
- vehicle
- driving
- speed
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09B—EDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
- G09B9/00—Simulators for teaching or training purposes
- G09B9/02—Simulators for teaching or training purposes for teaching control of vehicles or other craft
- G09B9/04—Simulators for teaching or training purposes for teaching control of vehicles or other craft for teaching control of land vehicles
- G09B9/05—Simulators for teaching or training purposes for teaching control of vehicles or other craft for teaching control of land vehicles the view from a vehicle being simulated
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- Computer Hardware Design (AREA)
- Human Computer Interaction (AREA)
- Aviation & Aerospace Engineering (AREA)
- Business, Economics & Management (AREA)
- Educational Administration (AREA)
- Educational Technology (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明公开了一种基于真实环境的虚拟驾驶场景建模方法,包括步骤:1)使用全景相机在固定移动速度下拍摄真实驾驶场景的全景视频;2)在Unity3D的虚拟空间中建立一个球体模型,将拍摄的全景视频贴到球体内侧;3)将一个车体模型放入球体场景的球心位置,作为虚拟驾驶的操作车辆;4)动态球体场景建模,包括球体场景变速调整和场景左右偏移调整。本发明通过真实全景视频来搭建虚拟驾驶场景,解决现有汽车模拟驾驶产品采用3D建模搭建场景耗时长,搭建的场景与真实场景差距大的技术问题。
The invention discloses a virtual driving scene modeling method based on a real environment, comprising the steps of: 1) using a panoramic camera to shoot a panoramic video of a real driving scene at a fixed moving speed; 2) establishing a spherical model in the virtual space of Unity3D , paste the captured panoramic video on the inside of the sphere; 3) Put a car body model into the center of the sphere scene, as a virtual driving operation vehicle; 4) Dynamic sphere scene modeling, including sphere scene speed adjustment and scene left and right Offset adjustment. The present invention builds a virtual driving scene through a real panoramic video, and solves the technical problem that the existing automobile simulated driving product adopts 3D modeling to build the scene, which takes a long time, and the built scene has a large gap with the real scene.
Description
技术领域technical field
本发明涉及汽车虚拟驾驶技术领域,特别涉及一种基于真实环境的虚拟驾驶场景建模方法。The invention relates to the technical field of automobile virtual driving, in particular to a virtual driving scene modeling method based on a real environment.
背景技术Background technique
传统的模拟驾驶产品,在搭建场景时通常使用的方法是:1)通过使用3dsMax等三维模型制作软件制作出目标模型的几何形状,并结合Photoshop等图像处理软件进行贴图;2)使用Unity3d等游戏引擎开发工具构建一个虚拟空间,将上一步制作的各个模型导入到该虚拟空间中进行放置,然后设置各个模型对应的物理属性。采用这种方法搭建场景有一个最大的优点,就是可以根据所使用的开发引擎内自身包含的功能,实现让场景中所有物体带有物理逻辑和自然特性(例如物理碰撞、自然落体、受力加速等),开发者无需对此耗费精力。Traditional driving simulation products usually use the following methods when building a scene: 1) Use 3dsMax and other 3D model making software to create the geometric shape of the target model, and combine it with Photoshop and other image processing software to map; 2) Use games such as Unity3d The engine development tool builds a virtual space, imports each model made in the previous step into the virtual space for placement, and then sets the physical properties corresponding to each model. One of the biggest advantages of using this method to build a scene is that all objects in the scene can have physical logic and natural characteristics (such as physical collision, natural fall, force acceleration, etc.) according to the functions contained in the development engine used. etc.), the developer does not need to spend effort on this.
但是这种场景模型也有其固有缺点——不真实。运用3D Max和Photoshop等软件制作模型,如果要求好的视觉效果,就需要有丰富经验的专业人员投入大量的时间才能达到,并且这种好的视觉效果仅仅是模型精美,与真实物体相比差别很大。对于模拟驾驶设备而言,如果使用者感受与实际驾车体验差距过大,则训练效果就会大打折扣。But this scene model also has its inherent disadvantage - unreal. Use software such as 3D Max and Photoshop to make models. If you want good visual effects, you need experienced professionals to invest a lot of time to achieve them, and this good visual effect is only a beautiful model, which is different from real objects. very large. For simulated driving equipment, if the difference between the user's experience and the actual driving experience is too large, the training effect will be greatly reduced.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明的目的是提供一种基于真实环境的虚拟驾驶场景建模方法,以解决现有汽车模拟驾驶产品采用3D建模搭建场景耗时长,搭建的场景与真实场景差距大的技术问题。In view of this, the purpose of the present invention is to provide a virtual driving scene modeling method based on a real environment, so as to solve the problem that the existing automobile simulation driving products adopt 3D modeling to build a scene, which takes a long time and has a large gap between the built scene and the real scene. question.
本发明基于真实环境的虚拟驾驶场景建模方法,包括以下步骤:The virtual driving scene modeling method based on the real environment of the present invention comprises the following steps:
1)使用全景相机在固定移动速度下拍摄真实驾驶场景的全景视频,所述全景相机在拍摄过程中的设置高度与驾驶员在车辆上的眼睛高度一致;1) Use a panoramic camera to shoot a panoramic video of a real driving scene at a fixed moving speed, and the setting height of the panoramic camera in the shooting process is consistent with the driver's eye height on the vehicle;
2)在Unity3D的虚拟空间中建立一个球体模型,通过编辑球体模型着色器,将拍摄的全景视频贴到球体内侧;2) Create a sphere model in the virtual space of Unity3D, and paste the captured panoramic video inside the sphere by editing the sphere model shader;
3)将一个车体模型放入球体场景的球心位置,作为虚拟驾驶车辆;3) Put a car body model into the center of the spherical scene as a virtual driving vehicle;
4)将一个虚拟相机放入车体模型的驾驶员位置,且虚拟相机的设置高度与驾驶员在车体模型上的眼睛高度一致;并将驾驶员佩戴的VR头盔的开发包中实现同步的脚本添加到虚拟相机上,以使检测VR头盔在三维空间中坐标位置和旋转角度的三维空间跟踪定位器所采集到的坐标和角度信息,作为虚拟相机的同步脚本参考输入,从而使虚拟相机跟随VR头盔同步转动;并将虚拟相机捕获的当前转角方向上的场景图像输入VR头盔。4) Put a virtual camera in the driver's position of the vehicle body model, and the setting height of the virtual camera is consistent with the height of the driver's eyes on the vehicle body model; and realize the synchronization in the development kit of the VR helmet worn by the driver. The script is added to the virtual camera, so that the coordinate and angle information collected by the 3D space tracking locator that detects the coordinate position and rotation angle of the VR headset in the 3D space can be used as the reference input of the synchronization script of the virtual camera, so that the virtual camera can follow The VR helmet rotates synchronously; and the scene image in the current corner direction captured by the virtual camera is input to the VR helmet.
进一步,所述的基于真实环境的虚拟驾驶场景建模方法还包括以下步骤:Further, the virtual driving scene modeling method based on the real environment also includes the following steps:
5)建立场景变化速度与模拟驾驶脚踏板输入信号的关系,具体步骤如下:5) Establish the relationship between the scene change speed and the input signal of the simulated driving pedal. The specific steps are as follows:
a)根据某种实际车辆的动力学参数,计算该车的平均加速度值,包括油门平均加速度ac1和刹车平均加速度ac2:a) According to the dynamic parameters of a certain actual vehicle, calculate the average acceleration value of the vehicle, including the average acceleration a c1 of the accelerator and the average acceleration a c2 of the brake:
上式中v10和v11分别表示油门加速过程的初始速度和终了速度,单位km/h,油门加速时间为Δt1秒;v20和v21分别表示刹车减速过程的初始速度和终了速度,单位km/h,刹车减速时间为Δt2秒;In the above formula, v 10 and v 11 represent the initial speed and final speed of the accelerator acceleration process, respectively, in km/h, and the accelerator acceleration time is Δt 1 second; v 20 and v 21 represent the initial speed and final speed of the braking deceleration process, respectively, The unit is km/h, and the braking deceleration time is Δt 2 seconds;
b)根据模拟驾驶脚踏板的输入信号和某种实际车辆的平均加速度值,计算该型号虚拟驾驶车辆的油门加速度a1、刹车加速度a2和当前加速度a:b) Calculate the accelerator acceleration a 1 , the braking acceleration a 2 and the current acceleration a of the virtual driving vehicle of this model according to the input signal of the simulated driving pedal and the average acceleration value of a certain actual vehicle:
上式中:δ1模拟驾驶油门踏板的输入信号值,δ2模拟驾驶制动踏板刹车的输入信号值,δ1和δ2输入信号的取值范围都为[-32767,32767];In the above formula : δ1 simulates the input signal value of the accelerator pedal, δ2 simulates the input signal value of the driving brake pedal, and the value range of the input signal of δ1 and δ2 is [-32767, 32767];
c)根据当前加速度a,计算虚拟驾驶车辆的当前速度vD:c) Calculate the current speed v D of the virtual driving vehicle according to the current acceleration a:
vD=vD0+(a·Δt)×3.6 (6)v D = v D0 +(a·Δt)×3.6 (6)
上式中vD和vD0分别表示当前时刻和上一时刻的车辆速度,单位km/h,前后两次计算的间隔时间为Δt秒;In the above formula, v D and v D0 represent the vehicle speed at the current moment and the previous moment, respectively, in km/h, and the interval between the two calculations before and after is Δt seconds;
d)根据虚拟驾驶车辆的当前速度和姿态偏转角,动态改变场景视频播放速率系数k,所述场景视频播放速率系数k的表达式如下:d) according to the current speed and the attitude deflection angle of the virtual driving vehicle, dynamically change the scene video playback rate coefficient k, and the expression of the scene video playback rate coefficient k is as follows:
上式中kmax为最大播放速率系数,其值取决于计算机硬件配置高低,一般设定为2-3之间;v0为拍摄真实驾驶场景全景视频时相机的移动速度,vD为虚拟驾驶车辆的当前行驶速度,v0kmax为虚拟驾驶车辆允许的最大行驶速度;θ为虚拟驾驶车辆的姿态偏转角,其值由下式(8)计算。In the above formula, k max is the maximum playback rate coefficient, and its value depends on the computer hardware configuration, and is generally set between 2 and 3; v 0 is the moving speed of the camera when shooting panoramic videos of real driving scenes, and v D is virtual driving The current running speed of the vehicle, v 0 km max is the maximum allowed running speed of the virtual driving vehicle; θ is the attitude deflection angle of the virtual driving vehicle, and its value is calculated by the following formula (8).
进一步,所述的基于真实环境的虚拟驾驶场景建模方法还包括以下步骤:Further, the virtual driving scene modeling method based on the real environment also includes the following steps:
6)建立模拟驾驶方向盘输入信号与虚拟驾驶车辆在球体场景中位姿及横向位置的关系,具体步骤如下:6) Establish the relationship between the input signal of the simulated driving steering wheel and the pose and lateral position of the virtual driving vehicle in the spherical scene. The specific steps are as follows:
a)设定转向系数q=ωs/θs,其中ωs为模拟驾驶方向盘的单边最大旋转角度,θs为虚拟驾驶车辆转向轮的最大转向角度;a) Set the steering coefficient q=ω s /θ s , where ω s is the unilateral maximum rotation angle of the simulated driving steering wheel, and θ s is the maximum steering angle of the steering wheel of the virtual driving vehicle;
b)设定球体场景中虚拟驾驶车辆的姿态偏转角θ为:b) Set the attitude deflection angle θ of the virtual driving vehicle in the spherical scene as:
上式中ω为模拟驾驶方向盘的输入角度信号;In the above formula, ω is the input angle signal of the simulated driving steering wheel;
c)根据虚拟驾驶车辆的当前速度和姿态偏转角,得到汽车侧向平移速度vx:c) According to the current speed and attitude deflection angle of the virtual driving vehicle, obtain the lateral translation speed v x of the vehicle:
vx=vD·sinθ (9)v x = v D · sinθ (9)
d)设定球体场景中虚拟驾驶车辆的左右平移范围为Rc,当虚拟驾驶车辆平移范围在Rc之内时,即x∈[-Rc,Rc],虚拟驾驶车辆在当前车道的场景视频中左右移动;当平移的范围超出Rc时,即x<-Rc或x>Rc,将虚拟驾驶车辆在移动过程中切换到相邻车道的场景视频。d) Set the left and right translation range of the virtual driving vehicle in the spherical scene as R c . When the virtual driving vehicle translation range is within R c , that is, x∈[-R c ,R c ], the virtual driving vehicle is in the current lane. The scene video moves left and right; when the range of translation exceeds R c , that is, x<-R c or x>R c , the virtual driving vehicle switches to the scene video of the adjacent lane during the moving process.
本发明的有益效果:Beneficial effects of the present invention:
1、本发明基于真实环境的虚拟驾驶场景建模方法,通过真实全景视频来搭建虚拟驾驶场景,建模效率高,并解决了现有汽车模拟驾驶产品采用3D建模搭建场景耗时长,搭建的场景与真实场景差距大的技术问题;通过将虚拟相机与VR头盔关联,驾驶员可以身临其境的观察球体模型中的驾驶场景,驾驶真实感强。1. The present invention is based on the virtual driving scene modeling method of the real environment. The virtual driving scene is built through the real panoramic video, and the modeling efficiency is high. It also solves the problem that the existing automobile simulation driving products adopt 3D modeling to build the scene, which is time-consuming and difficult to build. The technical problem is that there is a large gap between the scene and the real scene; by associating the virtual camera with the VR helmet, the driver can observe the driving scene in the spherical model immersively, and the driving reality is strong.
2、本发明基于真实环境的虚拟驾驶场景建模方法,其通过将虚拟驾驶车辆的加减速和场景视频的播放速率相结合,将虚拟驾驶车辆姿态和横向位置变化与方向盘输入关联,能实现在所建驾驶场景中使虚拟驾驶车辆与人互动,驾驶真实感强。2. The virtual driving scene modeling method based on the real environment of the present invention combines the acceleration and deceleration of the virtual driving vehicle with the playback rate of the scene video, and associates the posture and lateral position changes of the virtual driving vehicle with the steering wheel input. In the built driving scene, the virtual driving vehicle interacts with people, and the driving reality is strong.
附图说明Description of drawings
图1为球体场景模型。Figure 1 shows the sphere scene model.
图2为球体场景模型效果图。Figure 2 is the rendering of the sphere scene model.
图3为虚拟驾驶车辆偏转动作示意图。FIG. 3 is a schematic diagram of a deflection action of a virtual driving vehicle.
具体实施方式Detailed ways
下面结合附图和实施例对本发明作进一步描述。The present invention will be further described below with reference to the accompanying drawings and embodiments.
本实施例基于真实环境的虚拟驾驶场景建模方法,包括以下步骤:The virtual driving scene modeling method based on the real environment in this embodiment includes the following steps:
1)使用全景相机在固定移动速度下拍摄真实驾驶场景的全景视频,视频即若干连续图片;所述全景相机在拍摄过程中的设置高度与驾驶员在车辆上的眼睛高度一致。本实施例中,全景相机是Insta360公司出品的Insta360ONE,该相机拥有防抖功能,能够在很大程度上消除在拍摄过程中相机移动时带有的震动和摇晃。当然在不同实施例中还可采用其它型号的全景相机。1) Use a panoramic camera to shoot a panoramic video of the real driving scene at a fixed moving speed, the video is several consecutive pictures; the setting height of the panoramic camera during the shooting process is consistent with the driver's eye height on the vehicle. In this embodiment, the panoramic camera is Insta360ONE produced by Insta360 Company. The camera has an anti-shake function, which can largely eliminate vibration and shaking when the camera moves during the shooting process. Of course, other types of panoramic cameras can also be used in different embodiments.
2)在Unity3D的虚拟空间中建立一个球体模型,通过编辑球体模型着色器,将拍摄的全景视频贴到球体内侧。2) Create a sphere model in the virtual space of Unity3D, and paste the panoramic video shot inside the sphere by editing the sphere model shader.
3)将一个车体模型放入球体场景的球心位置,作为虚拟驾驶车辆。3) Put a car body model into the center of the spherical scene as a virtual driving vehicle.
4)将一个虚拟相机放入车体模型的驾驶员位置,且虚拟相机的设置高度与驾驶员在车体模型上的眼睛高度一致;并将驾驶员佩戴的VR头盔的开发包中实现同步的脚本添加到虚拟相机上,以使检测VR头盔在三维空间中坐标位置和旋转角度的三维空间跟踪定位器所采集到的坐标和角度信息,作为虚拟相机的同步脚本参考输入,从而使虚拟相机跟随VR头盔同步转动;并将虚拟相机捕获的当前转角方向上的场景图像输入VR头盔。4) Put a virtual camera in the driver's position of the vehicle body model, and the setting height of the virtual camera is consistent with the height of the driver's eyes on the vehicle body model; and realize the synchronization in the development kit of the VR helmet worn by the driver. The script is added to the virtual camera, so that the coordinate and angle information collected by the 3D space tracking locator that detects the coordinate position and rotation angle of the VR headset in the 3D space can be used as the reference input of the synchronization script of the virtual camera, so that the virtual camera can follow The VR helmet rotates synchronously; and the scene image in the current corner direction captured by the virtual camera is input into the VR helmet.
本实施例中,在虚拟空间中建立一个球体模型,将拍摄的全景视频贴到球体内侧采用Unity3D游戏引擎完成。本实施例选用由Install360ONE全景相机拍摄的3840*1920@30fps格式的视频素材,将视频素材导入到Unity3D引擎的工程中去,随后开始建立球体场景。在Unity3D的虚拟空间中建立一个球体模型对象,对该对象添加VideoPlayer组件。VideoPlayer是Unity3D内置的组件,使用该组件并配合相应的API,能实现在Unity3d中播放视频并进行切换、暂停、调整播放速率等功能。添加组件后进行设置,渲染模式RenderMode表示图像显示的方式,包括Camera Far Plane,Camera Near Plane,Render texture和Material Override四种方式。结合实际情况,需要将画面显示到球体模型上,适用Material Override模式,同理,在Renderer项选择球体Sphere。组建中,Source表示视频源,可以通过直接选用工程中视频文件和通过URL选择视频存储在计算机中的存储位置两种方式来选择视频源。In this embodiment, a sphere model is established in the virtual space, and the captured panoramic video is pasted inside the sphere using the Unity3D game engine. In this example, the video material in the 3840*1920@30fps format shot by the Install360ONE panoramic camera is selected, and the video material is imported into the project of the Unity3D engine, and then the sphere scene is created. Create a sphere model object in the virtual space of Unity3D, and add a VideoPlayer component to the object. VideoPlayer is a built-in component of Unity3D. Using this component and with the corresponding API, you can play video in Unity3d and perform functions such as switching, pausing, and adjusting the playback rate. After adding the component, set it. The rendering mode RenderMode indicates the way the image is displayed, including Camera Far Plane, Camera Near Plane, Render texture and Material Override. Combined with the actual situation, the screen needs to be displayed on the sphere model, and the Material Override mode is applicable. Similarly, select the sphere in the Renderer item. In the construction, Source represents the video source, and the video source can be selected by directly selecting the video file in the project or by selecting the storage location where the video is stored in the computer through the URL.
VideoPlayer组件设置完成后,视频会在球体模型对象的表面进行显示。场景搭建是将主观视角放置于球心,这样便能观看四周的景象,因此需要修改Shader文件将视频的渲染位置改为球体的内表面。Shader是计算机图形渲染管线的一部分,它通过一段代码程序表明场景中物体的渲染方式。这个过程包括计算颜色和着色区域等,然后将其给予对象,让对象进行显示。通过修改Shader文件,将球体模型的渲染位置改为球体内侧,同时将渲染亮度改成常亮(即取消Unity3d中的光照系统影响)。After the VideoPlayer component is set up, the video will be displayed on the surface of the sphere model object. The scene construction is to place the subjective perspective at the center of the sphere, so that you can watch the surrounding scene, so you need to modify the Shader file to change the rendering position of the video to the inner surface of the sphere. Shader is part of the computer graphics rendering pipeline, it uses a piece of code to indicate how objects in the scene are rendered. This process involves calculating colors and shading areas, etc., and then giving them to objects to display them. By modifying the Shader file, change the rendering position of the sphere model to the inside of the sphere, and change the rendering brightness to always bright (that is, cancel the influence of the lighting system in Unity3d).
在视频组件和Shader文件处理完成后,将一个虚拟相机Camera对象放入车体模型的驾驶员位置,作为驾驶员主观视角;并将VR开发包中的实现同步脚本添加到虚拟相机Camera对象上,这样在程序运行时,定位器将检测VR头盔在现实环境中的角度和位置,然后将检测到的角度和位置作为同步脚本参考输入,来控制虚拟相机的角度和位置,从而使虚拟相机跟随VR头盔同步转动,并将虚拟相机捕获的当前转角方向上的场景图像输入VR头盔。当系统运行时,驾驶员戴上VR头盔就能观看到球体场景内四周的真实环境,非常贴近现实。After the video components and Shader files are processed, a virtual camera Camera object is placed in the driver's position of the vehicle body model as the driver's subjective perspective; and the implementation synchronization script in the VR development kit is added to the virtual camera Camera object, In this way, when the program is running, the locator will detect the angle and position of the VR headset in the real environment, and then use the detected angle and position as the reference input of the synchronization script to control the angle and position of the virtual camera, so that the virtual camera follows the VR The helmet rotates synchronously, and the scene image in the current corner direction captured by the virtual camera is input to the VR helmet. When the system is running, the driver can watch the real environment around the spherical scene by wearing the VR helmet, which is very close to reality.
作为对本实施例的改进,所述的基于真实环境的虚拟驾驶场景建模方法还包括以下步骤:As an improvement to this embodiment, the described real environment-based virtual driving scene modeling method further includes the following steps:
5)建立场景变化速度与模拟驾驶脚踏板输入信号的关系,具体步骤如下:5) Establish the relationship between the scene change speed and the input signal of the simulated driving pedal. The specific steps are as follows:
a)根据某种实际车辆的动力学参数,计算该车的平均加速度值,包括油门平均加速度ac1和刹车平均加速度ac2:a) According to the dynamic parameters of a certain actual vehicle, calculate the average acceleration value of the vehicle, including the average acceleration a c1 of the accelerator and the average acceleration a c2 of the brake:
上式中v10和v11分别表示油门加速过程的初始速度和终了速度,单位km/h,油门加速时间为Δt1秒;v20和v21分别表示刹车减速过程的初始速度和终了速度,单位km/h,刹车减速时间为Δt2秒;In the above formula, v 10 and v 11 represent the initial speed and final speed of the accelerator acceleration process, respectively, in km/h, and the accelerator acceleration time is Δt 1 second; v 20 and v 21 represent the initial speed and final speed of the braking deceleration process, respectively, The unit is km/h, and the braking deceleration time is Δt 2 seconds;
b)根据模拟驾驶脚踏板的输入信号和某种实际车辆的平均加速度值,计算该型号虚拟驾驶车辆的油门加速度a1、刹车加速度a2和当前加速度a:b) Calculate the accelerator acceleration a 1 , the braking acceleration a 2 and the current acceleration a of the virtual driving vehicle of this model according to the input signal of the simulated driving pedal and the average acceleration value of a certain actual vehicle:
上式中:δ1模拟驾驶油门踏板的输入信号值,δ2模拟驾驶制动踏板刹车的输入信号值,δ1和δ2输入信号的取值范围都为[-32767,32767];In the above formula : δ1 simulates the input signal value of the accelerator pedal, δ2 simulates the input signal value of the driving brake pedal, and the value range of the input signal of δ1 and δ2 is [-32767, 32767];
c)根据当前加速度a,计算虚拟驾驶车辆的当前速度vD:c) Calculate the current speed v D of the virtual driving vehicle according to the current acceleration a:
vD=vD0+(a·Δt)×3.6 (6)v D = v D0 +(a·Δt)×3.6 (6)
上式中vD和vD0分别表示当前时刻和上一时刻的车辆速度,单位km/h,前后两次计算的间隔时间为Δt秒;In the above formula, v D and v D0 represent the vehicle speed at the current moment and the previous moment, respectively, in km/h, and the interval between the two calculations before and after is Δt seconds;
d)根据虚拟驾驶车辆的当前速度和姿态偏转角,动态改变场景视频播放速率系数k,所述场景视频播放速率系数k的表达式如下:d) according to the current speed and the attitude deflection angle of the virtual driving vehicle, dynamically change the scene video playback rate coefficient k, and the expression of the scene video playback rate coefficient k is as follows:
上式中kmax为最大播放速率系数,其值取决于计算机硬件配置高低,一般设定为2-3之间;v0为拍摄真实驾驶场景全景视频时相机的移动速度,vD为虚拟驾驶车辆的当前行驶速度,v0kmax为虚拟驾驶车辆允许的最大行驶速度;θ为虚拟驾驶车辆的姿态偏转角,其值由下式(8)计算。In the above formula, k max is the maximum playback rate coefficient, and its value depends on the computer hardware configuration, and is generally set between 2 and 3; v 0 is the moving speed of the camera when shooting panoramic videos of real driving scenes, and v D is virtual driving The current running speed of the vehicle, v 0 km max is the maximum allowed running speed of the virtual driving vehicle; θ is the attitude deflection angle of the virtual driving vehicle, and its value is calculated by the following formula (8).
本实施例中素材录制时的相机移动速度v0保持在20km/h,拍得的全景视频帧率30fps,由于虚拟驾驶系统主要面向驾驶学员,因此本实施例中设定系统中虚拟驾驶车辆的最高行驶速度v0kmax为60km/h(当然在具体实施中,最高行驶速度v0kmax还可根据需要设定为其它值),此时当虚拟驾驶车辆沿着图3中Y方向行驶时,视频播放最大速率kmax为3。通过动态的调控视频的播放速率,即能实现让虚拟驾驶车辆以不同行驶速度。In this embodiment, the moving speed v 0 of the camera during material recording is kept at 20km/h, and the frame rate of the captured panoramic video is 30fps. Since the virtual driving system is mainly oriented to driving students, the virtual driving vehicle in the system is set in this embodiment. The maximum travel speed v 0 km max is 60km/h (of course, in the specific implementation, the maximum travel speed v 0 km max can also be set to other values as required). , the maximum video playback rate km max is 3. By dynamically adjusting the playback rate of the video, the virtual driving vehicle can be driven at different speeds.
作为对本实施例的进一步改进,所述的基于真实环境的虚拟驾驶场景建模方法还包括以下步骤:As a further improvement to this embodiment, the virtual driving scene modeling method based on the real environment further includes the following steps:
6)建立模拟驾驶方向盘输入信号与虚拟驾驶车辆在球体场景中位姿及横向位置的关系,具体步骤如下:6) Establish the relationship between the input signal of the simulated driving steering wheel and the pose and lateral position of the virtual driving vehicle in the spherical scene. The specific steps are as follows:
a)设定转向系数q=ωs/θs,其中ωs为模拟驾驶方向盘的单边最大旋转角度,θs为虚拟驾驶车辆转向轮的最大转向角度;a) Set the steering coefficient q=ω s /θ s , where ω s is the unilateral maximum rotation angle of the simulated driving steering wheel, and θ s is the maximum steering angle of the steering wheel of the virtual driving vehicle;
b)设定球体场景中虚拟驾驶车辆的姿态偏转角θ为:b) Set the attitude deflection angle θ of the virtual driving vehicle in the spherical scene as:
上式中ω为模拟驾驶方向盘的输入角度信号;In the above formula, ω is the input angle signal of the simulated driving steering wheel;
c)根据虚拟驾驶车辆的当前速度和姿态偏转角,得到汽车侧向平移速度vx:c) According to the current speed and attitude deflection angle of the virtual driving vehicle, obtain the lateral translation speed v x of the vehicle:
vx=vD·sinθ (9)v x = v D · sinθ (9)
d)设定球体场景中虚拟驾驶车辆的左右平移范围为Rc,当虚拟驾驶车辆平移范围在Rc之内时,即x∈[-Rc,Rc],虚拟驾驶车辆在当前车道的场景视频中左右移动;当平移的范围超出Rc时,即x<-Rc或x>Rc,将虚拟驾驶车辆在移动过程中切换到相邻车道的场景视频。d) Set the left and right translation range of the virtual driving vehicle in the spherical scene as R c . When the virtual driving vehicle translation range is within R c , that is, x∈[-R c ,R c ], the virtual driving vehicle is in the current lane. The scene video moves left and right; when the range of translation exceeds R c , that is, x<-R c or x>R c , the virtual driving vehicle switches to the scene video of the adjacent lane during the moving process.
本实施例中,所述的Rc=0.5r,其中r为球体模型S的半径,在实际使用中设定Rc=0.5r能获得自然的变道效果。In this embodiment, the R c =0.5r, where r is the radius of the spherical model S, and setting R c =0.5r in actual use can obtain a natural lane change effect.
最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be Modifications or equivalent substitutions without departing from the spirit and scope of the technical solutions of the present invention should be included in the scope of the claims of the present invention.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910434833.1A CN110109552B (en) | 2019-05-23 | 2019-05-23 | Modeling method of virtual driving scene based on real environment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910434833.1A CN110109552B (en) | 2019-05-23 | 2019-05-23 | Modeling method of virtual driving scene based on real environment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110109552A CN110109552A (en) | 2019-08-09 |
| CN110109552B true CN110109552B (en) | 2020-06-05 |
Family
ID=67491926
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910434833.1A Active CN110109552B (en) | 2019-05-23 | 2019-05-23 | Modeling method of virtual driving scene based on real environment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110109552B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112033694A (en) * | 2020-08-31 | 2020-12-04 | 安徽江淮汽车集团股份有限公司 | Natural driving working condition rack test method, device, equipment and storage medium |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111142261A (en) * | 2020-01-17 | 2020-05-12 | 福州大学 | A 360 panoramic video interactive experience method based on riding mode |
| CN111131915A (en) * | 2020-01-17 | 2020-05-08 | 福州大学 | Panoramic video interactive playing method based on laser radar |
| CN111131916A (en) * | 2020-01-17 | 2020-05-08 | 福州大学 | Panoramic video interactive playing method based on treadmill |
| CN111093036A (en) * | 2020-01-17 | 2020-05-01 | 福州大学 | VR panoramic video interactive playing method based on limb recognition |
| CN112885185A (en) * | 2021-01-22 | 2021-06-01 | 内蒙古巨宇测绘有限公司 | Driving simulation method and device |
| CN112613130B (en) * | 2021-03-05 | 2021-07-02 | 成都飞机工业(集团)有限责任公司 | Dimensional positioning pose simulation matching method based on two three-coordinate positioners |
| CN113781661B (en) * | 2021-09-13 | 2023-06-27 | 太仓中科信息技术研究院 | Immersion scene-oriented multi-projection space layout evaluation method and system |
| CN114089890B (en) * | 2021-09-18 | 2024-08-02 | 北京城市网邻信息技术有限公司 | Vehicle simulated driving method, apparatus, storage medium and program product |
| CN113850334A (en) * | 2021-09-26 | 2021-12-28 | 浙江天行健智能科技有限公司 | Sample collection, construction and prediction method and equipment of road type prediction model |
| CN116126150B (en) * | 2023-04-13 | 2023-06-27 | 北京千种幻影科技有限公司 | Simulated driving system and method based on live-action interaction |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105898337A (en) * | 2015-11-18 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Panoramic video display method and device |
| CN106527857A (en) * | 2016-10-10 | 2017-03-22 | 成都斯斐德科技有限公司 | Virtual reality-based panoramic video interaction method |
| CN107888894A (en) * | 2017-10-12 | 2018-04-06 | 浙江零跑科技有限公司 | A kind of solid is vehicle-mounted to look around method, system and vehicle-mounted control device |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016135472A1 (en) * | 2015-02-25 | 2016-09-01 | Bae Systems Plc | Immersive vehicle simulator apparatus and method |
-
2019
- 2019-05-23 CN CN201910434833.1A patent/CN110109552B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105898337A (en) * | 2015-11-18 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Panoramic video display method and device |
| CN106527857A (en) * | 2016-10-10 | 2017-03-22 | 成都斯斐德科技有限公司 | Virtual reality-based panoramic video interaction method |
| CN107888894A (en) * | 2017-10-12 | 2018-04-06 | 浙江零跑科技有限公司 | A kind of solid is vehicle-mounted to look around method, system and vehicle-mounted control device |
Non-Patent Citations (1)
| Title |
|---|
| 基于Unity3D的汽车功能模拟与驾驶场景演示系统的设计和实现;张茜;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20170315(第3期);正文第1-58页 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112033694A (en) * | 2020-08-31 | 2020-12-04 | 安徽江淮汽车集团股份有限公司 | Natural driving working condition rack test method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110109552A (en) | 2019-08-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110109552B (en) | Modeling method of virtual driving scene based on real environment | |
| CN110097799B (en) | Virtual driving system based on real scene modeling | |
| CN111161422A (en) | Model display method for enhancing virtual scene implementation | |
| CN105344101A (en) | Frame and mechanical motion synchronization simulation racing car equipment and simulation method | |
| CN103258338A (en) | Method and system for driving simulated virtual environments with real data | |
| US6384834B1 (en) | Three-dimensional simulator apparatus and image synthesis method using texture computation and texture information storage | |
| US20110181711A1 (en) | Sequential image generation | |
| KR100816622B1 (en) | Image processing apparatus and image processing method | |
| CN118675379A (en) | Virtual reality interactive teaching system based on naked eye 3D display technology | |
| JPH11175748A (en) | Image generation device and information storage medium | |
| CN108333956A (en) | Anti- solution linkage algorithm for movement simulation platform | |
| CN115798296A (en) | Vehicle training simulator and simulation method | |
| JP5165819B2 (en) | Image processing method and image processing apparatus | |
| JP2001028064A (en) | Image processing method of game machine and storage part stored with program capable of implementing the method | |
| US20260027473A1 (en) | Using Game Metadata to Animate User-Generated Object in Video Game | |
| US20260027471A1 (en) | Using gaussian representations of objects in computer game to insert user-generated content into game | |
| JP2898578B2 (en) | Simulation apparatus and image composition method | |
| JP4861862B2 (en) | Program, information storage medium, and image generation system | |
| US11182978B1 (en) | Rendering virtual content with coherent visual properties | |
| JP3254091B2 (en) | Three-dimensional simulator device and image synthesizing method | |
| US20260027470A1 (en) | Using Volumetric Representations of Objects from Video to Insert User-Generated Content Into Video | |
| US20260027472A1 (en) | Extracting game metadata to apply to volumetric representations of objects | |
| US20260027474A1 (en) | Unsupervised Extraction of Shared Group Correspondences in Video Game for Highlighting User-Generated Content in Game | |
| JP3752081B2 (en) | 3D simulator apparatus and image composition method | |
| US20250256207A1 (en) | Displaying levels of detail of 2d and 3d objects in virtual spaces |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |





















