Path planning method, device and computer storage medium of vehicle
By constructing and updating the lane directed graph, and performing path planning based on weights and road segment lengths, the problem of low path planning efficiency caused by high-precision maps is solved, and the efficiency of path planning is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHERY AUTOMOBILE CO LTD
- Filing Date
- 2023-11-02
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies based on high-precision maps have low efficiency in path planning, resulting in excessively long path planning times.
By constructing an initial directed lane graph, updating it to a target directed lane graph, and performing path planning based on the weights of the directed graphs and the length of road segments, map construction time and computational load are reduced.
It improves the efficiency of path planning and reduces the time and computation required for map building.
Smart Images

Figure CN117367450B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of path planning technology, and in particular to a method, apparatus and computer storage medium for path planning of vehicles. Background Technology
[0002] In the field of autonomous driving, path planning is a crucial core technology. Path planning provides autonomous vehicles with a global path so that the vehicles can travel according to the global path.
[0003] Related technologies generally rely on data corresponding to high-precision maps for path planning. However, since high-precision maps are high-resolution maps, they contain a large amount of data, making the creation of high-precision maps quite cumbersome.
[0004] If route planning is based on this high-precision map, the efficiency of route planning will be low because the time required to build the high-precision map is long. Summary of the Invention
[0005] This application provides a vehicle path planning method, apparatus, and computer storage medium, which can solve the problem of low efficiency in path planning in related technologies. The technical solution is as follows:
[0006] On the one hand, a method for vehicle path planning is provided, the method comprising:
[0007] Obtain the vehicle's current location and destination location;
[0008] Based on the current position and the destination position, the initial lane directed graph is updated to obtain the target lane directed graph. The initial lane directed graph includes: a plurality of preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the current position corresponds to the starting lane key point on the directed edge in the initial directed graph, the destination position corresponds to the ending lane key point on the directed edge in the initial directed graph, a plurality of preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points.
[0009] Based on the weights of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge, a first lane key point sequence from the starting lane key point to the ending lane key point is determined. The weights are determined based on the actual road segment length and the comfort level of the road segment.
[0010] Based on the target lane key point sequence, path planning is performed for the vehicle from the starting lane key point to the ending lane key point. The target lane key point sequence is a sequence composed of the starting lane key point and the first lane key points in the first lane key point sequence.
[0011] Optionally, the process of constructing the initial lane-directed graph includes:
[0012] Obtain multiple preset key points of the first lane on the road and the path relationships between each key point of the first lane;
[0013] The initial lane directed graph is constructed based on the multiple first lane key points and the path relationships between each first lane key point.
[0014] Optionally, updating the initial lane directed graph based on the current position and the destination position to obtain the target lane directed graph includes:
[0015] Determine the key points of the starting lane corresponding to the current position and the key points of the ending lane corresponding to the end position;
[0016] Based on the starting lane key point and the ending lane key point, determine the first target directed edge closest to the starting lane key point and the second target directed edge closest to the ending lane key point from the directed edges of the initial lane directed graph;
[0017] Determine the two key points of the first lane corresponding to the directed edge of the first target and the two key points of the first lane corresponding to the directed edge of the second target;
[0018] Determine two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and determine two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to two third target directed edges, and update the second target directed edge to two fourth target directed edges to obtain the target lane directed graph.
[0019] Optionally, determining the first lane key point sequence from the starting lane key point to the ending lane key point based on the weights of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge includes:
[0020] From a plurality of first lane key points in the target directed graph, determine a first candidate lane key point that is consistent with the vehicle’s frontal orientation and is closest to the starting lane key point, and use the first candidate lane key point as a lane key point in the first lane key point sequence.
[0021] Based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, a first lane key point sequence from the first lane key point to the termination lane key point is determined from the first candidate lane key point set. The first candidate lane key point set consists of lane key points other than the first lane key points included in the first lane key point sequence, as well as the termination lane key point.
[0022] Optionally, determining the sequence of first lane key points from the first lane key point to the termination lane key point from the first candidate lane key point set based on the weights of the directed edges in the target lane directed graph and the target lane directed graph includes:
[0023] Based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, the fifth target directed edge with the smallest weight is determined from the directed edges corresponding to the key points of the first candidate lane.
[0024] From the first set of candidate lane key points, determine the second candidate lane key point corresponding to the directed edge of the fifth target, and use the second candidate lane key point as a lane key point in the first lane key point sequence;
[0025] Determine whether the second candidate lane key point is the termination lane key point. If yes, obtain the first lane key point sequence. If not, update the first candidate lane key point set and determine the path weight of any third candidate lane key point in the updated first candidate lane key point set. The path weight is the total weight of the directed edge from the first candidate key point, following the order in which lane key points are selected as one of the target lane key point sequences, passing through all lane key points in the first lane key point, to reach the third candidate lane key point.
[0026] The third candidate lane key point corresponding to the smallest path weight is taken as a lane key point in the first lane key point sequence; the third candidate lane key point is taken as the second candidate lane key point, and the step of determining whether the second candidate lane key point is the termination lane key point is started.
[0027] Optionally, the step of performing path planning for the vehicle from the starting lane key point to the ending lane key point based on the target lane key point sequence includes:
[0028] Determine the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence, wherein the path type includes: straight path and turning path;
[0029] Based on the path type, the sequence of key points in the target lane, and the location coordinates of the target lane, path planning is performed for the vehicle.
[0030] On the other hand, a path planning device for a vehicle is provided, the device comprising:
[0031] The acquisition module is used to acquire the vehicle's current location and destination location;
[0032] An update module is used to update an initial lane directed graph based on the current position and the destination position to obtain a target lane directed graph. The initial lane directed graph includes: a plurality of preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the current position corresponding to the starting lane key point on the directed edge in the initial directed graph, the destination position corresponding to the ending lane key point on the directed edge in the initial directed graph, a plurality of preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points.
[0033] The determination module is used to determine the first lane key point sequence from the starting lane key point to the ending lane key point based on the weight of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge. The weight is determined based on the actual road segment length and the comfort level of the road segment.
[0034] The path planning module is used to plan the path of the vehicle from the starting lane key point to the ending lane key point based on the target lane key point sequence, wherein the target lane key point sequence is a sequence composed of the starting lane key point and the first lane key points in the first lane key point sequence.
[0035] Optionally, the apparatus further includes: a construction module, the construction module comprising:
[0036] The acquisition submodule is used to acquire multiple preset first lane key points on the road lanes and the path relationships between each first lane key point;
[0037] A construction submodule is used to construct the initial lane directed graph based on the plurality of first lane key points and the path relationships between each first lane key point.
[0038] Optionally, the update module includes:
[0039] The first determining submodule is used to determine the starting lane key point corresponding to the current position and the ending lane key point corresponding to the ending position.
[0040] The second determining submodule is used to determine, based on the starting lane key point and the ending lane key point, a first target directed edge that is closest to the starting lane key point and a second target directed edge that is closest to the ending lane key point from the directed edges of the initial lane directed graph;
[0041] The third determination submodule determines the two first lane key points corresponding to the directed edge of the first target and the two first lane key points corresponding to the directed edge of the second target.
[0042] The update submodule is used to determine two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and to determine two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to two third target directed edges, and update the second target directed edge to two fourth target directed edges to obtain the target lane directed graph.
[0043] Optionally, the determining module includes:
[0044] The fourth determining submodule is used to determine, from multiple first lane key points in the target directed graph, a first candidate lane key point that is consistent with the vehicle's frontal orientation and is closest to the starting lane key point, and to use the first candidate lane key point as a lane key point in the first lane key point sequence.
[0045] The fifth determining submodule is used to determine, based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, a first lane key point sequence from the first candidate lane key point set to the termination lane key point from the first candidate lane key point set. The first candidate lane key point set consists of lane key points other than the first lane key points included in the first lane key point sequence, and the termination lane key point.
[0046] Optionally, the fifth determining submodule includes:
[0047] The first determining unit is used to determine the fifth target directed edge with the smallest weight from the directed edges corresponding to the key points of the first candidate lane, based on the weights of the directed edges in the target lane directed graph and the target lane directed graph.
[0048] The second determining unit is used to determine the second candidate lane key point corresponding to the directed edge of the fifth target from the first candidate lane key point set, and to use the second candidate lane key point as a lane key point in the first lane key point sequence.
[0049] The judgment unit is used to determine whether the second candidate lane key point is the termination lane key point. If it is, the first lane key point sequence is obtained; if it is not, the first candidate lane key point set is updated and the path weight of any third candidate lane key point in the updated first candidate lane key point set is determined. The path weight is the total weight of the directed edge from the first candidate key point, in the order of being selected as a lane key point in the target lane key point sequence, passing through all lane key points in the first lane key point, to the third candidate lane key point.
[0050] The determining unit is used to select the third candidate lane key point corresponding to the smallest path weight as a lane key point in the first lane key point sequence; select the third candidate lane key point as a second candidate lane key point and send it to the judging unit, and the judging unit starts to execute the step of judging whether the second candidate lane key point is the termination lane key point.
[0051] Optionally, the path planning module includes:
[0052] The judgment submodule is used to determine the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence. The path type includes: straight path and turning path.
[0053] The sixth determination submodule is used to perform path planning for the vehicle based on the path type, the sequence of key points of the target lane, and the position coordinates of the target lane.
[0054] On the other hand, a computer-readable storage medium is provided, on which instructions are stored, which, when executed by a processor, implement any step in the above-described vehicle path planning method.
[0055] On the other hand, a computer program product containing instructions is provided that, when run on a computer, causes the computer to perform any step in the path planning of the aforementioned vehicle.
[0056] The beneficial effects of the technical solutions provided in this application include at least the following:
[0057] In this embodiment, a target lane directed graph corresponding to the vehicle's current position and destination position is obtained by including directed edges representing the path relationship between adjacent first lane key points and an initial lane directed graph of multiple first lane key points. Weights are set for the directed edges of the target lane directed graph, thereby enabling path planning based on the weights and the target lane directed graph constructed by the directed graph. This reduces the time required for map construction and the computational load of path planning, thereby improving the efficiency of path planning. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a flowchart of a vehicle path planning method provided in an embodiment of this application;
[0060] Figure 2 This is a flowchart of another vehicle path planning method provided in an embodiment of this application;
[0061] Figure 3 This is a flowchart of constructing an initial lane directed graph provided in an embodiment of this application;
[0062] Figure 4 This is a schematic diagram of an initial lane directed graph provided in an embodiment of this application;
[0063] Figure 5 This is a schematic diagram of a directed graph of a target lane provided in an embodiment of this application;
[0064] Figure 6 This is a schematic diagram of an adjacency matrix provided in an embodiment of this application;
[0065] Figure 7 This is a flowchart illustrating how to determine a sequence of key points for a first lane, as provided in an embodiment of this application.
[0066] Figure 8 This is a schematic diagram illustrating different paths provided in the embodiments of this application;
[0067] Figure 9 This is a schematic diagram of the structure of a vehicle path planning device provided in an embodiment of this application. Detailed Implementation
[0068] Figure 1 This is a flowchart of a vehicle path planning method provided in an embodiment of this application. The vehicle path planning method may include the following steps:
[0069] Step 101: Obtain the vehicle's current location and destination location.
[0070] Step 102: Based on the current position and the destination position, update the initial lane directed graph to obtain the target lane directed graph. The initial lane directed graph includes: multiple preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the starting lane key point on the directed edge in the initial directed graph corresponding to the current position, the ending lane key point on the directed edge in the initial directed graph corresponding to the destination position, multiple preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points.
[0071] Step 103: Based on the weights of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge, determine the first lane key point sequence from the starting lane key point to the ending lane key point. The weights are determined based on the actual road segment length and the road segment comfort.
[0072] Step 104: Based on the target lane key point sequence, perform path planning for the vehicle from the starting lane key point to the ending lane key point. The target lane key point sequence is a sequence composed of the starting lane key point and the first lane key points in the first lane key point sequence.
[0073] In this embodiment, a target lane directed graph corresponding to the current position and the destination position of the vehicle is obtained by using directed edges that represent the path relationship between adjacent first lane key points and an initial lane directed graph of multiple first lane key points. Weights are set for the directed edges of the target lane directed graph, thereby enabling path planning based on the weights and the target lane directed graph constructed by the directed graph. This reduces the time required for map construction and the amount of computation required for path planning, thereby improving the efficiency of path planning.
[0074] Figure 2 This is a flowchart of another vehicle path planning method provided in this application embodiment. This embodiment illustrates the application of the vehicle path planning method to a controller in a vehicle. The vehicle path planning method may include the following steps:
[0075] Step 201: Obtain the vehicle's current location and destination location.
[0076] It should be noted that the current position and the destination position are position coordinates in a preset coordinate system. Furthermore, in order to ensure the accuracy of path planning, all parameters involved in the vehicle's path planning method are parameters in a preset coordinate system, with the x-axis pointing due east and the y-axis pointing due north, as an example.
[0077] In this embodiment of the application, the vehicle is located using GPS in the vehicle to determine the vehicle's position coordinates in the geocentric coordinate system. Then, by using the correspondence between the geocentric coordinate system and the preset coordinate system, the vehicle's position coordinates in the geocentric coordinate system are converted into position coordinates in the preset coordinate system. The position coordinates in the preset coordinate system are then used as the vehicle's current position.
[0078] The endpoint location is determined based on the location input by the user. In one embodiment of this application, the location input by the user can be obtained and converted into position coordinates in a preset coordinate system. The position coordinates in the preset coordinate system are then used as the endpoint location.
[0079] Step 202: Determine the key points of the starting lane corresponding to the current position and the key points of the ending lane corresponding to the ending position.
[0080] It should be noted that the starting lane key point corresponding to the current position and the ending lane key point corresponding to the ending position are determined based on the initial lane directed graph, which is used to represent the drivable roads in the actual environment and the connection relationships between each drivable road.
[0081] The following section introduces the construction of the initial directed lane graph, such as... Figure 3 As shown, the specific process includes steps 2021-2022:
[0082] Step 2021: Obtain multiple preset key points of the first lane on the road and the path relationship between each key point of the first lane.
[0083] The first lane key point is preset and is represented by the position coordinates of the key point in a preset coordinate system. The first lane key point is a key point on the actual road, such as a crossroads, a T-junction, and a bend.
[0084] In the embodiments of this application, the path relationship between each first lane key point is used to represent the connection relationship between each first lane key point on the actual road. This path relationship can be represented by directed edges in a directed graph or by an adjacency matrix.
[0085] Step 2022: Construct an initial lane directed graph based on multiple first lane key points and the path relationships between each first lane key point.
[0086] The initial lane directed graph can be represented by a directed graph, which consists of vertices and directed edges, such as... Figure 4 As shown, the initial lane directed graph can also be an adjacency matrix used to represent the path relationships between key points in the first lane.
[0087] When the initial lane directed graph can be represented by an adjacency matrix, a one-dimensional array is used to store all vertex data, which is the position coordinates of each first lane key point or the identification information of each first lane key point. A two-dimensional array is used to store the connection relationship data between each first lane key point. The adjacency matrix can determine whether there is an edge connecting any two first lane key points. This edge can be represented by a directed edge, or the vertex data and connection relationship data can be combined into a two-dimensional adjacency matrix.
[0088] In one embodiment of this application, a correspondence between the location coordinates of key points in the first lane and their identification information can be established, thereby storing the identification information corresponding to the key points in the first lane sequentially in a one-dimensional array according to the order of the identification information. Figure 4 As shown, there are 9 key points in the first lane, and the identification information is assigned sequentially as 0, 1, 2, 3, 4, 5, 6, 7, 8.
[0089] It should be noted that when planning a route for a vehicle, it is necessary to determine whether the current position and the destination position are on a drivable road, that is, to determine whether the current position and the destination position are on the directed edges of the initial lane directed graph.
[0090] In one embodiment of this application, when the vehicle's current position is on a directed edge in the initial lane directed graph, the starting lane key point is a key point at the current position; when the vehicle's current position is not on a directed edge in the initial lane directed graph, the starting lane key point is a projection point of the key point at the current position onto the drivable road. The projection point is determined as follows:
[0091] Based on the location coordinates of the first lane key point and the coordinates of the current position, the distance between each first lane key point and the current position can be determined. The first lane key point with the smallest distance is selected. Based on the initial lane directed graph, all directed edges corresponding to the first lane key point are determined. From all directed edges, the directed edge closest to the current position is determined. The current position is projected onto the directed edge closest to the current position to obtain the projection point, which is used as the starting lane key point.
[0092] In one embodiment of this application, the method for determining the key point of the termination lane corresponding to the endpoint position is similar to the method for determining the key point of the starting lane corresponding to the current position. When determining the key point of the termination lane corresponding to the endpoint position, the current position is replaced with the endpoint position. The key point of the termination lane can be determined using the above method.
[0093] Step 203: Based on the starting lane key point and the ending lane key point, determine the first target directed edge closest to the starting lane key point and the second target directed edge closest to the ending lane key point from the directed edges of the initial lane directed graph.
[0094] Among them, the directed edge where the key point of the starting lane is located is the first target directed edge, which is the directed edge closest to the current position, and the directed edge where the key point of the ending lane is located is the second target directed edge, which is the directed edge closest to the end position.
[0095] Step 204: Determine the two first lane key points corresponding to the first target directed edge and the two first lane key points corresponding to the second target directed edge; determine the two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and determine the two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to the two third target directed edges, and update the second target directed edge to the two fourth target directed edges to obtain the target lane directed graph.
[0096] In this embodiment, when the starting lane key point and the ending lane key point are projected onto their corresponding directed edges, the path relationships between the starting lane key point and the ending lane key point and the first lane key point in the initial directed graph need to be established using the method described above. The process is illustrated below with an example:
[0097] like Figure 4 and Figure 5 As shown, the first target directed edge is the directed edge between the first lane key point with identification information 1 and the first lane key point with identification information 2. The two first lane key points corresponding to this directed edge are the first lane key point with identification information 1 and the first lane key point with identification information 2. The starting lane key point is the key point with identification information 9. If the first target directed edge is updated to two third target directed edges corresponding to the two first lane key points and the starting lane key point, then the third target directed edge between the key point with identification information 9 and the first lane key point with identification information 1 and another third target directed edge between the key point with identification information 9 and the first lane key point with identification information 2 are obtained.
[0098] For the two directed edges of the fourth objective corresponding to the key point of the termination lane, such as Figure 4 , Figure 5 As shown, the second target directed edge is the directed edge between the first lane key point with identification information 6 and the first lane key point with identification information 7. The two first lane key points corresponding to this directed edge are the first lane key point with identification information 6 and the first lane key point with identification information 7. The termination lane key point is the key point with identification information 10. If the second target directed edge is updated to two fourth target directed edges corresponding to the two first lane key points and the termination lane key point, then the fourth target directed edge between the key point with identification information 10 and the first lane key point with identification information 6 and another fourth target directed edge between the key point with identification information 10 and the first lane key point with identification information 7 are obtained.
[0099] It should be noted that when updating directed edges based on the starting and ending lane key points, the data corresponding to the directed edges in the adjacency matrix needs to be updated. Since the initial directed lane graph does not include the starting and ending lane key points, the process of updating the adjacency matrix requires adding the data of the directed edges corresponding to the starting and ending lane key points, as well as updating the data of the directed edges in the initial directed lane graph. The data corresponding to the unchanged directed edges in the initial directed lane graph remains unchanged, thus obtaining the target directed lane graph.
[0100] like Figure 6 The adjacency matrix corresponding to the directed graph of the target lane shown is as follows: the first row and first column contain vertex data, and the remaining data contain connection relationship data. A connection relationship value of 0 indicates a connection between vertices themselves; a connection relationship value of 1 indicates a path connection between two corresponding vertices; and an empty connection relationship value indicates no path connection between two corresponding vertices. The values corresponding to the connection relationships can be set according to the actual situation. Figure 6 This is just an example to illustrate the point.
[0101] Steps 201-204 can determine the target lane directed graph corresponding to the current position and the destination position. Subsequently, based on the target lane directed graph, steps 205-208 are used to determine the optimal path for vehicle path planning.
[0102] Step 205: From multiple first lane key points in the target directed graph, determine the first candidate lane key point that is consistent with the vehicle's frontal orientation and is closest to the starting lane key point, and use the first candidate lane key point as a lane key point in the first lane key point sequence.
[0103] The vehicle's heading is used to indicate the vehicle's intended driving mode. GPS can be used to obtain the angles between the vehicle's heading and various directions. These angles determine the vehicle's heading angle in a preset coordinate system. By analyzing the relationship between the heading angle and yaw angle, the yaw angle (the angle between the vehicle's heading and the x-axis in the preset coordinate system) can be determined. The cosine of the direction vector formed by the vehicle's heading and the direction vector of the nearest directed edge to the vehicle's current position is used to determine the first candidate lane key point that matches the vehicle's heading and is closest to the starting lane key point. Figure 5 As shown, the direction in which the vehicle's front is facing is consistent with the direction of the key point with the identification information of 1, that is: the key point with the identification information of 1 is the first candidate lane key point.
[0104] Step 206: Based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, determine the first lane key point sequence from the first lane key point to the termination lane key point from the first candidate lane key point set.
[0105] The first candidate lane key point set comprises lane key points other than those included in the first lane key point sequence, plus the termination lane key point. Weights are determined based on the actual road segment length and road segment comfort. Road segment comfort is determined based on the road segment width and road segment smoothness.
[0106] In embodiments of this application, a first lane key point sequence is used for vehicle path planning, and the lane key point sequence is a key point in the path planning.
[0107] In one embodiment of this application, such as Figure 7 As shown, based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, the sequence of first lane key points from the first candidate lane key point set to the terminal lane key point is determined, including steps 2061-2064:
[0108] Step 2061: Based on the weights of the directed edges in the directed graph of the target lane and the directed graph of the target lane, determine the fifth target directed edge with the minimum weight from the directed edges corresponding to the key points of the first candidate lane.
[0109] Among them, the directed edge corresponding to the first candidate lane key point is a directed edge with the first candidate lane key point as the vertex. Each directed edge has a weight, so the directed edge corresponding to the smallest weight is selected as the fifth target directed edge.
[0110] Step 2062: From the first set of candidate lane key points, determine the second candidate lane key point corresponding to the directed edge of the fifth target, and use the second candidate lane key point as a lane key point in the first lane key point sequence.
[0111] The first lane key point sequence is the set of key points selected for path planning, and the first candidate lane key point set is the set of key points not selected for path planning.
[0112] In one embodiment of this application, the initial state of the first lane key point sequence does not contain key points. After the first candidate key point is determined, the first candidate key point is stored in the first lane key point sequence. The first candidate lane key point set consists of key points that have not yet been determined as the optimal path. The initial state of the first candidate lane key point set consists of lane key points other than the first lane key points contained in the first lane key point sequence and the termination lane key point among multiple first lane key points.
[0113] Step 2063: Determine whether the second candidate lane key point is the termination lane key point. If yes, proceed to step 2064; otherwise, proceed to step 2065.
[0114] Step 2064: Obtain the key point sequence of the first lane.
[0115] Step 2065: Update the first candidate lane key point set and determine the path weight of any third candidate lane key point in the updated first candidate lane key point set. The path weight is the total weight of the directed edge that starts from the first candidate key point, follows the order of being selected as one of the target lane key points in the sequence of lane key points, passes through all the lane key points in the first lane key point, and reaches the third candidate lane key point.
[0116] Step 2066: Take the third candidate lane key point corresponding to the smallest path weight as a lane key point in the first lane key point sequence; take the third candidate lane key point as the second candidate lane key point, and start the step of determining whether the second candidate lane key point is a termination lane key point.
[0117] It should be noted that when determining the key point sequence of the first lane, the key points corresponding to the path planning can only be determined after the determined second candidate key point is the termination lane key point, so that the key point sequence of the first lane can be obtained.
[0118] Step 207: The target lane key point sequence is formed by the order of the starting lane key point and the key points of each first lane in the first lane key point sequence.
[0119] The target lane key point sequence is used to plan the path of the vehicle from the starting lane key point to the ending lane key point.
[0120] The following example illustrates the specific process of determining the sequence of key points in the first lane.
[0121] The key points for the first lane are those marked with labels 0-8, the key point for the starting lane is that marked with label 9, and the key point for the ending lane is that marked with label 10. The path relationship between the key points marked with labels 0-10 is as follows: Figure 5 As shown, if the first candidate key point is determined to be a key point with identification information of 1, then the key point with identification information of 1 is added to the first lane key point sequence. The first lane key point sequence includes the first candidate key point with identification information of 1. The first candidate lane key point set includes: key points with identification information of 0, key points with identification information of 2-8, and key points with identification information of 10.
[0122] Then, it is determined whether the first candidate keypoint with the identifier 1 is a termination lane keypoint. In this example, the termination lane keypoint is the keypoint with identifier 10. Therefore, the first candidate keypoint with identifier 1 is not a termination lane keypoint. From the keypoints with identifier 0, keypoints with identifiers 2-8, and keypoints with identifier 10, the keypoint with the smallest weight of the directed edge corresponding to the first candidate keypoint is determined to be the keypoint with identifier 4. The keypoint with identifier 4 is then added to the first lane keypoint sequence. It is then determined whether the keypoint with identifier 4 is a termination lane keypoint. If not, the first candidate lane keypoint set is updated, and the keypoint with identifier 4 added to the first lane keypoint sequence is removed. This results in an updated first candidate lane keypoint set including keypoints with identifier 0, keypoints with identifiers 0, 2-3, 5-8, and keypoints with identifier 10. For each keypoint among the keypoints with identifiers 2-3, 5-8, and 10, the keypoint is determined by passing through the first candidate keypoint with identifier 1 and the keypoint with identifier 4. The total weight of the key point is calculated. If the key point with the smallest weight corresponds to a key point with identifier 7, then the key point with identifier 7 is added to the first lane key point sequence. It is then determined whether the key point with identifier 7 is a termination lane key point. If not, the first candidate lane key point set is updated, and the key point with identifier 7 added to the first lane key point sequence is removed. The updated first candidate lane key point set includes key points with identifier 0, key points with identifiers 2-3, 5-6, and 8, and key points with identifier 10. For each key point among the key points with identification information of 0, 2-3, 5-8 and key points with identification information of 10, the total weight from the first candidate key point with identification information of 1, through the key points with identification information of 4 and 7 to the key point is calculated. If the key point with the smallest weight is the key point with identification information of 10, then the key point with identification information of 10 is added to the key point sequence of the first lane. If the key point with identification information of 10 is determined to be the key point of the termination lane, then the sequence of the key points of the first lane is obtained as follows: key points with identification information of 1, 4, 7, and 10.
[0123] After obtaining the sequence of key points in the first lane, the starting key point with the identifier 9 is added to the beginning of the sequence of key points in the first lane, forming the target lane key point sequence with identifiers of 9, 1, 4, 7, and 10 in sequence.
[0124] Step 208: Determine the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence.
[0125] The path types include: straight paths and turning paths.
[0126] In one embodiment of this application, determining the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence includes: comparing the x-coordinate and y-coordinate of the coordinates of the (i-1)th point with those of the coordinates of the i-th point; comparing the x-coordinate and y-coordinate of the coordinates of the i-th point with those of the (i+1)th point; and determining whether the line segment formed by the (i-1)th point and the (i+1)th point is above or below the i-th point to determine different path cases in a preset coordinate system, as detailed below:
[0127] If the ordinate of the (i-1)th point is greater than the ordinate of the ith point, the x-coordinate of the (i-1)th point is the same as the x-coordinate of the ith point, the ordinate of the ith point is the same as the (i+1)th point, the x-coordinate of the ith point is greater than the x-coordinate of the (i+1)th point, and the line segment formed by the (i-1)th point and the (i+1)th point is above the ith point, then the path is determined to be a path that travels along the negative y-axis and turns towards the negative x-axis. Figure 8 The case corresponding to ① in the text;
[0128] If the x-coordinate of point (i-1) is the same as the x-coordinate of point i, the y-coordinate of point (i-1) is greater than the y-coordinate of point i, the y-coordinate of point i is the same as the y-coordinate of point (i+1), the x-coordinate of point i is less than the x-coordinate of point (i+1), and the line segment formed by points (i-1) and (i+1) is above point i, then the path is determined to be a path where the vehicle travels along the negative y-axis and turns towards the positive x-axis. Figure 8 The case corresponding to ② in the text;
[0129] If the x-coordinate of point (i-1) is the same as the x-coordinate of point i, and the y-coordinate of point (i-1) is less than the y-coordinate of point i, and the y-coordinate of point i is the same as the y-coordinate of point (i+1), and the x-coordinate of point i is less than the x-coordinate of point (i+1), and the line segment formed by points (i-1) and (i+1) is below point i, then the path is determined to be a path where the vehicle travels along the positive y-axis and turns towards the positive x-axis. Figure 8 The case corresponding to ③ in the text;
[0130] If the x-coordinate of point (i-1) is the same as the x-coordinate of point i, the y-coordinate of point (i-1) is less than the y-coordinate of point i, the y-coordinate of point i is the same as the y-coordinate of point (i+1), the x-coordinate of point i is greater than the x-coordinate of point (i+1), and the line segment formed by points (i-1) and (i+1) is below point i, then the path is determined to be a path where the vehicle travels along the positive y-axis and turns towards the negative x-axis. Figure 8 The case corresponding to ④ in the text;
[0131] If the x-coordinate of point (i+1) is the same as the x-coordinate of point (i), and the y-coordinate of point (i+1) is greater than the y-coordinate of point (i), and the y-coordinate of point (i-1) is the same as the y-coordinate of point (i-1), and the x-coordinate of point (i) is greater than the x-coordinate of point (i-1), and the line segment formed by points (i-1) and (i+1) is above point (i), then the path is determined to be a path where the vehicle travels along the positive x-axis and turns along the positive y-axis. Figure 8 The case corresponding to ⑤ in the text;
[0132] If the x-coordinate of point (i+1) is the same as the x-coordinate of point (i), the y-coordinate of point (i+1) is greater than the y-coordinate of point (i), the y-coordinate of point (i-1) is the same as the y-coordinate of point (i-1), the x-coordinate of point (i) is less than the x-coordinate of point (i-1), and the line segment formed by points (i-1) and (i+1) is above point (i), then the path is determined to be a path where the vehicle travels along the positive x-axis and turns along the negative y-axis. Figure 8 The case corresponding to ⑥ in the text;
[0133] If the ordinate of the (i-1)th point is the same as the ordinate of the ith point, the x-coordinate of the (i-1)th point is greater than the x-coordinate of the ith point, the x-coordinate of the ith point is the same as the x-coordinate of the (i+1)th point, the ordinate of the ith point is greater than the ordinate of the (i+1)th point, and the line segment formed by the (i-1)th point and the (i+1)th point is below the ith point, then the path is determined to be a path where the vehicle travels along the negative x-axis and turns towards the negative y-axis, which corresponds to case ⑦ in the figure.
[0134] If the ordinate of point (i-1) is the same as the ordinate of point i, the x-coordinate of point (i-1) is greater than the x-coordinate of point i, the x-coordinate of point i is greater than the x-coordinate of point (i-1), the ordinate of point i is greater than the ordinate of point (i+1), and the line segment formed by points (i-1) and (i+1) is below point i, then the path is determined to be a path where the vehicle travels along the positive x-axis and turns towards the negative y-axis. Figure 8 The case corresponding to ⑧ in the diagram;
[0135] If the x-coordinate or y-coordinate of the (i-1)th point, the ith point, and the (i-1)th point are the same, then the current path is determined to be a straight path. Figure 8 The case corresponding to ⑨ in the diagram.
[0136] Step 209: Perform path planning for the vehicle based on the path type, the sequence of key points in the target lane, and the location coordinates corresponding to the sequence of key points in the target lane.
[0137] If the path type is a straight path, then path planning is performed according to the following formula:
[0138]
[0139] Where, x i y i Let x be the coordinate of the i-th point. i-1 y i-1 Let θ be the coordinates of the (i-1)th point, and θ be the yaw angle. Δx is the difference in the abscissa between two adjacent key points in the target lane key point sequence in the straight path, Δy is the difference in the ordinate between two adjacent key points, T is the preset control cycle, and v is the preset speed.
[0140] If the path type is a turning path, then the path planning is performed according to the following formula:
[0141]
[0142] Where, x i y i Let θ be the coordinate of the i-th point. i Let x be the yaw angle at the i-th point. i-1 y i-1 Let θ be the coordinate of the (i-1)th point. i-1 Let be the yaw angle at the (i-1)th point, T be the preset control cycle, v be the preset speed, and R be the preset road radius.
[0143] In this embodiment, a target lane directed graph corresponding to the current position and the destination position of the vehicle is obtained by using directed edges that represent the path relationship between adjacent first lane key points and an initial lane directed graph of multiple first lane key points. Weights are set for the directed edges of the target lane directed graph, thereby enabling path planning based on the weights and the target lane directed graph constructed by the directed graph. This reduces the time required for map construction and the amount of computation required for path planning, thereby improving the efficiency of path planning.
[0144] Figure 9 This is a schematic diagram of a vehicle path planning device provided in an embodiment of this application. The vehicle path planning device can be implemented by software, hardware, or a combination of both. The vehicle's display control device may include: an acquisition module 901, an update module 902, a determination module 903, and a path planning module 90.
[0145] The acquisition module 901 is used to acquire the vehicle's current location and destination location;
[0146] The update module 902 is used to update the initial lane directed graph based on the current position and the destination position to obtain the target lane directed graph. The initial lane directed graph includes: a plurality of preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the starting lane key point on the directed edge of the initial directed graph corresponding to the current position, the ending lane key point on the directed edge of the initial directed graph corresponding to the destination position, a plurality of preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points.
[0147] The determination module 903 is used to determine the first lane key point sequence from the starting lane key point to the ending lane key point based on the weight of the directed edge in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge. The weight is determined based on the actual road segment length and the comfort level of the road segment.
[0148] The path planning module 904 is used to plan the path of a vehicle from the starting lane key point to the ending lane key point based on the target lane key point sequence. The target lane key point sequence is a sequence composed of the starting lane key point and the first lane key points in the first lane key point sequence.
[0149] Optionally, the apparatus further includes: a building module, which includes:
[0150] The acquisition submodule is used to acquire multiple preset first lane key points on the road lanes and the path relationships between each first lane key point;
[0151] The construction submodule is used to construct an initial lane directed graph based on multiple first lane key points and the path relationships between each first lane key point.
[0152] Optional, update module 902, including:
[0153] The first determination submodule is used to determine the key points of the starting lane corresponding to the current position and the key points of the ending lane corresponding to the ending position.
[0154] The second determination submodule is used to determine, based on the starting lane key point and the ending lane key point, the first target directed edge closest to the starting lane key point and the second target directed edge closest to the ending lane key point from the directed edges of the initial lane directed graph.
[0155] The third determination submodule determines the two first lane key points corresponding to the directed edge of the first target and the two first lane key points corresponding to the directed edge of the second target.
[0156] The update submodule is used to determine two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and to determine two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to two third target directed edges, and update the second target directed edge to two fourth target directed edges to obtain the target lane directed graph.
[0157] Optionally, module 903 includes:
[0158] The fourth determination submodule is used to determine the first candidate lane key point that is consistent with the vehicle's frontal orientation and is closest to the starting lane key point from multiple first lane key points in the target directed graph, and to use the first candidate lane key point as a lane key point in the first lane key point sequence.
[0159] The fifth determination submodule is used to determine the first lane key point sequence from the first lane key point to the termination lane key point from the first candidate lane key point set based on the weight of the directed edge in the target lane directed graph and the target lane directed graph. The first candidate lane key point set consists of lane key points other than the first lane key points included in the first lane key point sequence and the termination lane key point among multiple first lane key points.
[0160] Optionally, the fifth determining submodule includes:
[0161] The first determining unit is used to determine the fifth target directed edge with the smallest weight from the directed edges corresponding to the key points of the first candidate lane, based on the weights of the directed edges in the directed graph of the target lane and the target lane directed graph.
[0162] The second determining unit is used to determine the second candidate lane key point corresponding to the directed edge of the fifth target from the first candidate lane key point set, and to use the second candidate lane key point as a lane key point in the first lane key point sequence.
[0163] The judgment unit is used to determine whether the second candidate lane key point is the termination lane key point. If it is, the first lane key point sequence is obtained; if not, the first candidate lane key point set is updated and the path weight of any third candidate lane key point in the updated first candidate lane key point set is determined. The path weight is the total weight of the directed edge that starts from the first candidate key point, follows the order of being selected as a lane key point in the target lane key point sequence, passes through all lane key points in the first lane key point, and reaches the third candidate lane key point.
[0164] The determining unit selects the third candidate lane key point corresponding to the smallest path weight as a lane key point in the first lane key point sequence; it then selects the third candidate lane key point as the second candidate lane key point and sends it to the judging unit to start the step of judging whether the second candidate lane key point is a termination lane key point.
[0165] Optionally, the route planning module 904 includes:
[0166] The judgment submodule is used to determine the path type corresponding to the path formed by three adjacent key points in the key point sequence of the target lane. The path type includes: straight path and turning path.
[0167] The sixth determination submodule is used to plan the route for the vehicle based on the path type, the sequence of key points in the target lane, and the location coordinates of the target lane.
[0168] It should be noted that the vehicle path planning device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the vehicle path planning device and the vehicle path planning method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0169] This application also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the vehicle's processor, enables the vehicle to execute the vehicle path planning method provided in the above embodiments.
[0170] This application also provides a computer program product containing instructions that, when run on a vehicle, causes the vehicle to execute the vehicle path planning method provided in the above embodiments.
[0171] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0172] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.
Claims
1. A method for vehicle path planning, characterized in that, The method includes: Obtain the vehicle's current location and destination location; Based on the current position and the destination position, the initial lane directed graph is updated to obtain the target lane directed graph. The initial lane directed graph includes: a plurality of preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the current position corresponds to the starting lane key point on the directed edge in the initial lane directed graph, the destination position corresponds to the ending lane key point on the directed edge in the initial lane directed graph, a plurality of preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points. Based on the weights of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge, a first lane key point sequence from the starting lane key point to the ending lane key point is determined. The weights are determined based on the actual road segment length and the comfort level of the road segment. Determine the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence. The path type includes: straight path and turning path. Based on the path type, the target lane key point sequence and its position coordinates, perform path planning for the vehicle. The target lane key point sequence is a sequence composed of the starting lane key point and the sequence of each first lane key point in the first lane key point sequence.
2. The method as described in claim 1, characterized in that, The process of constructing the initial lane directed graph includes: Obtain multiple preset key points of the first lane on the road and the path relationships between each key point of the first lane; The initial lane directed graph is constructed based on the multiple first lane key points and the path relationships between each first lane key point.
3. The method as described in claim 1, characterized in that, The step of updating the initial lane directed graph based on the current position and the destination position to obtain the target lane directed graph includes: Determine the key points of the starting lane corresponding to the current position and the key points of the ending lane corresponding to the ending position; Based on the starting lane key point and the ending lane key point, determine the first target directed edge closest to the starting lane key point and the second target directed edge closest to the ending lane key point from the directed edges of the initial lane directed graph; Determine the two key points of the first lane corresponding to the directed edge of the first target and the two key points of the first lane corresponding to the directed edge of the second target; Determine two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and determine two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to two third target directed edges, and update the second target directed edge to two fourth target directed edges to obtain the target lane directed graph.
4. The method as described in claim 1, characterized in that, The determination of the first lane key point sequence from the starting lane key point to the ending lane key point, based on the weights of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge, includes: From a plurality of first lane key points in the target lane directed graph, determine a first candidate lane key point that is consistent with the vehicle’s frontal orientation and is closest to the starting lane key point, and use the first candidate lane key point as a lane key point in the first lane key point sequence. Based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, a first lane key point sequence from the first lane key point to the termination lane key point is determined from the first candidate lane key point set. The first candidate lane key point set consists of lane key points other than the first lane key points included in the first lane key point sequence, as well as the termination lane key point.
5. The method as described in claim 4, characterized in that, The step of determining the first lane key point sequence from the first lane key point to the termination lane key point from the first candidate lane key point set based on the weights of the directed edges in the target lane directed graph and the target lane directed graph includes: Based on the weights of the directed edges in the target lane directed graph and the target lane directed graph, the fifth target directed edge with the smallest weight is determined from the directed edges corresponding to the key points of the first candidate lane. From the first set of candidate lane key points, determine the second candidate lane key point corresponding to the directed edge of the fifth target, and use the second candidate lane key point as a lane key point in the first lane key point sequence; Determine whether the second candidate lane key point is the termination lane key point. If yes, obtain the first lane key point sequence. If not, update the first candidate lane key point set and determine the path weight of any third candidate lane key point in the updated first candidate lane key point set. The path weight is the total weight of the directed edge from the first candidate lane key point, following the order in which lane key points are selected as one of the target lane key point sequences, passing through all lane key points in the first lane key point, to reach the third candidate lane key point. The third candidate lane key point corresponding to the smallest path weight is taken as a lane key point in the first lane key point sequence; the third candidate lane key point is taken as the second candidate lane key point, and the step of determining whether the second candidate lane key point is the termination lane key point is started.
6. A path planning device for a vehicle, characterized in that, The device includes: The acquisition module is used to acquire the vehicle's current location and destination location; An update module is used to update an initial lane directed graph based on the current position and the destination position to obtain a target lane directed graph. The initial lane directed graph includes: a plurality of preset first lane key points and directed edges used to represent the path relationship between adjacent first lane key points. The target lane directed graph includes: the current position corresponding to the starting lane key point on the directed edge in the initial lane directed graph, the destination position corresponding to the ending lane key point on the directed edge in the initial lane directed graph, a plurality of preset first lane key points, and directed edges used to represent the path relationship between adjacent lane key points. The determination module is used to determine the first lane key point sequence from the starting lane key point to the ending lane key point based on the weight of the directed edges in the target lane directed graph, the target lane directed graph, and the actual road segment length corresponding to each directed edge. The weight is determined based on the actual road segment length and the comfort level of the road segment. The path planning module is used to determine the path type corresponding to the path formed by three adjacent key points in the target lane key point sequence. The path type includes: straight path and turning path. Based on the path type, the target lane key point sequence and its position coordinates, the module performs path planning for the vehicle. The target lane key point sequence is a sequence formed by following the order of the starting lane key point and passing through each first lane key point in the first lane key point sequence.
7. The apparatus as claimed in claim 6, characterized in that, The device further includes: a construction module, the construction module comprising: The acquisition submodule is used to acquire multiple preset first lane key points on the road lanes and the path relationships between each first lane key point; A construction submodule is used to construct the initial lane directed graph based on the plurality of first lane key points and the path relationships between each first lane key point.
8. The apparatus as claimed in claim 6, characterized in that, The update module includes: The first determining submodule is used to determine the starting lane key point corresponding to the current position and the ending lane key point corresponding to the ending position. The second determining submodule is used to determine, based on the starting lane key point and the ending lane key point, a first target directed edge that is closest to the starting lane key point and a second target directed edge that is closest to the ending lane key point from the directed edges of the initial lane directed graph; The third determination submodule determines the two first lane key points corresponding to the directed edge of the first target and the two first lane key points corresponding to the directed edge of the second target. The update submodule is used to determine two third target directed edges between the two first lane key points corresponding to the first target directed edge and the starting lane key point, and to determine two fourth target directed edges between the two first lane key points corresponding to the second target directed edge and the ending lane key point; update the first target directed edge to two third target directed edges, and update the second target directed edge to two fourth target directed edges to obtain the target lane directed graph.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a processor, implement the steps of the vehicle path planning method according to any one of claims 1 to 5.