A trajectory planning method and computer readable storage medium
By introducing time dimensions and preset speed considerations in the hybrid A* algorithm, obtaining and processing the start and end nodes and their status information of the vehicle, the problems of large amount of calculation and poor real-time performance of the existing algorithm are solved, and more efficient planning of the trajectory of autonomous driving vehicles is achieved.
Patent Information
- Application Number
- CN202210546061.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-05-19
AI Technical Summary
The existing hybrid A* algorithm has a large amount of calculations when planning the trajectory, which is difficult to meet real-time requirements and cannot further improve the traffic efficiency of autonomous vehicles.
By obtaining the starting node and terminating node and their status information of the target vehicle, an open list is established, and the next target node and its status information are obtained according to the size and direction of the preset speed until the driving trajectory of the vehicle is determined. This method extends the hybrid A* algorithm, applies it to the time dimension, and plans the trajectory of autonomous vehicles over the full-time and spatial domain.
When trajectory planning is carried out in real time, the requirements of vehicle dynamic constraints and dynamic solution are met, and the traffic efficiency of intersections is improved.
Smart Images

Figure CN115185263B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a trajectory planning method and a computer-readable storage medium. Background Art
[0002] The development of computer technology and communication technology has brought intersection management and control methods into a new stage. Planning and controlling the trajectory of connected and automated vehicles (CAVs) can effectively improve the safety and efficiency of intersections. Path search algorithms are widely used methods for finding effective paths. Common shortest path search algorithms include Dijkstra algorithm and A* algorithm. However, the trajectories searched by these algorithms do not conform to the kinematic characteristics of the vehicle and cannot guide the vehicle's actions. Dolgov et al. added heuristic conditions to the A* algorithm and proposed a hybrid A* algorithm, which enabled the path search algorithm to be used in vehicle trajectory planning.
[0003] However, the hybrid A* algorithm significantly increases the consumption of computing resources. When performing trajectory planning, the amount of calculation is large, which makes it difficult to meet real-time requirements and cannot further improve the traffic efficiency of autonomous vehicles. Summary of the invention
[0004] The embodiments of the present application provide a trajectory planning method and a computer-readable storage medium, which can solve the above problems.
[0005] In a first aspect, an embodiment of the present application provides a trajectory planning method, including:
[0006] Acquire a starting node and an ending node of a target vehicle, and acquire state information corresponding to the starting node; the state information includes a target time corresponding to the starting node, a steering angle of the target vehicle at the target time, and a heading angle of the target vehicle at the target time;
[0007] Establishing an open list, and adding the starting node to the open list; the open list is used to store each candidate node and its corresponding status information;
[0008] Acquire the candidate node with the smallest cost value in the open list as the target node;
[0009] When the target node is not the termination node, obtaining the magnitude and direction of the preset speed of the target vehicle, and obtaining the next target node and its corresponding target state information according to the magnitude and direction of the preset speed, and determining whether the next target node is the termination node;
[0010] When the target node is the terminating node, the driving trajectory of the target vehicle is determined according to the status information corresponding to the starting node and all the target nodes and their corresponding status information.
[0011] Further, the acquiring of the next target node and its corresponding target state information according to the magnitude and direction of the preset speed includes:
[0012] Acquire an initial node according to the magnitude and direction of a preset speed of the target vehicle;
[0013] An initial node that meets the preset constraint condition is used as the next target node, and target state information corresponding to the next target node is obtained.
[0014] Further, the acquiring the initial node according to the magnitude and direction of the preset speed of the target vehicle includes:
[0015] An iteration node is obtained according to the magnitude and direction of the preset speed of the target vehicle, and the unprocessed iteration node is used as an initial node.
[0016] Further, the obtaining of the iteration node according to the magnitude and direction of the preset speed of the target vehicle includes:
[0017] Acquire a plurality of first nodes according to the magnitude and direction of a preset speed of the target vehicle;
[0018] A plurality of iteration nodes are determined from the first nodes according to a preset grid interval; wherein the iteration nodes are located in different preset grid intervals.
[0019] Further, the determining a plurality of iteration nodes from the first nodes according to a preset grid interval includes:
[0020] When a plurality of the first nodes are in the same preset grid interval, any one of the first nodes is taken as an iteration node.
[0021] Furthermore, the taking the initial node that meets the preset constraint condition as the next target node includes:
[0022] Acquire a second node satisfying a preset collision constraint condition from the initial node;
[0023] A third node satisfying a preset range constraint condition is obtained from the second node, and the third node is used as the next target node.
[0024] Further, the acquiring a second node satisfying a preset collision constraint condition from the initial node includes:
[0025] Acquire a first boundary area of the initial node;
[0026] A second node satisfying a preset collision constraint condition is determined according to the first boundary area.
[0027] Further, the acquiring a third node satisfying a preset range constraint condition from the second node includes:
[0028] When the second node is in a preset restricted area, marking the second node as a fourth node;
[0029] The heading angle of the fourth node is acquired, and the second node is selected from the fourth node according to the heading angle of the fourth node, the heading angle of the initial node, and the heading angle of the termination node.
[0030] Further, the step of obtaining the candidate node with the smallest cost value in the open list as the target node includes:
[0031] A target trajectory from each candidate node to the terminal node is planned according to the Dubins curve, and the length of the target trajectory is calculated; wherein the target trajectory is composed of an arc and a straight line.
[0032] In a second aspect, an embodiment of the present application provides a trajectory planning device, including:
[0033] A first acquisition unit is used to acquire a starting node and an ending node of a target vehicle, and acquire state information corresponding to the starting node; the state information includes a target time corresponding to the starting node, a steering angle of the target vehicle at the target time, and a heading angle of the target vehicle at the target time;
[0034] A first processing unit is configured to establish an open list and add the start node to the open list; the open list is configured to store each candidate node and its corresponding status information;
[0035] A second acquisition unit, configured to acquire the candidate node with the smallest cost value in the open list as a target node;
[0036] A second processing unit is used for, when the target node is not the termination node, obtaining the magnitude and direction of the preset speed of the target vehicle, and obtaining the next target node and its corresponding target state information according to the magnitude and direction of the preset speed, and determining whether the next target node is the termination node;
[0037] The third processing unit is used to determine the driving trajectory of the target vehicle according to the state information corresponding to the starting node and all the target nodes and their corresponding state information when the target node is the ending node.
[0038] Furthermore, the second processing unit is specifically configured to:
[0039] Acquire an initial node according to the magnitude and direction of a preset speed of the target vehicle;
[0040] An initial node that meets the preset constraint condition is used as the next target node, and target state information corresponding to the next target node is obtained.
[0041] Furthermore, the second processing unit is specifically configured to:
[0042] An iteration node is obtained according to the magnitude and direction of the preset speed of the target vehicle, and the unprocessed iteration node is used as an initial node.
[0043] Furthermore, the second processing unit is specifically configured to:
[0044] Acquire a plurality of first nodes according to the magnitude and direction of a preset speed of the target vehicle;
[0045] A plurality of iteration nodes are determined from the first nodes according to a preset grid interval; wherein the iteration nodes are located in different preset grid intervals.
[0046] Furthermore, the second processing unit is specifically configured to:
[0047] When a plurality of the first nodes are in the same preset grid interval, any one of the first nodes is taken as an iteration node.
[0048] Furthermore, the second processing unit is specifically configured to:
[0049] Acquire a second node satisfying a preset collision constraint condition from the initial node;
[0050] A third node satisfying a preset range constraint condition is obtained from the second node, and the third node is used as the next target node.
[0051] Furthermore, the second processing unit is specifically configured to:
[0052] Acquire a first boundary area of the initial node;
[0053] A second node satisfying a preset collision constraint condition is determined according to the first boundary area.
[0054] Furthermore, the second processing unit is specifically configured to:
[0055] When the second node is in a preset restricted area, marking the second node as a fourth node;
[0056] The heading angle of the fourth node is acquired, and the second node is selected from the fourth node according to the heading angle of the fourth node, the heading angle of the initial node, and the heading angle of the termination node.
[0057] Furthermore, the second acquisition unit is specifically used to:
[0058] A target trajectory from each candidate node to the terminal node is planned according to the Dubins curve, and the length of the target trajectory is calculated; wherein the target trajectory is composed of an arc and a straight line.
[0059] In a third aspect, an embodiment of the present application provides a trajectory planning device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0060] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.
[0061] In the embodiment of the present application, the starting node and the ending node of the target vehicle are obtained, and the state information corresponding to the starting node is obtained; an open list is established, and the starting node is added to the open list; the candidate node with the smallest cost value in the open list is obtained as the target node; when the target node is not the ending node, the size and direction of the preset speed of the target vehicle are obtained, and the next target node and its corresponding target state information are obtained according to the size and direction of the preset speed, and it is determined whether the next target node is the ending node; when the target node is the ending node, the driving trajectory of the target vehicle is determined according to the state information corresponding to the starting node and all the target nodes and their corresponding state information. In the above method, the state information includes the target time corresponding to the starting node, the steering angle of the target vehicle at the target time, and the heading angle of the target vehicle at the target time, which expands the hybrid A* algorithm and extends it to the time dimension. When performing trajectory planning in real time, it meets the requirements of the vehicle's dynamic constraints and dynamic solution, and plans the trajectory of the autonomous driving vehicle in the full time and space domain, thereby improving the traffic efficiency of the intersection. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0063] Figure 1 is a schematic flow chart of a trajectory planning method provided in the first embodiment of the present application;
[0064] Figure 2 is a schematic diagram of an intersection in a trajectory planning method provided in the first embodiment of the present application;
[0065] Figure 3 is a schematic diagram of a dynamics model of an autonomous driving vehicle in a trajectory planning method provided in the first embodiment of the present application;
[0066] Figure 4 is a schematic diagram of a boundary area of a vehicle in a trajectory planning method provided in the first embodiment of the present application;
[0067] Figure 5 is a schematic diagram of a trajectory planning device provided in a second embodiment of the present application;
[0068] Figure 6 It is a schematic diagram of a trajectory planning device provided in the third embodiment of the present application. DETAILED DESCRIPTION
[0069] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0070] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0071] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0072] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0073] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0074] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0075] Trajectory planning refers to calculating a driving trajectory that meets internal / external constraints between the starting state and the ending state of a moving object. Internal constraints mainly include kinematic characteristics, and external constraints mainly include collision avoidance or other user-defined restrictions.
[0076] See also Figure 1 , Figure 1 is a schematic flow chart of a trajectory planning method provided in the first embodiment of the present application. In this embodiment, the execution subject of a trajectory planning method is a device with a trajectory planning function, such as a desktop computer, a server, etc. Figure 1 The trajectory planning method shown may include:
[0077] S101: Acquire a starting node and an ending node of a target vehicle, and acquire status information corresponding to the starting node; the status information includes a target time corresponding to the starting node, a steering angle of the target vehicle at the target time, and a heading angle of the target vehicle at the target time.
[0078] In this embodiment, trajectory planning refers to calculating a driving trajectory that meets internal or external constraints between the starting state and the ending state of the moving object. The moving object may be a moving vehicle. Therefore, in this embodiment, when performing unmanned driving trajectory planning, the device needs to first obtain the starting node and the ending node of the target vehicle.
[0079] The device obtains the starting node and the ending node of the target vehicle from the preset map. The device can obtain the location information of the starting node and the ending node, and the location information may include the coordinate information of the starting node and the ending node. The preset map may be a local map of the road, such as Figure 2 As shown, it can also include a complete intersection, where Figure 2 In the middle is a four-entry, two-way six-lane intersection. The arrow indicates the channelization of the intersection. The innermost lane is for vehicles turning left, the middle lane is for vehicles going straight, and the outermost lane is for vehicles turning right. RW indicates the width of the lane. Traffic lights are used to control manually driven vehicles. Autonomous vehicles, on the other hand, travel according to the planned trajectory and are not restricted by traffic lights. In addition, the preset map can include roads, obstacles, road condition information, etc., which are not restricted here.
[0080] When performing trajectory planning, it is also necessary to obtain the status information of the node. It can be understood that the status information of the starting node includes the position information of the starting node. In addition, the status information of the starting node also includes the target time corresponding to the starting node, the steering angle of the target vehicle at the target time, and the heading angle of the target vehicle at the target time.
[0081] In this embodiment, the movement of the vehicle is limited by speed, acceleration, and heading angle, and the driving process needs to meet certain constraints. In this embodiment, an autonomous driving vehicle dynamics model is constructed, through which some parameters in the state information of the vehicle node can be determined, such as Figure 3 And the following formula:
[0082]
[0083] Among them, (x i (t),y i (t)) represents the center point of the rear axle of the target vehicle i at time t; θ i (t) represents the heading angle of the target vehicle at time t; φ i (t) is the steering angle; a i (t) is the acceleration of the vehicle; ω i (t) is the angular velocity of the vehicle. To minimize the delay of the target vehicle when passing through the intersection, we assume that the vehicle has a maximum speed v maxWhen passing through an intersection, the maximum steering angle and maximum angular velocity of the vehicle are restricted:
[0084] v i (t) = v max
[0085] In order to enable dynamic solution, the time dimension is added to the state information of each node. In this way, the planned trajectory can be regarded as a dynamic obstacle. The subsequent planned trajectory can search for the most efficient path while ensuring safety.
[0086] S102: Establish an open list, and add the start node to the open list; the open list is used to store each candidate node and its corresponding status information.
[0087] The device establishes an open list, which is used to store each candidate node and its corresponding state information. In other words, the open list is a collection of candidate nodes, which are the location nodes that the target vehicle may travel to. The state information corresponding to the candidate node includes the location information of the candidate node, the time corresponding to the candidate node, the steering angle of the vehicle at this time, the heading angle of the vehicle at this time, and the posture and speed of the vehicle.
[0088] The device adds the start node to the open list. The open list can be empty before the start node is added, that is, the start node is the first node added to the open list. The open list can also be not empty before the start node is added.
[0089] S103: Acquire the candidate node with the smallest cost in the open list as the target node.
[0090] The device obtains the cost value of each candidate node in the open list, where the cost value is used to represent the cost consumed by the target vehicle from the starting node to the candidate node, and then from the candidate node to the end node. When calculating the cost value, factors that can be considered include trajectory length, movement time, whether there are obstacles, etc., which are not limited here.
[0091] Generally, when calculating the cost value, the heuristic function of the hybrid A* algorithm can be used for calculation. The heuristic function of the hybrid A* algorithm consists of two parts, namely the cost value of the A* algorithm and the cost value of the Reeds-Shepp curve. The larger value of the two is used as the final cost value of the node.
[0092] In another implementation, the device may use the Dubins curve instead of the Reeds-Shepp curve to calculate the cost value. The device plans the target trajectory from each candidate node to the terminal node according to the Dubins curve, and calculates the length of the target trajectory, where the target trajectory is composed of arcs and straight lines. Specifically, the cost value may refer to the distance from the current node to the target node. This distance is not a straight-line distance, but the length of the trajectory planned according to the Dubins curve. Specifically, during the driving process of the vehicle, its trajectory will be affected by factors such as the maximum heading angle, so its trajectory should be a trajectory composed of arcs and straight lines.
[0093] Let S represent the motion primitive of the vehicle going straight, L represent the motion primitive of the vehicle turning left, and R represent the motion primitive of the vehicle turning right. It can be proved that the shortest path from any starting point to the end point can be composed of no more than three motion primitives. A sequence composed of three motion primitives is called a word. Since two consecutive identical motion primitives can be combined into one, there are 10 possible combinations of all words. Dubins proved that the optimal combination can only be one of the following 6 combinations:
[0094] L α R β L γ ,R α L β R γ ,L α S d L γ ,L α S d R γ ,R α S d L γ ,R α S d R γ
[0095] The subscript represents radians or distances, such as L α Indicates that the target vehicle turns right at the maximum steering angle (because the shortest distance is required here, the steering action should be at the maximum steering angle, and the steering radius is the minimum turning radius of the vehicle). dIndicates the distance of the target vehicle to go straight; α, γ∈[0,2π), β∈(π,2π), when β<π, there must be other sequences that are better than the current sequence. To calculate the cost value of a node, we calculate the six sequences separately, and then take the node with the smallest cost value as the current cost value.
[0096] For the calculation of radian and distance, the above 6 words can actually be divided into two categories, namely CSC and CCC. C stands for Circle and S stands for Straight. The calculation of CSC is to determine the centers of two circles according to the starting point and the end point, and then obtain the common tangent of the two circles. For CCC, the word is composed of three tangent circles, and the radian of three turns can be calculated.
[0097] In addition, it is understandable that when the open list is empty, it means that an error has occurred, and there is no valid path for trajectory planning this time, and trajectory planning needs to be repeated.
[0098] S104: When the target node is not the termination node, the magnitude and direction of the preset speed of the target vehicle are obtained, and the next target node and its corresponding target state information are obtained according to the magnitude and direction of the preset speed to determine whether the next target node is the termination node.
[0099] The device determines whether the target node is a termination node. When the target node is not a termination node, the device obtains the angular velocity of the target vehicle, obtains the next target node and its corresponding target state information according to the angular velocity of the target vehicle, and determines whether the next target node is the termination node.
[0100] This process is actually a continuous expansion process, from the starting node to the ending node, so when the target node is not the ending node, it is necessary to continue to expand and find the next target node. Therefore, it can be understood that this step is a cyclic step. Each time it is determined that the target node is not the ending node, the cycle is restarted to obtain the next target node.
[0101] The device obtains the magnitude and direction of the preset speed of the target vehicle, obtains the position of the next target node according to the magnitude and direction of the preset speed of the target vehicle, and obtains the corresponding target state information. Specifically, the device can obtain the initial node according to the angular velocity of the target vehicle, and then use the initial node that meets the preset constraint conditions as the next target node, and obtain the target state information corresponding to the next target node. The magnitude and direction of the preset speed of the target vehicle can be the maximum angular velocity of the target vehicle. Assume ω max is the maximum angular velocity of the target vehicle, and the current target node rotates -ω max ,0,ωmax angles, multiple initial nodes can be obtained. The device pre-stores preset constraints, which are used to filter out the next target node from the initial node. The preset constraints may include preset range constraints, preset collision constraints, etc., which are not limited here.
[0102] In this embodiment, in order to avoid the path planned by the algorithm being invalid and to further improve the speed of the algorithm, the initial node that meets the preset constraint condition is used as the next target node. The specific implementation method may include: the device obtains the second node that meets the preset collision constraint condition from the initial node; obtains the third node that meets the preset range constraint condition from the second node, and uses the third node as the next target node. That is, the device screens the initial nodes according to the preset collision constraint condition, screens out the second node, and discards the initial node that may collide and is not used as the second node. Then, the device screens out the third node from the second node according to the preset range constraint condition, and the second node that is not within the preset range is also discarded and is not used as the third node.
[0103] Among them, in order to further ensure the driving safety of the vehicle when passing through the intersection, the specific implementation method of obtaining the second node that meets the preset collision constraint condition from the initial node can be: obtaining the first boundary area of the initial node, and determining the second node that meets the preset collision constraint condition according to the first boundary area. In order to ensure the calculation accuracy, the preset collision condition set by the device in this embodiment adds a boundary area for the vehicle, such as Figure 4 As shown in the figure, the boundary area of the autonomous vehicle is a square slightly larger than the vehicle body, which can ensure the driving safety of the vehicle. The uncertainty of the driving of the manually driven vehicle will be considered in the subsequent modeling, and the speed will fluctuate by 10%. For the convenience of calculation, the circumscribed circle is used as the boundary to wrap the manually driven vehicle. When there is an overlap between the boundary areas of the two vehicles, it is determined that the two vehicles are in conflict and a collision will occur.
[0104] In addition, to facilitate mixed flow traffic management, the device can move the manually driven vehicle along a fixed trajectory generated by a Bezier curve. The Bezier curve can generate a smooth curve through a given control point. Unlike autonomous vehicles that can drive completely along the planned trajectory, manually driven vehicles cannot move completely along the given trajectory, causing the speed of manually driven vehicles to fluctuate by 10%. All possible positions of manually driven vehicles will be considered as dynamic obstacles in the trajectory planning of autonomous vehicles.
[0105] Among them, in order to avoid the path planned by the algorithm being invalid, and in order to further limit the search area and increase the speed of the algorithm, the device specifies a restricted area for each turning vehicle. When obtaining a third node that meets the preset range constraint from the second node, the following method can be used. When the second node is in the preset restricted area, the device marks the second node as the fourth node, obtains the heading angle of the fourth node, and filters out the second node from the fourth node according to the heading angle of the fourth node, the heading angle of the initial node, and the heading angle of the terminal node. Specifically, when searching for nodes, if the node corresponding to the action exceeds the restricted area, the node will be directly abandoned. In addition, restrictions are also placed on the turning of the action. For example, for a straight-moving vehicle, the angle should not be reversed during its driving process. Therefore, in this algorithm, the angle of each node in the trajectory is different from the heading angle θ0 of the starting point (and the heading angle θ f ) cannot exceed 90°, that is: and
[0106] In one embodiment, when the initial node is obtained according to the magnitude and direction of the preset speed of the target vehicle, the iterative node can be obtained according to the magnitude and direction of the preset speed of the target vehicle, and the unprocessed iterative node is used as the initial node. max ,0,ω max If the device moves forward one step in the direction, multiple iteration nodes can be obtained. The device determines whether the iteration node has been processed. If it has been processed, it means that the iteration node has been searched and may have been expanded. In this case, no further processing is required and the processed iteration node can be discarded. The device can mark the processed node to facilitate the acquisition of the node processing status. After the device determines whether the iteration node has been processed, it uses the unprocessed iteration node as the initial node and further determines whether it can be used as the next target node.
[0107] On the other hand, in order to reduce the search time of the algorithm, when the device obtains the iterative nodes according to the size and direction of the preset speed of the target vehicle, it can adopt the following method: obtain multiple first nodes according to the size and direction of the preset speed of the target vehicle; determine multiple iterative nodes from the first nodes according to the preset grid interval; wherein the iterative nodes are in different said preset grid intervals.
[0108] Furthermore, a specific method of determining a plurality of iteration nodes from the first nodes according to the preset grid interval may be: when a plurality of first nodes are in the same preset grid interval, any first node is taken as an iteration node.
[0109] In this embodiment, 3D rasterization is used to limit the search area of the algorithm. Because the heuristic function of the improved hybrid A* algorithm is the Dubins curve, many similar nodes will be searched when searching for nodes. In order to avoid searching for redundant nodes and increase the algorithm search speed, the device rasterizes the intersection control area in the dimensions of (x, y, θ). In order to enable the model to be solved dynamically, a time dimension is added to each node, and the node information is changed from (x, y, θ) to (x, y, θ, time).
[0110] Specifically, rasterization is a discretization process for continuous variables. Here, the variables are divided into discrete intervals. When two variables fall into the same interval, they are determined to be the same variable and there is no need to search for the variable. For example, there are two nodes (x1, y1, theta1) and (x2, y2, theta2). If x1 and x2, y1 and y2, theta1 and theta2 all belong to the same interval, the two nodes are considered to be the same node and no search is required. Of course, if one of the variables (such as x) is distributed in two intervals, it will be considered to be two nodes and the second node needs to be searched. Rasterization (discretization) can reduce the amount of calculation on the one hand, and avoid the errors caused by computer floating-point numbers on the other hand.
[0111] In this way, the planned trajectory can be regarded as a dynamic obstacle, and the subsequent planned trajectory can search for the most efficient path while ensuring safety.
[0112] Finally, the device obtains the target state information corresponding to the next target node. Please refer to the method of the autonomous driving vehicle dynamics model mentioned above, which will not be repeated here.
[0113] S105: When the target node is the end node, the driving trajectory of the target vehicle is determined according to the state information corresponding to the start node and all the target nodes and their corresponding state information.
[0114] When the device determines that the target node is the end node, it means that all target nodes between the start node and the end node have been found, and there is no need to continue searching and expanding. The start node, all target nodes, and the end node are connected in sequence to obtain the driving trajectory of the target vehicle. Then, the device can obtain relevant information about the driving trajectory based on the status information of all nodes in the driving trajectory.
[0115] In the embodiment of the present application, the starting node and the ending node of the target vehicle are obtained, and the state information corresponding to the starting node is obtained; an open list is established, and the starting node is added to the open list; the candidate node with the smallest cost value in the open list is obtained as the target node; when the target node is not the ending node, the size and direction of the preset speed of the target vehicle are obtained, and the next target node and its corresponding target state information are obtained according to the size and direction of the preset speed, and it is determined whether the next target node is the ending node; when the target node is the ending node, the driving trajectory of the target vehicle is determined according to the state information corresponding to the starting node and all the target nodes and their corresponding state information. In the above method, the state information includes the target time corresponding to the starting node, the steering angle of the target vehicle at the target time, and the heading angle of the target vehicle at the target time, which expands the hybrid A* algorithm and extends it to the time dimension. When performing trajectory planning in real time, it meets the requirements of the vehicle's dynamic constraints and dynamic solution, and plans the trajectory of the autonomous driving vehicle in the full time and space domain, thereby improving the traffic efficiency of the intersection.
[0116] It should be understood that the order of execution of the steps in the above embodiments does not imply a sequence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0117] See also Figure 5 , Figure 5 Schematic diagram of a trajectory planning device provided in the second embodiment of the present application. The units included are used to execute Figure 1 For details, please refer to the steps in the corresponding embodiment. Figure 1 For the convenience of explanation, only the parts related to this embodiment are shown. Figure 5 , the trajectory planning device 5 comprises:
[0118] A first acquisition unit 510 is used to acquire a starting node and an ending node of a target vehicle, and acquire state information corresponding to the starting node; the state information includes a target time corresponding to the starting node, a steering angle of the target vehicle at the target time, and a heading angle of the target vehicle at the target time;
[0119] The first processing unit 520 is used to establish an open list and add the start node to the open list; the open list is used to store each candidate node and its corresponding state information;
[0120] A second acquisition unit 530 is used to acquire the candidate node with the smallest cost value in the open list as the target node;
[0121] The second processing unit 540 is used for, when the target node is not the termination node, obtaining the magnitude and direction of the preset speed of the target vehicle, and obtaining the next target node and its corresponding target state information according to the magnitude and direction of the preset speed, and determining whether the next target node is the termination node;
[0122] The third processing unit 550 is used to determine the driving trajectory of the target vehicle according to the state information corresponding to the starting node and all the target nodes and their corresponding state information when the target node is the ending node.
[0123] Furthermore, the second processing unit 540 is specifically configured to:
[0124] Acquire an initial node according to the magnitude and direction of a preset speed of the target vehicle;
[0125] An initial node that meets the preset constraint condition is used as the next target node, and target state information corresponding to the next target node is obtained.
[0126] Furthermore, the second processing unit 540 is specifically configured to:
[0127] An iteration node is obtained according to the magnitude and direction of the preset speed of the target vehicle, and the unprocessed iteration node is used as an initial node.
[0128] Furthermore, the second processing unit 540 is specifically configured to:
[0129] Acquire a plurality of first nodes according to the magnitude and direction of a preset speed of the target vehicle;
[0130] A plurality of iteration nodes are determined from the first nodes according to a preset grid interval; wherein the iteration nodes are located in different preset grid intervals.
[0131] Furthermore, the second processing unit 540 is specifically configured to:
[0132] When a plurality of the first nodes are in the same preset grid interval, any one of the first nodes is taken as an iteration node.
[0133] Furthermore, the second processing unit 540 is specifically configured to:
[0134] Acquire a second node satisfying a preset collision constraint condition from the initial node;
[0135] A third node satisfying a preset range constraint condition is obtained from the second node, and the third node is used as the next target node.
[0136] Furthermore, the second processing unit 540 is specifically configured to:
[0137] Acquire a first boundary area of the initial node;
[0138] A second node satisfying a preset collision constraint condition is determined according to the first boundary area.
[0139] Furthermore, the second processing unit 540 is specifically configured to:
[0140] When the second node is in a preset restricted area, marking the second node as a fourth node;
[0141] The heading angle of the fourth node is acquired, and the second node is selected from the fourth node according to the heading angle of the fourth node, the heading angle of the initial node, and the heading angle of the termination node.
[0142] Furthermore, the second acquiring unit 530 is specifically configured to:
[0143] A target trajectory from each candidate node to the terminal node is planned according to the Dubins curve, and the length of the target trajectory is calculated; wherein the target trajectory is composed of an arc and a straight line.
[0144] Figure 6 Schematic diagram of a trajectory planning device provided in the third embodiment of the present application. Figure 6 As shown, the trajectory planning device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a trajectory planning program. When the processor 60 executes the computer program 62, the steps in the above-mentioned trajectory planning method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 5 The functions of modules 510 to 550 are shown.
[0145] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the trajectory planning device 6. For example, the computer program 62 may be divided into a first acquisition unit, a first processing unit, a second acquisition unit, a second processing unit, and a third processing unit, and the specific functions of each unit are as follows:
[0146] A first acquisition unit is used to acquire a starting node and an ending node of a target vehicle, and acquire state information corresponding to the starting node; the state information includes a target time corresponding to the starting node, a steering angle of the target vehicle at the target time, and a heading angle of the target vehicle at the target time;
[0147] A first processing unit is configured to establish an open list and add the start node to the open list; the open list is configured to store each candidate node and its corresponding status information;
[0148] A second acquisition unit, configured to acquire the candidate node with the smallest cost value in the open list as a target node;
[0149] A second processing unit is used for, when the target node is not the termination node, obtaining the magnitude and direction of the preset speed of the target vehicle, and obtaining the next target node and its corresponding target state information according to the magnitude and direction of the preset speed, and determining whether the next target node is the termination node;
[0150] The third processing unit is used to determine the driving trajectory of the target vehicle according to the state information corresponding to the starting node and all the target nodes and their corresponding state information when the target node is the ending node.
[0151] The trajectory planning device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 This is only an example of the trajectory planning device 6 and does not constitute a limitation of the trajectory planning device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the trajectory planning device may also include input and output devices, network access devices, buses, etc.
[0152] The processor 60 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0153] The memory 61 may be an internal storage unit of the trajectory planning device 6, such as a hard disk or memory of the trajectory planning device 6. The memory 61 may also be an external storage device of the trajectory planning device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the trajectory planning device 6. Further, the trajectory planning device 6 may also include both an internal storage unit and an external storage device of the trajectory planning device 6. The memory 61 is used to store the computer program and other programs and data required by the trajectory planning device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0154] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0155] An embodiment of the present application further provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above method embodiments when executing the computer program.
[0156] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0157] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0158] If the 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 present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0159] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0160] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0161] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0162] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0163] The embodiments described above 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 aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A trajectory planning method, characterized in that: include: Obtaining the starting node and the ending node of the target vehicle, and obtaining the status information corresponding to the starting node; The state information includes the target time corresponding to the starting node, the steering angle of the target vehicle at the target time, and the heading angle of the target vehicle at the target time; Establishing an open list, and adding the starting node to the open list; the open list is used to store each candidate node and its corresponding status information; Acquire the candidate node with the smallest cost value in the open list as the target node; When the target node is not the termination node, obtaining the magnitude and direction of a preset speed of the target vehicle, and obtaining a plurality of first nodes according to the magnitude and direction of the preset speed; Determine a plurality of iteration nodes from a plurality of the first nodes according to a preset grid interval, the iteration nodes being in different preset grid intervals, use the unprocessed iteration nodes as initial nodes, use the initial nodes satisfying preset constraints as the next target nodes, obtain target state information corresponding to the next target node, and determine whether the next target node is the termination node; When the target node is the terminating node, the driving trajectory of the target vehicle is determined according to the status information corresponding to the starting node and all the target nodes and their corresponding status information.
2. The trajectory planning method according to claim 1, characterized in that: The step of determining a plurality of iteration nodes from a plurality of the first nodes according to a preset grid interval includes: When a plurality of the first nodes are in the same preset grid interval, any one of the first nodes is taken as an iteration node.
3. The trajectory planning method according to claim 1, characterized in that: The taking the initial node satisfying the preset constraint condition as the next target node comprises: Acquire a second node satisfying a preset collision constraint condition from the initial node; A third node satisfying a preset range constraint condition is obtained from the second node, and the third node is used as the next target node.
4. The trajectory planning method according to claim 3, characterized in that: The step of acquiring a second node satisfying a preset collision constraint condition from the initial node comprises: Acquire a first boundary area of the initial node; A second node satisfying a preset collision constraint condition is determined according to the first boundary area.
5. The trajectory planning method according to claim 3, characterized in that: The acquiring a third node satisfying a preset range constraint condition from the second node includes: When the second node is in a preset restricted area, marking the second node as a fourth node; The heading angle of the fourth node is acquired, and the second node is selected from the fourth node according to the heading angle of the fourth node, the heading angle of the initial node, and the heading angle of the termination node.
6. The trajectory planning method according to claim 1, characterized in that: The step of obtaining the candidate node with the smallest cost value in the open list as the target node includes: A target trajectory from each candidate node to the terminal node is planned according to the Dubins curve, and the length of the target trajectory is calculated; wherein the target trajectory is composed of an arc and a straight line.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Trajectory planning method, trajectory planning device, storage medium and electronic equipment
CN110836671A