Map path planning method and related device
Through a map path planning method, combining the location information and road data of the autonomous driving system, the shortest target path is generated, which solves the problem of difficulty in combining simulation scenarios with real-life vehicle testing in the existing technology, and improves the efficiency and accuracy of autonomous driving navigation.
Patent Information
- Application Number
- CN202510252713.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-27
AI Technical Summary
The existing autonomous driving system is difficult to combine with real-life vehicle testing in simulation scenarios, and its performance in real-life driving scenarios cannot be determined.
A map path planning method is provided, by determining the initial starting point according to the location of the target vehicle, in response to the starting point and the end point selection operation, determining the starting point and the end point road, and calculating the distance between each path point and the initial starting point, and determining the path starting point and the end point. Based on this information, the planned roads that start from the starting road and are connected in sequence until they are connected to the end road, determine the road connection relationship and generate the target path.
It combines map path planning with real-life driving scenarios, supports independent selection of path end points during path planning, considers the starting direction and arrival direction of the target vehicle, and generates the shortest target path, which improves the efficiency and accuracy of autonomous driving navigation.
Smart Images

Figure CN120043548A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and particularly to a map path planning method and related devices. Background Art
[0002] During the real vehicle test of an autonomous driving vehicle, in order to improve the safety and convenience of autonomous driving, the autonomous driving system can perform perception, planning, and control based on road data, so as to achieve vehicle navigation and driving decision-making.
[0003] In related technologies, the navigation of an autonomous driving vehicle is usually carried out in a simulation scenario, where software is used to simulate different traffic scenarios and road conditions to achieve map path planning. However, the simulation in the simulation scenario is difficult to be combined with the real vehicle test, and it is impossible to determine its performance in the real driving scenario. Summary of the Invention
[0004] In view of this, a first aspect of this application provides a map path planning method, and the method includes:
[0005] Determine an initial starting point according to the position of the target vehicle;
[0006] Respond to a starting point selection operation to determine a starting point road; the starting point road includes at least a starting point road direction;
[0007] According to the road type of the starting point road, calculate the distances between each path point on the starting point road and the initial starting point, and determine the path point on the starting point road that is closest to the initial starting point as the path starting point;
[0008] Respond to an end point selection operation to determine an end point road, and determine a path end point on the end point road; wherein, the end point road includes at least an end point road direction;
[0009] According to the starting point road direction and the end point road direction, calculate the planned roads connected in sequence starting from the starting point road until the planned road is connected to the end point road, and determine the road connection relationship between the starting point road, the planned road, and the end point road;
[0010] Based on the starting point road, the planned road, the end point road, and the road connection relationship, determine the target path of the target vehicle between the path starting point and the path end point; wherein, the target path is the shortest path between the path starting point on the starting point road and the path end point on the end point road.
[0011] Optionally, the calculating the distances between each path point on the starting point road and the initial starting point according to the road type of the starting point road includes:
[0012] Obtain the road type of the starting road from the map;
[0013] When the starting road is a straight road, determine the perpendicular line segment between the initial starting point and the starting road, and calculate the distance corresponding to the perpendicular line segment on the map;
[0014] When the starting road is a curved road, obtain the curve description equation corresponding to the starting road on the map, and determine each path point on the starting road according to the curve description equation and the curve parameter step size, and calculate the distance between each path point and the initial starting point in turn;
[0015] When the starting road is an arc road, obtain the arc description equation corresponding to the starting road on the map; determine each path point on the starting road according to the arc description equation and the arc parameter step size, and calculate the distance between each path point and the initial starting point in turn.
[0016] Optionally, the calculating the planned roads connected in sequence starting from the starting road according to the starting road direction and the ending road direction until the planned road is connected to the ending road, and determining the road connection relationship between the starting road, the planned road and the ending road includes:
[0017] Determine the reference road set between the starting road and the ending road according to the starting road direction and the ending road direction;
[0018] For the i-th reference road, determine the i-th candidate road set corresponding to the i-th reference road from the reference road set, and determine whether the ending road exists in the i-th candidate road set; wherein, the starting points of the candidate roads in the i-th candidate road set are all on the i-th reference road, and i is an integer greater than 0. When the value of i is 1, the first reference road is the starting road;
[0019] When the ending road does not exist in the i-th candidate road set, calculate the candidate distances corresponding to each candidate road in the i-th candidate road set respectively, and determine the candidate road corresponding to the minimum candidate distance as the target candidate road corresponding to the i-th reference road, and save the candidate connection relationship between the i-th reference road and the target candidate road; wherein, the candidate distance is the sum of the road lengths of the i-th reference road and the candidate road corresponding thereto;
[0020] Determine the target candidate road corresponding to the i-th reference road as the (i + 1)-th reference road;
[0021] When the end road exists in the i-th candidate road set, determine the end road as the (i + 1)-th reference road, and save the candidate connection relationship between the i-th reference road and the (i + 1)-th reference road;
[0022] According to the candidate connection relationships corresponding to each reference road, determine the second reference road to the (n - 1)-th reference road as planned roads, and determine the road connection relationships between the starting road, the end road and each of the planned roads; where n is the number of roads corresponding to the target path.
[0023] Optionally, determining the target path of the target vehicle between the path start point and the path end point based on the starting road, the planned roads, the end road and the road connection relationships includes:
[0024] According to the road type of the starting road, determine the first guiding step length of the starting road, and determine a plurality of first guiding path points on the starting road according to the first guiding step length;
[0025] According to the road types of each of the planned roads, determine the second guiding step length corresponding to each of the planned roads, and determine a plurality of second guiding path points on each of the starting roads according to the second guiding step length;
[0026] According to the road type of the end road, determine the third guiding step length of the end road, and determine a plurality of third guiding path points on the end road according to the third guiding step length;
[0027] Connect the first guiding path points, the second guiding path points and the third guiding path points in sequence according to the road connection relationship to generate the target path.
[0028] Optionally, the method further includes:
[0029] Draw a start identifier and an end identifier according to the position information of the path start point in the map and the position information of the path end point in the map;
[0030] Draw guiding path point identifiers according to the position information of the first guiding path points, the second guiding path points and the third guiding path points in the map;
[0031] Generate a displayed target path according to the start identifier, the guiding path point identifiers and the end identifier, and visually output the displayed target path to the display interface corresponding to the map.
[0032] Optionally, determining the path end point on the end road includes:
[0033] In response to an end - point selection operation triggered for an end - point road, determine an initial end - point, and detect whether the initial end - point is on the road reference line of the end - point road;
[0034] If the initial end - point is on the road reference line of the end - point road, determine the initial end - point as the path end - point;
[0035] If the initial end - point is not on the road reference line of the end - point road, calculate the distances between each path point on the end - point road and the initial end - point according to the road type of the end - point road, and determine the path point on the end - point road that is closest to the initial end - point as the path end - point.
[0036] The second aspect of this application provides a map path planning device, and the device includes:
[0037] A position determination unit, configured to: determine an initial starting point according to the position of the target vehicle;
[0038] A starting - point determination unit, configured to: in response to a starting - point selection operation, determine a starting - point road; the starting - point road includes at least the starting - point road direction;
[0039] A distance calculation unit, configured to: calculate the distances between each path point on the starting - point road and the initial starting point according to the road type of the starting - point road, and determine the path point on the starting - point road that is closest to the initial starting point as the path starting point;
[0040] An end - point determination unit, configured to: in response to an end - point selection operation, determine an end - point road, and determine a path end - point on the end - point road; wherein, the end - point road includes at least the end - point road direction;
[0041] A path calculation unit, configured to: calculate the planned roads that are sequentially connected starting from the starting - point road according to the starting - point road direction and the end - point road direction until the planned road is connected to the end - point road, and determine the road connection relationship between the starting - point road, the planned road, and the end - point road;
[0042] A path generation unit, configured to: determine a target path of the target vehicle between the path starting point and the path end - point based on the starting - point road, the planned road, the end - point road, and the road connection relationship; wherein, the target path is the shortest path between the path starting point on the starting - point road and the path end - point on the end - point road.
[0043] Optionally, the distance calculation unit is specifically configured to:
[0044] Obtain the road type of the starting - point road from the map;
[0045] When the starting road is a straight road, determine the perpendicular line segment between the initial starting point and the starting road, and calculate the distance corresponding to the perpendicular line segment on the map;
[0046] When the starting road is a curved road, obtain the curve description equation corresponding to the starting road on the map, and determine each path point on the starting road according to the curve description equation and the curve parameter step size, and calculate the distance between each path point and the initial starting point in turn;
[0047] When the starting road is an arc road, obtain the arc description equation corresponding to the starting road on the map; determine each path point on the starting road according to the arc description equation and the arc parameter step size, and calculate the distance between each path point and the initial starting point in turn.
[0048] The third aspect of the present application provides a map path planning device, including: a memory and a processor;
[0049] The memory is used to store programs;
[0050] The processor is used to execute the program to implement each step of the method described in any one of claims 1 to 6.
[0051] The fourth aspect of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step of the method described in any one of claims 1 to 6 is implemented.
[0052] From the above technical solutions, it can be seen that the present application has the following advantages:
[0053] An embodiment of the present application provides a map path planning method and related devices. First, an initial starting point is determined according to the position of the target vehicle. Secondly, in response to a starting point selection operation, a starting point road is determined; the starting point road includes at least the direction of the starting point road. Then, according to the road type of the starting point road, the distances between each path point on the starting point road and the initial starting point are calculated, and the path point on the starting point road that is closest to the initial starting point is determined as the path starting point. Then, in response to an end point selection operation, an end point road is determined, and a path end point is determined on the end point road; wherein, the end point road includes at least the direction of the end point road. According to the direction of the starting point road and the direction of the end point road, the planned roads connected in sequence starting from the starting point road are calculated until the planned road is connected to the end point road, and the road connection relationship between the starting point road, the planned road, and the end point road is determined. Based on the starting point road, the planned road, the end point road, and the road connection relationship, the target path of the target vehicle between the path starting point and the path end point is determined; wherein, the target path is the shortest path between the path starting point on the starting point road and the path end point on the end point road. It can be seen that by combining map path planning with the actual vehicle driving scenario, it supports the autonomous selection of the path end point during path planning, and at the same time considers the departure direction of the target vehicle and the arrival direction at the end point during actual application, generates the shortest target path corresponding to the direction of the starting point road and the direction of the end point road, enables the target vehicle to perform trace navigation according to the shortest target path, and quickly and accurately reaches the path end point according to the direction of the end point road, improving the efficiency and accuracy of the autonomous driving navigation of the target vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 It is a flowchart of a map path planning method provided by the present application;
[0055] Figure 2 It is a schematic diagram of the global path planning web interaction interface provided by an embodiment of the present application;
[0056] Figure 3 It is a schematic diagram of calculating the path starting point on a straight road provided by an embodiment of the present application;
[0057] Figure 4 It is a schematic diagram of calculating the path starting point on a curved road provided by an embodiment of the present application;
[0058] Figure 5 It is a schematic diagram of calculating the path starting point on an arc road provided by an embodiment of the present application;
[0059] Figure 6 It is a schematic diagram of the process of determining the target path provided by an embodiment of the present application;
[0060] Figure 7 It is a schematic diagram of the target path display provided by an embodiment of the present application;
[0061] Figure 8 A method flowchart of a map path planning method provided by an embodiment of the present application;
[0062] Figure 9 A schematic diagram of road segmentation provided by an embodiment of the present application;
[0063] Figure 10 A schematic structural diagram of a map path planning device provided by the present application. Detailed implementation manners
[0064] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.
[0065] The term "including" and its variants used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0066] It should be noted that the concepts such as "first" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0067] It should be noted that the modifications of "one" and "multiple" mentioned in the present application are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".
[0068] See Figure 1 , Figure 1 A method flowchart of a map path planning method provided by the present application. This method can achieve path planning for the OpenDrvie map based on the web page, and specifically includes the following steps:
[0069] Step 101: Determine the initial starting point according to the position of the target vehicle.
[0070] During the process of path planning for the target vehicle, first determine the initial starting point of the path planning of the target vehicle according to the current position information of the target vehicle.
[0071] Specifically, a map coordinate system can be established based on the OpenDrive map provided by the web page. When the map is not rotated, by default, the east direction indicated by the map is taken as the positive direction of the x-axis, and the north direction indicated by the map is taken as the positive direction of the y-axis. According to the position of the target vehicle, its corresponding initial starting point in the map coordinate system is determined, and based on the coordinates corresponding to the initial starting point, the initial starting point is displayed on the map interface.
[0072] Step 102: In response to the starting point selection operation, determine the starting point road.
[0073] Since the initial starting point corresponding to the current position of the target vehicle may not be on any road in the map, after determining the initial starting point, the starting point road corresponding to the path planning of the target vehicle this time can be determined through the starting point selection operation. Generally, there are two opposite directions for the roads shown in the map. Then, in order to improve the accuracy of path planning, when determining the starting point road in the embodiments of the present application, the starting point road direction is also selected.
[0074] Specifically, in the OpenDrive map interface, each road in the map is drawn through the d3.path command, and the attribute of monitoring the mouse click operation is added to each road through the ".on(\"click\",function())" command. The user can select the starting point road and its starting point road direction according to the driving direction they want or according to the head orientation of the current target vehicle. The starting point selection operation is triggered by the left mouse button. The in-vehicle terminal determines the selected road corresponding to the mouse click operation, and changes the color of the selected road through the d3.attr('fill', 'color') command to make it highlighted. At the same time, the road identifier of the selected road, that is, the starting point road identifier, is obtained. The in-vehicle terminal responds to the starting point selection operation and obtains the starting point road determined by the user. The starting point road includes the starting point road identifier and the starting point road direction. Among them, the position, shape and other parameter information of the starting point road can be determined through the starting point road identifier, and the starting point direction of the target vehicle during path planning can be determined through the starting point road direction.
[0075] See Figure 2 , Figure 2 is a schematic diagram of the global path planning web page interaction interface provided by the embodiments of the present application. In Figure 2 , the user can trigger the starting point selection operation by clicking the "Select Starting Point Road" button. Further, in Figure 2 , other function buttons can also be set, such as "Select Intermediate Point", "Select End Point Road", "Restore Initial", "Obtain Coordinates", etc., and corresponding functions can be configured for each function button name. The embodiments of the present application do not make specific limitations on this.
[0076] Step 103: According to the road type of the starting road, calculate the distances between each path point on the starting road and the initial starting point, and determine the path point on the starting road that is closest to the initial starting point as the path starting point.
[0077] In the OpenDrive map, the road type corresponding to each road is saved, and this road type is used to describe the shape parameters of the road, such as the description equation of the road in the map coordinate system, the road length, etc. There are multiple path points on the starting road. Since the initial starting point may not be on the starting road, in order to determine the path starting point corresponding to this path planning on the starting road, the distances between each path point on the starting road and the initial starting point can be calculated, and the path point with the closest distance is determined as the path starting point.
[0078] In a possible implementation, the distances between the initial starting point and each path point on the starting road can be calculated in the following way:
[0079] S11: Obtain the road type of the starting road from the map.
[0080] In the OpenDrive map, the shape parameters corresponding to each road are stored. Through these shape parameters, the roads in the map can be divided into multiple types, including but not limited to straight roads, curved roads, and arc roads. When calculating the distances between the initial starting point and each path point on the starting road, first obtain the road type of the starting road, and then according to the description equation corresponding to this starting road, transform the distance problem into a geometric problem on the map for calculation.
[0081] S12: When the starting road is a straight road, determine the perpendicular line segment between the initial starting point and the starting road, and calculate the distance corresponding to this perpendicular line segment on the map.
[0082] When the starting road is a straight road, since the perpendicular line segment from a point to a straight line is the shortest line segment between the point and the straight line, the distance of the perpendicular line segment between the initial starting point and the starting road can be directly calculated, and the intersection point between this perpendicular line segment and the starting road is used as the path starting point.
[0083] See Figure 3 , Figure 3 which is a schematic diagram for calculating the path starting point on a straight road provided by an embodiment of this application. Among them, the xoy coordinate system is the map coordinate system, point A is the road starting point corresponding to the starting road, point B is the initial starting point, point M is the path point on the starting road, hdg is the road direction angle of the starting road, and the vector AM is perpendicular to the vector BM. At the same time, since both point A and point M are points on the starting road, the included angle between the vector AM and the x-axis is the road direction angle of the starting road.
[0084] First, according to the coordinates of point A, A(x1, y1), and the coordinates of point B, B(x2, y2), the included angle β between vector AB and the x-axis, and the included angle α between vector AM and vector AB, the calculation formulas are as follows:
[0085]
[0086] α = β - hdg
[0087] Secondly, according to the distance between point A and point B, and the included angle α between vector AM and vector AB, calculate the distance s between point A and point M. The calculation formula is as follows:
[0088] s = d * cosα
[0089] Then, according to the coordinates of the starting point A, the distance s between point A and point M, and the road direction angle hdg of the starting road, calculate the coordinates M(x, y) of the path starting point. The calculation formula is as follows:
[0090] x = s * cos(hdg) + x1
[0091] y = s * sin(hdg) + y1
[0092] In this way, the path starting point on the starting road of the straight line is determined on the map.
[0093] S13: When the starting road is a curved road, obtain the curve description equation corresponding to the starting road on the map, and determine each path point on the starting road according to the curve description equation and the curve parameter step size, and calculate the distance between each path point and the initial starting point in turn.
[0094] When the starting road is a curved road, obtain the curve description equation of the starting road in the map, and then calculate the distance between each path point on the starting road and the initial starting point one by one according to the curve description equation. Since the number of path points constituting the curved road is large, in order to improve the calculation efficiency, each path point participating in the calculation is determined according to the curve parameter step size on the starting road.
[0095] It should be noted that in the OpenDrive map, the curve description equations corresponding to curved roads mainly have two forms, namely parametric cubic curves and cubic polynomial curves, both of which are used to describe the shape of curved roads. The following combines Figure 4 to introduce the calculations of these two curve equations respectively.
[0096] See Figure 4 , Figure 4Schematic diagram of calculating the path starting point on a curved road provided by an embodiment of the present application. Among them, the uv coordinate system is the road coordinate system, the u-axis direction is the tangent direction of the starting road at the road starting point A, and the v-axis direction is the normal direction of the starting road at the road starting point A; point B is the initial starting point, point M is the path point on the starting road, and hdg is the angle between the u-axis and the x-axis.
[0097] When the curve description equation of the starting road is a parametric cubic curve, its description equation in the uv coordinate system is as follows:
[0098] u(p) = a U + b U * p + c U * p 2 + d U * p 3
[0099] v(p) = a V + b V * p + c V * p 2 + d V * p 3
[0100] Among them, a U , b U , c U , d U , a V , b V , c V , d V are all coefficients in the curve equation, and their values are determined according to the curve shape; in the parametric cubic curve equation, the value range of the equation parameter p is 0 to 1. In the parametric cubic curve, the normal directions corresponding to each path point are not the same, and the path point closest to point B cannot be accurately obtained. In the embodiment of the present application, the curve parameter step size can be set to 0.1. According to the parametric cubic curve equation, the equation parameter p increases by 0.1 in sequence according to the curve parameter step size until it increases to 1.
[0101] When the curve description equation of the starting road is a cubic polynomial curve, its description equation in the uv coordinate system is as shown in the following formula:
[0102] v(u) = a + b * u + c * u 2 + d * u 3
[0103] Among them, a, b, c, and d are all coefficients in the curve equation, and their values are determined according to the curve shape. In the cubic polynomial curve, the curve parameter step size can be set to 1. According to the cubic polynomial curve equation, the independent variable u increases by 1 in sequence according to the curve parameter step size until it reaches the road length corresponding to the starting road.
[0104] In this process, according to the coordinate values of the path point M in the uv coordinate system, the included angle α between the vector AM and the u-axis and the distance s between point A and point M are calculated. The calculation formulas are as follows:
[0105]
[0106] Furthermore, according to the distance s, the included angle hdg, and the coordinates A(x1, y1) of the starting point A in the map coordinate system, the coordinates M(x, y) of point M in the map coordinate system are calculated. The specific calculation formulas are as follows:
[0107] x = s * cos(hdg + α) + x1
[0108] y = s * sin(hdg + α) + y1
[0109] After obtaining the coordinates corresponding to each path point on the curved road, the distance between each path point and the initial starting point B can be calculated according to the initial starting point B(x2, y2) and the path point M(x, y). The path point corresponding to the minimum distance is determined as the path starting point on the starting road. In this way, the path starting point on the curved starting road is determined in the map.
[0110] S14: When the starting road is an arc-shaped road, obtain the arc description equation corresponding to the starting road on the map; according to the arc description equation and the arc parameter step size, determine each path point on the starting road, and calculate the distance between each path point and the initial starting point in turn.
[0111] When the starting road is an arc-shaped road, different from the curved road, the arc-shaped road can calculate the distance between each path point on the arc-shaped road and the initial starting point by obtaining the arc description equation. See Figure 5 , Figure 5 is a schematic diagram for calculating the path starting point on the arc-shaped road provided by the embodiment of the present application. Among them, point A is the road starting point corresponding to the arc-shaped road, point M is the path point on the arc-shaped road, and the coordinates of point A in the map coordinate system are A(x1, y1). First, starting from the starting point A, select the arc length to increase by 0.1 in turn until the arc length reaches the total length of the arc-shaped road, determine the coordinates M(u, v) of point M in the road coordinate system and the arc length d corresponding to the vector AM, and calculate the angle α corresponding to the vector AM according to the arc length d:
[0112] α = d / r
[0113] where r is the radius corresponding to the arc-shaped road, which can be determined according to the arc description equation corresponding to the arc-shaped road.
[0114] Next, determine the angle β between the vector AM and the u-axis according to the angle α:
[0115] β = α / 2
[0116] Thus, calculate the distance s between A and M as:
[0117] s = 2*r*sin(α / 2)
[0118] When the curvature of the arc road is greater than or equal to 0, calculate the coordinates M(x, y) of point M in the map coordinate system through the following formula:
[0119] x = s*cos(hdg + β) + x1
[0120] y = s*sin(hdg + β) + y1
[0121] When the curvature of the arc road is less than 0, calculate the coordinates M(x, y) of point M in the map coordinate system through the following formula:
[0122] x = s*cos(hdg - β) + x1
[0123] y = s*sin(hdg - β) + y1
[0124] In this way, according to M(x, y) and the coordinates of the initial starting point B in the map coordinate system as B(x2, y2), the distance between each path point M on the arc road and the initial starting point B can be calculated.
[0125] Step 104: Respond to the end point selection operation, determine the end road, and determine the path end point on the end road.
[0126] Among them, the end road at least includes the end road direction. When performing path planning, in addition to the path starting point, it is also necessary to determine the path end point of this path planning. In the embodiments of the present application, the user can trigger the end point selection operation to select the end road corresponding to this path planning and select the path end point on the end road; the vehicle-mounted terminal responds to the end point selection operation to determine the end road and the path end point corresponding to this path planning. For Figure 2 example, the user can trigger the end point selection operation by clicking the "Select End Point" button. It should be noted that the same as the starting road, when determining the end road, the end road direction is also determined.
[0127] In a real driving scenario, the destination may be located on one side of the road, and a general road includes two opposite road directions. Therefore, when the user selects the end road direction through an end point selection operation according to the trip end point, it can enable the target vehicle to reach the end point of the path in accordance with the end road direction when driving along the target path. At this time, the parking position of the target vehicle and the trip end point are exactly on the same side of the destination on the end road, and the target vehicle does not need to turn around, improving the accuracy of path planning and the convenience of navigation.
[0128] As an embodiment, when determining the path end point on the end road, it can be specifically implemented in the following manner:
[0129] S21: In response to an end point selection operation triggered for the end road, determine the initial end point and detect whether the initial end point is on the road reference line of the end road.
[0130] After determining the end road, the user can trigger an end point selection operation through a click operation on the end road and determine the click point selected by the user as the initial end point. For example, when drawing a road area on the map interface, the attribute of monitoring the mouse click operation can be added to each road through the ".on(\"click\",function())" command. When the user clicks on the road area with the left mouse button, the color of the selected road can be changed through d3.attr('fill', 'color') to highlight the selected road, and the road identifier of the selected road can be obtained through the mouse click operation; at the same time, the coordinates of the mouse click point in the map coordinate system, that is, the coordinates of the initial end point, can also be obtained by using the ".on(\"click\",function())" command. Generally speaking, the initial end point selected by the user may not accurately fall on the road reference line of the end road. Then, if such an initial end point is used to plan the path, errors such as turning around and deviation may occur in the obtained target path. Therefore, the embodiment of the present application also needs to determine the corresponding path end point on the reference line of the end road according to the initial end point.
[0131] S22: If the initial end point is on the road reference line of the end road, determine the initial end point as the path end point.
[0132] Of course, if the initial end point determined by the user through the end point selection operation exactly falls on the road reference line of the end road, then the initial end point can be directly determined as the path end point.
[0133] S23: If the initial end point is not on the road reference line of the end road, calculate the distances between each path point on the end road and the initial end point according to the road type of the end road, and determine the path point on the end road that is closest to the initial end point as the path end point.
[0134] When the initial start and end points are not on the road reference line of the end road, the distances between each path point on the end road and the initial start and end points can be calculated in sequence according to the road type of the end road, and the path point corresponding to the minimum distance is determined as the path end point of this path planning. Specifically, determining the path end point according to the end road type can refer to the specific implementation steps of determining the path start point according to the start road type in step 103.
[0135] Determining the path end point corresponding to the path planning on the road reference line of the end road can improve the accuracy of path planning, and further improve the accuracy of navigating the target vehicle using the target path.
[0136] Step 105: According to the start road direction and the end road direction, calculate the planned roads connected in sequence starting from the start road until the planned road is connected to the end road, and determine the road connection relationship among the start road, the planned road, and the end road.
[0137] After determining the start road and the end road, according to the start road direction and the end road direction, through a path planning algorithm, such as the Dijkstra algorithm, starting from the start road, calculate the planned roads connected in sequence. Specifically, starting from the path start point, according to the start road direction, successively determine the subsequent connected planned roads until a planned road connected to the end road appears, reach the path end point according to the end road direction, and save the road connection relationship among the start road, the planned road, and the end road.
[0138] As Figure 6 shown, in a possible implementation manner, step 105 can be specifically implemented in the following way:
[0139] S31: According to the start road direction and the end road direction, determine the reference road set between the start road and the end road.
[0140] According to the start road direction and the end road direction, determine all the reference roads in the start road and the end road in the map, and generate a reference road set based on all the reference roads. In the embodiments of the present application, the reference road is all the roads passed from the path start point in the start road direction and reaching the path end point in the end road direction.
[0141] S32: For the i-th reference road, determine the i-th candidate road set corresponding to the i-th reference road from the reference road set, and determine whether the end road exists in the i-th candidate road set.
[0142] The i-th reference road is one of the constituent roads of the target path. In the process of determining the target path, starting from the starting road, the starting road is taken as the 1st reference road, and the 1st candidate road set corresponding to the 1st reference road is determined from the set of reference roads. In this 1st candidate road set, the starting points of all candidate roads are on the 1st candidate road. Then, for the i-th reference road, the starting points of the candidate roads in its corresponding i-th candidate road set are also all on the i-th reference road. In the embodiments of the present application, i is an integer greater than 0.
[0143] S33: When the end road does not exist in the i-th candidate road set, calculate the candidate distances corresponding to each candidate road in the i-th candidate road set respectively, and determine the candidate road corresponding to the minimum candidate distance as the target candidate road corresponding to the i-th reference road, and save the candidate connection relationship between the i-th reference road and the target candidate road.
[0144] For the i-th reference road, traverse each candidate road in the i-th candidate road set corresponding to the i-th reference road. When the end road is not included in the i-th candidate road set, calculate the candidate distances corresponding to each candidate road. In the embodiments of the present application, the candidate distance refers to the sum of the road lengths corresponding to the i-th reference road and the candidate road.
[0145] In the embodiments of the present application, for the i-th reference road, after calculating the candidate distances corresponding to each candidate road in the i-th candidate road set respectively, determine the candidate road corresponding to the minimum candidate distance as the target candidate road corresponding to the i-th reference road, and save the candidate connection relationship between the target candidate road and the i-th reference road.
[0146] S34: Determine the target candidate road corresponding to the i-th reference road as the (i + 1)-th reference road.
[0147] Since the candidate distance between the target candidate road and the i-th reference road is the minimum, when looking for the shortest path between the starting road and the end road, the target candidate road corresponding to the i-th reference road can be determined as the (i + 1)-th reference road and continue to search on this basis.
[0148] S35: When the end road exists in the i-th candidate road set, determine the end road as the (i + 1)-th reference road, and save the candidate connection relationship between the i-th reference road and the (i + 1)-th reference road.
[0149] When the set of candidate roads for the i-th candidate road includes the end road, directly determine the end road as the target candidate road corresponding to the i-th reference road, that is, determine the end road as the (i + 1)-th reference road. Since in the target path, the end road is the last road, when the number of roads in the target path is n, the end road is also the n-th reference road. Save the candidate connection relationship between the i-th reference road and the (i + 1)-th reference road.
[0150] S36: According to the candidate connection relationships corresponding to each reference road, determine the 2nd to the (n - 1)-th reference roads as planned roads, and determine the road connection relationships between the starting road, the end road, and each of the planned roads.
[0151] After determining each reference road, according to the candidate connection relationships corresponding to each reference road, the connection relationship between every two reference roads can be determined, and the reference roads except the starting road and the end road are determined as planned roads. According to the candidate connection relationships, the road connection relationships between the starting road, the end road, and each planned road are determined, so as to form a target path that starts from the path starting point in the direction of the starting road, passes through each planned road, and finally reaches the path end point in the direction of the end road.
[0152] Specifically, information such as the road identifier and road length corresponding to each reference road can be saved in the reference road set. During the process of sequentially determining the reference roads, after removing the road identifier of the reference road from the reference road set open, it is saved in the nearest path set close. The close set includes the starting road, the end road, and each reference road. Each reference road corresponds to a reference road identifier, a predecessor road identifier, a successor road identifier, a reference road length, the shortest distance from the path starting point, and the road identifier of the previous level corresponding to the shortest distance.
[0153] Among them, taking the i-th reference road as an example, the reference road identifier is the road identifier corresponding to each reference road itself; the predecessor road identifier is the reference road determined before the i-th reference road, that is, the road identifiers corresponding to the 1st to the (i - 1)-th reference roads; the successor road identifier is the reference road determined after the i-th reference road, that is, the road identifiers corresponding to the (i + 1)-th to the n-th reference roads; the reference road length is the road length of the i-th reference road; the shortest distance from the path starting point refers to the shortest distance from the i-th reference road to the path starting point on the starting road; the road identifier of the previous level corresponding to the shortest distance refers to the road identifier of the (i - 1)-th reference road corresponding to the i-th reference road when the i-th reference road corresponds to the shortest distance.
[0154] After determining that the end road is added to the close set, based on the previous road identifiers corresponding to the shortest distances of each reference road, the previous roads are deduced sequentially from the end road until reaching the start road, forming a coherent target path.
[0155] In the OpenDrive map, the predecessor road and the successor road both refer to the connection relationship between roads in the map. Among them, the predecessor road identifier can be obtained sequentially through road, link, predecessor, and elementId in the OpenDrive map file, and the successor road identifier can be obtained sequentially through road, link, successor, and elementId in the OpenDrive map file.
[0156] By using the path planning algorithm to sequentially determine each reference road and forming the target path according to the candidate connection relationships between the reference roads, the efficiency and accuracy of determining the target path corresponding to the shortest distance are improved.
[0157] Step 106: Determine the target path of the target vehicle between the path start point and the path end point based on the start road, the planned road, the end road, and the road connection relationship.
[0158] Wherein, the target path is the shortest path between the path start point on the start road and the path end point on the end road.
[0159] According to the start road, the planned road, the end road, and the road connection relationship among the three, starting from the path start point on the start road, each road is connected sequentially until reaching the path end point on the end road, forming a complete target path of the target vehicle between the path start point and the path end point. In the embodiment of the present application, this target path is the shortest path between the path start point on the start road and the path end point on the end road. Since when determining the start road and the end road, the corresponding start road direction and end road direction are determined for the start road and the end road respectively, so on the basis of the start road direction and the end road direction, this target path is the shortest path corresponding to starting from the path start point along the start road direction and reaching the path end point along the end road direction.
[0160] Through the map path planning method provided by the embodiments of the present application, an initial starting point is determined according to the position of the target vehicle. In response to a starting point selection operation, a starting point road and the direction of the starting point road are determined. According to the road type of the starting point road, the distances between each path point on the starting point road and the initial starting point are calculated, and the path point on the starting point road that is closest to the initial starting point is determined as the path starting point. In response to an end point selection operation, an end point road and the direction of the end point road are determined, and a path end point is determined on the end point road. According to the direction of the starting point road and the direction of the end point road, the planned roads that are sequentially connected starting from the starting point road are calculated until the planned road is connected to the end point road, and the road connection relationship between the starting point road, the planned roads, and the end point road is determined. Based on the starting point road, the planned roads, the end point road, and the road connection relationship, a target path of the target vehicle between the path starting point and the path end point is determined; wherein, the target path is the shortest path between the path starting point on the starting point road and the path end point on the end point road. Thus, by combining map path planning with the actual vehicle driving scenario, it supports the autonomous selection of the path end point during path planning, and at the same time considers the departure direction of the target vehicle and the arrival direction at the end point during actual application, generates the shortest target path corresponding to the direction of the starting point road and the direction of the end point road, enables the target vehicle to perform trace navigation according to this shortest target path, and quickly and accurately reaches the path end point according to the direction of the end point road, improving the efficiency and accuracy of the autonomous driving navigation of the target vehicle.
[0161] In addition, compared with the traditional software for viewing and editing OpenDrive maps, the present application realizes OpenDrive map path planning based on a lightweight web page, thereby reducing the usage cost of the OpenDrive map.
[0162] In a possible implementation manner, step 106 can be specifically implemented in the following way:
[0163] S41: According to the road type of the starting point road, determine the first guiding step length of the starting point road, and determine a plurality of first guiding path points on the starting point road according to the first guiding step length.
[0164] After determining each road that makes up the target path, discrete path points can also be set on each road and sent to the backend for autonomous driving trace navigation. In Figure 2 the shown interface, the user can also generate discrete path points by clicking the "Select Intermediate Point" button. In order to improve the continuity between discrete path points, different guiding step lengths need to be set for different types of roads, and the guiding step length is used to describe the distance between two adjacent discrete path points on the road.
[0165] For the starting road, according to the road type of the starting road, determine the first guiding step length of the starting road. Starting from the path starting point on the starting road, determine a first guiding path point every first guiding step length. The path corresponding to the starting road consists of multiple first guiding path points.
[0166] For example, when the starting road is a straight road, referring to Figure 3 , the first guiding step length can be set to 2 meters, and a first guiding path point is set every 2 meters on the straight road.
[0167] When the starting road is a curved road, referring to Figure 4 , if the description equation of the curved road is a parametric cubic curve equation, then set the first guiding step length to 0.05, so that the equation parameter p of the parametric cubic curve equation increases by 0.05 in sequence, determine each discrete path point until the equation parameter p increases to 1; calculate the straight-line distance between each discrete path point and the previous first guiding path point in sequence. If the distance exceeds 2 meters, then determine the current discrete path point as a first guiding path point. Otherwise, calculate the relationship between the next discrete path point and the previous first guiding path point, so that the straight-line interval between each first guiding path point determined on the curved road can also be maintained at about 2 meters. If the description equation of the curved road is a cubic polynomial curve, set the first guiding step length to 0.5, the equation parameter u of the cubic polynomial curve equation increases by 0.5 in sequence, determine each discrete path point until the sum of the straight-line distances between adjacent two discrete path points is approximately equal to the length of the curved road, calculate the coordinates of each discrete path point in the road coordinate system, and then calculate the coordinates of each discrete path point in the map coordinate system. According to the straight-line distance between each discrete path point and the previous first guiding path point, if the distance is greater than 2 meters, then determine the discrete path point as a first guiding path point, so that the straight-line interval between each first guiding path point determined on the curved road can also be maintained at about 2 meters.
[0168] When the starting road is an arc-shaped road, referring to Figure 5 , the first guiding step length can be set to 2 meters, and a first guiding path point is set every arc length of 2 meters on the arc-shaped road.
[0169] It should be noted that in the embodiments of the present application, the guiding step lengths corresponding to different road types can be set according to the actual application scenario, and the embodiments of the present application do not make specific limitations on this.
[0170] S42: According to the road types of each of the planned roads, determine the second guiding step length corresponding to each of the planned roads, and determine a plurality of second guiding path points on each of the starting roads according to the second guiding step length.
[0171] For the planned roads, according to the road types corresponding to each planned road, determine the second guiding step length corresponding to each planned road. Starting from the starting point of the planned road, determine a second guiding path point every second guiding step length until reaching the end point of the planned road. The path corresponding to each planned road is composed of multiple second guiding path points.
[0172] S43: According to the road type of the end road, determine the third guiding step length of the end road, and determine multiple third guiding path points on the end road according to the third guiding step length.
[0173] For the end road, according to the road type of the end road, determine the third guiding step length corresponding to the end road, and starting from the starting point of the end road, determine a third guiding path point every third guiding step length until reaching the end point of the path. The path corresponding to the end road is composed of multiple third guiding path points.
[0174] In the embodiments of the present application, for the second guiding step length and the third guiding step length set for different road types, the setting method for the first guiding step length in S31 can be referred to.
[0175] S44: Connect the first guiding path points, the second guiding path points, and the third guiding path points in sequence according to the road connection relationship to generate the target path.
[0176] According to the road connection relationship between the starting road, each planned road, and the end road, connect the guiding path points determined on each road in sequence, so as to generate a target path composed of guiding path points. During the driving process of the target vehicle, the target vehicle is guided to follow the track through each guiding path point in the target path, improving the accuracy of the path planning of the target vehicle.
[0177] In a possible implementation manner, the map path planning method provided by the present application may further include:
[0178] S51: Draw a starting point identifier and an end point identifier according to the position information of the path starting point in the map and the position information of the path end point in the map;
[0179] S52: Draw guiding path point identifiers according to the position information of the first guiding path points, the second guiding path points, and the third guiding path points in the map;
[0180] S53: Generate a display target path according to the starting point identifier, the guiding path point identifiers, and the end point identifier, and visually output the display target path to the display interface corresponding to the map.
[0181] After determining the path start point, path end point, and each guiding path point corresponding to the target path, according to the position information of the path start point and path end point in the map, such as the coordinates of the path start point and path end point in the map coordinate system, draw the start point identifier corresponding to the path start point and the end point identifier corresponding to the path end point on the map interface.
[0182] Similarly, for the first guiding path point on the start road, the second guiding path point on each planned road, and the third guiding path point on the end road, the guiding path point identifiers can be drawn on the map interface by referring to the way of drawing the path start point and path end point, according to the position information of each guiding path point in the map, such as the coordinates of each guiding path point in the map coordinate system.
[0183] In order to distinguish the path start point, path end point, and guiding path points, different identifiers can be set for the path start point, path end point, and guiding path points. Specifically, the guiding path point identifiers corresponding to each guiding path point can be drawn through the command of drawing a circle in D3.js, and the start point identifier and end point identifier can also be drawn through other drawing instructions. As Figure 7 shown, the start point identifier is a car, the end point identifier is a flag, and the guiding path point identifier can be a red dot identifier. According to the start point identifier, each guiding path point identifier, and the end point identifier, the display target path is generated and visually output to the map display interface for the user to view.
[0184] By drawing the start point identifier, end point identifier, and each guiding path point identifier, and visually outputting the display target path to the display interface, the intuitiveness of the path planning result display can be improved, so that the target vehicle can follow the track according to the display target path, and the accuracy of the target vehicle navigation is improved.
[0185] It should be noted that in the embodiments of the present application, the first guiding step length, the second guiding step length, and the third guiding step length may be the same or different, and the embodiments of the present application do not make specific limitations on this.
[0186] See Figure 8 , Figure 8 is the method flow chart of a map path planning method provided by the embodiment of the present application scenario. The method mainly includes three parts: determining the start point, determining the end point, and determining the shortest path.
[0187] When determining the starting point of the path, first, obtain the current position information of the target vehicle through the backend, including the longitude, latitude, and heading angle information of the target vehicle, and determine the initial starting point as the position of the target vehicle. Secondly, in response to the starting point selection operation, obtain the candidate starting point road selected by the starting point selection operation, including the road identifier and road direction of the candidate starting point road. Then, find the path point closest to the initial starting point on the road reference line of the candidate starting point road, and determine this path point as the starting point of the path. Next, according to this starting point of the path and the road direction of the candidate starting point road, divide the candidate starting point road to obtain the starting point road and the divided road. The road starting point corresponding to the obtained starting point road after division is the starting point of the path.
[0188] After determining the starting point road, the road direction of the starting point road, and the starting point of the path, to improve the calculation efficiency of the path planning process, the candidate starting point road can be divided according to the starting point of the path into two roads: before the starting point of the path and after the starting point of the path, as Figure 9 shown. Among them, the road starting from the road starting point corresponding to the candidate starting point road to the starting point of the path is the newly divided road, and the road with the starting point of the path as the road starting point is the finally determined starting point road.
[0189] When determining the ending point of the path, first, in response to the ending point selection operation, determine the candidate ending point road, including the road identifier and road direction of the candidate ending point road. Secondly, in response to the click operation on the candidate ending point road, determine the initial ending point and its position information, and this position information can be the coordinate value of the initial ending point in the map coordinate system. Then, find the path point closest to the initial ending point on the road reference line of the candidate ending point road, and determine this path point as the ending point of the path. Next, according to this ending point of the path and the road direction of the candidate ending point road, divide the candidate ending point road to obtain the ending point road. The road ending point corresponding to the obtained ending point road after division is the ending point of the path.
[0190] After determining the ending point road, the road direction of the ending point road, and the ending point of the path, similarly, the candidate ending point road can be divided according to the ending point of the path into two roads: before the ending point of the path and after the ending point of the path. Among them, the road starting from the road starting point corresponding to the candidate ending point road to the ending point of the path is the ending point road, and the road with the ending point of the path as the road starting point is the newly divided road.
[0191] When determining the shortest path, the starting road and the starting point of the path, as well as the ending road and the ending point of the path, are input into the path planning algorithm Dijkstra to obtain the road identifiers of each planned road corresponding to the target path. Then, according to the connection relationships between the starting road, the ending road, and each planned road, discrete guiding path points on the starting road, the ending road, and each planned road are obtained. Finally, each guiding path point is sent to the backend, and based on the coordinates of each guiding path point in the map coordinate system, a target path formed by arranging the starting point of the path, the guiding path points, and the ending point of the path in sequence is generated and displayed, so that the target vehicle can navigate along each path point for tracking.
[0192] Although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
[0193] It should be understood that the various steps recited in the method embodiments of the present application may be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present application is not limited in this regard.
[0194] See Figure 10 , Figure 10 FIG. is a schematic structural diagram of a map path planning device provided by an embodiment of the present application, including:
[0195] A position determination unit 1001, configured to: determine an initial starting point according to the position of the target vehicle;
[0196] A starting point determination unit 1002, configured to: determine a starting road in response to a starting point selection operation; the starting road includes at least a starting road direction;
[0197] A distance calculation unit 1003, configured to: calculate the distances between each path point on the starting road and the initial starting point according to the road type of the starting road, and determine the path point on the starting road that is closest to the initial starting point as the starting point of the path;
[0198] An ending point determination unit 1004, configured to: determine an ending road in response to an ending point selection operation, and determine an ending point of the path on the ending road; wherein, the ending road includes at least an ending road direction;
[0199] A path calculation unit 1005, configured to: calculate the planned roads sequentially connected starting from the starting road according to the starting road direction and the ending road direction until the planned road is connected to the ending road, and determine the road connection relationships between the starting road, the planned roads, and the ending road;
[0200] A path generation unit 1006 is configured to: determine a target path of the target vehicle between the path start point and the path end point based on the start road, the planned road, the end road, and the road connection relationship; wherein, the target path is the shortest path between the path start point on the start road and the path end point on the end road.
[0201] Optionally, the distance calculation unit 1003 is specifically configured to:
[0202] Obtain the road type of the start road from the map;
[0203] When the start road is a straight road, determine the perpendicular line segment between the initial start point and the start road, and calculate the distance corresponding to the perpendicular line segment on the map;
[0204] When the start road is a curved road, obtain the curve description equation corresponding to the start road on the map, and determine each path point on the start road according to the curve description equation and the curve parameter step size, and sequentially calculate the distances between each path point and the initial start point;
[0205] When the start road is an arc road, obtain the arc description equation corresponding to the start road on the map; determine each path point on the start road according to the arc description equation and the arc parameter step size, and sequentially calculate the distances between each path point and the initial start point.
[0206] Optionally, the path calculation unit 1005 is specifically configured to:
[0207] Determine a reference road set between the start road and the end road according to the start road direction and the end road direction;
[0208] For the i-th reference road, determine the i-th candidate road set corresponding to the i-th reference road from the reference road set, and determine whether the end road exists in the i-th candidate road set; wherein, the start points of the candidate roads in the i-th candidate road set are all on the i-th reference road, and i is an integer greater than 0. When the value of i is 1, the first reference road is the start road;
[0209] When the end road does not exist in the i-th candidate road set, calculate the candidate distances corresponding to the respective candidate roads in the i-th candidate road set, and determine the candidate road corresponding to the minimum candidate distance as the target candidate road corresponding to the i-th reference road, and save the candidate connection relationship between the i-th reference road and the target candidate road; wherein, the candidate distance is the sum of the road lengths corresponding to the i-th reference road and the candidate road.
[0210] Determine the target candidate road corresponding to the i-th reference road as the (i + 1)-th reference road.
[0211] When the end road exists in the i-th candidate road set, determine the end road as the (i + 1)-th reference road, and save the candidate connection relationship between the i-th reference road and the (i + 1)-th reference road.
[0212] According to the candidate connection relationships corresponding to the respective reference roads, determine the second reference road to the (n - 1)-th reference road as the planned roads, and determine the road connection relationships between the start road, the end road and the respective planned roads; where n is the number of roads corresponding to the target path.
[0213] Optionally, the path generation unit 1006 is specifically configured to:
[0214] Determine the first guiding step length of the start road according to the road type of the start road, and determine a plurality of first guiding path points on the start road according to the first guiding step length.
[0215] Determine the second guiding step length corresponding to each of the planned roads according to the road type of each of the planned roads, and determine a plurality of second guiding path points on each of the start roads according to the second guiding step length.
[0216] Determine the third guiding step length of the end road according to the road type of the end road, and determine a plurality of third guiding path points on the end road according to the third guiding step length.
[0217] Connect the first guiding path points, the second guiding path points and the third guiding path points in sequence according to the road connection relationship to generate the target path.
[0218] Optionally, the device further includes a path drawing unit, configured to:
[0219] Draw a start identifier and an end identifier according to the position information of the path start point in the map and the position information of the path end point in the map.
[0220] Draw guiding path point identifiers based on the position information of the first guiding path point, the second guiding path point, and the third guiding path point in the map;
[0221] Generate a display target path based on the starting point identifier, the guiding path point identifier, and the ending point identifier, and visually output the display target path to the display interface corresponding to the map.
[0222] Optionally, the end point determination unit 1004 is specifically configured to:
[0223] In response to an end point selection operation triggered for an end point road, determine a preliminary end point, and detect whether the preliminary end point is on the road reference line of the end point road;
[0224] If the preliminary end point is on the road reference line of the end point road, determine the preliminary end point as the path end point;
[0225] If the preliminary end point is not on the road reference line of the end point road, calculate the distances between each path point on the end point road and the preliminary end point according to the road type of the end point road, and determine the path point on the end point road that is closest to the preliminary end point as the path end point.
[0226] An embodiment of the present application provides a map path planning device, including: a memory and a processor;
[0227] The memory is used to store programs;
[0228] The processor is used to execute the program to implement each step of the above map path planning method.
[0229] An embodiment of the present application provides a computer storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, each step of the above map path planning method is implemented.
[0230] The names of the messages or information exchanged between multiple devices in the embodiments of the present application are only for illustrative purposes, and are not used to limit the scope of these messages or information.
[0231] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0232] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical, or other forms.
[0233] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0234] In addition, in each embodiment of the present application, the functional units can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0235] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store computer programs.
[0236] As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A map path planning method, characterized in that: The method comprises: Determine an initial starting point according to the position of the target vehicle; In response to the starting point selection operation, determining a starting point road; the starting point road at least includes a starting point road direction; Calculating the distance between each path point on the starting road and the initial starting point according to the road type of the starting road, and determining the path point on the starting road closest to the initial starting point as the path starting point; In response to the end point selection operation, a destination road is determined, and a path end point is determined on the destination road; wherein the destination road at least includes a destination road direction; According to the direction of the starting road and the direction of the end road, calculating the planned roads connected in sequence starting from the starting road until the planned road is connected to the end road, and determining the road connection relationship between the starting road, the planned road and the end road; A target path of a target vehicle between the path starting point and the path ending point is determined based on the starting road, the planned road, the destination road, and the road connection relationship; wherein the target path is the shortest path between the path starting point on the starting road and the path ending point on the destination road.
2. The method according to claim 1, characterized in that The calculating, according to the road type of the starting road, the distance between each path point on the starting road and the initial starting point comprises: Acquire the road type of the starting point road from a map; When the starting point road is a straight road, determining a vertical line segment between the initial starting point and the starting point road, and calculating a distance corresponding to the vertical line segment on the map; When the starting point road is a curved road, obtaining a curve description equation corresponding to the starting point road on the map, and determining each path point on the starting point road according to the curve description equation and the curve parameter step length, and calculating the distance between each path point and the initial starting point in sequence; When the starting road is an arc road, obtain the arc description equation corresponding to the starting road on the map; determine each path point on the starting road according to the arc description equation and the arc parameter step, and calculate the distance between each path point and the initial starting point in turn.
3. The method according to claim 1, characterized in that The step of calculating, according to the direction of the starting road and the direction of the end road, the planned roads connected in sequence starting from the starting road until the planned road is connected to the end road, and determining the road connection relationship between the starting road, the planned road and the end road includes: Determining a reference road set between the starting road and the ending road according to the starting road direction and the ending road direction; For the i-th reference road, determine the i-th candidate road set corresponding to the i-th reference road from the reference road set, and determine whether the end road exists in the i-th candidate road set; wherein the starting points of the candidate roads in the i-th candidate road set are all on the i-th reference road, i is an integer greater than 0, and when the value of i is 1, the first reference road is the starting road; When the destination road does not exist in the i-th candidate road set, respectively calculating the candidate distances corresponding to the candidate roads in the i-th candidate road set, determining the candidate road corresponding to the smallest candidate distance as the target candidate road corresponding to the i-th reference road, and saving the candidate connection relationship between the i-th reference road and the target candidate road; wherein the candidate distance is the sum of the road lengths corresponding to the i-th reference road and the candidate roads; Determine the target candidate road corresponding to the i-th reference road as the i+1-th reference road; When the terminal road exists in the i-th candidate road set, the terminal road is determined as the i+1-th reference road, and a candidate connection relationship between the i-th reference road and the i+1-th reference road is saved; According to the candidate connection relationship corresponding to each benchmark road, the second benchmark road to the n-1th benchmark road are determined as planned roads, and the road connection relationship between the starting road, the end road and each of the planned roads is determined; n is the number of roads corresponding to the target path.
4. The method according to claim 3, characterized in that The determining of a target path of a target vehicle between the path starting point and the path ending point based on the starting point road, the planned road, the ending point road and the road connection relationship comprises: Determining a first guidance step length of the starting road according to the road type of the starting road, and determining a plurality of first guidance path points on the starting road according to the first guidance step length; Determining, according to the road type of each of the planned roads, a second guidance step length corresponding to each of the planned roads, and determining, according to the second guidance step length, a plurality of second guidance path points on each of the starting roads; Determining a third guidance step length of the destination road according to the road type of the destination road, and determining a plurality of third guidance path points on the destination road according to the third guidance step length; According to the road connection relationship, the first guide path point, the second guide path point and the third guide path point are sequentially connected to generate the target path.
5. The method according to claim 1, characterized in that The method further comprises: Draw a starting point mark and an end point mark according to the position information of the starting point of the path in the map and the position information of the end point of the path in the map; Drawing a guide path point identifier according to the position information of the first guide path point, the second guide path point and the third guide path point in the map; A display target path is generated according to the starting point identifier, the guide path point identifier and the end point identifier, and the display target path is visually output to a display interface corresponding to the map.
6. The method according to claim 1, characterized in that Determining the end point of the path on the end road comprises: In response to a destination selection operation triggered for a destination road, determining an initial destination, and detecting whether the initial destination is on a road reference line of the destination road; If the initial endpoint is on the road reference line of the terminal road, the initial endpoint is determined as the path endpoint; If the initial endpoint is not on the road reference line of the endpoint road, the distance between each path point on the endpoint road and the initial endpoint is calculated according to the road type of the endpoint road, and the path point on the endpoint road closest to the initial endpoint is determined as the path endpoint.
7. A map path planning device, characterized in that: The device comprises: A position determination unit, used to: determine an initial starting point according to the position of the target vehicle; A starting point determination unit, configured to: determine a starting point road in response to a starting point selection operation; the starting point road at least includes a starting point road direction; A distance calculation unit is used to calculate the distance between each path point on the starting road and the initial starting point according to the road type of the starting road, and determine the path point on the starting road closest to the initial starting point as the path starting point; The end point determination unit is used to: determine the end point road in response to the end point selection operation, and determine the path end point on the end point road; wherein the end point road at least includes the end point road direction; A path calculation unit is used to: calculate the planned roads connected in sequence from the starting road according to the direction of the starting road and the direction of the end road, until the planned road is connected to the end road, and determine the road connection relationship between the starting road, the planned road and the end road; A path generation unit is used to determine a target path of a target vehicle between the path starting point and the path ending point based on the starting road, the planned road, the ending road and the road connection relationship; wherein the target path is the shortest path between the path starting point on the starting road and the path ending point on the ending road.
8. The device according to claim 7, characterized in that The distance calculation unit is specifically used for: Acquire the road type of the starting point road from a map; When the starting point road is a straight road, determining a vertical line segment between the initial starting point and the starting point road, and calculating a distance corresponding to the vertical line segment on the map; When the starting point road is a curved road, obtaining a curve description equation corresponding to the starting point road on the map, and determining each path point on the starting point road according to the curve description equation and the curve parameter step length, and calculating the distance between each path point and the initial starting point in sequence; When the starting point road is an arc road, obtaining an arc description equation corresponding to the starting point road on the map; According to the arc description equation and the arc parameter step, each path point on the starting point road is determined, and the distance between each path point and the initial starting point is calculated in turn.
9. A map path planning device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method according to any one of claims 1 to 6.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 6 is implemented.