The construction method of distinctive mark object in Vehicular automatic driving virtual environment
Technical field
The technical field that the present invention relates to both pattern-recognitions and intelligence system in conjunction with the vehicles, and in particular to a kind of
The construction method of the building of marker and the virtual environment including the marker in Vehicular automatic driving virtual environment.
Background technique
With the improvement of people's living standards, the vehicles such as car become the main walking-replacing tool of people, and traffic
The intelligence of tool also increasingly makes trip more simple.In some cases, vehicle can be performed automatically driving task,
For example, opening the vehicles such as the common family-sized car of Function for Automatic Pilot, bus, truck, or can also be driven for nobody
The vehicles such as family-sized car, bus, the truck sailed.Vehicle needs to be determined according to preconfigured vehicle when executing automatic Pilot
Plan planning algorithm obtains Vehicle Decision Method line, and then according to the Vehicle Decision Method line, executes automatic Pilot task.
The process that real steering vectors are arrived in emulation is all deferred in the exploitation of automated driving system, and Virtual Simulative Experiment is as a kind of zero wind
Danger, iteratively faster, reproducible test method have established solid foundation for the technical drive test examination of automatic Pilot.Emulation can be with
Quickly and effectively the correctness of algorithm is tested with performance.
It realizes emulation experiment, virtual environment need to be built for emulation experiment.Currently, when building virtual environment, for road
Condition or acquiring for carriage way contextual data such as need expensive acquisition equipment, or need to drive to roam everywhere big at the acquisition difficulty
Mode acquire, or because extreme event is extremely difficult occur due to do not acquire the data of sufficient amount.The special mark being especially directed to
Will object, such as: road, lane line, traffic sign, street lamp, trees etc., although these be it is common in daily, drive at nobody
It sails the marker that hardly possible is simulated in the prior art under simulated environment and also lacks emulation data true to nature.In order to overcome above-mentioned difficulties, this
Application proposes a kind of Vehicular automatic driving virtual environment building method and the wherein construction method of distinctive mark object.
Summary of the invention
In view of the deficiencies of the prior art, the present invention provides specific type marker in a kind of Vehicular automatic driving virtual environment
Construction method, it is characterised in that: the marker be include road, lane line, traffic sign, street lamp, trees, mountainous region, bridge
With the traffic traveling marker or road roadside natural object in building at least including any one;It the described method comprises the following steps,
Step I: it determines the version for needing to generate the specific type marker, obtains corresponding model parameter;
Step II: calling application programming interfaces corresponding with the specific type marker model, and execute generating algorithm,
To obtain the marker object factory compatible with virtual scene;
Step III: marker object is output to memory;
Wherein, the generating algorithm includes road generating algorithm, and the connection place A and B are set in the road generating algorithm
The straight highway in place;Assuming that the coordinate in the place A is PA, the coordinate in the place B is PB, then the anywhere P (t) on highway can be with
It indicates are as follows:
P (t)=P0+(P1-P0) t=(1-t) P0+tP1, t ∈ [0,1];
If highway is conic section, because the conic section in plane is determined by three points, it is assumed that three coordinates are
P0,P1And P2, have:
P (t)=(1-t)2P0+2t(1-t)P1+t2P2, t ∈ [0,1];
With this conic section formula recurrence, a highway can be described with arbitrary finite dimension curve, formula are as follows:
Wherein n indicates the dimension of curve.
Another aspect of the present invention provides a kind of Vehicular automatic driving virtual environment building method, which is characterized in that including
Following steps:
Step 1: the modeling and generation of virtual scene, for establishing virtual target object model in virtual scene;
Step 2: the acquisition of virtual data and signal by generating virtual-sensor in virtual scene, and uses calculating
Machine graphics algorithm obtains the relative coordinate relationship between virtual target object and virtual-sensor, and generates packet based on this
Containing the virtual data and virtual signal including image, distance;
Step 3: automatically generating specific type marker by application programming interfaces in virtual scene;
Step 4: being based on the specific type marker, map element and resource in dynamically load virtual scene;
Step 5: according to the virtual data and signal, interesting target in virtual scene being labeled, passes through setting
Some part of corresponding application programming interfaces, some object interested to user in virtual scene or object into
Rower note returns to attribute value of the interesting target object in virtual scene;
Step 6: the method based on kinetic model and the step 1, step 2 and step 3, simulated in virtual scene into
Row automated driving system marginal testing;
Step 7: the method based on step 1, step 2 and step 5 tests the identification of automated driving system in virtual scene
As a result.
Further are as follows: in the step 1, the virtual scene is modeled as establishing various virtual target objects in virtual scene
Model, the virtual target object be natural scene including blue sky, white clouds, lake and including building, road, pedestrian,
Made Target including vehicle, traffic sign object;The virtual scene is generated as virtual target object and behavior in scene set
Process.
Further are as follows: the modeling of the virtual scene includes the following steps,
Step 1.11: establishing the three-dimensional grid description of virtual target object;
Step 1.12: carrying out surface textures for virtual target object;
Step 1.13: adjusting the illumination of virtual scene, and the shade of virtual target object is set according to illumination.
Further are as follows: the generation of the virtual scene includes the following steps,
Step 1.21: choosing the virtual target object for needing to be placed in virtual scene according to demand;
Step 1.22: virtual target object is placed in the specified coordinate in virtual scene coordinate system;
Step 1.23: loading the behavioural characteristic of specific virtual target object, generate dynamic virtual scene.
Further are as follows: in the step 2, virtual-sensor is generated in virtual scene, and calculate using computer graphics
Method obtains the relative coordinate relationship between virtual target object and virtual-sensor, and raw based on the relative coordinate relationship
At include image and distance including virtual data and virtual signal.
Further are as follows: the step 2 includes the following steps,
Step 2.1: obtaining coordinate of the virtual subject vehicle in moment t in virtual scene;
Step 2.2: according to the relative positional relationship of actual sensor and true main body vehicle, be arranged virtual-sensor in when
Carve coordinate of the t in virtual scene;
Step 2.3: according to the signal acquisition mode of actual sensor, calling application programming interfaces in virtual scene from void
Data or signal required for being obtained in quasi- scene;
Step 2.4: virtual data and signal that t moment is got are returned to the work for needing the virtual data and signal
Module;
Wherein, t is time constant.
Further are as follows: the step 4 includes the following steps,
Step 4.1: receiving the request of the load virtual scene of virtual environment analogue system;
Step 4.2: positioning and parse basic map file, and map file carries out uniform coordinate transformation over the ground;
Step 4.3: for the natural marker manually drawn including trees, mountainous region, being loaded into from memory corresponding
Fine arts resource, and the corresponding position of virtual scene is placed into map coordinates system after unified;
Step 4.4: for the dynamic symbol object of the dynamic generation including road, lane line, from memory file
It is loaded into the description resource of dynamic symbol object, and is placed into the corresponding position of virtual scene after unified with map coordinates system.
Further are as follows: the step 5 includes the following steps,
Step 5.1: user carries out language description to interesting target with specific description language;
Step 5.2: rendering engine converts language description to the interesting target set for needing to mark in virtual scene;
Step 5.3: whether search engine there is the step in real-time detection virtual scene when virtual scene is run
Interesting target in 5.2, and return to when occurring the attribute value of online interesting target.
Further are as follows: the step 6 comprises the following steps,
Step 6.1: the input parameter of control loop and the status data of main body vehicle under acquisition true environment;
Step 6.2: according to the specific type marker in the virtual scene and step 3 in the step 1, in virtual scene
The kinetic parameters of middle setting virtual subject vehicle, and the input parameter in the step 6.1 is passed into automatic Pilot
System is iterated tuning;It is less than when being differed between the status data and the status data of true main body vehicle of virtual subject vehicle
Threshold value extremely, stops tuning, obtains test kinetic parameters;
Step 6.3: test kinetic parameters being substituted into virtual scene, and execute the side of automated driving system
Boundary's test.
Further are as follows: the marginal testing in the step 6.3 is, specific virtual when substituting into test kinetic parameter
After scene, then given automated driving system input range I, the automated driving system, which executes, orders and generates result accordingly result
Range O;Wherein, the input range I of automated driving system includes adopting in virtual scene and the step 2 that the step 1 exports
The virtual data and signal of collection.
Further are as follows: the input of automated driving system includes throttle, brake, steering wheel angle, the shape of virtual subject vehicle
State data include displacement, speed, steering angle of automobile etc..
Further are as follows: the step 7 includes the following steps,
Step 7.1: test scene is established by the step 1;
Step 7.2: starting the test scene, acquired in real time by the step 2 and simulate camera shooting in the test scene
Head data and sensor information;
Step 7.3: interesting target in the test scene is obtained by the step 5;
Step 7.4: by the simulation camera data and biography in the test scene and the step 7.2 in the step 7.1
Sensor information is passed to automated driving system algorithm, and obtains the output result of automatic Pilot algorithm;
Step 7.5: by output knot described in the calibration value of interesting target in the step 7.3 and the step 7.4
Fruit is compared, and assesses the performance of automated driving system algorithm;
Step 7.6: when output algorithm result and calibration value are inconsistent, recording in automated driving system in parameter at that time
With environmental data.
Inventive point and its advantages of the invention includes but is not limited to following aspect:
For the distinctive mark object under virtual environment, the prior art also lacks analogy method true to nature, especially common
Road.And in unmanned Simulation Test Environment, road is accurately drawn and controlled, can be the place of later data
Reason provides data and supports.Present invention comprises the distinctive mark object generation methods including road generating algorithm can be very good to solve
The accurate Drawing of road and the control for being needed and being carried out according to emulation adjust.Especially with algorithm in the prior art simultaneously
Not for being used in the emulation of unmanned virtual environment.But invention uses the algorithm in terms of actual simulated effect, with reality
The data that road collects have the very high goodness of fit.
The present invention generates virtual target object and specific type marker by program software, to replace the scene of real world
With the collection process of marker, avoid reducing cost using expensive acquisition equipment;
Pass through;Automated driving system marginal testing is carried out by simulating in virtual scene, to obtain more true generation
Boundary is difficult the status data occurred, counter-measure of the optimization automated driving system to different situations;
In virtual scene test automated driving system recognition result method, for the performance to automated driving system into
Row analog detection solves the problems, such as lack of training samples in actual conditions.
Detailed description of the invention
Fig. 1 is specific type marker schematic diagram of construction method of the present invention;
Fig. 2 is Vehicular automatic driving virtual environment building method schematic diagram of the present invention;
Fig. 3 is the data flow diagram of step 7 in virtual environment building method in the present invention.
Specific embodiment
It elaborates with reference to the accompanying drawing to the present invention.
As shown in Figure 1, for the method flow of specific type marker building in the present invention.It mainly includes three steps
It is rapid: step I: to determine the version for needing to generate the specific type marker, obtain corresponding model parameter;
Step II: calling application programming interfaces corresponding with the specific type marker model, and execute generating algorithm,
To obtain the marker object factory compatible with virtual scene;
Step III: marker object is output to memory;
As shown in Fig. 2, the relation schematic diagram between each independent process of the present invention, arrow set out item to be relied on item, arrow
It is to rely on item that head, which is directed toward item,;A kind of Vehicular automatic driving virtual environment building method, comprising the following steps:
Step 1: the modeling and generation of virtual scene;
Step 2: the acquisition of virtual data and signal;
Step 3: specific type marker is automatically generated in virtual scene;
Step 4: being based on the specific type marker, map element and resource in dynamically load virtual scene;
Step 5: according to the virtual data and signal, interesting target in virtual scene being labeled;
Step 6: the method based on kinetic model and the step 1, step 2 and step 3, simulated in virtual scene into
Row automated driving system marginal testing;
Step 7: the method based on step 1, step 2 and step 5 tests the identification of automated driving system in virtual scene
As a result.
Wherein, the step 1 is the basis of automatic Pilot algorithm operation, is provided the foundation test data for algorithm;It is described
Virtual scene is modeled as establishing various virtual target object models in virtual scene, the virtual target object be include blue sky, it is white
Natural scene including cloud, lake and the made Target including building, road, pedestrian, vehicle, traffic sign object;Institute
State the process for being generated as virtual target object and behavior in scene set of virtual scene.
The modeling of the virtual scene includes the following steps that step 1.11: the three-dimensional grid for establishing virtual target object describes;
Step 1.12: carrying out surface textures for virtual target object;Step 1.13: adjusting the illumination of virtual scene, and be arranged according to illumination
The shade of virtual target object;
The generation of the virtual scene includes the following steps that step 1.21: selection needs to be placed in virtual scene according to demand
Virtual target object;Step 1.22: virtual target object is placed in the specified coordinate in virtual scene coordinate system;Step 1.23: adding
The behavioural characteristic for carrying specific virtual target object, generates dynamic virtual scene.
In the step 2, virtual-sensor is generated in virtual scene, and use computer graphics algorithm, obtain empty
Relative coordinate relationship between quasi- object and virtual-sensor, and being generated based on the relative coordinate relationship includes image
With the virtual data and virtual signal including distance.
The step 2 provides the approach for obtaining automatic Pilot algorithm basic data;This method refers in virtual scene
Virtual-sensor is generated, and uses computer graphics algorithm, obtains the opposite seat between virtual target object and virtual-sensor
Mark relationship, and the process of the virtual datas such as image, distance and virtual signal is generated based on this;Include the following steps, step
2.1: obtaining coordinate of the virtual subject vehicle in moment t in virtual scene;Step 2.2: according to actual sensor and true master
Coordinate of the virtual-sensor in moment t in virtual scene is arranged in the relative positional relationship of body vehicle;Step 2.3: according to true
The signal acquisition mode of sensor, calls the application programming interfaces in virtual scene, and application programming interfaces are obtained from virtual scene
Data required for taking or signal;Step 2.4: virtual data and signal that t moment is got being returned to and need the virtual number
According to and signal operational module;Wherein, t is time constant.Wherein, all programs can all have the reserved interface for obtaining data, i.e.,
Application programming interfaces are exactly to call directly a function in GTA, specify the attribute of the object and object that obtain data, just
The data of available corresponding attribute, the platform ground certainly naturally just have this interface, because all physical layer interfaces are all
It is to be write by programmer, the position of all objects and posture, the programmer's natural energy for creating this platform are taken;For example want vehicle
Position, directly just with the function of the position of vehicle, if it is desired to which some point (such as position of car light) on vehicle body is known
The accurate 3d model of road each car directly can be obtained by according to the position of vehicle plus this relative position put in a model.
The specific type marker is including road, lane line, traffic sign, street lamp, trees, mountainous region and building
Traffic travel marker;The step 3 is the marker of some common types in automatic Pilot analogue system, provides one
It kind can Unify legislation, easy generation method.This method is that each class mark is provided with a specific generating algorithm, system
These marks can be quickly generated by application programming interfaces, are eliminated the workload that art designing personnel model one by one, are improved and build
Imitate rate;Include the following steps, step 3.1: determining the version for needing to generate the specific type marker, obtain corresponding
Model parameter;Step 3.2: calling application programming interfaces corresponding with the specific type marker model, and execute generation
Algorithm, to obtain the marker object factory compatible with virtual scene;Step 3.3: marker object is output to memory;
Wherein, the generating algorithm includes road generating algorithm, and the connection place A and B are set in the road generating algorithm
The straight highway in place;Assuming that the coordinate in the place A is PA, the coordinate in the place B is PB, then the anywhere P (t) on highway can be with
It indicates are as follows:
P (t)=P0+(P1-P0) t=(1-t) P0+tP1,t∈[0,1];
If highway is conic section, because the conic section in plane is determined by three points, it is assumed that three coordinates are
P0,P1And P2, have:
P (t)=(1-t)2P0+2t(1-t)P1+t2P2,t∈[0,1];
With this conic section formula recurrence, a highway can be described with arbitrary finite dimension curve, formula are as follows:
Wherein n indicates the dimension of curve.
Provided herein is that road generating algorithm, it will be understood that other distinctive mark objects, which can also be adopted, to be generated algorithmically by.
In some embodiments, other distinctive mark objects in addition to road need to carry out the technology fine arts and now make model, are then introduced into.
The step 4 is for integrating virtual scene and its each element, the specific type mark generated in step 3
Object describes file usually independently of virtual scene file, and each element in virtual scene file may also position
In different physical files;This method is used for the Miscellaneous Documents used to virtual scene, such as map, dynamic symbol object, art designing
Model etc. is integrated;Include the following steps, step 4.1: receiving the request of the load virtual scene of virtual environment analogue system;
Step 4.2: positioning and parse basic map file, and map file carries out uniform coordinate transformation over the ground;Step 4.3:
For the natural marker manually drawn including trees, mountainous region, be loaded into corresponding fine arts resource from memory, and with ground
Figure coordinate system is placed into the corresponding position of virtual scene after reunification;Step 4.4: for the dynamic including road, lane line
The dynamic symbol object of generation is loaded into the description resource of dynamic symbol object from memory file, places and shows up in program operation
The corresponding position of scape, the i.e. position of these dynamic symbol objects are describing to describe in resource, directly put according to the parameter of the inside
Just.
The step 5 is used to provide basic data for the training process of automatic Pilot algorithm, with optimization algorithm performance;The party
Method refers in virtual scene, by the way that corresponding application programming interfaces, some mesh interested to user in virtual scene is arranged
Some part of mark object or object is labeled, and returns to the attribute values such as coordinate of the interesting target in virtual scene;Packet
Following steps are included, step 5.1: user carries out language description to interesting target with specific description language;Step 5.2: explaining
Engine converts language description to the interesting target set for needing to mark in virtual scene;Step 5.3: search engine is virtual
When scene is run, whether occur the interesting target in the step 5.2, and the return when occurring in real-time detection virtual scene
The attribute value of online interesting target.
The step 6 is used for the performance bounds of simulation test automated driving system, and optimization automated driving system is not to sympathizing with
The counter-measure of shape;The step is based on kinetic model and step 1, step, test automated driving system in given situations
Performance, and whether assessment of system performance reaches standard;Include the following steps, step 6.1: control loop under acquisition true environment
The status data of parameter and main body vehicle is inputted, the input of control loop includes throttle, brake, steering wheel angle etc., vehicle
Status data includes displacement, speed, steering angle of automobile etc.;Step 6.2: according to the virtual scene and step in the step 1
The kinetic parameters of virtual subject vehicle are arranged in specific type marker in rapid 3 in virtual scene, and by the step
Input parameter in rapid 6.1 passes to automated driving system and is iterated tuning;When the status data of virtual subject vehicle and true
Difference is less than threshold value extremely between the status data of real main body vehicle, stops tuning, obtains test kinetic parameters;Step
6.3: test kinetic parameters being substituted into virtual scene, and execute the marginal testing of automated driving system;
Wherein, the marginal testing in the step 6.3 is, when test kinetic parameter is substituted into specific virtual scene
Afterwards, then given automated driving system input range I, the automated driving system execute order and generate result accordingly result range
O;Wherein, the input range I of automated driving system includes acquiring in virtual scene and the step 2 that the step 1 exports
Virtual data and signal.
As shown in Fig. 2, each box indicates that an independent data processing unit, arrow indicate one group of independent data flow
To description of the arrow textual representation to this group of data.The step 7 is for carrying out simulation inspection to the performance of automated driving system
It surveys, it is therefore an objective to solve the problems, such as lack of training samples in actual conditions;Include the following steps, step 7.1: according to virtual scene
Definition and material are established by the step 1 close to true test scene, such as country road, highway, Urban Streets
Deng;Step 7.2: starting the test scene, simulation camera data in the test scene are acquired by the step 2 in real time
And sensor information;Step 7.3: interesting target in the test scene is obtained by the step 5;Step 7.4: will be described
Simulation camera data in test scene and the step 7.2 and sensor information in step 7.1 are passed to automatic Pilot system
System algorithm, and obtain the output result of automatic Pilot algorithm;Step 7.5: by the calibration value of interesting target in the step 7.3
It is compared with output result described in the step 7.4, assesses the performance of automated driving system algorithm;Step 7.6: when defeated
Out arithmetic result and calibration value it is inconsistent when, record automated driving system at that time parameter and environmental data.
The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention.The technology of the industry
Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and the above embodiments and description only describe this
The principle of invention, without departing from the spirit and scope of the present invention, various changes and improvements may be made to the invention, these changes
Change and improvement all fall within the protetion scope of the claimed invention.The claimed scope of the invention by appended claims and its
Equivalent thereof.