Method and device for generating three-dimensional intersection model
By analyzing OpenDRIVE map data and merging the three-dimensional polygons formed by boundary points, the three-dimensional intersection model is generated using the ear-cut method, which solves the problem that the entire three-dimensional road network model needs to be updated in the existing technology of intersection changes, and improves the update efficiency.
Patent Information
- Application Number
- CN202111269196.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In the three-dimensional road network model, the entire three-dimensional road network model needs to be updated when the intersection changes, resulting in low update efficiency.
By analyzing OpenDRIVE map data, the three-dimensional polygons formed by the boundary points of each connecting road in an intersection are calculated, and these polygons are merged to generate a three-dimensional intersection model. The three-dimensional intersection model is generated by the ear cutting method, which is independent of the three-dimensional object model and only if required Update the three-dimensional intersection model when it is time.
The update efficiency of the three-dimensional intersection model is improved, thereby improving the update efficiency of the three-dimensional road network model, and solving the merge problem caused by no intersection with other three-dimensional polygons.
Smart Images

Figure CN114037798B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method and device for generating a three-dimensional intersection model. Background Art
[0002] Autonomous driving, also known as unmanned driving, relies on artificial intelligence, visual computing, radar, monitoring devices and global positioning systems to work together to allow computers to automatically and safely operate motor vehicles without any human intervention. Simulation test verification is an essential part of the autonomous driving system development process. Autonomous driving simulation software generally needs to generate a three-dimensional road network model first, and then generate a simulated three-dimensional space animation based on a three-dimensional rendering engine to achieve simulation testing through the three-dimensional space animation.
[0003] Among them, the 3D road network model includes a 3D road model and a 3D object model. The 3D object model refers to the 3D model of static objects around the road. At present, when generating a 3D road network model, a 3D model including the road and the static objects around the road is generated, and the 3D road model and the 3D object model in the 3D model are an inseparable whole. Therefore, when a road in the 3D road network model, especially an intersection, changes, the entire 3D road network model needs to be updated again, and the update efficiency is low. Summary of the invention
[0004] The present invention provides a method and device for generating a three-dimensional intersection model, which can generate a three-dimensional intersection model independent of a three-dimensional object model based on OpenDRIVE map data. When the intersection needs to be updated, the three-dimensional intersection model can be directly updated without recalculating the three-dimensional object model, thereby improving the update efficiency of the three-dimensional intersection model and further improving the update efficiency of the three-dimensional road network model.
[0005] The specific technical solutions are as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for generating a three-dimensional intersection model, the method comprising:
[0007] Parse OpenDRIVE map data to obtain road network descriptive data;
[0008] Calculating a three-dimensional polygon formed by boundary points of each connecting road in the intersection according to the road network descriptive data;
[0009] Merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection;
[0010] The three-dimensional boundary area is cut using the ear cutting method to generate a three-dimensional intersection model of the intersection.
[0011] Optionally, the road network descriptive data includes Junction node information and Road node information of each connecting road in the intersection, the Junction node information is used to describe the intersection in the road network, and the Road node information is used to describe the connecting roads.
[0012] Optionally, when the Road node information includes geometric shape information, elevation information, reference lines of connected roads, lane information, and transverse profile information, a three-dimensional polygon formed by boundary points of each connected road in an intersection is calculated according to the road network descriptive data, including:
[0013] Determine the intersection to be calculated according to the Junction node information in the road network descriptive data;
[0014] Determine the three-dimensional coordinates of the reference line corresponding to the connecting road defined in the Road node information according to the geometric shape information and elevation information in the Road node information of each connecting road in the intersection;
[0015] For each connecting road, determine the horizontal coordinates of the boundary point of the connecting road according to the three-dimensional coordinates of the reference line of the connecting road and the lane information in the Road node information of the connecting road, and determine the vertical coordinates of the boundary point of the connecting road according to the transverse section information and the lane information in the Road node information of the connecting road, wherein the horizontal coordinates are coordinates on a horizontal plane, and the vertical coordinates are coordinates on a vertical plane perpendicular to the horizontal plane;
[0016] For each connecting road, the boundary points of the connecting road with determined horizontal coordinates and vertical coordinates are connected in sequence to form a three-dimensional polygon of the connecting road.
[0017] Optionally, when the lane information includes lane width information and lane offset information, determining the horizontal coordinates of the boundary point of the connecting road according to the three-dimensional coordinates of the reference line of the connecting road and the lane information in the Road node information of the connecting road includes:
[0018] For each boundary line of the connecting road, determine a lateral offset between the boundary line and the reference line according to lane width information and lane offset information in lane information of a lane included between the boundary line and the reference line;
[0019] Determine the tangent direction of each point on the reference line, and determine the direction perpendicular to the tangent direction and toward the boundary line as the offset direction of the boundary line relative to the reference line;
[0020] The horizontal coordinates of the boundary points on the boundary line are determined according to the lateral offset and the offset direction.
[0021] Optionally, when the connecting road includes multiple lanes, the connecting road includes a center lane and a first side lane and a second side lane respectively located on both sides of the center lane, the lane width information of the center lane is 0, the number of lanes of the first side lane is the same as the number of lanes of the second side lane, and the lane offset is the offset of the center lane relative to the reference line.
[0022] Optionally, for each boundary line of the connecting road, determining a lateral offset between the boundary line and the reference line according to lane width information and lane offset information in lane information of a lane included between the boundary line and the reference line includes:
[0023] When the reference line is the center line of the connecting road, the lateral offset between the first side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road, wherein the first side boundary line and the first side lane are located on the same side relative to the center line, and the second side boundary line and the second side lane are located on the same side relative to the center line;
[0024] When the reference line is the first side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is 0, and the lateral offset between the second side boundary line and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road;
[0025] When the reference line is the second side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line and the reference line is 0.
[0026] Optionally, merging the three-dimensional polygons of all connected roads in the intersection to obtain the three-dimensional boundary area of the intersection includes:
[0027] If the three-dimensional polygons of all the connecting roads in the intersection are merged to obtain two merged three-dimensional polygons, the three-dimensional polygon located on the outer side is determined as the three-dimensional boundary area of the intersection.
[0028] Optionally, merging the three-dimensional polygons of all connected roads in the intersection to obtain the three-dimensional boundary area of the intersection includes:
[0029] Selecting two adjacent three-dimensional polygons to be merged from the three-dimensional polygons of all the connecting roads in the intersection, merging the two three-dimensional polygons to be merged, and obtaining a merged first three-dimensional polygon;
[0030] According to the positional relationship of the remaining three-dimensional polygons including the three-dimensional polygon that has not been merged and the first three-dimensional polygon, two adjacent three-dimensional polygons to be merged are selected from the remaining three-dimensional polygons, and the two currently selected three-dimensional polygons to be merged are merged to obtain a merged second three-dimensional polygon, until the remaining three-dimensional polygons include only one three-dimensional polygon, and the three-dimensional boundary area of the intersection is obtained;
[0031] In which, in the process of merging the two three-dimensional polygons to be merged, if the two three-dimensional polygons to be merged have two intersecting edges, the intersection point is determined as the merged point, and the three-dimensional coordinates of the intersection point are obtained by interpolating the three-dimensional coordinates of the two boundary points on the line segment where the intersection point is located.
[0032] Optionally, merging the three-dimensional polygons of all connected roads in the intersection to obtain the three-dimensional boundary area of the intersection includes:
[0033] When a target three-dimensional polygon exists among the three-dimensional polygons of all the connecting roads in the intersection, a triangle is added at the connection between the connecting road corresponding to the target three-dimensional polygon and the intersection, wherein the target three-dimensional polygon is a three-dimensional polygon that has no intersection with other three-dimensional polygons, or a three-dimensional polygon whose intersection with other three-dimensional polygons is a point, two vertices of the triangle are boundary points of the intersection, and the third vertex is located in the intersection;
[0034] The three-dimensional polygons of all connected roads in the intersection and the triangle are merged to obtain a three-dimensional boundary area of the intersection.
[0035] In a second aspect, an embodiment of the present invention provides a device for generating a three-dimensional intersection model, the device comprising:
[0036] A parsing unit, used to parse OpenDRIVE map data to obtain road network descriptive data;
[0037] A calculation unit, used for calculating the three-dimensional polygon formed by the boundary points of each connecting road in the intersection according to the road network descriptive data;
[0038] A merging unit, used for merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection;
[0039] The cutting unit is used to cut the three-dimensional boundary area by using the ear cutting method to generate a three-dimensional intersection model of the intersection.
[0040] Optionally, the road network descriptive data includes Junction node information and Road node information of each connecting road in the intersection, the Junction node information is used to describe the intersection in the road network, and the Road node information is used to describe the connecting roads.
[0041] Optionally, the computing unit includes:
[0042] A first determination module is used to determine the intersection to be calculated according to the intersection node information in the road network descriptive data;
[0043] A second determination module is used to determine the three-dimensional coordinates of the reference line of the corresponding connecting road defined in the Road node information according to the geometric shape information and elevation information in the Road node information of each connecting road in the intersection when the Road node information includes geometric shape information, elevation information, and a reference line of the connecting road;
[0044] a third determining module, configured to determine, for each connecting road, a horizontal coordinate of a boundary point of the connecting road according to the three-dimensional coordinates of a reference line of the connecting road and the lane information in the Road node information of the connecting road when the Road node information includes lane information, wherein the horizontal coordinate is a coordinate on a horizontal plane;
[0045] a fourth determining module, configured to determine, for each connecting road, a vertical coordinate of a boundary point of the connecting road according to the transverse profile information and lane information in the Road node information of the connecting road when the Road node information further includes transverse profile information, wherein the vertical coordinate is a coordinate on a vertical plane perpendicular to the horizontal plane;
[0046] The connection module is used for sequentially connecting the boundary points of the connection road with determined horizontal coordinates and vertical coordinates for each connection road to form a three-dimensional polygon of the connection road.
[0047] Optionally, the third determination module is used to determine, for each boundary line of the connecting road, a lateral offset between the boundary line and the reference line based on the lane width information and the lane offset information in the lane information of the lane contained between the boundary line and the reference line when the lane information includes lane width information and lane offset information; determine the tangent direction of each point on the reference line, and determine the direction perpendicular to the tangent direction and toward the boundary line as the offset direction of the boundary line relative to the reference line; and determine the horizontal coordinates of the boundary point on the boundary line based on the lateral offset and the offset direction.
[0048] Optionally, when the connecting road includes multiple lanes, the connecting road includes a center lane and a first side lane and a second side lane respectively located on both sides of the center lane, the lane width information of the center lane is 0, the number of lanes of the first side lane is the same as the number of lanes of the second side lane, and the lane offset is the offset of the center lane relative to the reference line.
[0049] Optionally, the third determination module is used for, when the reference line is the center line of the connecting road, the lateral offset between the first side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road, wherein the first side boundary line and the first side lane are located on the same side relative to the center line, and the second side boundary line and the second side lane are located on the same side relative to the center line;
[0050] When the reference line is the first side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is 0, and the lateral offset between the second side boundary line and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road;
[0051] When the reference line is the second side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line and the reference line is 0.
[0052] Optionally, a merging unit is used to obtain two inner and outer merged three-dimensional polygons after merging the three-dimensional polygons of all connecting roads in the intersection, and then determine the three-dimensional polygon located on the outer side as the three-dimensional boundary area of the intersection.
[0053] Optionally, the merging unit includes:
[0054] A selection module, used for selecting two adjacent three-dimensional polygons to be merged from the three-dimensional polygons of all connected roads in the intersection;
[0055] A merging module, used for merging the two three-dimensional polygons to be merged to obtain a merged first three-dimensional polygon;
[0056] The selection module is used to select two adjacent three-dimensional polygons to be merged from the remaining three-dimensional polygons according to the positional relationship of the remaining three-dimensional polygons including the three-dimensional polygon that has not been merged and the first three-dimensional polygon;
[0057] The merging module is used to merge the two currently selected three-dimensional polygons to be merged to obtain a merged second three-dimensional polygon, until the remaining three-dimensional polygons include only one three-dimensional polygon, thereby obtaining the three-dimensional boundary area of the intersection;
[0058] In which, in the process of merging the two three-dimensional polygons to be merged, if the two three-dimensional polygons to be merged have two intersecting edges, the intersection point is determined as the merged point, and the three-dimensional coordinates of the intersection point are obtained by interpolating the three-dimensional coordinates of the two boundary points on the line segment where the intersection point is located.
[0059] Optionally, a merging unit is used to add a triangle at the connection point between the connecting road corresponding to the target three-dimensional polygon and the intersection when there is a target three-dimensional polygon among the three-dimensional polygons of all connecting roads in the intersection, wherein the target three-dimensional polygon is a three-dimensional polygon that has no intersection with other three-dimensional polygons, or a three-dimensional polygon whose intersection with other three-dimensional polygons is a point, two vertices of the triangle are boundary points of the intersection, and the third vertex is located within the intersection; the three-dimensional polygons of all connecting roads in the intersection and the triangle are merged to obtain the three-dimensional boundary area of the intersection.
[0060] In a third aspect, an embodiment of the present invention provides a storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described in the first aspect.
[0061] In a fourth aspect, an embodiment of the present invention provides a computing device, including:
[0062] one or more processors;
[0063] a storage device for storing one or more programs,
[0064] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in the first aspect.
[0065] As can be seen from the above content, the method and device for generating a three-dimensional intersection model provided by the embodiment of the present invention can first parse the OpenDRIVE map data to obtain the road network descriptive data, then calculate the three-dimensional polygons formed by the boundary points of each connecting road in the intersection according to the road network descriptive data, and merge the three-dimensional polygons of all connecting roads in the intersection to obtain the three-dimensional boundary area of the intersection, and finally use the ear cutting method to cut the three-dimensional boundary area to generate the three-dimensional intersection model of the intersection. Since the three-dimensional intersection model of the embodiment of the present invention is generated according to the road network data description information in the OpenDRIVE map data, it is independent of the three-dimensional object model. When the intersection needs to be updated, the three-dimensional intersection model can be directly updated without recalculating the three-dimensional object model, thereby improving the update efficiency of the three-road intersection model, and then improving the update efficiency of the three-dimensional road network model. In addition, when there are three-dimensional polygons among all the connecting roads in the intersection that have no intersection with other three-dimensional polygons or three-dimensional polygons whose intersection with other three-dimensional polygons is a single point, the three-dimensional polygons of all the connecting roads can be merged by adding a triangle at the connection point between the connecting road corresponding to the three-dimensional polygon and the intersection, thereby solving the problem that they cannot be merged with other three-dimensional polygons.
[0066] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work.
[0068] Figure 1 A schematic diagram of a flow chart of a method for generating a three-dimensional intersection model provided by an embodiment of the present invention;
[0069] Figure 2 An example diagram of a method for determining horizontal coordinates of a connecting road boundary line provided by an embodiment of the present invention;
[0070] Figure 3 An exemplary diagram of a method for constructing a triangle provided by an embodiment of the present invention;
[0071] Figure 4 An exemplary diagram of a polygon merging method provided by an embodiment of the present invention;
[0072] Figure 5 An example diagram of triangulating the boundary area of an intersection provided by an embodiment of the present invention;
[0073] Figure 6 A block diagram of a device for generating a three-dimensional intersection model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0074] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0076] The present invention provides a method and device for generating a three-dimensional intersection model, which can generate a three-dimensional intersection model independent of a three-dimensional object model based on OpenDRIVE map data. When an intersection needs to be updated, the three-dimensional intersection model can be directly updated without recalculating the three-dimensional object model, thereby improving the update efficiency of the three-way intersection model, and further improving the update efficiency of the three-dimensional road network model. The method provided by the embodiment of the present invention can be applied to any electronic device with computing capabilities. In one implementation, the functional software implementing the method can exist in the form of a separate client software, or in the form of a plug-in for currently related client software.
[0077] The embodiments of the present invention are described in detail below.
[0078] Figure 1 A schematic flow chart of a method for generating a three-dimensional intersection model provided in an embodiment of the present invention. The method mainly includes:
[0079] S100, parsing OpenDRIVE map data to obtain road network descriptive data.
[0080] OpenDRIVE is a universal road information description format, and its syntax uses XML (Extensible Markup Language). OpenDRIVE map data can be manually constructed in simulation software or automatically generated based on real road data. Therefore, by parsing OpenDRIVE map data, road network descriptive data can be obtained to describe roads, intersections, lane information, and other road-related information.
[0081] The road network descriptive data includes Road node information and Junction node information. Road node information is used to describe the roads in the road network, and the Road node information of each connecting road in the intersection is used to describe the connecting road. Road node information includes geometry information, elevation information, lanes information, reference lines of connecting roads, lateral profile information, etc. Junction node information is used to describe the intersection, including the name and ID of the intersection, and the connecting road information in the intersection (including the incoming road ID and the outgoing road ID).
[0082] S110, calculating a three-dimensional polygon formed by boundary points of each connecting road in the intersection according to the road network descriptive data.
[0083] Specifically, the three-dimensional polygon formed by the boundary points of each connecting road can be obtained through steps A1-A4.
[0084] (A1) Determine the intersection to be calculated according to the intersection node information in the road network descriptive data. Determine whether a three-dimensional intersection model has been generated for the intersection according to the intersection name or ID included in the junction node information. If the three-dimensional intersection model has not been generated, determine the intersection as the intersection to be calculated.
[0085] (A2) determining the three-dimensional coordinates of a reference line corresponding to the connecting road defined in the Road node information according to the geometric shape information and elevation information in the Road node information of each connecting road in the intersection.
[0086] An intersection is an intersection area formed by connecting multiple roads. For a road, part of the road section is outside the intersection, and part of the road section is inside the intersection. In the embodiment of the present invention, the road section inside the intersection is determined as a connecting road. A reference line is defined for each road in the Road node information, and the reference line is used as a reference benchmark to describe the changes of other positions of the road relative to the reference line. Generally, the reference line is the center line of the road, and it can also be a boundary line of the road.
[0087] Geometry information provides at least five types of geometric curves for representing the shape of the reference line, namely, straight line, arc, spiral, cubic polynomial and parametric cubic polynomial. These lines have different mathematical expressions, and the expression to be used is determined based on the actual road. For example, a straight road is expressed by a straight line, and an arc road is expressed by an arc. Therefore, Geometry information can be used to calculate the horizontal coordinates of the reference line connecting the roads on the horizontal plane. When the horizontal axis of the horizontal plane is represented by the X axis and the vertical axis is represented by the Y axis, the horizontal plane is the XY plane, and the horizontal coordinates are (x, y).
[0088] The elevation information is used to describe the slope information of the reference line. Therefore, the elevation information can be used to determine the vertical coordinate of the reference line on the vertical plane. When the coordinate axis on the vertical plane is represented by the Z axis, the vertical coordinate is z.
[0089] The horizontal coordinate and vertical coordinate of the reference line constitute the three-dimensional coordinate of the reference line. For example, for any point on the reference line, if the horizontal coordinate is (x, y) and the vertical coordinate is z, then the three-dimensional coordinate of the point is (x, y, z).
[0090] (A3) For each connecting road, the horizontal coordinates of the boundary points of the connecting road are determined based on the three-dimensional coordinates of the reference line of the connecting road and the lane information in the Road node information of the connecting road, and the vertical coordinates of the boundary points of the connecting road are determined based on the transverse profile information and lane information in the Road node information of the connecting road.
[0091] Wherein, the horizontal coordinate is the coordinate on the horizontal plane, and the vertical coordinate is the coordinate on the vertical plane perpendicular to the horizontal plane. The method for determining the horizontal coordinate of the boundary point of the connecting road may be: when the lane information includes lane width information and lane offset information, for each boundary line of the connecting road, according to the lane width information and lane offset information in the lane information of the lane included between the boundary line and the reference line, determine the lateral offset between the boundary line and the reference line; determine the tangent direction of each point on the reference line, and determine the direction perpendicular to the tangent direction and toward the boundary line as the offset direction of the boundary line relative to the reference line; determine the horizontal coordinate of the boundary point on the boundary line according to the lateral offset and the offset direction.
[0092] The connecting road includes at least one lane. When it includes multiple lanes, it includes a center lane and a first side lane and a second side lane located on both sides of the center lane, for example, the first side lane is a left lane and the second side lane is a right lane, or the first side lane is a right lane and the second side lane is a left lane. The lane width information of the center lane is 0 and is used as a reference for lane numbering. The lane number of the center lane is 0. The numbering of other lanes starts from the center lane. The lane numbers are in descending order to one side, such as -1, -2, and in ascending order to the other side, such as 1, 2. The number of lanes of the first side lane is the same as the number of lanes of the second side lane. The lane information includes lane offset (laneOffset) information and lane width information. The laneOffset information is used to indicate the offset of the center lane relative to the reference line. The lane width information includes the width of each lane, and the width of each lane is not necessarily the same. When the reference line is the center line of the connecting road, the lateral offset between the first side boundary line of the connecting road and the reference line is the sum of the laneOffset information and the lane width information of all first side lanes, and the lateral offset between the second side boundary line of the connecting road and the reference line is the sum of the laneOffset information and the lane width information of all second side lanes, wherein the first side boundary line and the first side lane are located on the same side relative to the center line, and the second side boundary line and the second side lane are located on the same side relative to the center line, for example, the first side boundary line is the left boundary line, the first side lane is the left lane, the second side boundary line is the right boundary line, and the first side lane is the right lane. When the reference line is the first side boundary line of the connecting road, the lateral offset between the reference line and the first side boundary line is 0, and the lateral offset between the reference line and the second side boundary line is the sum of the laneOffset information and the lane width information of all the second side lanes; when the reference line is the second side boundary line of the connecting road, the lateral offset between the reference line and the second boundary line is 0, and the lateral offset between the reference line and the first side boundary line is the sum of the laneOffset information and the lane width information of all the first side lanes.
[0093] When the connecting road includes only one lane, the laneOffset information is 0, and the reference line is the first side boundary line or the second side boundary line of the connecting road. When the reference line is the first side boundary line, the lateral offset between the reference line and the first side boundary line is 0, and the lateral offset between the reference line and the second side boundary line is the lane width information; when the reference line is the second side boundary line, the lateral offset between the reference line and the first side boundary line is the lane width information, and the lateral offset between the reference line and the second side boundary line is 0.
[0094] For example, Figure 2 is a connecting road, the reference line of the connecting road is the left boundary line, and point P on the reference lineref With the left boundary point P left Coincident, the reference line is at point P ref The tangent direction at point P is vector s, and the offset direction is vector t (for intuitive representation, it is not drawn at point P). ref At point P ref The lateral offset between the reference line and the right boundary line is w1+w2. Based on the lateral offset and the offset direction, the distance from point P to point P can be calculated. left The corresponding point P on the right boundary line right The horizontal coordinate of .
[0095] The lateral profile is a series of superelevation and cross-section records that define the characteristics of the road surface along the reference line. The lane information includes lane height information used to describe the lane height. Therefore, the vertical coordinates of the boundary points of the connecting road can be calculated based on the lateral profile information and lane height information.
[0096] (A4) For each connecting road, the boundary points of the connecting road with determined horizontal coordinates and vertical coordinates are sequentially connected to form a three-dimensional polygon of the connecting road.
[0097] S120: Merge the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection.
[0098] Specifically, two adjacent three-dimensional polygons to be merged are selected from the three-dimensional polygons of all the connecting roads in the intersection, and the two three-dimensional polygons to be merged are merged to obtain a merged first three-dimensional polygon; according to the positional relationship of the remaining three-dimensional polygons including the unmerged three-dimensional polygons and the first three-dimensional polygon, two adjacent three-dimensional polygons to be merged are selected from the remaining three-dimensional polygons, and the two currently selected three-dimensional polygons to be merged are merged to obtain a merged second three-dimensional polygon, until the remaining three-dimensional polygons include only one three-dimensional polygon, and the three-dimensional boundary area of the intersection is obtained. In the process of merging the two three-dimensional polygons to be merged, if two edges of the two three-dimensional polygons to be merged intersect, the intersection is determined as the merged point, and the three-dimensional coordinates of the intersection are obtained by interpolating the three-dimensional coordinates of the two boundary points on the line segment where the intersection is located. In essence, merging two three-dimensional polygons is to calculate the union of the two three-dimensional polygons.
[0099] Optionally, when a target three-dimensional polygon exists among the three-dimensional polygons of all the connecting roads in the intersection, a triangle is added at the junction of the connecting road corresponding to the target three-dimensional polygon and the intersection. The target three-dimensional polygon is a three-dimensional polygon that has no intersection with other three-dimensional polygons, or a three-dimensional polygon whose intersection with other three-dimensional polygons is a point, two vertices of the triangle are boundary points of the intersection, and the third vertex is located in the intersection. The three-dimensional polygons of all the connecting roads in the intersection and the triangle are merged to obtain the three-dimensional boundary area of the intersection.
[0100] Optionally, if the three-dimensional polygons of all connecting roads in the intersection are merged to obtain two inner and outer merged three-dimensional polygons, the three-dimensional polygon located on the outer side is determined as the three-dimensional boundary area of the intersection.
[0101] For example, Figure 3 The intersection is a Y-shaped intersection, which includes the cross-section of three-dimensional polygons formed by three connected roads, namely polygons A, B and C on the horizontal plane, where polygon D is a blank area. The intersections between polygons A and B, B and C, and C and A are only one point each. In order to merge the three, three points can be added to generate three triangles E, F and G. Then, polygon A and triangle E are merged in turn to obtain the merged polygons as shown in Figure 4 In Figure (1), Figure 4 Figure (1) in the figure is merged with triangle F to obtain the merged polygon as shown in Figure 4 In Figure (2), Figure 4 In Figure 2 Merge with polygon B to obtain the merged polygon as follows Figure 4 Figure (3) in , and so on, then Figure (3) in 4 becomes Figure (4), Figure (5), and Figure (6), because Figure 4 There are two inner and outer polygons in Figure (6), so remove the inner polygon and obtain the outer polygon as the boundary area of the intersection, such as Figure 4 Figure (7) in .
[0102] S130: Cut the three-dimensional boundary area using an ear cutting method to generate a three-dimensional intersection model of the intersection.
[0103] The ear cutting method is a method of triangulating polygons, which can be combined with Figure 5 To understand the implementation process of this method: Figure 5The three-dimensional boundary area in includes 19 points, namely point 0 to point 18. Select a convex vertex, for example, point 0, whose two adjacent points are point 18 and point 1, and the triangle formed by the three points 0 / 1 / 18 is an ear triangle. Add the indexes of these three points to the index array, and do not use point 0 to construct triangles in the future. Using the same method, triangles 1 / 2 / 18, 2 / 3 / 18, 3 / 4 / 18, 4 / 5 / 18, 5 / 6 / 18, 6 / 7 / 18, 7 / 8 / 18, 8 / 9 / 18, 9 / 10 / 18 and 10 / 11 / 18 can be cut out in sequence. When judging point 11, triangle 11 / 12 / 18 is not an ear triangle because point 13 is inside the triangle. Continuing to judge with point 12 as the vertex of the ear tip, 12 / 13 / 11, 13 / 14 / 11, 14 / 15 / 11, 15 / 16 / 11, 16 / 17 / 11 and 17 / 18 / 11 can be cut out. At this point, the polygon triangulation is completed, and a total of 17 triangles are generated as shown in the figure. Figure 5 As shown in the right figure.
[0104] It should be added that the process of generating a 3D road model excluding intersections is similar to the process of generating 3D polygons of connecting roads in a 3D intersection model. After generating a 3D intersection model and a 3D road model excluding intersections, the two models can be merged and rendered using a 3D rendering engine to generate a displayable 3D road model.
[0105] The method for generating a three-dimensional intersection model provided in an embodiment of the present invention can first parse the OpenDRIVE map data to obtain the road network descriptive data, then calculate the three-dimensional polygons formed by the boundary points of each connecting road in the intersection according to the road network descriptive data, and merge the three-dimensional polygons of all connecting roads in the intersection to obtain the three-dimensional boundary area of the intersection, and finally use the ear cutting method to cut the three-dimensional boundary area to generate the three-dimensional intersection model of the intersection. Since the three-dimensional intersection model of the embodiment of the present invention is generated according to the road network data description information in the OpenDRIVE map data, it is independent of the three-dimensional object model. When the intersection needs to be updated, the three-dimensional intersection model can be directly updated without recalculating the three-dimensional object model, thereby improving the update efficiency of the three-road intersection model, and then improving the update efficiency of the three-dimensional road network model. In addition, when there are three-dimensional polygons among all the connecting roads in an intersection that have no intersection with other three-dimensional polygons, the three-dimensional polygons of all the connecting roads can be merged by adding a triangle at the connection point between the connecting road corresponding to the three-dimensional polygon without intersection and the intersection, thereby solving the problem of being unable to merge due to no intersection with other three-dimensional polygons.
[0106] Based on the above embodiment, another embodiment of the present invention provides a device for generating a three-dimensional intersection model, such as Figure 6 As shown, the device comprises:
[0107] A parsing unit 20, used for parsing OpenDRIVE map data to obtain road network descriptive data;
[0108] A calculation unit 22, used for calculating a three-dimensional polygon formed by boundary points of each connecting road in the intersection according to the road network descriptive data;
[0109] A merging unit 24, configured to merge the three-dimensional polygons of all the connecting roads in the intersection to obtain a three-dimensional boundary area of the intersection;
[0110] The cutting unit 26 is used to cut the three-dimensional boundary area using the ear cutting method to generate a three-dimensional intersection model of the intersection.
[0111] Optionally, the road network descriptive data includes Junction node information and Road node information of each connecting road in the intersection, the Junction node information is used to describe the intersection in the road network, and the Road node information is used to describe the connecting roads.
[0112] Optionally, the computing unit 22 includes:
[0113] A first determination module is used to determine the intersection to be calculated according to the intersection node information in the road network descriptive data;
[0114] A second determination module is used to determine the three-dimensional coordinates of the reference line of the corresponding connecting road defined in the Road node information according to the geometric shape information and elevation information in the Road node information of each connecting road in the intersection when the Road node information includes geometric shape information, elevation information, and a reference line of the connecting road;
[0115] a third determining module, configured to determine, for each connecting road, a horizontal coordinate of a boundary point of the connecting road according to the three-dimensional coordinates of a reference line of the connecting road and the lane information in the Road node information of the connecting road when the Road node information includes lane information, wherein the horizontal coordinate is a coordinate on a horizontal plane;
[0116] a fourth determining module, configured to determine, for each connecting road, a vertical coordinate of a boundary point of the connecting road according to the transverse profile information and lane information in the Road node information of the connecting road when the Road node information further includes transverse profile information, wherein the vertical coordinate is a coordinate on a vertical plane perpendicular to the horizontal plane;
[0117] The connection module is used for sequentially connecting the boundary points of the connection road with determined horizontal coordinates and vertical coordinates for each connection road to form a three-dimensional polygon of the connection road.
[0118] Optionally, the third determination module is used to determine, for each boundary line of the connecting road, a lateral offset between the boundary line and the reference line based on the lane width information and the lane offset information in the lane information of the lane contained between the boundary line and the reference line when the lane information includes lane width information and lane offset information; determine the tangent direction of each point on the reference line, and determine the direction perpendicular to the tangent direction and toward the boundary line as the offset direction of the boundary line relative to the reference line; and determine the horizontal coordinates of the boundary point on the boundary line based on the lateral offset and the offset direction.
[0119] Optionally, when the connecting road includes multiple lanes, the connecting road includes a center lane and a first side lane and a second side lane respectively located on both sides of the center lane, the lane width information of the center lane is 0, the number of lanes of the first side lane is the same as the number of lanes of the second side lane, and the lane offset is the offset of the center lane relative to the reference line.
[0120] Optionally, the third determination module is used for, when the reference line is the center line of the connecting road, the lateral offset between the first side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road, wherein the first side boundary line and the first side lane are located on the same side relative to the center line, and the second side boundary line and the second side lane are located on the same side relative to the center line;
[0121] When the reference line is the first side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is 0, and the lateral offset between the second side boundary line and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road;
[0122] When the reference line is the second side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line and the reference line is 0.
[0123] Optionally, the merging unit 24 is used to obtain two inner and outer merged three-dimensional polygons after merging the three-dimensional polygons of all connecting roads in the intersection, and then determine the three-dimensional polygon located on the outer side as the three-dimensional boundary area of the intersection.
[0124] Optionally, the merging unit 24 includes:
[0125] A selection module, used for selecting two adjacent three-dimensional polygons to be merged from the three-dimensional polygons of all connected roads in the intersection;
[0126] A merging module, used for merging the two three-dimensional polygons to be merged to obtain a merged first three-dimensional polygon;
[0127] The selection module is used to select two adjacent three-dimensional polygons to be merged from the remaining three-dimensional polygons according to the positional relationship of the remaining three-dimensional polygons including the three-dimensional polygon that has not been merged and the first three-dimensional polygon;
[0128] The merging module is used to merge the two currently selected three-dimensional polygons to be merged to obtain a merged second three-dimensional polygon, until the remaining three-dimensional polygons include only one three-dimensional polygon, thereby obtaining the three-dimensional boundary area of the intersection;
[0129] In which, in the process of merging the two three-dimensional polygons to be merged, if the two three-dimensional polygons to be merged have two intersecting edges, the intersection point is determined as the merged point, and the three-dimensional coordinates of the intersection point are obtained by interpolating the three-dimensional coordinates of the two boundary points on the line segment where the intersection point is located.
[0130] Optionally, a merging unit 24 is used to add a triangle at the connection between the connecting road corresponding to the target three-dimensional polygon and the intersection when there is a target three-dimensional polygon among the three-dimensional polygons of all connecting roads in the intersection, wherein the target three-dimensional polygon is a three-dimensional polygon that has no intersection with other three-dimensional polygons, or a three-dimensional polygon whose intersection with other three-dimensional polygons is a point, two vertices of the triangle are boundary points of the intersection, and the third vertex is located within the intersection; the three-dimensional polygons of all connecting roads in the intersection and the triangle are merged to obtain the three-dimensional boundary area of the intersection.
[0131] Based on the above method embodiment, another embodiment of the present invention provides a storage medium on which executable instructions are stored. When the instructions are executed by a processor, the processor implements the above method.
[0132] Based on the above embodiment, another embodiment of the present invention provides a computing device, including:
[0133] one or more processors;
[0134] a storage device for storing one or more programs,
[0135] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0136] The above-mentioned system and device embodiments correspond to the method embodiments and have the same technical effects as the method embodiments. For specific descriptions, please refer to the method embodiments. The device embodiments are obtained based on the method embodiments. For specific descriptions, please refer to the method embodiment part, which will not be repeated here. It can be understood by those of ordinary skill in the art that the accompanying drawings are only schematic diagrams of one embodiment, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present invention.
[0137] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a three-dimensional intersection model, characterized in that: The method comprises: Parse OpenDRIVE map data to obtain road network descriptive data; Calculating a three-dimensional polygon formed by boundary points of each connecting road in the intersection according to the road network descriptive data; Merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection; The three-dimensional boundary area is cut using the ear cutting method to generate a three-dimensional intersection model of the intersection.
2. The method according to claim 1, characterized in that The road network descriptive data includes Junction node information and Road node information of each connecting road in the intersection. The Junction node information is used to describe the intersection in the road network, and the Road node information is used to describe the connecting roads.
3. The method according to claim 2, characterized in that When the Road node information includes geometric shape information, elevation information, reference lines of connected roads, lane information, and transverse profile information, a three-dimensional polygon formed by boundary points of each connected road in the intersection is calculated according to the road network descriptive data, including: Determine the intersection to be calculated according to the Junction node information in the road network descriptive data; Determine the three-dimensional coordinates of the reference line corresponding to the connecting road defined in the Road node information according to the geometric shape information and elevation information in the Road node information of each connecting road in the intersection; For each connecting road, determine the horizontal coordinates of the boundary point of the connecting road according to the three-dimensional coordinates of the reference line of the connecting road and the lane information in the Road node information of the connecting road, and determine the vertical coordinates of the boundary point of the connecting road according to the transverse section information and the lane information in the Road node information of the connecting road, wherein the horizontal coordinates are coordinates on a horizontal plane, and the vertical coordinates are coordinates on a vertical plane perpendicular to the horizontal plane; For each connecting road, the boundary points of the connecting road with determined horizontal coordinates and vertical coordinates are connected in sequence to form a three-dimensional polygon of the connecting road.
4. The method according to claim 3, characterized in that When the lane information includes lane width information and lane offset information, determining the horizontal coordinates of the boundary point of the connecting road according to the three-dimensional coordinates of the reference line of the connecting road and the lane information in the Road node information of the connecting road includes: For each boundary line of the connecting road, determine a lateral offset between the boundary line and the reference line according to lane width information and lane offset information in lane information of a lane included between the boundary line and the reference line; Determine the tangent direction of each point on the reference line, and determine the direction perpendicular to the tangent direction and toward the boundary line as the offset direction of the boundary line relative to the reference line; The horizontal coordinates of the boundary points on the boundary line are determined according to the lateral offset and the offset direction.
5. The method according to claim 4, characterized in that When the connecting road includes multiple lanes, the connecting road includes a center lane and a first side lane and a second side lane respectively located on both sides of the center lane, the lane width information of the center lane is 0, the number of lanes of the first side lane is the same as the number of lanes of the second side lane, and the lane offset is the offset of the center lane relative to the reference line.
6. The method according to claim 5, characterized in that For each boundary line of the connecting road, determining a lateral offset between the boundary line and the reference line according to lane width information and lane offset information in lane information of a lane included between the boundary line and the reference line, including: When the reference line is the center line of the connecting road, the lateral offset between the first side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line of the connecting road and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road, wherein the first side boundary line and the first side lane are located on the same side relative to the center line, and the second side boundary line and the second side lane are located on the same side relative to the center line; When the reference line is the first side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is 0, and the lateral offset between the second side boundary line and the reference line is the sum of the lane offset information and the lane width information of all second side lanes in the connecting road; When the reference line is the second side boundary line of the connecting road, the lateral offset between the first side boundary line and the reference line is the sum of the lane offset information and the lane width information of all first side lanes in the connecting road, and the lateral offset between the second side boundary line and the reference line is 0.
7. The method according to claim 1, characterized in that Merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection includes: If the three-dimensional polygons of all the connecting roads in the intersection are merged to obtain two merged three-dimensional polygons, the three-dimensional polygon located on the outer side is determined as the three-dimensional boundary area of the intersection.
8. The method according to claim 1, characterized in that Merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection includes: Selecting two adjacent three-dimensional polygons to be merged from the three-dimensional polygons of all the connecting roads in the intersection, merging the two three-dimensional polygons to be merged, and obtaining a merged first three-dimensional polygon; According to the positional relationship of the remaining three-dimensional polygons including the three-dimensional polygon that has not been merged and the first three-dimensional polygon, two adjacent three-dimensional polygons to be merged are selected from the remaining three-dimensional polygons, and the two currently selected three-dimensional polygons to be merged are merged to obtain a merged second three-dimensional polygon, until the remaining three-dimensional polygons include only one three-dimensional polygon, and the three-dimensional boundary area of the intersection is obtained; In which, in the process of merging the two three-dimensional polygons to be merged, if the two three-dimensional polygons to be merged have two intersecting edges, the intersection point is determined as the merged point, and the three-dimensional coordinates of the intersection point are obtained by interpolating the three-dimensional coordinates of the two boundary points on the line segment where the intersection point is located.
9. The method according to any one of claims 1 to 8, characterized in that Merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection includes: When a target three-dimensional polygon exists among the three-dimensional polygons of all the connecting roads in the intersection, a triangle is added at the connection between the connecting road corresponding to the target three-dimensional polygon and the intersection, wherein the target three-dimensional polygon is a three-dimensional polygon that has no intersection with other three-dimensional polygons, or a three-dimensional polygon whose intersection with other three-dimensional polygons is a point, two vertices of the triangle are boundary points of the intersection, and the third vertex is located in the intersection; The three-dimensional polygons of all connected roads in the intersection and the triangle are merged to obtain a three-dimensional boundary area of the intersection.
10. A device for generating a three-dimensional intersection model, characterized in that: The device comprises: A parsing unit, used to parse OpenDRIVE map data to obtain road network descriptive data; A calculation unit, used for calculating the three-dimensional polygon formed by the boundary points of each connecting road in the intersection according to the road network descriptive data; A merging unit, used for merging the three-dimensional polygons of all connected roads in the intersection to obtain a three-dimensional boundary area of the intersection; The cutting unit is used to cut the three-dimensional boundary area by using the ear cutting method to generate a three-dimensional intersection model of the intersection.
Citation Information
Patent Citations
Road grid data generation method and device
CN111145355A
Dynamic simulation method and device for vehicle road model, equipment and storage medium
CN113065199A
