A High-Precision Map Format Conversion Method, Device, and Storage Medium
The conversion of Apollo format maps to OpenDrive format using polynomial fitting and mapping ensures effective simulation testing by aligning road, lane, and signal data, addressing format inconsistencies and reducing costs.
Patent Information
- Application Number
- CN202211693057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-12-28
AI Technical Summary
In autonomous driving tests, inconsistent high-precision map formats lead to the impact of simulation testing and increase testing costs.
Provide a high-precision map format conversion method, which can obtain Apollo format map data, perform polynomial fit and map, convert it to OpenDrive format, handle reference line breaks, overlaps and topological relationships, and ensure the continuity and consistency of map data.
It realizes unified conversion of high-precision map formats, supports simulation testing tools, reduces testing costs, and ensures that the tests are carried out effectively.
Smart Images

Figure CN116028561B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of map format conversion, and particularly to a method, device and storage medium for converting high-precision map formats. Background Art
[0002] In autonomous driving simulation tests, it is necessary to build and evaluate a digital scenario library based on high-precision maps. The simulation test tools used support high-precision maps in the internationally common OpenDrive standard format. Since the autonomous driving test enterprises all use personalized high-precision maps, and most of them are in Apollo format data, this has caused the simulation test work to be greatly affected by the high-precision map data format, unable to ensure the effective progress of the test work, and the test cost has increased significantly. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, device and storage medium for converting high-precision map formats, so as to solve the problem in the prior art that the map format provided by autonomous driving test enterprises is inconsistent with the map format supported by simulation test tools, resulting in the simulation test work being greatly affected by the high-precision map data format, unable to ensure the effective progress of the test work, and the test cost increasing significantly.
[0004] According to the first aspect of the embodiments of the present invention, a method for converting high-precision map formats is provided, including:
[0005] Obtain road data, lane data, feature data, and signal data of Apollo format map data;
[0006] Cut the reference line according to the reference line elevation of the road data, perform polynomial fitting on the cut reference line, and obtain the first fitting parameter; cut the reference line according to the projection of the reference line in the xy plane, perform polynomial fitting on the plane projection of the cut reference line, and obtain the second fitting parameter, and write the first fitting parameter and the second fitting parameter into the intermediate table;
[0007] Calculate the geometric shape of the lane according to the geometric line type of the lane in the lane data, obtain the width value of the lane reference line, perform fitting on the width value of the lane reference line, obtain the third fitting parameter, and write the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table;
[0008] Convert the road data and lane data in Apollo format into road data and lane data in OpenDrive format according to the data in the intermediate table;
[0009] Convert the feature data in the lane information node of the Apollo format map data into the road object node of the OpenDrive format map data through a mapping method;
[0010] Convert the signal data in the lane information node of the Apollo format map data to the road signal node of the OpenDrive format map through a mapping method.
[0011] Preferably, it further includes:
[0012] When the reference line of the road or lane in the Apollo format map data is broken or overlapped, splice or cut the reference line of the Apollo format so that the reference line is continuous and smooth.
[0013] Preferably,
[0014] When the reference line of the road or lane is broken, splicing the reference line of the Apollo format includes:
[0015] If the reference line of the current road or lane is located at an intersection or a section and is broken from the previous reference line, splicing the reference line of the Apollo format includes:
[0016] Obtain the control point in the reference line of the current road or lane that is the closest to the previous reference line, denoted as control point C;
[0017] Obtain the control point in the previous reference line that is the closest to the reference line of the current road or lane, denoted as control point B, and the control point A that is the closest to control point B;
[0018] Draw a perpendicular line segment from control point B to line segment AB, denote the projection point of control point C on the perpendicular line segment as control point E, calculate the coordinates of control point E, and use control point E as the first control point of the reference line of the current road or lane to make it continuous and smooth with the previous reference line;
[0019] If the reference line of the current road or lane is located at an intersection or a section and is broken from the subsequent reference line, splicing the reference line of the Apollo format includes:
[0020] Select the control point in the reference line of the current road or lane that is the closest to the subsequent reference line, denoted as control point D, and the control point C that is the closest to control point D;
[0021] Select the control point in the subsequent reference line that is the closest to the reference line of the current road or lane, denoted as control point A;
[0022] Draw a perpendicular line segment from control point D to line segment CD, denote the projection point of control point A on the perpendicular line segment as control point E, calculate the coordinates of control point E, and use control point E as the first control point of the subsequent reference line to make it continuous and smooth with the subsequent reference line.
[0023] Preferably,
[0024] When the reference line of the road or lane overlaps, splicing or cutting the reference line of the Apollo format includes:
[0025] When the reference line of the current road or lane is located at an intersection or a section and overlaps with the previous reference line or the subsequent reference line, the clipping of the reference line in Apollo format includes:
[0026] Obtain the shape point on the reference line of the current road or lane that is the closest to the previous reference line or the subsequent reference line, denoted as shape point C;
[0027] Obtain the shape point on the previous reference line or the subsequent reference line that is the closest to the reference line of the current road or lane, denoted as shape point B, and the shape point A that is the closest to shape point B;
[0028] Draw a perpendicular line segment to line segment AB through shape point B, denote the projection point of shape point C on the perpendicular line segment as shape point E, calculate the length S from shape point E to the starting point of the current road or lane, traverse all the shape points of the current road or lane, calculate the length from each shape point to the starting point respectively, eliminate all the shape points with a length less than S, and insert shape point E into the position of the first shape point of the current road or lane after eliminating the shape points, so as to be continuous and smooth with the previous reference line or the subsequent reference line.
[0029] Preferably, it further includes:
[0030] In the road data or lane data, if the coordinates of any two roads or lanes have overlapping parts, it is determined that the two roads or lanes have a divergence or a confluence;
[0031] Denote the overlapping part of the two roads as road A, denote the non-overlapping parts of the two roads as road B and road C respectively, denote the intersection coordinate of road AB and road AC as intersection coordinate D, and write road ADB and road ADC into the connecting roads in OpenDrive format.
[0032] Preferably, it further includes:
[0033] In the road data or lane data, if the angle difference between the starting angle and the ending angle of a certain road or lane meets the preset angle difference threshold, it is considered that the road or lane is a U-turn road;
[0034] Split the original U-turn road EF into two roads or lanes of equal length before and after the U-turn, set the coordinate at the U-turn as intersection coordinate G, obtain two connecting roads EG and GF, the previous connecting road EG along the original U-turn road ID, and the subsequent connecting road GF uses a new ID;
[0035] Take the subsequent road of the original U-turn road EF as the subsequent road of the connecting road GF, and take the connecting road EG as the previous road of the connecting road GF; modify the ID of the previous road of all the subsequent roads of the original U-turn road EF to the new ID used by the connecting road GF.
[0036] Preferably, it further includes:
[0037] Taking a bicycle lane entering an intersection in road data or lane data as the starting node, all subsequent bicycle lanes of this bicycle lane as child nodes, and the bicycle lane leaving the intersection as the ending node, all bicycle road paths leaving the intersection from all directions of the starting node are obtained;
[0038] Traverse all bicycle lanes entering the intersection to obtain all bicycle road paths to which this intersection belongs;
[0039] Merge all bicycle road paths to obtain a new bicycle lane and assign a new ID, and update the original topology relation table.
[0040] Preferably,
[0041] Obtain the median strip data in the two-way road and the roadside sidewalk data in the feature data;
[0042] Cut the type points of the median strip data and the sidewalk data according to the road attributes, recalculate the widths of the median strip and the sidewalk, and convert them into lane boundary lines, and fill the blank parts in the lane boundary lines with lane information or shoulder information.
[0043] According to the second aspect of the embodiments of the present invention, a high-precision map format conversion device is provided, including:
[0044] Data acquisition module: used to acquire road data, lane data, feature data, and signal data of Apollo format map data;
[0045] The first intermediate data extraction module: used to cut the reference line according to the reference line elevation of the road data, perform polynomial fitting on the cut reference line to obtain the first fitting parameter; cut the reference line according to the projection of the reference line in the xy plane, perform polynomial fitting on the cut reference line plane projection to obtain the second fitting parameter, and write the first fitting parameter and the second fitting parameter into the intermediate table;
[0046] The second intermediate data extraction module: used to calculate the geometric shape of the lane according to the geometric line type of the lane in the lane data to obtain the width value of the lane reference line, perform fitting on the width value of the lane reference line to obtain the third fitting parameter, and write the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table;
[0047] Road and lane conversion module: used to convert the road data and lane data in Apollo format into road data and lane data in OpenDrive format according to the data in the intermediate table;
[0048] Feature conversion module: used to convert the feature data in the lane information node of the Apollo format map data to the road object node of the OpenDrive format map data through a mapping method;
[0049] Signal conversion module: used to convert the signal data in the lane information node of the Apollo format map data to the road signal node of the OpenDrive format map through a mapping method.
[0050] According to the third aspect of the embodiments of the present invention, a storage medium is provided. The storage medium stores a computer program, and when the computer program is executed by a main controller, each step in the above-mentioned method is implemented.
[0051] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0052] This application extracts the road data, lane data, feature data, and signal data of the Apollo format map data, converts the road data to the road data in the standard OpenDrive format through a mapping method, recalculates the topological relationship of the road based on the topological relationship of the lanes in the original Apollo map format, converts the lane data of the Apollo format map data to the lane data in the standard OpenDrive format through a mapping method, calculates the lane width through the parameters characterizing the lane characteristics in the lane data of the Apollo data, fits the width value, and realizes the conversion of the lane data through the fitting parameters. The data representing features in the lane information node of the Apollo format map data is converted to the road object node of the standard OpenDrive format map data through a mapping method, and the data representing signals in the lane node of the Apollo format map data is converted to the road signal node of the standard OpenDrive format map through a mapping method. This application converts the original Apollo format map data to the standard OpenDrive format map data through a mapping method and calculating the fitting parameters in the conversion process, which is used to support the simulation test tool, so that the simulation test is no longer limited by the map format.
[0053] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. Description of the Drawings
[0054] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments in line with the present invention, and are used together with the specification to explain the principles of the present invention.
[0055] Figure 1 It is a flowchart showing a method for converting high-precision map formats according to an exemplary embodiment;
[0056] Figure 2 Schematic diagram of a data conversion system shown according to an exemplary embodiment;
[0057] Figure 3 Schematic diagram of repairing a break in a previous reference line shown according to another exemplary embodiment;
[0058] Figure 4 Schematic diagram of repairing a break in a subsequent reference line shown according to another exemplary embodiment;
[0059] Figure 5 Schematic diagram of repairing an overlap with a previous reference line shown according to another exemplary embodiment;
[0060] Figure 6 Schematic diagram of repairing an overlap with a subsequent reference line shown according to another exemplary embodiment;
[0061] Figure 7 Schematic diagram of a system of a high-precision map format conversion device shown according to another exemplary embodiment;
[0062] In the drawings: 1 - data acquisition module, 2 - first intermediate data extraction module, 3 - second intermediate data extraction module, 4 - road and lane conversion module, 5 - feature conversion module, 6 - signal conversion module. Detailed implementation manners
[0063] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0064] Embodiment 1
[0065] Figure 1 Schematic flowchart of a high-precision map format conversion method shown according to an exemplary embodiment, as Figure 1 shown, the method includes:
[0066] S1, obtaining road data, lane data, feature data, and signal data of an Apollo format map data;
[0067] S2, cutting the reference line according to the elevation of the reference line of the road data, performing polynomial fitting on the cut reference line, and obtaining a first fitting parameter; cutting the reference line according to the projection of the reference line in the xy plane, performing polynomial fitting on the plane projection of the cut reference line, and obtaining a second fitting parameter, and writing the first fitting parameter and the second fitting parameter into an intermediate table;
[0068] S3. Calculate the geometric shape of the lane based on the geometric line type of the lane in the lane data, obtain the width value of the lane reference line, fit the width value of the lane reference line to obtain the third fitting parameter, and write the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table;
[0069] S4. Convert the Apollo format road data and lane data into OpenDrive format road data and lane data according to the data in the intermediate table;
[0070] S5. Convert the feature data in the lane information node of the Apollo format map data to the road object node of the OpenDrive format map data through the mapping method;
[0071] S6. Convert the signal data in the lane information node of the Apollo format map data to the road signal node of the OpenDrive format map through the mapping method;
[0072] It can be understood that, as shown in the appendix Figure 2 Based on the format structure of Apollo data, the road, lane, feature, and signal data are extracted in layers. Among them, the extraction process of road data: take out the first road attribute of the road node class, and judge whether the type and serial number of this attribute are empty. If not, extract the previous and subsequent road serial numbers of this road, and extract the current road type and geometric line type, and then traverse the entire road node class; the extraction process of the road reference line data: take out the first lane attribute of the HLane layer (lane node class), and extract the geometric feature part, that is, geometry, from the lane attribute, which is the reference line corresponding to this road, and then traverse the lane attributes of the entire data; the extraction process of lane data: take out the first lane attribute of the lane node class (HLane), and judge whether the type and serial number of the lane attribute are empty. If not, extract the previous and subsequent lane serial numbers of this lane, and extract the ID of the right side line of the current lane, and find the corresponding color, type, geometric and other attribute values, and then traverse the lane attributes of the entire road data, take out the lane attributes obtained by traversing, the previous and subsequent lane serial numbers of this lane, and splice the previous, current, and subsequent lane geometric line types in order; Although the Apollo data format is very similar to OpenDrive, there are many differences in the specific definitions. Only the definitions of the lane type point direction and attributes are the same as those of OpenDrive. Therefore, based on the lanes in the Apollo data, the data is converted, and the road segments in the Apollo data are converted one-to-one into the roads in the OpenDrive data, and the topological relationship and attributes of the road are recalculated based on the topological data of the lanes in the Apollo data:
[0073] (1) Calculate the preceding and succeeding roads of the road based on the preceding and succeeding lanes of the extracted lane, thereby calculating the reference line direction, and write this data into the road node class;
[0074] (2) Calculate the length, intersection ID, and road ID of the road according to the extracted reference line;
[0075] (3) Cut the reference line according to the reference line elevation to ensure that the cubic polynomial fitting error of each section of the reference line elevation is within the threshold. Perform cubic polynomial fitting on the cut reference line to obtain the first fitting parameters: s coordinate phase difference (the distance from the point on the current reference line to the starting point of the reference line), polynomial coefficients (constant term coefficient a, first-order term coefficient b, second-order term coefficient c, third-order term coefficient d), and write the first fitting parameters into the intermediate table;
[0076] (4) Cut the reference line according to the projection of the reference line on the xy plane to ensure that the cubic polynomial fitting error of the projection of each section of the reference line on the xy plane is within the threshold. Perform cubic polynomial fitting on the cut reference line plane projection to obtain the second fitting parameters coordinates (x, y, u, v), heading angle, s coordinate phase difference (the distance from the point on the current reference line to the starting point of the reference line), and write the second fitting parameters into the intermediate table;
[0077] Lane conversion module: Convert all lane data in Apollo format to lane data in OpenDrive format one by one. Calculate the width value, road ID, etc. of the lane reference line according to parameters such as the boundary line, road width, and road ID in the Apollo lane data. The specific process is as follows: Use the geometry of the road corresponding to the extracted lane as a reference, interpolate it, project and calculate the geometry of the spliced lanes to obtain the width value of the lane reference line. Fit the width value to obtain the third fitting parameter, and write the third fitting parameter and the preceding and succeeding parameters (topological relationship) of the lane into the intermediate table;
[0078] The overlapping feature attributes of the road segments in Apollo format represent all the feature information associated with this road segment, and need to be converted to the road features in OpenDrive format one by one;
[0079] The overlapping signal attributes in the road segments of Apollo format represent all the signals associated with this road segment, and are converted to OpenDrive road signals one by one;
[0080] Through the above mapping method and calculation of the fitting parameters in the conversion process, this application converts the original Apollo format map data into standard OpenDrive format map data to support the simulation test tool, so that the simulation test is no longer limited by the map format.
[0081] Preferably, it further includes:
[0082] When the reference lines of roads or lanes in Apollo format map data are broken or overlapped, splice or cut the reference lines in Apollo format to make the reference lines continuous and smooth;
[0083] It can be understood that OpenDrive requires the reference line to be continuous and smooth, while the Apollo data does not meet the standard in many places. Therefore, interpolation points are inserted at appropriate positions to meet the requirements of OpenDrive for the reference line and avoid overlapping / breaking of the generated map data. According to the OpenDrive rules, there will be only one road in the same road section. Therefore, based on the head and tail angles of the road, modify the reference lines of the previous / successive roads to ensure that there will be no breakage or overlap of the reference lines. In the present invention, two flag bits are set in the reference line structure to indicate whether the head / tail of the reference line has been modified to avoid repeated modification.
[0084] Preferably,
[0085] When the reference line of the road or lane is broken, it includes:
[0086] If the reference line of the current road or lane is located at an intersection or a road section and is broken from the previous reference line:
[0087] Obtain the interpolation point in the reference line of the current road or lane that is the closest to the previous reference line, which is interpolation point C;
[0088] Obtain the interpolation point in the previous reference line that is the closest to the reference line of the current road or lane, which is interpolation point B, and the interpolation point A that is the closest to interpolation point B;
[0089] Draw a perpendicular line segment to line segment AB through interpolation point B, and denote the projection point of interpolation point C on the perpendicular line segment as interpolation point E. Calculate the coordinates of interpolation point E, and use interpolation point E as the first interpolation point of the reference line of the current road or lane (if the direction of the reference line interpolation points in the Apollo format data is from the end point to the start point, then interpolation point E is the last interpolation point);
[0090] If the reference line of the current road or lane is located at an intersection or a road section and is broken from the subsequent reference line:
[0091] Select the interpolation point in the reference line of the current road or lane that is the closest to the subsequent reference line, which is interpolation point D, and the interpolation point C that is the closest to interpolation point D;
[0092] Select the interpolation point in the subsequent reference line that is the closest to the reference line of the current road or lane, which is interpolation point A;
[0093] Draw a perpendicular line segment of line segment CD through the transition point D, denote the projection point of transition point A on the perpendicular line segment as transition point E, calculate the coordinates of transition point E, and take transition point E as the first transition point of the subsequent reference line (if in the Apollo format data, the direction of the reference line transition points is from the end point to the start point, then transition point E is the last transition point);
[0094] It can be understood that, as shown in the appendix Figure 3 when the current road is at an intersection or a section and there is a break with the previous reference line:
[0095] (1) Select the two transition points closest to the current lane on the previous lane: transition point A and transition point B, and select the transition point closest to the previous lane on the current lane: transition point C;
[0096] (2) Draw a perpendicular line segment of line segment AB through transition point B. If the perpendicular line segment does not intersect the current lane, the reference line is broken;
[0097] (3) Calculate the coordinates of the projection point E of transition point C on the perpendicular line segment;
[0098] (4) Modify the transition points of the current lane and take the projection point E as the position of the first transition point.
[0099] As shown in the appendix Figure 4 when the current road is at an intersection and there is a break with the subsequent reference line:
[0100] (1) Select the two transition points closest to the current lane on the subsequent lane: transition point A, and select the two transition points closest to the subsequent lane on the current lane: transition point C and transition point D;
[0101] (2) Draw a perpendicular line segment of line segment CD through transition point D. If the perpendicular line segment does not intersect the current lane, the reference line is broken;
[0102] (3) Calculate the coordinates of the projection point E of transition point A on the perpendicular line segment;
[0103] (4) Modify the transition points of the subsequent lane and take the projection point E as the first transition point of the subsequent lane.
[0104] Preferably,
[0105] when the reference lines of the road or lane overlap, it includes:
[0106] If the reference line of the current road or lane is at an intersection or a section and overlaps with the previous reference line or the subsequent reference line:
[0107] Obtain the transition point C that is the closest to the previous reference line or the subsequent reference line among the transition points of the reference line of the current road or lane;
[0108] Among the type points of the previous reference line or the subsequent reference line, obtain the type point B that is the closest to the reference line of the current road or lane, and the type point A that is the closest to the type point B;
[0109] Draw a perpendicular line segment of the line segment AB through the type point B, and denote the projection point of the type point C on the perpendicular line segment as the type point E. Calculate the length S from the type point E to the starting point of the current road or lane. Traverse all the type points of the current road or lane, calculate the length from each type point to the starting point respectively, and eliminate all the type points with a length less than S (if in the Apollo data, the direction of the type point is from the end point to the starting point, then eliminate all the type points with a length greater than S). Insert the type point E into the position of the first type point (or the last type point) of the current road or lane after eliminating the type points;
[0110] It can be understood that as shown in the appendix Figure 5 and the appendix Figure 6 shown, when the reference line of the current road or lane is located at an intersection or a section and overlaps with the previous reference line or the subsequent reference line:
[0111] (1) Select two type points that are the closest to the current lane among the previous lanes: type point A and type point B, and select the type point that is the closest to the previous lane among the current lanes: type point C;
[0112] (2) Draw a perpendicular line segment of the AB line segment through the type point B. If the perpendicular line segment intersects with the current lane and the intersection point is not B, it can be obtained that the reference lines overlap;
[0113] (3) Calculate the coordinates of the projection point E of the type point C on the perpendicular line segment;
[0114] (4) Calculate the length s from the projection point E to the starting point of the current lane;
[0115] (5) Traverse all the type points of the current lane, calculate the length from each type point to the starting point, and eliminate all the type points with a length less than s (if in the Apollo data, the direction of the type point is from the end point to the starting point, then eliminate all the type points with a length greater than S);
[0116] (6) Insert the projection point E into the position of the first type point (or the last type point) of the current lane after elimination.
[0117] Preferably, it further includes:
[0118] In the road data or lane data, if the coordinates of any two roads or lanes contain overlapping parts, it is determined that the two roads or lanes diverge or merge;
[0119] Denote the overlapping part of the two roads as road A, denote the non-overlapping parts of the two roads as road B and road C respectively, denote the intersection point of road AB and road AC as the intersection coordinate D, and write road ADB and road ADC into the connecting roads in the OpenDrive format;
[0120] It is understandable that in Apollo data, the positions of lane addition and subtraction (such as lane divergences and merges) are not regarded as intersections. According to OpenDrive rules, these positions should be defined as intersections. Use the overlapping lane group data in Apollo data to find the diverging / merging roads, and mark the new connecting roads and connecting lanes accordingly. The connecting roads in Apollo data only give envelope-type points. It is necessary to traverse all the connecting roads, create new connecting lanes separately, and write them into the connecting roads in OpenDrive:
[0121] (1) Traverse the sub-items of the overlapping lane group data in Apollo data to establish a mapping table of all lanes and their overlapping lanes;
[0122] (2) Access the first lane in the table, traverse all the associated overlapping lanes of this lane information, and store them in the intermediate data set. Traverse all the lanes in the mapping table;
[0123] (3) Mark all the lanes in the intermediate data set and the roads to which they belong as new connecting roads and connecting lanes.
[0124] Preferably, it also includes:
[0125] In the road data or lane data, if the angle difference between the starting angle and the ending angle of a certain road or lane meets a preset angle difference threshold, then it is considered that this road or lane is a U-turn road;
[0126] Split the original U-turn road EF into two roads or lanes of equal length before and after the U-turn. Set the coordinates at the U-turn as the intersection coordinates G, and obtain two connecting roads EG and GF. The connecting road EG before the U-turn uses the ID of the original U-turn road EF, and the connecting road GF after the U-turn uses a new ID;
[0127] Take the successor road of the original U-turn road EF as the successor road of the connecting road GF, and take the connecting road EG as the pre-order road of the connecting road GF; Modify the ID of the pre-order road of all the successor roads of the original U-turn road EF to the new ID used by the connecting road GF;
[0128] It is understandable that the U-turn lane in front of the crossroads meets the intersection conversion conditions, and this lane should be newly added as a connecting lane. However, the OpenDrive rules do not allow two connecting lanes to be directly connected. Therefore, it is necessary to split the intermediate road to meet the conditions. Therefore, it is necessary to traverse all the intersection roads to determine whether they are U-turn roads. The specific operation steps are as follows:
[0129] (1) The intersection to which the road belongs is not the intersection included in the Apollo original data, but a newly created intersection when dealing with diverging / merging roads;
[0130] (2) The difference between the starting and ending angles of the road is 180° (±15°);
[0131] (3) Roads that meet the above conditions need to be split to meet the OpenDrive standard's requirement that two connecting lanes are not allowed to be directly connected;
[0132] (4) Split the original road reference line into two equal length segments. The first segment uses the original road ID, and the second segment uses the new ID. The reference line points, road width and other attributes are split accordingly.
[0133] (5) Modify the road topology table: copy the successor roads of the original road to the successor roads of the new road ID, and the predecessor roads of the new road ID are the previous road ID; change the IDs of all successor roads and predecessor roads of the original road to the new ID.
[0134] Preferably, it also includes:
[0135] Take a bicycle lane entering the intersection in the road data or lane data as the starting node, all subsequent bicycle lanes of the bicycle lane as child nodes, and the bicycle lane leaving the intersection as the ending node, and obtain all bicycle lane paths leaving the intersection from all directions from the starting node;
[0136] Traverse all bicycle lanes entering the intersection and obtain all bicycle lane paths belonging to the intersection;
[0137] Merge all bicycle paths to obtain new bicycle paths and assign new IDs, and update the original topology relationship table;
[0138] It is understandable that according to OpenDrive rules, the connecting lanes in the intersection can only consist of one lane, but the bicycle lanes in the intersection (a type of connecting lanes in the intersection) in the Apollo data have divergence / merging, so the bicycle lanes in the intersection need to be merged. The specific steps are as follows:
[0139] (1) Take the bicycle lane entering the intersection as the starting node, its subsequent lanes as child nodes, and the bicycle lane exiting the intersection as the ending node, and perform a depth-first traversal to find all paths starting from the bicycle lane and exiting the intersection in all directions;
[0140] (2) Traverse all bicycle lanes that enter the intersection and repeat step ① to obtain all bicycle lanes belonging to the intersection;
[0141] (3) Merge each path obtained in (2) to obtain a new bicycle lane and update the topological relationship table.
[0142] Preferably,
[0143] Obtain the median strip data in the feature data of two-way roads and the sidewalk data along the roadside;
[0144] Cut the type points of the median strip data and the sidewalk data according to the road attributes, recalculate the widths of the median strip and the sidewalk, and convert them into lane boundary lines. Fill the blank parts in the lane boundary lines with lane information or shoulder information;
[0145] It can be understood that the median strip in the middle of two-way roads and the sidewalk along the roadside are feature information in Apollo data and lane information in OpenDrive standard. Therefore, cut the type points of the median strip and the sidewalk in Apollo data according to the road attributes, recalculate the widths, convert them into lane boundary lines, and fill the blank parts of the features and roads in the original data with lane / shoulder information.
[0146] Embodiment 2
[0147] Figure 7 It is a system schematic diagram of a high-precision map format conversion device shown according to another exemplary embodiment, including:
[0148] Data acquisition module 1: Used to acquire road data, lane data, feature data, and signal data of Apollo format map data;
[0149] First intermediate data extraction module 2: Used to cut the reference line according to the elevation of the reference line of the road data, perform polynomial fitting on the cut reference line, and obtain the first fitting parameter; Cut the reference line according to the projection of the reference line in the xy plane, perform polynomial fitting on the cut reference line plane projection, and obtain the second fitting parameter, and write the first fitting parameter and the second fitting parameter into the intermediate table;
[0150] Second intermediate data extraction module 3: Used to calculate the geometric shape of the lane according to the geometric line type of the lane in the lane data, obtain the width value of the lane reference line, perform fitting on the width value of the lane reference line, obtain the third fitting parameter, and write the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table;
[0151] Road and lane conversion module 4: Used to convert the road data and lane data in Apollo format into road data and lane data in OpenDrive format according to the data in the intermediate table;
[0152] Feature conversion module 5: Used to convert the feature data in the lane information node of Apollo format map data into the road target object node of OpenDrive format map data through a mapping method;
[0153] Signal conversion module 6: used to convert the signal data in the lane information node of the Apollo format map data to the road signal node of the OpenDrive format map through a mapping method;
[0154] It can be understood that this application obtains the road data, lane data, feature data, and signal data of the Apollo format map data through the data acquisition module 1; the first intermediate data extraction module 2 cuts the reference line according to the reference line elevation of the road data, performs polynomial fitting on the cut reference line to obtain the first fitting parameter; cuts the reference line according to the projection of the reference line in the xy plane, performs polynomial fitting on the cut reference line plane projection to obtain the second fitting parameter, and writes the first fitting parameter and the second fitting parameter into the intermediate table; the second intermediate data extraction module 3 calculates the geometric shape of the lane according to the geometric line type of the lane in the lane data, obtains the width value of the lane reference line, performs fitting on the width value of the lane reference line to obtain the third fitting parameter, and writes the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table; the road and lane conversion module 4 converts the road data and lane data in the Apollo format to the road data and lane data in the OpenDrive format according to the data in the intermediate table; the feature conversion module 5 converts the data representing features in the lane information node of the Apollo format map data to the road target node of the OpenDrive format map data through a mapping method; the signal conversion module 6 converts the data representing signals in the lane information node of the Apollo format map data to the road signal node of the OpenDrive format map through a mapping method; through the above mapping method and calculating the fitting parameters in the conversion process, this application converts the original Apollo format map data into the standard OpenDrive format map data to support the simulation test tool, so that the simulation test is no longer limited by the map format.
[0155] Embodiment 3:
[0156] This embodiment provides a storage medium, which stores a computer program. When the computer program is executed by the main controller, it realizes each step in the above method;
[0157] It can be understood that the above-mentioned storage medium can be a read-only memory, a disk, an optical disc, etc.
[0158] It can be understood that the same or similar parts in the above embodiments can be referred to each other, and the content not detailed in some embodiments can be referred to the same or similar content in other embodiments.
[0159] It should be noted that in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a plurality of" refers to at least two.
[0160] Any process or method description in the flowchart or described in other ways herein can be understood to represent a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the technical field of the embodiments of the present invention.
[0161] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following well-known techniques in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0162] Those of ordinary skill in the technical field can understand that all or part of the steps carried by the methods in the above embodiments can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0163] In addition, each functional unit in various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0164] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.
[0165] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0166] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A high-precision map format conversion method, characterized in that, The method includes: Obtaining road data, lane data, ground object data, and signal data of Apollo format map data; Cutting the reference line according to the elevation of the reference line of the road data, performing polynomial fitting on the cut reference line, and obtaining the first fitting parameter; cutting the reference line according to the projection of the reference line on the xy plane, performing polynomial fitting on the plane projection of the cut reference line, obtaining the second fitting parameter, and writing the first fitting parameter and the second fitting parameter into the intermediate table; Calculating the geometric shape of the lane according to the geometric line type of the lane in the lane data, obtaining the width value of the lane reference line, performing fitting on the width value of the lane reference line, obtaining the third fitting parameter, and writing the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table; Converting the road data and lane data in Apollo format into road data and lane data in OpenDrive format according to the data in the intermediate table; Converting the ground object data in the lane information node of the Apollo format map data into the road object node of the OpenDrive format map data through a mapping method; Converting the signal data in the lane information node of the Apollo format map data into the road signal node of the OpenDrive format map through a mapping method.
2. The method according to claim 1, wherein It further includes: When the reference line of the road or lane in the Apollo format map data is broken or overlapped, splicing or cutting the reference line in the Apollo format to make the reference line continuous and smooth.
3. The method according to claim 2, wherein When the reference line of the road or lane is broken, splicing the reference line in the Apollo format includes: If the reference line of the current road or lane is located at an intersection or a section and is broken from the previous reference line, splicing the reference line in the Apollo format includes: Obtaining the type point of the reference line of the current road or lane that is closest to the previous reference line, which is type point C; Obtaining the type point of the previous reference line that is closest to the reference line of the current road or lane, which is type point B, and the type point A that is closest to type point B; Drawing a perpendicular line segment to line segment AB through type point B, denoting the projection point of type point C on the perpendicular line segment as type point E, calculating the coordinates of type point E, and taking type point E as the first type point of the reference line of the current road or lane to make it continuous and smooth with the previous reference line; If the reference line of the current road or lane is located at an intersection or a section and is broken from the subsequent reference line, splicing the reference line in the Apollo format includes: Selecting the type point of the reference line of the current road or lane that is closest to the subsequent reference line, which is type point D, and the type point C that is closest to type point D; Selecting the type point of the subsequent reference line that is closest to the reference line of the current road or lane, which is type point A; Drawing a perpendicular line segment to line segment CD through type point D, denoting the projection point of type point A on the perpendicular line segment as type point E, calculating the coordinates of type point E, and taking type point E as the first type point of the subsequent reference line to make it continuous and smooth with the subsequent reference line.
4. The method according to any one of claims 2 or 3, wherein When the reference lines of the said road or lane overlap, clip the reference lines in Apollo format, including: When the reference line of the current road or lane is located at an intersection or a section and overlaps with the previous reference line or the subsequent reference line, it includes: Obtain the type point in the reference line of the current road or lane that is the closest to the previous reference line or the subsequent reference line, which is type point C; Obtain the type point in the previous reference line or the subsequent reference line that is the closest to the reference line of the current road or lane, which is type point B, and the type point A that is the closest to type point B; Draw a perpendicular line segment to line segment AB through type point B, denote the projection point of type point C on the perpendicular line segment as type point E, calculate the length S from type point E to the starting point of the current road or lane, traverse all the type points of the current road or lane, calculate the length from each type point to the starting point respectively, eliminate all the type points with a length less than S, and insert type point E into the position of the first type point of the current road or lane after eliminating the type points, so as to be continuous and smooth with the previous reference line or the subsequent reference line.
5. The method according to claim 1, wherein It also includes: In the road data or lane data, if the coordinates of any two roads or lanes contain overlapping parts, it is determined that the two roads or lanes diverge or merge; Denote the overlapping part of the two roads as road A, denote the non-overlapping parts of the two roads as road B and road C respectively, denote the intersection coordinate of road AB and road AC as intersection coordinate D, and write road ADB and road ADC into the connected roads in OpenDrive format.
6. The method according to claim 1, characterized in that, It also includes: In the road data or lane data, if the angle difference between the starting angle and the ending angle of a certain road or lane meets the preset angle difference threshold, it is considered that the road or lane is a U-turn road; Split the original U-turn road EF into two roads or lanes of equal length before and after the U-turn, set the coordinate of the U-turn as intersection coordinate G, obtain two connected roads EG and GF, the previous connected road EG of the U-turn uses the original ID of the U-turn road EF, and the subsequent connected road GF after the U-turn uses a new ID; Take the subsequent road of the original U-turn road EF as the subsequent road of the connected road GF, and take the connected road EG as the previous road of the connected road GF; Modify the ID of the previous road of all the subsequent roads of the original U-turn road EF to the new ID used by the connected road GF.
7. The method according to claim 1, wherein It also includes: Taking a bicycle lane entering an intersection in the road data or lane data as the starting node, all the subsequent bicycle lanes of this bicycle lane as the sub-nodes, and the bicycle lane leaving the intersection as the ending node, obtain all the bicycle road paths leaving the intersection from all directions of this starting node; Traverse all the bicycle lanes entering the intersection, and obtain all the bicycle road paths belonging to this intersection; Merge all the bicycle road paths to get a new bicycle lane and assign it a new ID, and update the original topology relation table.
8. The method according to claim 1, wherein Obtain the median strip data and the roadside sidewalk data in the middle of the two-way road in the ground object data; Cut the type points of the isolation belt data and sidewalk data according to the road attributes, recalculate the widths of the isolation belt and sidewalk, and convert them into lane boundary lines. Fill the blank parts in the lane boundary lines with lane information or shoulder information.
9. A high-precision map format conversion device, characterized in that The device includes: A data acquisition module: used to acquire road data, lane data, feature data, and signal data of Apollo format map data; A first intermediate data extraction module: used to cut the reference line according to the elevation of the reference line of the road data, perform polynomial fitting on the cut reference line to obtain the first fitting parameter; cut the reference line according to the projection of the reference line in the xy plane, perform polynomial fitting on the cut reference line plane projection to obtain the second fitting parameter, and write the first fitting parameter and the second fitting parameter into the intermediate table; A second intermediate data extraction module: used to calculate the geometric shape of the lane according to the geometric line type of the lane in the lane data, obtain the width value of the lane reference line, perform fitting on the width value of the lane reference line to obtain the third fitting parameter, and write the third fitting parameter and the topological relationship of the lane in the lane data into the intermediate table; A road and lane conversion module: used to convert the road data and lane data in Apollo format into road data and lane data in OpenDrive format according to the data in the intermediate table; A feature conversion module: used to convert the feature data in the lane information node of the Apollo format map data into the road object node of the OpenDrive format map data through a mapping method; A signal conversion module: used to convert the signal data in the lane information node of the Apollo format map data into the road signal node of the OpenDrive format map through a mapping method.
10. A storage medium, characterized in that, The storage medium stores a computer program, which when executed by the main controller, implements each step in a high-precision map format conversion method as described in any one of claims 1-8.
Citation Information
Patent Citations
Map topology connection line generation method for intelligent network connection vehicle
CN113074744A
Map format conversion method and device and electronic equipment
CN113836255A