Path planning method and device
By introducing target attraction function and target driving strategy into the path planning algorithm, the direction selection of path nodes is optimized, and the problems of disordered paths and high repetition rate in complex environments are solved, and the stability and search efficiency of path planning are improved. The path is more optimized and smooth.
Patent Information
- Application Number
- CN202411388472.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
AI Technical Summary
The paths generated by existing path planning algorithms in complex environments have disorder and high repetition rates, and insufficient search efficiency and stability.
By introducing target attraction functions and pre-determined target driving strategies, candidate path nodes with direction deviations are generated, direction selection of path nodes is optimized, local optimal solutions are avoided, and the exploration ability of global optimal solutions is improved, and the reward value table and Random tree expansion tree method optimizes path search.
Improve the stability and search efficiency of path planning, avoid the problems of disordered paths and high repetition rates, and the generated paths are more optimized and smooth.
Smart Images

Figure CN119268720A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a path planning method and device. Background Art
[0002] With the rapid development of artificial intelligence technology, more and more path planning algorithms combined with artificial intelligence have emerged. However, in actual engineering, it is found that when existing path planning algorithms search for paths in complex environments, the generated paths are disordered and have a high repetition rate, which is lacking in stability and search efficiency. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide a path planning method, device, electronic device and storage medium, which can improve the efficiency and stability of path node search for path planning in complex environments.
[0004] In a first aspect, an embodiment of the present disclosure provides a path planning method, including:
[0005] According to the position information of the starting point and the target point, a target attraction function is determined; the target attraction function is used to indicate the generation of candidate path nodes with direction deviation;
[0006] Generate candidate path nodes between the starting point and the target point according to the target attraction function and the predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path node;
[0007] Determine the target path based on the starting point, the target point, and the generated candidate path nodes.
[0008] Optionally, the target driving strategy is determined by the following steps:
[0009] Determine a discrete grid map within the target area, wherein the discrete grid map includes a starting point and a target point;
[0010] A reward value form is established, and the following steps are repeatedly performed until the reward value change rate is less than a preset threshold value: based on the state information and action information corresponding to different candidate driving strategies of the target vehicle driving from the starting point to the target point, a reward value corresponding to each candidate driving strategy is calculated, and a change rate between a maximum reward value and a current reward value in the reward value form is determined, and when the change rate is greater than or equal to a preset threshold value, the reward value is recorded in the reward value form; wherein the state information of the target vehicle is determined based on a discrete grid map, and the state information includes the position information and orientation information of the target vehicle in the discrete grid map;
[0011] When the reward value change rate is less than a preset threshold, the candidate driving strategy corresponding to the maximum reward value in the reward value table is determined as the target driving strategy.
[0012] Optionally, generating candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy includes:
[0013] Initialize the expansion tree and connection tree; the expansion tree starts from the starting point, and the connection tree starts from the target point;
[0014] Based on the target attraction function and the target driving strategy, the expansion tree is extended toward the connection tree to perform path node expansion to generate a first path node;
[0015] The generated first path node is determined as a candidate path node.
[0016] Optionally, generating candidate path nodes between the starting point and the target point according to the position information of the starting point and the target point and a predetermined target driving strategy includes:
[0017] Exchange the positions of the expansion tree and the connection tree so that the expansion tree starts from the target point and the connection tree starts from the starting point;
[0018] Based on the target attraction function and the target driving strategy, the expanded tree after the exchanged position is extended toward the connection tree after the exchanged position to generate a second path node;
[0019] Based on the first path node and the second path node, a candidate path node is determined.
[0020] Optionally, determining a target path based on the starting point, the target point, and the generated candidate path nodes includes:
[0021] Based on the coordinate data of each two candidate path nodes in the map corresponding to the target area, a curve function is constructed between each two candidate path nodes; the curve function takes the abscissa of the candidate path node as an independent variable and the ordinate of the candidate path node as a dependent variable; the curve function includes at least one undetermined coefficient;
[0022] According to the preset solution conditions, determine the value of the undetermined coefficient in each curve function;
[0023] The determined undetermined coefficient value is substituted into the corresponding curve function, and the target path is determined based on the curve represented by the curve function.
[0024] Optionally, in response to every two candidate path nodes being two adjacent candidate path nodes; determining the target path based on a curve represented by the curve function includes:
[0025] Determine the curve represented by each curve function as a connection curve between each two adjacent candidate path nodes;
[0026] The target path is determined based on the connection curve between every two adjacent candidate nodes.
[0027] Optionally, in response to every two candidate path nodes being two non-adjacent candidate path nodes; determining the target path based on a curve represented by the curve function includes:
[0028] Determine the curve represented by each curve function as a connection curve between each two corresponding candidate path nodes;
[0029] Determine whether the connection curve passes through at least one candidate path node between every two candidate path nodes; if not, remove at least one candidate path node between every two candidate path nodes; if yes, retain at least one candidate path node between every two candidate path nodes; and select the target path node from the candidate path nodes;
[0030] The target path is determined based on the screened target path nodes and connection curves.
[0031] In a second aspect, an embodiment of the present disclosure provides a path planning device, including:
[0032] The function determination module is used to determine the target attraction function according to the position information of the starting point and the target point; the target attraction function is used to indicate the generation of candidate path nodes with direction deviation;
[0033] A node determination module is used to generate candidate path nodes between a starting point and a target point according to a target attraction function and a predetermined target driving strategy; wherein the target driving strategy is used to indicate a generation position of the candidate path node;
[0034] The path determination module is used to determine the target path based on the starting point, the target point and the generated candidate path nodes.
[0035] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any optional implementation of the first aspect are performed.
[0036] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.
[0037] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.
[0038] Any of the above aspects or any implementation of any of the aspects, by utilizing the target attraction function, can indicate the generation of path nodes with directional deviations; by introducing directional deviations, a variety of different path candidates can be generated, rather than just moving along the most direct path, which helps to find a better path in a complex environment. In addition, by introducing directional deviations, it is also possible to avoid the problem of falling into a local optimal solution due to only considering the most direct target direction, which helps to explore a wider space and find a global optimal solution. Furthermore, when generating candidate path nodes, in addition to the target attraction function, a predetermined target driving strategy is also referred to, so that the predetermined target driving strategy can be used to optimize the selection of path node directions, thereby avoiding the problems of path disorder and high repetition rate during the search process, and improving the stability of the generated path and the efficiency of the path search.
[0039] In a further embodiment of the present disclosure, the initial path generated based on the candidate path nodes can be smoothed by determining the connection curve between every two adjacent nodes or every two nodes separated by a certain step length, thereby improving the availability and smoothness of the final path.
[0040] The effects of the above-mentioned path planning device, electronic device and storage medium can be found in the description of the above-mentioned path planning method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0042] Figure 1 A flow chart of a path planning method provided by an embodiment of the present disclosure is shown;
[0043] Figure 2 A schematic diagram of a path planning device provided by an embodiment of the present disclosure is shown;
[0044] Figure 3 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;
[0045] Figure 4 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0047] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0048] Research has found that with the rapid development of artificial intelligence technology, more and more path planning algorithms combined with artificial intelligence have emerged. Among them, the RRT algorithm is a sampling-based path planning method. Because it does not require spatial modeling and has a fast search speed, it has been widely used in implementation.
[0049] However, since the traditional RRT algorithm uses global random sampling, the algorithm takes a long time to run and converges slowly. And since the traditional RRT algorithm uses the nearest neighbor node selection algorithm to generate the target path, it often leads to path planning failure in complex environments. Although the RRT-connect algorithm is better than the basic RRT algorithm in terms of convergence, the path generated by the algorithm is still random and unstable, and the final path is connected by multiple random sampling points, so it is not smooth.
[0050] Based on the above research, the disclosed embodiment can indicate the generation of path nodes with directional deviations by utilizing the target attraction function; by introducing directional deviations, a variety of different path candidates can be generated, rather than just moving along the most direct path, which helps to find a better path in a complex environment. In addition, by introducing directional deviations, it is also possible to avoid the problem of falling into a local optimal solution due to only considering the most direct target direction, which helps to explore a wider space and find a global optimal solution. Furthermore, when generating candidate path nodes, in addition to the target attraction function, a predetermined target driving strategy is also referenced, so that the predetermined target driving strategy can be used to optimize the selection of path node directions, thereby avoiding the problems of path disorder and high repetition rate during the search process, and improving the stability of the generated path and the efficiency of the path search.
[0051] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0052] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0053] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0054] To facilitate understanding of this embodiment, a path planning method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the path planning method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the path planning method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0055] See also Figure 1 FIG. 1 is a flow chart of a path planning method provided by an embodiment of the present disclosure, and the method includes S101 to S103, wherein:
[0056] S101: Determine a target attraction function according to the position information of the starting point and the target point; the target attraction function is used to indicate the generation of candidate path nodes with direction deviation.
[0057] In this step, before or after determining the starting point and the target point, the target area can be determined. The target area here can be an area including the starting point and the target point that can be used for the target vehicle or other subject to travel; it can also be other areas that require path planning.
[0058] In the disclosed embodiment, after determining the target area, the target area can be divided into a plurality of discrete grids, and the coordinate data corresponding to each grid in the target area can be determined. The coordinate data of the starting point and the target point can then be determined based on the discrete grid map, and the distance between the two points can be calculated. When the distance between the starting point and the target point is less than a preset threshold, the line between the two points can be directly determined as the target path; for the case where the distance between the starting point and the target point is greater than the preset threshold, further path planning can be performed, which will be described in detail below and will not be repeated here.
[0059] In a specific implementation, the preset threshold used to determine the distance between the starting point and the target point can be determined based on the parameter information and operational requirements of the target vehicle (or other path planning subject). For example, if the length of the target vehicle (or other path planning subject) is 4.5 meters, and the distance between the starting point and the target point is 5 meters, then no additional path planning is required. It is only necessary to determine the connection line between the starting point and the target point without obstacles as the final path. The above operational requirements may include safety requirements, comfort requirements, environment and other aspects; for example, the setting of the threshold needs to be combined with the vehicle performance to ensure that the passengers in the car will not be affected by emergency braking, so as to ensure the comfort requirements of the target vehicle, etc. It should be noted that the reference dimension for determining the preset threshold is only used as an example of a feasible implementation method, and does not constitute an improper limitation of the present invention. In actual implementation, it should be based on the actual situation and be based on the ability to achieve its function.
[0060] In the disclosed embodiment, if the distance between the starting point and the target point exceeds a preset threshold, the target attraction function can be determined according to the position information of the starting point and the target point, so as to indicate the generation of candidate path nodes with directional deviation. The directional deviation here refers to the deviation between the generated candidate path node and the expected direction of the target point. Specifically, assuming that there is a target point, the ideal path should be directly in the direction of the target point, that is, the direction of the generated candidate path node should be generated directly in the direction of the target point. Here, the generation of the path node with directional deviation means that the generated candidate path node is not directly generated along the direction of the target point, but deviates from the angle relative to the ideal path direction. By introducing the directional deviation, a variety of different candidate path node options can be generated, rather than just moving along the most direct path, which helps to find a better path in a complex environment, especially when there are obstacles or other constraints need to be considered. In addition, the introduction of directional deviation can also avoid falling into the local optimal solution due to only considering the most direct direction target. The directional deviation can search a wider space and help find the global optimal solution. In practical applications, the ideal path may become infeasible due to dynamic changes or unpredictable factors in the environment. For example, the ideal path may pass through obstacles whose positions change. Candidate path nodes with directional deviations can provide backup options, making path planning more flexible in the face of emergencies, thereby improving the overall robustness of path planning.
[0061] The process of how the target attraction function indicates the generation of candidate path nodes with directional deviations will be specifically described in S102 and will not be elaborated here.
[0062] In another possible implementation, the generation direction of the candidate path nodes can also be indicated by methods other than the target attraction function. For example, a certain probability can be set for the target point direction so that each randomly generated node has a greater probability of expanding toward the target point; or the generation direction of the candidate path nodes can be indicated by setting the state of the grid map in the target area, so that the candidate path nodes are generated toward an idle grid, and so on.
[0063] S102: Generate candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path nodes.
[0064] In this step, if the distance between the starting point and the target point is not greater than the preset threshold value as determined in S101, the line between the starting point and the target point can be determined as the final path according to the actual environment and road information between the starting point and the target point. If the distance between the starting point and the target point is greater than the preset threshold value as determined in S101, candidate path nodes between the starting point and the target point can be generated according to the position information of the starting point and the target point and the predetermined target driving strategy.
[0065] In the disclosed embodiment, the target driving strategy is determined by the following steps: determining a discrete grid map within the target area, wherein the discrete grid map includes a starting point and a target point; establishing a reward value form, and repeatedly performing the following steps until the reward value change rate is less than a preset threshold value: calculating a reward value corresponding to each candidate driving strategy based on the state information and action information corresponding to different candidate driving strategies for the target vehicle to travel from the starting point to the target point, determining the change rate between the maximum reward value and the current reward value in the reward value form, and recording the reward value in the reward value form when the change rate is greater than or equal to the preset threshold value; wherein the state information of the target vehicle is determined based on the discrete grid map, and the state information includes the position information and orientation information of the target vehicle in the discrete grid map; when the reward value change rate is less than the preset threshold value, determining the candidate driving strategy corresponding to the maximum reward value in the reward value form as the target driving strategy.
[0066] In order to solve the problems of path disorder and high repetition rate when the RRT-connect algorithm performs path search in a complex environment, the disclosed embodiment introduces a target driving strategy to indicate the generation position of the candidate path node, thereby optimizing the path direction, reducing the repetition rate in the path search process, and solving the problem of path disorder. Specifically, before generating the candidate path node between the starting point and the target point, the target driving strategy for indicating the candidate path generation node can be determined first.
[0067] In a specific implementation, the coordinate data of the starting point and the target point can be determined according to the discrete grid map above. Then, different driving paths of the target vehicle or other path planning subject from the starting point to the target point can be simulated. Before starting the simulation, a reward value form can be initialized to record the reward values of different paths; the various parameters in the following formula can also be set:
[0068] Q(s t ,a)=Q(s t ,a)+α[r t +γmaxQ(s t+1 ,a)-Q(s t ,a)]
[0069] Among them, Q(s t ,a) is the reward value, s represents the state, a represents the action, Q(s t ,a) represents the cumulative reward after selecting action a in state s, which can reflect the goodness of taking action a in the current state; α is the learning rate, which is between 0 and 1 and is used to control the amplitude of each reward value update. In other words, the learning rate determines to what extent the new reward value covers the old reward value; r t It is the immediate reward obtained by the target vehicle or other subject after performing an action. It provides direct feedback when the reward value is updated and is used to adjust the reward value so that the target vehicle or other subject can make better decisions in similar situations. γ is the discount factor, which is also a value between 0 and 1, used to balance the contribution of immediate rewards and future rewards in the total reward value.
[0070] After completing the initialization setting of the form and the above parameters, the reward values corresponding to different driving strategies can be calculated based on the state information and action information of different driving strategies, where the state information may include the location information, orientation information, etc. of the target vehicle or other subject.
[0071] For example, assume that the target vehicle is at the coordinate (1,1) in the processing grid map of state s, and action a is down or right. Then s t =(1,1), a = down, execute action "down" and transfer to state s t+1 =(0,1), get instant reward r t = -1, in state s t+1 Next, execute the rightward movement, then Q(s t+1 ,a)=Q(s t+1, to the right). The instant reward in the above text adopts a step penalty strategy, that is, a fixed negative reward is given for each step, so that the final target driving strategy can achieve the shortest path; of course, the strategy selection for the instant reward here is arbitrary, and the embodiment of the disclosure only uses the step penalty strategy as an example for explanation, which does not constitute an improper limitation of the present invention. In practical applications, a specific instant reward strategy can be set according to specific needs, and there is no specific limitation on the positive and negative values of the instant reward value.
[0072] In the disclosed embodiment, the total reward value corresponding to different driving strategies can be gradually determined according to the above method. After each reward value is determined, the maximum reward value can be selected from the current reward value table, and the change rate between the current reward value and the maximum reward value can be calculated. If the calculated change rate does not meet the preset requirement, it can be recorded in the reward value table. If it meets the requirement, the candidate driving strategy corresponding to the reward value can be determined as the target driving strategy. The preset requirement can be a preset threshold. When the change rate is less than the preset threshold for n consecutive times, it indicates that the reward value gradually converges to the optimal strategy, that is, the optimal path from the starting point to the target point is found.
[0073] In another possible implementation manner, the target driving strategy may also be determined based on cost values of a plurality of candidate driving strategies.
[0074] For example, assuming that the coordinates of the current node are (1,1) and the coordinates of the target point are (10,10), then the possible new extension point of the current node can be determined first, and the new extension point can be determined based on the attraction of the target point to the current node. Assuming that the determined new extension points are (1,2), (2,2), and (2,1), the next step can be to check whether the paths from (1,1) to (1,2), (2,2), and (2,1) intersect with obstacles. Assuming that there are obstacles blocking the path from (1,1) to (1,2), (1.2) can be removed from the list of extension points, and only (2,2) and (2,1) can be used as possible new extension points of the current node. In addition, the kinematic limitations of the target vehicle itself, such as the maximum steering angle, body size, maximum speed, etc., can be considered when determining possible new extension points. Then, for each possible new extension point, the corresponding extension points of the next level can be gradually determined until the target point is reached. Then the cost of each candidate property strategy can be calculated separately; or, when determining possible new extension points, by comparing the cost of traveling from the current node to multiple extension points, an optimal extension point can be determined from multiple possible extension points and used as the next current node for further path expansion. In this way, at least one candidate driving strategy can be determined to ensure that the target vehicle can safely travel to the target point. In this way, the candidate driving strategy with the lowest total cost value can be used as the target driving strategy to indicate the generation position in the candidate path node generation process.
[0075] It should be noted that the above-mentioned method for determining the target driving strategy is only a possible implementation method in the embodiment of the present disclosure and does not constitute an improper limitation on the present invention. In practical applications, it can be based on actual needs and be based on the ability to achieve its functions.
[0076] In this way, when generating candidate path nodes, the target driving strategy can be used to indicate the generation location of the candidate path nodes. Since the target driving strategy corresponds to the optimal path, it can not only reduce the repeatability of node search during path planning, but also improve the accuracy and availability of path planning.
[0077] In the embodiment of the present disclosure, according to the position information of the starting point and the target point and the predetermined target driving strategy, the candidate path nodes between the starting point and the target point are generated, including:
[0078] Initialize the expansion tree and the connection tree; the expansion tree takes the starting point as the starting point, and the connection tree takes the target point as the starting point; based on the target attraction function and the target driving strategy, the expansion tree is extended toward the connection tree to perform path node expansion to generate a first path node; the generated first path node is determined as a candidate path node.
[0079] In a specific implementation, two random trees may be initialized first. The two random trees take the starting point and the target point as root nodes respectively. The random tree with the starting point as the root node may be defined as an expansion tree, and the random tree with the target point as the root node may be defined as a connection tree. After initializing the expansion tree and the connection tree, parameters such as the step size for the expansion of the expansion tree may also be defined. The expansion tree is gradually expanded based on the growth guidance function. In the disclosed embodiment, a target attraction function may be introduced to expand the expansion tree toward the position of the target point, thereby improving the efficiency of the path node search.
[0080] Specifically, the target attraction function G(q near ) For each node q of the expanded tree near To expand, node q near Expanded node q new It can be expressed as:
[0081] F(q near )=R(q near )+G(q near )
[0082] Among them, F(q near ) is the node q near The growth guidance function to the target point, R(q near ) is the node q near The random growth function of the new node q in the expanded tree new Calculated as:
[0083] q new =q near +step*[R(q near )+G(q near )]
[0084] The random growth function is:
[0085]
[0086] Among them, ρ is the expansion coefficient, which is used to adjust the size of the expansion vector; q rand is a random sampling point, usually randomly sampled from the search space, used to guide the expansion of the expansion tree; count represents the distance threshold or step size, indicating the maximum step size or range of each expansion.
[0087] The target attraction function is:
[0088]
[0089] Among them, step is the number of expansion steps, q′ goal is the node in the connection tree closest to the expansion tree, k ρis the adjustment coefficient, which is used to adjust the attraction strength of the attraction function; count represents the distance threshold or step length, which represents the maximum step length or range of each expansion. Therefore, the calculation formula for the new node of the connection tree is:
[0090] q′ new =q′ goal +step·(q new -q′ goal ) / ||q new -q′ goal ||
[0091] In the embodiment of the present disclosure, for the expansion tree, calling F(q near ) generates a new node and adds it to the expansion tree; for the connection tree, the link function can be called to generate a new node to the expansion tree until it encounters an obstacle or meets a node in the expansion tree, then the new node is added to the connection tree. When the expansion tree meets the search tree, it indicates that the path node generation is complete, and the generated path node (the first path node) can be used as a candidate path node between the starting point and the target point.
[0092] In a specific implementation, the connection tree and the expansion tree can generate nodes according to the corresponding functions mentioned above. After the nodes are generated, the connection tree and the expansion tree can be used to determine whether the newly generated nodes encounter obstacles. If so, the nodes can be discarded and regenerated. After the generated nodes do not encounter obstacles, they are added to the corresponding connection tree or expansion tree, and then it is determined whether the two nodes meet. If they do, it indicates that the path node has been generated. If they do not meet, the above steps can be repeated until the path node is generated.
[0093] In the disclosed embodiment, after the first path node is generated, a new set of path nodes, namely, the second path node, can also be generated by exchanging the positions of the expansion tree and the connection tree. Specifically, according to the target attraction function and the predetermined target driving strategy, the candidate path nodes between the starting point and the target point are generated, including: exchanging the positions of the expansion tree and the connection tree so that the expansion tree starts from the target point and the connection tree starts from the starting point; based on the target attraction function and the target driving strategy, the expansion tree after the exchange of positions is extended toward the connection tree after the exchange of positions to generate the second path node; based on the first path node and the second path node, the candidate path node is determined.
[0094] In a specific implementation, after determining the first path node, the positions of the current expansion tree and the connection tree can be exchanged, so that the expansion tree starts from the target point and the connection tree starts from the starting point, and the above search and expansion steps are repeated to obtain a new set of path nodes (i.e., the second path node). Then, the final candidate path nodes can be determined based on the two groups of path nodes. For example, by comparing the cost values of the two groups of nodes, the group with the lower cost value can be selected as the candidate path node; the path formed by the second path node can also be reversed and merged with the path formed by the first path node, and the candidate path node can be obtained after removing the duplicate nodes, etc. In this way, the search area can be made more comprehensive, and the flexibility, success rate and efficiency of path search can be improved.
[0095] In another possible implementation, starting from the starting point, according to the posture information of the target vehicle at the starting point and the kinematic constraints, a set of new postures can be generated in the direction of the target point according to the predetermined curvature sampling interval and sampling step. The new posture here refers to the position where the target vehicle may be after a time step; each new posture corresponds to a subnode associated with the starting point. After obtaining the subnode corresponding to the starting point, each subnode can be evaluated to check whether it is effectively constrained by the kinematic constraints, such as whether it collides with an obstacle, whether it is in the drivable area, whether it is less than the maximum speed, etc. For each subnode that passes the inspection, it can be sorted from small to large according to the cost value of reaching the subnode from the starting point, and then the preset number of subnodes in the subnode sequence can be used as candidate nodes, and then it can be determined whether the candidate node includes the target point. If it is included, it indicates that the node tree has been successfully extended from the initial point to the target point, and the node extension is completed; if it is not included, the determined candidate node can be added to the node tree for subsequent extension. Thus, the node tree that satisfies the kinematic constraints between the starting point and the target point is determined. Then, the grid cost map corresponding to the target area and the total cost values of multiple initial paths included in the node tree can be used to determine the path with the lowest cost value, and the node corresponding to the path can be determined as the candidate path node.
[0096] S103: Determine the target path based on the starting point, the target point and the generated candidate path nodes.
[0097] In this step, after the candidate path nodes are determined, the starting point, the target point and the connection between each candidate path node can be determined as the target path.
[0098] In a possible implementation, the connection between the starting point, the target point, and the generated candidate path nodes can be directly used as the target path. In the process of determining the target path, the obstacle information in the target area can be considered. If the connection path includes an obstacle, the environment around the path can be used to indicate that the connection path bypasses the obstacle to determine the final target path.
[0099] In the disclosed embodiment, since there may be a small number of redundant points and large curvature of some paths in the determined candidate path nodes, the candidate path nodes may be optimized before determining the target path to make the final target path smoother, thereby improving the availability of the target path. Specifically, based on the starting point, the target point, and the generated candidate path nodes, the target path is determined, including: constructing a curve function between every two adjacent candidate path nodes based on the coordinate data of each two adjacent candidate path nodes in the map corresponding to the target area; the curve function uses the horizontal coordinate of the candidate path node as an independent variable and the vertical coordinate of the candidate path node as a dependent variable; the curve function includes at least one undetermined coefficient; according to the preset solution conditions, the value of the undetermined coefficient in each curve function is determined; the determined undetermined coefficient value is substituted into the corresponding curve function, and the curve represented by each curve function is determined as the corresponding connection curve between every two adjacent candidate path nodes; according to the connection curve between every two adjacent candidate nodes, the target path is determined.
[0100] In a specific implementation, a curve function between two adjacent candidate path nodes can be constructed based on the coordinate data of the two adjacent candidate path nodes. For example, for each interval [x i , x i+1 ] can construct a cubic polynomial S i (x) = a i (xx i ) 3 +b i (xx i ) 2 +c i (xx i )+d i ; Where x is the independent variable, corresponding to the horizontal coordinate of the path node; S i (x) is the dependent variable, corresponding to the ordinate of the path node; and a i 、b i 、c i ,d iis the undetermined coefficient. Then the undetermined coefficient can be solved according to the preset solution conditions, which may include interpolation conditions, continuity conditions, boundary conditions, etc. After the undetermined coefficient is determined, its value can be substituted back into the curve function to obtain the curve in the interval. This curve can be used as a line between every two adjacent nodes to generate the target path between the starting point and the target point. Compared with directly connecting two candidate path nodes with a straight line, the target path determined by this method is smoother, which solves the problem of large curvature of some paths, improves the availability of the target path and the stability of the target vehicle during driving.
[0101] In another possible implementation, the above process of determining the connection curve of every two adjacent candidate path nodes can be transformed into determining the connection curve of every two candidate path nodes, where every two path candidate nodes may not be adjacent, and can be specifically determined by a preset step size, a preset number of nodes, etc.
[0102] Specifically, based on the starting point, the target point and the generated candidate path nodes, the target path is determined, including: based on the coordinate data of each two candidate path nodes in the map corresponding to the target area, a curve function is constructed between each two candidate path nodes; the curve function uses the horizontal coordinate of the candidate path node as an independent variable and the vertical coordinate of the candidate path node as a dependent variable; the curve function includes at least one undetermined coefficient; the distance between each two candidate path nodes is determined based on a preset step length, and each two candidate path nodes are separated by at least one candidate path node; according to a preset solution condition, the value of the undetermined coefficient in each curve function is determined; the determined undetermined coefficient value is substituted into the corresponding curve function, and the curve represented by each curve function is determined as the corresponding connection curve between each two candidate path nodes; it is determined whether the connection curve passes through at least one candidate path node between each two candidate path nodes; if not, at least one candidate path node between each two candidate path nodes is eliminated; if yes, at least one candidate path node between each two candidate path nodes is retained; the target path node is screened out from the candidate path nodes; the target path is determined according to the screened target path node and the connection curve.
[0103] In the specific implementation, the process of constructing the curve function is similar to the above, and will not be repeated here. When obtaining the connection curve between each two candidate path nodes, it can be determined whether the curve passes through the path nodes separated by the two path nodes. If it does not pass through, it indicates that the path nodes separated by the two path nodes are redundant points and can be eliminated; if it passes through, the path nodes separated by the two path nodes can be retained. In this way, the redundant points in the candidate path nodes can be eliminated, and the selected candidate path nodes are used as nodes for generating the target path, which helps to further shorten the length of the target path and improve the accuracy of determining the target path.
[0104] According to a second aspect of the embodiment of the present disclosure, Figure 2 As shown, a path planning device 200 is provided, comprising:
[0105] The function determination module 201 is used to determine the target attraction function according to the position information of the starting point and the target point; the target attraction function is used to indicate the generation of candidate path nodes with direction deviation;
[0106] The node determination module 202 is used to generate candidate path nodes between the starting point and the target point according to the target attraction function and the predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path node;
[0107] The path determination module 203 is used to determine the target path based on the starting point, the target point and the generated candidate path nodes.
[0108] Optionally, the target driving strategy is determined by the following steps:
[0109] Determine a discrete grid map within the target area, wherein the discrete grid map includes a starting point and a target point;
[0110] A reward value form is established, and the following steps are repeatedly performed until the reward value change rate is less than a preset threshold value: based on the state information and action information corresponding to different candidate driving strategies of the target vehicle driving from the starting point to the target point, a reward value corresponding to each candidate driving strategy is calculated, and a change rate between a maximum reward value and a current reward value in the reward value form is determined, and when the change rate is greater than or equal to a preset threshold value, the reward value is recorded in the reward value form; wherein the state information of the target vehicle is determined based on a discrete grid map, and the state information includes the position information and orientation information of the target vehicle in the discrete grid map;
[0111] When the reward value change rate is less than a preset threshold, the candidate driving strategy corresponding to the maximum reward value in the reward value table is determined as the target driving strategy.
[0112] Optionally, the node determination module 202 is specifically configured to:
[0113] Initialize the expansion tree and connection tree; the expansion tree starts from the starting point, and the connection tree starts from the target point;
[0114] Based on the target attraction function and the target driving strategy, the expansion tree is extended toward the connection tree to perform path node expansion to generate a first path node;
[0115] The generated first path node is determined as a candidate path node.
[0116] Optionally, the node determination module 202 is specifically configured to:
[0117] Exchange the positions of the expansion tree and the connection tree so that the expansion tree starts from the target point and the connection tree starts from the starting point;
[0118] Based on the target attraction function and the target driving strategy, the expanded tree after the exchanged position is extended toward the connection tree after the exchanged position to generate a second path node;
[0119] Based on the first path node and the second path node, a candidate path node is determined.
[0120] Optionally, the path determination module 203 is specifically configured to:
[0121] Based on the coordinate data of each two candidate path nodes in the map corresponding to the target area, a curve function is constructed between each two candidate path nodes; the curve function takes the abscissa of the candidate path node as an independent variable and the ordinate of the candidate path node as a dependent variable; the curve function includes at least one undetermined coefficient;
[0122] According to the preset solution conditions, determine the value of the undetermined coefficient in each curve function;
[0123] The determined undetermined coefficient value is substituted into the corresponding curve function, and the target path is determined based on the curve represented by the curve function.
[0124] Optionally, in response to every two candidate path nodes being two adjacent candidate path nodes, the path determination module 203 is specifically configured to:
[0125] Determine the curve represented by each curve function as a connection curve between each two adjacent candidate path nodes;
[0126] Determine the target path based on the connection curve between every two adjacent candidate nodes
[0127] Optionally, in response to every two candidate path nodes being two non-adjacent candidate path nodes, the path determination module 203 is specifically configured to:
[0128] Determine the curve represented by each curve function as a connection curve between each two corresponding candidate path nodes;
[0129] Determine whether the connection curve passes through at least one candidate path node between every two candidate path nodes; if not, remove at least one candidate path node between every two candidate path nodes; if yes, retain at least one candidate path node between every two candidate path nodes; and select the target path node from the candidate path nodes;
[0130] The target path is determined based on the screened target path nodes and connection curves.
[0131] According to the third aspect of an embodiment of the present disclosure, there is provided an electronic device for path planning, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present invention.
[0132] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.
[0133] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the method of any of the above embodiments when executed by a processor.
[0134] Figure 3 An exemplary system architecture 300 is shown to which the path planning method or the path planning device implemented by the present disclosure can be applied.
[0135] like Figure 3 As shown, the system architecture 300 may include terminal devices 301, 302, 303, a network 304 and a server 305. The network 304 is used to provide a medium for communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0136] Users can use terminal devices 301, 302, 303 to interact with server 305 through network 304 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 301, 302, 303, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0137] The terminal devices 301 , 302 , and 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0138] The server 305 may be a server that provides various services, such as a background management server (only as an example) that provides support for shopping websites browsed by users using the terminal devices 301, 302, and 303. The background management server may process the received route planning request and feed back the processing result (only as an example) to the terminal device.
[0139] It should be noted that the path planning method provided in the embodiment of the present invention is generally executed by the server 305, and accordingly, the path planning device is generally set in the server 305. The path planning method provided in the embodiment of the present invention can also be executed by the terminal devices 301, 302, and 303, and accordingly, the path planning device can be set in the terminal devices 301, 302, and 303.
[0140] It should be understood that Figure 3 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0141] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 of a terminal device suitable for implementing an embodiment of the present invention. Figure 4 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0142] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0143] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0144] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present invention are executed.
[0145] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0146] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, a processor includes a judgment module, a generation module, and a determination module, wherein the names of these modules do not constitute a limitation on the modules themselves under certain circumstances. For example, the function determination module may also be described as "determining a target attraction function module based on the position information of the starting point and the target point".
[0148] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: determining a target attraction function according to the position information of the starting point and the target point; the target attraction function is used to indicate the generation of candidate path nodes with direction deviations; generating candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path nodes; determining the target path based on the starting point, the target point, and the generated candidate path nodes.
[0149] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A path planning method, characterized in that: include: According to the position information of the starting point and the target point, determine the target attraction function; The target attraction function is used to instruct the generation of candidate path nodes with direction deviation; Generating candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path node; A target path is determined based on the starting point, the target point and the generated candidate path nodes.
2. The method according to claim 1, characterized in that The target driving strategy is determined by the following steps: Determine a discrete grid map within the target area, wherein the discrete grid map includes the starting point and the target point; Establish a reward value form, and repeatedly perform the following steps until the reward value change rate is less than a preset threshold: based on the state information and action information corresponding to different candidate driving strategies of the target vehicle driving from the starting point to the target point, calculate the reward value corresponding to each of the candidate driving strategies, determine the change rate between the maximum reward value and the current reward value in the reward value form, and when the change rate is greater than or equal to the preset threshold, record the reward value in the reward value form; wherein the state information of the target vehicle is determined based on the discrete grid map, and the state information includes the position information and orientation information of the target vehicle in the discrete grid map; When the reward value change rate is less than a preset threshold, the candidate driving strategy corresponding to the maximum reward value in the reward value table is determined as the target driving strategy.
3. The method according to claim 1, characterized in that Generating candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy, including: Initialize an expansion tree and a connection tree; the expansion tree takes the starting point as the starting point, and the connection tree takes the target point as the starting point; Based on the target attraction function and the target driving strategy, the expansion tree is extended toward the connection tree to perform path node expansion to generate a first path node; The generated first path node is determined as a candidate path node.
4. The method according to claim 3, characterized in that Generating candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy, including: Swapping the positions of the expansion tree and the connection tree so that the expansion tree starts from the target point and the connection tree starts from the starting point; Based on the target attraction function and the target driving strategy, the expanded tree after the exchange of positions is extended toward the connection tree after the exchange of positions to generate a second path node; A candidate path node is determined based on the first path node and the second path node.
5. The method according to claim 1, characterized in that Determining a target path based on the starting point, the target point, and the generated candidate path nodes includes: Based on the coordinate data of each two candidate path nodes in the map corresponding to the target area, a curve function is constructed between each two candidate path nodes; the curve function takes the abscissa of the candidate path node as an independent variable and the ordinate of the candidate path node as a dependent variable; the curve function includes at least one undetermined coefficient; According to the preset solution conditions, determining the value of the undetermined coefficient in each of the curve functions; The determined value of the undetermined coefficient is substituted into the corresponding curve function, and the target path is determined based on the curve represented by the curve function.
6. The method according to claim 5, characterized in that In response to every two candidate path nodes being two adjacent candidate path nodes; Determining a target path based on a curve represented by the curve function includes: Determine the curve represented by each of the curve functions as a connection curve between each two adjacent candidate path nodes; The target path is determined based on the connection curve between every two adjacent candidate nodes.
7. The method according to claim 5, characterized in that In response to every two candidate path nodes being two non-adjacent candidate path nodes; Determining a target path based on a curve represented by the curve function includes: Determine the curve represented by each of the curve functions as a connection curve between each corresponding two candidate path nodes; Determine whether the connection curve passes through at least one candidate path node between every two candidate path nodes; if not, remove at least one candidate path node between every two candidate path nodes; if yes, retain at least one candidate path node between every two candidate path nodes; and select a target path node from the candidate path nodes; The target path is determined according to the target path nodes and the connection curve obtained by screening.
8. A path planning device, characterized in that: include: A function determination module, used to determine a target attraction function according to position information of a starting point and a target point; The target attraction function is used to instruct the generation of candidate path nodes with direction deviation; A node determination module, used to generate candidate path nodes between the starting point and the target point according to the target attraction function and a predetermined target driving strategy; wherein the target driving strategy is used to indicate the generation position of the candidate path node; The path determination module is used to determine the target path based on the starting point, the target point and the generated candidate path nodes.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.