CN115062445A - Simulation scene construction method and system based on natural driving data - Google Patents

Simulation scene construction method and system based on natural driving data Download PDF

Info

Publication number
CN115062445A
CN115062445A CN202210304419.0A CN202210304419A CN115062445A CN 115062445 A CN115062445 A CN 115062445A CN 202210304419 A CN202210304419 A CN 202210304419A CN 115062445 A CN115062445 A CN 115062445A
Authority
CN
China
Prior art keywords
information
vehicle
scene
map
road
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.)
Pending
Application number
CN202210304419.0A
Other languages
Chinese (zh)
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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202210304419.0A priority Critical patent/CN115062445A/en
Publication of CN115062445A publication Critical patent/CN115062445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

A simulation scene building method and system based on natural driving data relate to a driving scene building technology in the technical field of automatic driving. The method solves the problems that the existing automatic driving scene construction method depends on manual construction, has poor transportability and can not completely restore all dynamic information. The method comprises the steps of collecting scene data obtained under the natural driving condition as a basis; extracting csv information therefrom; transferring the coordinates of the vehicle and the coordinates of the target vehicle into the same coordinate system; generating a static map by using the open source map OSM and the acquired scene data; projecting lane information, vehicle information and target vehicle information into the static map, and correcting road network information in the static map; converting the csv information into an xml format file through an SCP instruction; and importing the static map and the xml format file after the road network information is corrected into a VTD (virtual traffic display) to generate a dynamic graph by taking time as a trigger condition, and completing construction. The method is suitable for constructing the automatic driving scene.

Description

Natural driving data-based simulation scene construction method and system
Technical Field
The invention relates to the technical field of automatic driving, in particular to a construction technology of a driving scene.
Background
The test scene library is an effective support for safety development design and verification of the intelligent networked automobile and is fuel for ensuring the intelligent networked automobile to run on the road. If it turns out that unmanned vehicles are safer than ordinary driving, 100 vehicles are needed, 24 hours and a whole day, 40km/h are tested continuously for 225 years under various real scenes! Therefore, the virtual simulation test capability should be established, and firstly, a simulation scene meeting the test requirement is constructed. The reconstruction scenes can restore real data, can develop simulation tests, can greatly shorten the test verification period, and has an important propulsion effect on the development of the automatic driving function.
At present, most scene reconstruction methods are manually built, standards are not formed, transportability is poor, and the method is difficult to use across software. Moreover, the manual construction is uneven, and the single achievement is difficult to reproduce. Meanwhile, the logic scene is based on the extracted scene characteristics, and does not completely restore all dynamic information, thereby causing a series of errors to the virtual test.
Disclosure of Invention
The method solves the problems that the existing method for constructing the automatic driving scene depends on manual construction, has poor transportability and can not completely restore all dynamic information.
The simulation scene building method based on natural driving data comprises the following steps:
a scene data acquisition step for acquiring scene data obtained under natural driving conditions;
a csv information extraction step, which is used for extracting csv information from scene data, wherein the csv information comprises vehicle information, target vehicle information and lane information;
a vehicle coordinate conversion step, which is used for converting the terrestrial coordinate system of the vehicle into a terrestrial coordinate system;
a target vehicle coordinate conversion step, which is used for converting a local coordinate system where the target vehicle is located into a geodetic coordinate system;
a static map acquisition step, which is used for generating a static map by utilizing the open source map OSM and the acquired scene data;
a step of projecting road condition information, in which lane information, vehicle information after coordinate conversion and target vehicle information are projected into the static map, and road network information in the static map is corrected;
a file format conversion step, which is used for converting the csv information into an xml format file through an SCP instruction;
and a simulation scene building step, which is used for importing the static map and the xml format file after the road network information is corrected into a VTD to generate a dynamic map by taking time as a trigger condition, and completing the building of the simulation scene.
Further, the target vehicle is: all vehicles around the vehicle for collecting information can influence the driving behavior of the vehicle.
Preferably, the step of converting the coordinates of the target vehicle comprises the following steps: by the formula
x”=(x-m)cosθ+(y-n)sinθ
y”=(y-n)cosθ-(x-m)sinθ
The coordinate system is converted, in the formula, x and y are respectively the horizontal coordinate and the vertical coordinate of the vehicle in the local coordinate system, theta is the rotation angle of the local coordinate system converted into the transition coordinate system, m and n are the horizontal and vertical offsets of the transition coordinate system converted into the geodetic coordinate system, and x 'y' is the horizontal and vertical coordinates of the vehicle in the geodetic coordinate system.
Preferably, the process of the static map obtaining step is as follows:
reading the content in an open source map file generated by an OsmOpenStreetMap by adopting an open source simulator CARLA for automatic driving research, and converting the content into an OpenDRIVE format;
defaulting each road in the open source map osm to have two reference lines which are an incoming road and an outgoing road respectively;
and (3) expanding the lowest layer algorithm of the CARLA to the right according to the reference line to form two lanes by adopting an open source simulator CARLA.
Preferably, in the step of projecting the road condition information, the process of correcting the road network information in the static map is as follows:
a) calculating the shortest distance between the coordinates of the vehicle in each sampling point and a reference line in the open source map osm, and if the shortest distance meets the condition, determining that the sampling point is affiliated to the road where the reference line is located;
b) translating the reference line by combining the number of the lane to which the vehicle belongs, and drawing the lane of the vehicle and all surrounding lanes of the vehicle;
c) loading the isolation zone information by combining the type of the central isolation zone;
d) identifying a reference line closest to the current reference line, and defining the reference line as a lane-to-face reference line;
e) removing the opposite lane reference line, and simultaneously, symmetrically arranging the lanes on the side to be opposite to form an opposite lane;
f) and outputting the xodr map engineering file taking OpenDRIVE as the standard, namely the static map required by the final simulation scene.
Preferably, the process of the simulation scene construction step is as follows:
extracting the position and motion orientation information of the vehicle in the static map after the road network information is corrected by adopting an SCP command in VTD simulation software;
initiating a traffic participant in the simulated environment by command;
and (3) using rapidxml SDK quoted in c + + language, converting the constructed SCP instruction into a standard xml format, loading the SCP instruction and the static map file after the road network information is corrected to VTD software, previewing and finishing the construction of the simulation scene.
The method is realized by adopting computer software, so the invention also protects the following steps:
a computer storage medium is provided, in which a computer program is stored, and when the computer program runs, the simulation scene building method of the present invention is executed.
An electronic device, comprising: the simulation system comprises a processor and a memory, wherein the memory is used for storing executable instructions of the processor, and the processor is configured to execute the simulation scene building method provided by the invention by executing the executable instructions.
The method is realized by adopting computer software, and a system corresponding to the method comprises the following steps:
a simulation scene building system based on natural driving data comprises the following modules:
the scene data acquisition module is used for acquiring scene data obtained under the natural driving condition;
the csv information extraction module is used for extracting csv information from scene data, wherein the csv information comprises vehicle information, target vehicle information and lane information;
the vehicle coordinate conversion module is used for converting a terrestrial coordinate system where the vehicle is located into a terrestrial coordinate system;
the target vehicle coordinate conversion module is used for converting a local coordinate system where the target vehicle is located into a geodetic coordinate system;
the static map acquisition module is used for generating a static map by utilizing the open source map OSM and the acquired scene data;
the road condition information projection module is used for projecting lane information, the vehicle information after coordinate conversion and target vehicle information into the static map and correcting road network information in the static map;
the file format conversion module is used for converting the csv information into an xml format file through an SCP instruction;
and the simulation scene building module is used for importing the static map and the xml format file after the road network information is corrected into the VTD to generate a dynamic map by taking time as a trigger condition, and completing building of the simulation scene.
Preferably, the static map obtaining module further includes the following units:
the open source map osm acquisition unit is used for reading the content in the open source map file generated by the OsmOpenStreetMap by adopting an open source simulator CARLA for automatic driving research and converting the content into an OpenDRIVE format;
the road dividing unit is used for defaulting each road in the open source map osm to have two reference lines which are an incoming road and an outgoing road respectively;
and the lane expanding unit is used for expanding the lowest layer algorithm of the open source simulator CARLA to the right according to the reference line to form two lanes.
Preferably, the road condition information projection module further includes the following units:
the vehicle lane confirming unit is used for calculating the shortest distance between the coordinates of the vehicle in each sampling point and a reference line in the open source map osm, and if the shortest distance meets the condition, the sampling point is considered to be affiliated to the road where the reference line is located;
the lane drawing unit is used for translating the reference line by combining the number of the lane to which the vehicle belongs and drawing the lane of the vehicle and all surrounding lanes of the vehicle;
the isolation strip loading unit is used for loading the isolation strip information in combination with the type of the central isolation strip;
a lane reference line determining unit for identifying a reference line closest to the current reference line and defining it as an opposite lane reference line;
the object lane determining unit is used for deleting the opposite lane reference line and simultaneously symmetrical the lane at the side to the opposite lane to form the opposite lane;
and the static map output unit is used for outputting the xodr map engineering file taking OpenDRIVE as the standard, namely the static map required by the final simulation scene.
The method is based on a natural driving data acquisition result, applies VTD (Virtual Test Drive) software, and conducts simulation scene reconstruction by taking ASAM OpenDRIVE (static road traffic network descriptive file required by automatic driving simulation application) and OpenSCENARIO (ADAS recommended by European vehicle factories and tool providers and standard organization of intelligent driving) industry standards as guidance. OpenDRIVE corresponds to static road networks, openscoranio (a file describing the dynamic content of the driving simulator and traffic simulator) corresponds to vehicle dynamics.
The invention provides a method and a system for manually and automatically generating a simulation scene based on natural driving data, which have the following advantages:
1. based on a set of manual static road network and vehicle dynamic information construction method, according to selected scene elements, logic scenes are representatively extracted and restored. The generated engineering file has good portability and is suitable for multiple platforms and multiple software.
2. A set of tool chain for automatically generating simulation scenes is developed, data acquisition information and an open source map are input, and a large number of test cases are rapidly generated. The input of the labor cost is reduced, the error caused by manual construction is eliminated, and the output efficiency is improved.
3. And screening effective fields from a plurality of acquisition indexes, and classifying the effective fields for static and dynamic scene construction.
4. And the accurate matching of the vehicle position and the high-precision map is realized by a projection and coordinate conversion method.
5. According to the data acquisition result, the osm open source map and the csv data acquisition data are organically combined, the road network structure is effectively corrected, the number of lanes and the isolation zone are modified, and the map information is more real.
6. And the vehicle dynamic information is restored in real time by utilizing an SCP instruction, no packet loss occurs, 100% real restoration is realized, and the real world virtualization is realized.
The method and the system for manually and automatically generating the simulation scene based on the natural driving data are suitable for building the test scene in the technical field of automatic driving.
Drawings
Fig. 1 is a flowchart of manually building a simulation scene according to the first embodiment.
Fig. 2 is the 4 reference line shapes mentioned in the manual construction method.
Fig. 3 is a diagram of a road diversion model mentioned in the manual construction method.
Fig. 4 is a diagram of a triple intersection model mentioned in the manual construction method.
FIG. 5 is a preview result of an OpenX project file obtained by a manual construction method.
FIG. 6 is a flowchart illustrating a method for automatically generating a simulation scenario according to an embodiment.
Fig. 7 is a schematic diagram of the coordinate transformation process according to the fourth embodiment.
Fig. 8 shows the relative positional relationship between the target vehicle and the host vehicle according to the second embodiment.
Detailed description of the preferred embodiments
In order to make the technical solutions and advantages of the present invention clearer, several embodiments of the present invention will be described in further detail below with reference to the accompanying drawings, but the embodiments described below are only a part of the embodiments claimed in the present application, and not all of the embodiments.
The method for building the simulation scene based on the natural driving data comprises the following steps:
a scene data acquisition step for acquiring scene data obtained under natural driving conditions;
a csv information extraction step, which is used for extracting csv information from scene data, wherein the csv information comprises vehicle information, target vehicle information and lane information;
a vehicle coordinate conversion step, which is used for converting the terrestrial coordinate system of the vehicle into a terrestrial coordinate system;
a target vehicle coordinate conversion step, which is used for converting a local coordinate system where the target vehicle is located into a geodetic coordinate system;
a static map acquisition step, which is used for generating a static map by utilizing the open source map OSM and the acquired scene data;
a step of projecting road condition information, in which lane information, vehicle information after coordinate conversion and target vehicle information are projected into the static map, and road network information in the static map is corrected;
a file format conversion step, which is used for converting the csv information into an xml format file through an SCP instruction;
and a simulation scene building step, which is used for importing the static map and the xml format file after the road network information is corrected into a VTD to generate a dynamic map by taking time as a trigger condition, and completing the building of the simulation scene.
In the embodiment, the scene data acquisition step acquires scene data acquired under natural driving conditions. The natural driving condition refers to the condition that the vehicle runs under the natural scene of the nationwide public road through the driving test vehicle, and the scene data can be acquired in the driving process by the test vehicle running under the natural scene of the nationwide public road.
In practical application, driving test vehicles run on national public roads, and the running information of the test vehicles and all scene information around the test vehicles are collected in the running process, generally, one test vehicle runs on a road for at least 10 ten thousand kilometers, and scene data are collected in real time.
The test vehicle is a vehicle equipped with acquisition equipment, and the acquisition equipment comprises 6 4-line laser radars, 2 millimeter wave radars, 1 Mobiley sensor and 2 cameras and is used for acquiring running state information of the test vehicle and all image information around the test vehicle. From these information, scene elements required for simulation scene construction can be obtained, for example: the dynamic information such as the running speed and the position of the target vehicle can be obtained, and the lane line, the curvature information and the like of the current lane can be identified. Meanwhile, according to the information fed back by the gyroscope and the GPS combined inertial navigation of the test vehicle, all real-time state data of the vehicle required by the simulation scene construction can be obtained, for example: vehicle speed, vehicle driving posture light. The data are all real scene information, and the information is used as basic data for constructing the simulation scene, so that the simulation scene closer to the actual simulation scene can be obtained.
In the present embodiment, the csv information extraction step is to extract necessary information required for constructing the simulation scene, and includes, for example:
the vehicle information is used for constructing all vehicle information felt by a driver when a simulation scene is constructed so as to achieve the effect of truly reflecting the driving condition in time, and the generally extracted information at least comprises the following components: the vehicle time, the vehicle longitude longtude, the vehicle latitude, the vehicle motion orientation angle orientation, the vehicle pitch angle pitch, the vehicle yaw angle roll and the vehicle type;
the target vehicle information is to construct the state of the target vehicle around the host vehicle, and therefore, information required for constructing each target vehicle needs to be collected so as to actually present a dynamic image of the target vehicle in the simulation scene. The information generally extracted includes at least: target vehicle time obj _ time, target vehicle ID, longitudinal position posX of the target vehicle relative to the vehicle, lateral position posY of the target vehicle relative to the vehicle, orientation angle obj _ orientation of the target vehicle relative to the vehicle, and type obj _ type of the target vehicle;
the target vehicle type obj _ type is classified by vehicle type, for example: passenger cars, motorcycles, and trucks.
The lane information is data required for drawing a lane under a scene in the simulation scene and determining the relative positions of the host vehicle and the target vehicle on the road. The general extraction information at least includes: the lane information includes: the lane number lane _ amount of the road where the vehicle is located, the current lane number lane _ ID and the type of the isolation zone.
The types of isolation belts generally include single guardrails, double guardrails, greenbelts, and the like.
In practical cases, the time point at which the host vehicle acquires data is taken as a sampling point, and the host vehicle information is complete in the xml entire sequence. However, the problems of bad weather, too close target, shielding of target and the like often cause the point cloud data acquired by the laser radar to be lost, and the whole target vehicle cannot be effectively identified. Therefore, there is a possibility that the target vehicle information is intermittent, and time is not necessarily completely equivalent to obj _ time. If the phenomenon that the time axis is not synchronous occurs, data cleaning is carried out, and the single-axis time stamp is acquired by adopting a method of reducing sampling frequency or utilizing linear interpolation.
In the collected scene data, the coordinate systems of the vehicle and the target vehicle are not uniform: the host vehicle returns latitude and longitude, and the target vehicle returns a distance relative to the host vehicle. The coordinates of both must be identical or cannot be present in the same area. Therefore, in the present embodiment, the coordinates of the host vehicle and the target vehicle are unified by the host vehicle coordinate conversion step and the target vehicle coordinate conversion step.
In this embodiment, the static map obtaining step is to obtain the corresponding open source map OSM according to the geographic location information in the scene data, and generate the static map as the background of the simulation scene by combining the scene data.
And the file format conversion step is to adopt an SCP instruction to realize the format conversion of the scene data, wherein the SCP instruction is a commonly used instruction in the field and is used for realizing the function of remote file copying.
The existing simulation scene building modes are divided into two types: manual construction and automatic construction, wherein:
the road structure and the traffic participants can be set individually through manual construction, and the road structure and the traffic participants have the advantages of being high in accuracy and clear in detail expression. However, in the face of the infinite test case requirements, the speed of manually taking scenes is difficult to match with.
The automatic construction is the development trend of the industry, and the automatic construction is that the real 1: 1, restoring to simulation software, providing a practical basis for test case generation, and abandoning scenes which cannot occur in real life but have high simulation environment frequency. Meanwhile, repeated labor of engineers can be reduced, and massive simulation scenes and test cases can be obtained in batches.
Whether the manual construction or the automatic generation is carried out, the same set of generation rules and methods must be followed, and the set of rules ensure that scenes generated by different engineers in different air are the same at different times, so that subsequent users can quickly get on hand.
The simulation scene building method described in this embodiment is an automatic building method, and adds new methods suitable for machine identification processing on the premise of inheriting most of manual building methods.
The following is a brief introduction to the existing manual construction method:
the existing manual construction method flow is shown in figure 1, and the specific method comprises the following steps:
step 1, manually constructing a static road network based on the OpenDRIVE standard.
Prior to placing the vehicle, the environment in which the vehicle is located needs to be constructed, i.e., the container that can hold the vehicle. The relevant standards cover descriptions modeling the contents of roads, lanes, intersections, road signs, etc. The following describes the operation of these layers one by one.
And 1.1, drawing a Road and a Lane Lane.
A road is a passage from one point to another point, and a lane is a single width currently traveled by each vehicle. The two are in inclusion relation, and a plurality of lanes form a road. On the transverse level, the lanes are connected tightly without gaps. Before constructing the lane, a reference line Road should be drawn. Those geometric elements that express the road shape and additional attributes are defined in terms of reference lines. According to different shapes, the reference lines can be roughly divided into 4 types, namely straight lines, right circular arcs, spiral lines and polynomial curves. Their curvatures are expressed by equation (1), and the trajectories are shown in fig. 2, and there are four trajectories, which are respectively:
y 1 =0
y 2 =a
y 3 =bx
y 4 =a+bx+cx 2 +dx 3 (1)
in the formula, y 1 、y 2 、y 3 And y 4 The four trajectory curves shown in fig. 2 are respectively shown, x is the abscissa of the trajectory, and a, b, c, and d are polynomial parameters.
The lane width must be greater than 0 and the sequence numbers are immediately adjacent. According to functions, the method can be divided into the following 9 types:
firstly, a road shoulder: soft boundaries at road edges;
boundary (II): hard border of road edge. The height of the vehicle is the same as that of a normal driveway for driving;
driving a lane: a 'normal' road which can be used for driving and does not belong to other types;
fourthly, parking lane: a lane with parking spaces;
isolation belt: separating traffic in different directions on a large road;
sixth, the bicycle way: a lane reserved specifically for cyclists;
and a sidewalk: a road on which pedestrians are allowed to walk;
eigh curb: the height of the curb is different from that of the adjacent traffic lane;
ninthly, connecting the ramps: and connecting the ramps of the two expressways.
And step 1.2, connecting intersections Junctions.
An intersection refers to an area where three or more roads meet.
In order to be able to travel in the road network, the roads must be connected to each other, the condition for lane connection being that the reference lines are connected. The reference lines can neither be broken nor overlapped; while lanes may have a small range of overlap. A road containing lanes driving to the intersection is called an incoming road; roads between junction intersections or ramps are called junction roads; the incoming route can be regarded as the outgoing route.
Fig. 3 is a diagram of a road diversion model, which is a main road divided into two main roads, and shows a feasible road connection scene relationship in an intersection. Black arrows indicate reference lines; -1, -2 represent lane numbers, the left side of the reference line is positive and the right side is negative, and the inside of the dashed line represents the junction road.
Fig. 4 is a model diagram of a triple intersection, showing traffic flow relationships among three main roads. The grey bottom road is an incoming road, and the white bottom road is an outgoing road. It can be seen that A, B paths have the same attribute, and the reference line is taken as the center, and the two sides are respectively an incoming path and an outgoing path; the reference line of the C route is positioned at the leftmost side, and only an incoming route and no outgoing route exist. The junction roads in the intersection strictly follow the rules of multi-road connection.
Step 1.3, object Objects and landmarks are placed.
Objects can affect the lanes, most notably parking spaces, pedestrian crossings and traffic barriers. When placing, attention needs to be paid to the position and the direction.
Signs mainly include traffic signs and traffic lights. Traffic signs can be divided into ground signs and guideboards according to placement location: ground signs are used to control traffic behavior, such as speed limits and turn restrictions; the guideboards are of various types and are generally placed beside effective roads. According to the scrolling condition, the method can be divided into a static mark and a dynamic mark: the dynamic signs are mostly traffic lights and periodically change along with time, and the dynamic signs can be set in the dynamic information.
The above is a method for manually constructing a static map, and finally an engineering file with xml as a data storage format and an extension of xodr is formed.
And 2, manually constructing vehicle dynamics based on the OpenSENARIO standard.
In step 1, a static road environment of a scene is constructed, and a construction method of dynamic information will be described. A scenario must contain three component scenarios: path and entity, scene content, and condition trigger, three schemes are introduced below.
2.1 draw path and initialize entity.
The path is used to navigate the entity instance and the simulator will use its path policy to restrict the movement of the entity. The VTD scene Editor has two ways of drawing a Path, namely, a create Path and a create Path Shape. The shape of the former is almost consistent with that of the imported xodr map file, and the length of the former can be changed; the latter has higher degree of freedom and is generally used for complex track motion, such as parking, transverse motion and the like.
Entities are those target objects that can dynamically change location over time. Other objects are non-pedestrian and non-vehicular examples, such as obstacles, street lights, railings, and the like. Each instance has attributes and methods of the class that created it. In the case of a vehicle, the initialization conditions include the name, model, color, presence or absence of a driver, driver style, location of a relative path, and the like.
Step 2.2, scene content
The dynamic scene information mainly solves the problem of 'which object' does 'and what action', and comprises an initialization element and one or more scene content elements. Each object is composed of an action, presenting a series of meaningful actions throughout the time sequence.
The initialization element is mainly used to set initial conditions of a scene, such as the position and speed of an entity. The actions include wire-looping, lane-changing, cutting in, cutting out, etc.
Step 2.3, event trigger
The trigger is the result after the condition combination. The scenario summarizes a series of meaningful actions, and the triggers take control of such actions. Thus, triggers play an important role in how the scene evolves. The same set of actions may lead to a number of different results, all depending on the way the action is triggered.
The triggers are divided into a start trigger and an end trigger. Briefly, it is used to control when an entity action occurs and when it ends. It includes delay and conditional edges. The delay refers to the time required from the satisfaction of the Condition to the report of the satisfied state.
The above is a method for manually constructing dynamic information, and finally an engineering file with xml as a data storage format and an extension of xml is formed.
And importing the xodr and the xml project file into a VTD-GUI main interface, wherein the preview result is shown in FIG. 5, wherein a represents a constructed static diagram, b represents a constructed dynamic diagram, and the two diagrams are combined to form a simulation result shown in c.
In the second embodiment, the present embodiment is an explanation of the target vehicle in the method for building a simulation scene based on natural driving data according to the first embodiment, and in the present embodiment, the target vehicle is: all vehicles around the vehicle for collecting information can influence the driving behavior of the vehicle.
The target vehicles are all vehicles capable of influencing the driving of the vehicle in a real scene, and the target vehicles appear in a simulation scene, so that all information of the target vehicles needs to be acquired. Generally, referring to the 18-grid schematic diagram shown in fig. 8, the target vehicle refers to vehicles located in front of, behind, on the left side, on the right side, in front of, behind, front two, front right two, front left two, behind, and behind the vehicle, and these vehicles all affect the driving state of the vehicle. The target vehicles are displayed in the simulation scene, so that the square scene is closer to the actual driving environment.
In the third embodiment, the vehicle coordinate conversion step is exemplified as the vehicle coordinate conversion step in the simulation scene construction method based on natural driving data according to the first embodiment, and the coordinates are converted by using a universal horizontal axis mercator projection as a projection mode.
The vehicle coordinate conversion step is a step for converting the terrestrial coordinate system in which the vehicle is located into a terrestrial coordinate system. The existing coordinate transformation techniques can be used. The embodiment provides that the transformation of coordinates is realized by adopting a universal transverse axis mercator projection UTM (universal transverse transform camera) as a projection mode, the mercator projection is also called a positive axis equiangular cylindrical projection and belongs to an equiangular cylindrical projection, and the farther from the equator, the larger the area deformation is; in contrast, the UTM projector artificially divides the globe into 60 distinct longitudinal bands, one band at a time, with little distortion in the region of the selected band. Selecting the corresponding UTM band number according to the area where the test vehicle runs, such as: if the area in which the test car is traveling is within the Jilin province, the UTM band number 51 is selected.
In the present embodiment, a target vehicle coordinate conversion step in the method for building a simulation scene based on natural driving data according to the first embodiment is exemplified, and in the present embodiment, the target vehicle coordinate conversion step is: the local coordinate system is first transformed and then translated to the geodetic coordinate system.
The data processing amount of the coordinate conversion step of the target vehicle is small, and the conversion speed is high.
Referring to fig. 7, a process of the target vehicle coordinate conversion step according to the present embodiment is illustrated:
by formula (2)
Figure BDA0003566595100000131
The transformation of a coordinate system is realized, the coordinate system xy is the original local coordinate system in the target vehicle information, x and y in the formula are respectively the horizontal and vertical coordinates of the target vehicle in the local coordinate system, theta is the rotation angle of the local coordinate system transformed into the transitional coordinate system, m and n are the horizontal and vertical offsets of the transitional coordinate system transformed into the geodetic coordinate system, and x 'and y' are respectively the horizontal and vertical coordinates of the target vehicle in the geodetic coordinate system.
The geodetic coordinate system may be considered a global coordinate system. The target vehicle is located in a local coordinate system xy taking the vehicle as an origin, and referring to fig. 7, xy in the figure is a local coordinate system, x 'y' is a transition coordinate system, and x 'y' is a geodetic coordinate system, the rotation angle theta of the local coordinate system xy is changed into a transition coordinate system x 'y', and then the transition coordinate system x 'y' is moved by a distance m along the horizontal axis of the geodetic coordinate system and then is moved by a distance n along the vertical axis of the geodetic coordinate system, so that the transition coordinate system x 'y' is converted into the geodetic coordinate system x 'y'. And then converting the coordinates of the target vehicle through a formula (2) to obtain the coordinates of the target vehicle in a geodetic coordinate system.
The coordinate conversion process described in the present embodiment is realized based on a proj ection character string of the proj ection type. Proj is a format for coordinate coefficient data exchange, and includes all parameters defining a spatial reference frame to be used.
In the fifth embodiment, an example of the step of obtaining the static map in the method for building the simulation scene based on the natural driving data according to the first embodiment is described, and in the first embodiment, the step of obtaining the static map includes:
reading the content in an open source map file generated by an OsmOpenStreetMap by adopting an open source simulator CARLA for automatic driving research, and converting the content into an OpenDRIVE format;
defaulting each road in the open source map osm to have two reference lines which are an incoming road and an outgoing road respectively;
and (3) expanding the lowest layer algorithm of the CARLA to the right according to the reference line to form two lanes by adopting an open source simulator CARLA.
In this embodiment, in the road condition information projection step, a process of correcting the road network information in the static map is as follows:
a) and calculating the shortest distance between the coordinates of the vehicle in each sampling point and the reference line in the open source map osm, and if the shortest distance meets the condition, determining that the sampling point is subordinate to the road where the reference line is located. The common road in the prior road has 6 unidirectional lanes at most, and the lane width is 3.5m, and the total width is 21 m. And if the shortest distance is less than 21m, the sampling point is considered to belong to the road where the reference line is located.
b) Translating the reference line by combining the number of the lane to which the vehicle belongs, and drawing the lane of the vehicle and all surrounding lanes of the vehicle;
c) loading the isolation zone information by combining the type of the central isolation zone;
d) identifying a reference line closest to the current reference line, and defining the reference line as a lane-to-face reference line;
e) deleting the opposite lane reference line, and simultaneously, symmetrically arranging the lane at the side to be opposite to form an opposite lane;
f) and outputting the xodr map engineering file taking OpenDRIVE as the standard, namely the static map corresponding to the final simulation scene.
In an actual situation, because the virtual static map automatically generated by using the open source map has disadvantages and cannot meet virtual simulation requirements, the content in the open source map file generated by OsmOpenStreetMap is read by using cara (open source simulator for automatic driving research), and is converted into OpenDRIVE format, so that the content can be extracted as cara mapping. However, osm does not contain lane number information, and each road has two reference lines by default, namely an incoming road and an outgoing road. The CARLA bottom algorithm expands two lanes to the right according to a reference line. Therefore, if it is not advisable to take the map file generated by cara by direct default, the roads thus generated differ greatly from the reality.
For the above reasons, it is necessary to correct the road network information in the obtained static map to obtain a simulation scene closer to the actual scene.
In the present embodiment, the simulation scene construction step in the simulation scene construction method based on natural driving data according to the first embodiment is exemplified, and in the present embodiment, the process of the simulation scene construction step is as follows:
extracting the position and motion orientation information of the vehicle in the static map after the road network information is corrected by adopting an SCP command in VTD simulation software;
initiating a traffic participant in the simulated environment by command;
and (3) using rapidxml SDK quoted in c + + language, converting the constructed SCP instruction into a standard xml format, loading the SCP instruction and the static map file after the road network information is corrected to VTD software, previewing and finishing the construction of the simulation scene.
In similar practical application, the manual construction of the simulation scene can be realized only by setting an initial condition and a turning condition. The information input for the automated reconstruction is the entire data of the entire scene slice, and the sampling frequency of the sensor needs to be considered, for example: when the sampling period is 0.1s, if the scene has a time length of 20s and 3 target vehicles appear in the scene, 800 lines of data are generated. The process of automatically building a simulation scenario cannot simplify the 800-line dataset, and is abstractly considered as a simple superposition of several actions, which all need to be filled into an xml file.
Namely: the continuous behavior is cut into discrete points. With each point as a connection, a complete sequence of paths is created.
And acquiring the positions and the movement directions of all vehicles by adopting SCP commands in VTD simulation software. The vehicle position can be directly obtained according to the longitude and latitude, and the target vehicle position is indirectly obtained according to the relative distance between the vehicle and the target vehicle; the motion direction of the host vehicle is based on the advancing direction of the road, and the motion direction of the target vehicle is indirectly obtained according to the host vehicle. Since the time difference between each point is short, it can be approximated as a continuous curve, and therefore no speed and acceleration information is needed. Accordingly, the path does not need to be set because the driving track of the vehicle is acquired; similarly, the behavior information of acceleration, deceleration, lane change and the like does not exist, and a string of compact data sequences is used instead.
The SCP is similar to xml in format, and can perform custom message triggering action to trigger the motion state (including position and orientation) of all vehicles as traffic participants in the simulation environment through commands. All interfaces and sub-interfaces of the SCP have to meet the < SCPGUI format requirement >. More than one target vehicle, in order to distinguish different target vehicles, a target vehicle number ID, a vehicle model number, and a color may be set in the SCP, which correspond to respective contents in the previously acquired scene data.
In order to avoid a complex process of manually constructing the SCP, the scheme utilizes a c + + language compiler to develop a desktop application program. The functions of the program are: the user imports traffic scene data (csv format) that the program can construct SCP instructions (including the position, heading, ID, model, etc. of all vehicles at each sample point) from the data source and convert it to standard xml format. The user interaction UI interface is designed by utilizing PyQt5 (graphical interface development), the installation of an integrated development environment and an SDK package is avoided, and the user can realize the function of automatically generating the xml through simple UI operation. The xml file can be loaded to the VTD software together with the static map file after the road network information correction is completed, and previewed. And finishing the reconstruction of the automatic simulation scene.
The method of the present invention can be implemented by computer software, and therefore, the "system" corresponding to the above-mentioned methods is not described herein again.

Claims (10)

1. A simulation scene building method based on natural driving data is characterized by comprising the following steps:
a scene data acquisition step for acquiring scene data obtained under natural driving conditions;
a csv information extraction step, which is used for extracting csv information from scene data, wherein the csv information comprises vehicle information, target vehicle information and lane information;
a vehicle coordinate conversion step, which is used for converting the terrestrial coordinate system of the vehicle into a terrestrial coordinate system;
a target vehicle coordinate conversion step, which is used for converting a local coordinate system where the target vehicle is located into a geodetic coordinate system;
a static map acquisition step, which is used for generating a static map by utilizing the open source map OSM and the acquired scene data;
a step of projecting road condition information, in which lane information, vehicle information after coordinate conversion and target vehicle information are projected into the static map, and road network information in the static map is corrected;
a file format conversion step, which is used for converting the csv information into an xml format file through an SCP instruction;
and a simulation scene building step, which is used for importing the static map and the xml format file after the road network information is corrected into a VTD to generate a dynamic map by taking time as a trigger condition, and completing the building of the simulation scene.
2. The natural driving data-based simulation scene construction method according to claim 1, wherein in the host vehicle coordinate transformation step, the transformation of coordinates is realized by using a universal transverse shaft mercator projection as a projection mode.
3. The natural driving data-based simulation scene building method according to claim 1, wherein in the step of converting the coordinates of the target vehicle, the target vehicle is converted into the coordinates by a formula
x”=(x-m)cosθ+(y-n)sinθ
y”=(y-n)cosθ-(x-m)sinθ
And realizing the conversion of a coordinate system, wherein in the formula, x and y are respectively the horizontal coordinate and the vertical coordinate of the vehicle in a local coordinate system, theta is the rotation angle of the local coordinate system converted into a transition coordinate system, m and n are the horizontal and vertical offsets of the transition coordinate system converted into a geodetic coordinate system, and the vertical coordinate, and x and y' are respectively the horizontal and vertical coordinates of the target vehicle in the geodetic coordinate system.
4. The natural driving data-based simulation scene building method according to claim 1, wherein the static map obtaining step includes the steps of:
reading the content in an open source map file generated by an OsmOpenStreetMap by adopting an open source simulator CARLA for automatic driving research, and converting the content into an OpenDRIVE format;
defaulting each road in the open source map osm to have two reference lines which are an incoming road and an outgoing road respectively;
and (3) expanding the lowest layer algorithm of the CARLA to the right according to the reference line to form two lanes by adopting an open source simulator CARLA.
5. The method for building a simulation scene based on natural driving data according to claim 1, wherein in the step of projecting the road condition information, the process of correcting the road network information in the static map is as follows:
a) the shortest distance between the coordinates of the vehicle in each sampling point and the reference line in the open source map osm is calculated,
if the shortest distance meets the condition, the sampling point is considered to be subordinate to the road where the reference line is located;
b) translating the reference line by combining the number of the lane to which the vehicle belongs, and drawing the lane of the vehicle and all surrounding lanes of the vehicle;
c) loading the isolation zone information by combining the type of the central isolation zone;
d) identifying a reference line closest to the current reference line, and defining the reference line as a lane-to-face reference line;
e) deleting the opposite lane reference line, and simultaneously, symmetrically arranging the lane at the side to be opposite to form an opposite lane;
f) and outputting the xodr map engineering file taking OpenDRIVE as the standard, namely the static map required by the final simulation scene.
6. The natural driving data-based simulation scene construction method according to claim 1, wherein the process of the simulation scene construction step is as follows:
extracting the position and motion orientation information of the vehicle in the static map after the road network information is corrected by adopting an SCP command in VTD simulation software;
initiating a traffic participant in the simulated environment by command;
and (3) using rapidxml SDK quoted in c + + language, converting the constructed SCP instruction into a standard xml format, loading the SCP instruction and the static map file after the road network information is corrected to VTD software, previewing and finishing the construction of the simulation scene.
7. A simulation scene building system based on natural driving data is characterized by comprising the following modules:
the scene data acquisition module is used for acquiring scene data obtained under the natural driving condition;
the csv information extraction module is used for extracting csv information from scene data, wherein the csv information comprises vehicle information, target vehicle information and lane information;
the vehicle coordinate conversion module is used for converting a terrestrial coordinate system where the vehicle is located into a terrestrial coordinate system;
the target vehicle coordinate conversion module is used for converting a local coordinate system where the target vehicle is located into a geodetic coordinate system;
the static map acquisition module is used for generating a static map by utilizing the open source map OSM and the acquired scene data;
the road condition information projection module is used for projecting lane information, the vehicle information after coordinate conversion and target vehicle information into the static map and correcting road network information in the static map;
the file format conversion module is used for converting the csv information into an xml format file through an SCP instruction;
and the simulation scene building module is used for importing the static map and the xml format file after the road network information is corrected into the VTD to generate a dynamic map by taking time as a trigger condition, and completing building of the simulation scene.
8. The natural driving data-based simulation scene building system according to claim 7, wherein the static map obtaining module further comprises the following units:
the open source map osm acquisition unit is used for reading the content in an open source map file generated by OsmOpenStreetMap by adopting an open source simulator CARLA for automatic driving research and converting the content into an OpenDRIVE format;
the road dividing unit is used for defaulting each road in the open source map osm to have two reference lines which are an incoming road and an outgoing road respectively;
and the lane expanding unit is used for expanding the lowest layer algorithm of the open source simulator CARLA to the right according to the reference line to form two lanes.
9. A computer storage medium, in which a computer program is stored, and when the computer program runs, the simulation scenario construction method according to any one of claims 1 to 6 is executed.
10. An electronic device, comprising: a processor and a memory, wherein the memory is configured to store executable instructions of the processor, and the processor is configured to execute the simulation scenario construction method of any one of claims 1 to 6 via executing the executable instructions.
CN202210304419.0A 2022-03-26 2022-03-26 Simulation scene construction method and system based on natural driving data Pending CN115062445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210304419.0A CN115062445A (en) 2022-03-26 2022-03-26 Simulation scene construction method and system based on natural driving data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210304419.0A CN115062445A (en) 2022-03-26 2022-03-26 Simulation scene construction method and system based on natural driving data

Publications (1)

Publication Number Publication Date
CN115062445A true CN115062445A (en) 2022-09-16

Family

ID=83196636

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210304419.0A Pending CN115062445A (en) 2022-03-26 2022-03-26 Simulation scene construction method and system based on natural driving data

Country Status (1)

Country Link
CN (1) CN115062445A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116206068A (en) * 2023-04-28 2023-06-02 北京科技大学 Three-dimensional driving scene generation and construction method and device based on real data set

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116206068A (en) * 2023-04-28 2023-06-02 北京科技大学 Three-dimensional driving scene generation and construction method and device based on real data set

Similar Documents

Publication Publication Date Title
US11738770B2 (en) Determination of lane connectivity at traffic intersections for high definition maps
US11365976B2 (en) Semantic label based filtering of objects in an image generated from high definition map data
US11645839B2 (en) Lane feature detection in aerial images based on road geometry
CN111566664B (en) Method, apparatus and system for generating composite image data for machine learning
US10331957B2 (en) Method, apparatus, and system for vanishing point/horizon estimation using lane models
Wong et al. Mapping for autonomous driving: Opportunities and challenges
CN112212874B (en) Vehicle track prediction method and device, electronic equipment and computer readable medium
WO2020108207A1 (en) Method and device for constructing high-resolution map
KR101932623B1 (en) Modeling method and device for three-dimensional road model, and storage medium
US20190279247A1 (en) Crowd-sourced mapping
US9396563B2 (en) Constructing road geometry
CN111656135A (en) Positioning optimization based on high-definition map
US11590989B2 (en) Training data generation for dynamic objects using high definition map data
US11501104B2 (en) Method, apparatus, and system for providing image labeling for cross view alignment
US20200364247A1 (en) Automatic feature extraction from imagery
EP3706072B1 (en) Method, apparatus, and system for detecting degraded ground paint in an image
US11170485B2 (en) Method, apparatus, and system for automatic quality assessment of cross view feature correspondences using bundle adjustment techniques
US20200293054A1 (en) Generating training data using simulated environments and training machine learning models for vehicle guidance
Kang et al. Hidam: A unified data model for high-definition (hd) map data
CN115062445A (en) Simulation scene construction method and system based on natural driving data
US11699234B2 (en) Semantic segmentation ground truth correction with spatial transformer networks
Patel A simulation environment with reduced reality gap for testing autonomous vehicles
Kanakagiri Development of a virtual simulation environment for autonomous driving using digital twins
Wang et al. Lightweight High-precision Map for Specific Scenes
Shi et al. Lane-level road network construction based on street-view images

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