Path planning method and device and storage medium
By constructing a sampling probability map and extending path tree, the problem of inefficient path planning in the existing technology in complex environments is solved, and faster and more efficient path planning is achieved, and the optimal solution can be found.
Patent Information
- Application Number
- CN202411975668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Existing path planning methods have high complexity in complex dynamic environments, long planning time, and usually cannot find the optimal path, resulting in inefficiency.
By constructing a sampling probability map based on environmental information in global space, using gravity and repulsive potential fields to determine the sampling probability of the path point, expand the path tree, and finally determine the target path from the starting point to the target point.
It improves the speed and efficiency of path planning, and can quickly find the optimal solution to path planning in complex scenarios, reduces the randomness of sampling point generation, and improves the pertinence of sampling.
Smart Images

Figure CN119779306A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a path planning method, device and storage medium. Background Art
[0002] Path planning is a technology used to determine the best path from a starting point to a destination. It is widely used in many application fields, such as navigation systems, driverless cars, logistics, and transportation. Existing path planning methods, such as graph search-based algorithms and numerical optimization-based path planning algorithms, are generally used in specific simple scenarios and are not suitable for complex dynamic environments. The solution complexity in some complex scenarios is very high, and the planning time will be relatively long. In order to take into account efficiency, the planned path is often not the optimal path, but only a suboptimal solution under certain conditions. Therefore, a new path planning method is urgently needed to improve the speed and efficiency of path planning. Summary of the invention
[0003] In view of this, the present disclosure proposes a path planning method, device and storage medium.
[0004] According to one aspect of the present disclosure, a path planning method is provided. The method comprises:
[0005] Based on the environmental information of the global space, a sampling probability map is constructed. The environmental information includes information about the target point and obstacles. The sampling probability map represents the path points in the global space and the probability of the path points being sampled. The path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacles have a smaller probability of being sampled.
[0006] Sampling waypoints in the global space based on the sampling probability map to expand a path tree, where the path tree consists of multiple waypoints;
[0007] The target path from the starting point to the target point is determined based on the expanded path tree.
[0008] In a possible implementation, a sampling probability map is constructed based on the environmental information of the global space, including:
[0009] Based on the environmental information of the global space, the gravitational potential field and the repulsive potential field in the global space are determined. The gravitational potential field represents the gravitational force of the target point on each path point, and the repulsive potential field represents the repulsive force of the obstacles on each path point.
[0010] Based on the gravitational potential field and the repulsive potential field, a sampling probability map is determined.
[0011] In a possible implementation, sampling path points in the global space based on the sampling probability map to expand the path tree includes:
[0012] Generate a first random number and a second random number;
[0013] When the first random number is less than a preset threshold, the path points other than the obstacles are sampled in the global space to obtain the sampled path points, and when the second random number is not greater than the sampling probability corresponding to the sampled path points in the sampling probability map, the sampled path points are used as candidate extension points;
[0014] When the first random number is not less than a preset threshold, the target point is used as a candidate extension point;
[0015] The path tree is extended based on the candidate extension points.
[0016] In a possible implementation, extending the path tree based on the candidate extension point includes:
[0017] When the candidate extension point meets the preset conditions, and the distance between the candidate extension point and the neighboring point is not greater than the preset step length, the candidate extension point is used as the target extension point, and the preset conditions include that the straight line between the candidate extension point and the neighboring point closest to the candidate extension point in the path tree does not pass through any obstacle;
[0018] When the distance between the candidate extension point and the neighboring point is greater than the preset step length, the middle path point on the straight line connecting the candidate extension point and the neighboring point, whose distance from the candidate extension point is not greater than the preset step length, is used as the target extension point;
[0019] When the distance between the target extension point and the target point is not less than the preset step length, the target extension point is added to the path tree to expand the path tree.
[0020] In a possible implementation, the preset condition also includes that a relative angle between the candidate extension point and a neighboring point closest to the candidate extension point in the path tree is less than a preset turning angle, and the relative angle is an angle between a direction corresponding to the candidate extension point and a line between the candidate point and the nearest neighboring point.
[0021] In a possible implementation, extending the path tree based on the candidate extension point further includes:
[0022] When the distance between the target extension point and the target point is less than the preset step length, the extension of the path tree is stopped to obtain the extended path tree.
[0023] In a possible implementation, determining a target path from a starting point to a target point based on the expanded path tree includes:
[0024] The target path from the starting point to the target point is determined in the expanded path tree using the backtracking method.
[0025] In a possible implementation, the method further includes:
[0026] The target path is smoothed based on a cubic B-spline curve to determine the target path after the smoothing process.
[0027] According to another aspect of the present disclosure, a path planning device is provided. The device comprises:
[0028] A construction module is used to construct a sampling probability map based on environmental information in the global space, where the environmental information includes information about the target point and obstacles. The sampling probability map represents the path points in the global space and the probability of the path points being sampled, where the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacles have a smaller probability of being sampled;
[0029] A sampling module, for sampling waypoints in a global space based on a sampling probability map to expand a path tree, where the path tree consists of a plurality of waypoints;
[0030] The determination module is used to determine a target path from a starting point to a target point based on the expanded path tree.
[0031] In a possible implementation, a module is constructed to:
[0032] Based on the environmental information of the global space, the gravitational potential field and the repulsive potential field in the global space are determined. The gravitational potential field represents the gravitational force of the target point on each path point, and the repulsive potential field represents the repulsive force of the obstacles on each path point.
[0033] Based on the gravitational potential field and the repulsive potential field, a sampling probability map is determined.
[0034] In a possible implementation, the sampling module is used to:
[0035] Generate a first random number and a second random number;
[0036] When the first random number is less than a preset threshold, the path points other than the obstacles are sampled in the global space to obtain the sampled path points, and when the second random number is not greater than the sampling probability corresponding to the sampled path points in the sampling probability map, the sampled path points are used as candidate extension points;
[0037] When the first random number is not less than a preset threshold, the target point is used as a candidate extension point;
[0038] The path tree is extended based on the candidate extension points.
[0039] In a possible implementation, extending the path tree based on the candidate extension point includes:
[0040] When the candidate extension point meets the preset conditions, and the distance between the candidate extension point and the neighboring point is not greater than the preset step length, the candidate extension point is used as the target extension point, and the preset conditions include that the straight line between the candidate extension point and the neighboring point closest to the candidate extension point in the path tree does not pass through any obstacle;
[0041] When the distance between the candidate extension point and the neighboring point is greater than the preset step length, the middle path point on the straight line connecting the candidate extension point and the neighboring point, whose distance from the candidate extension point is not greater than the preset step length, is used as the target extension point;
[0042] When the distance between the target extension point and the target point is not less than the preset step length, the target extension point is added to the path tree to expand the path tree.
[0043] In a possible implementation, the preset condition also includes that a relative angle between the candidate extension point and a neighboring point closest to the candidate extension point in the path tree is less than a preset turning angle, and the relative angle is an angle between a direction corresponding to the candidate extension point and a line between the candidate point and the nearest neighboring point.
[0044] In a possible implementation, extending the path tree based on the candidate extension point further includes:
[0045] When the distance between the target extension point and the target point is less than the preset step length, the extension of the path tree is stopped to obtain the extended path tree.
[0046] In a possible implementation, a module is determined to:
[0047] The target path from the starting point to the target point is determined in the expanded path tree using the backtracking method.
[0048] In a possible implementation, the device further includes:
[0049] The smoothing processing module is used to perform smoothing processing on the target path based on the cubic B-spline curve and determine the target path after the smoothing processing.
[0050] According to another aspect of the present disclosure, a path planning device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0051] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0052] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0053] According to an embodiment of the present application, a sampling probability map representing path points in the global space and the probability of path points being sampled is constructed based on environmental information in the global space, and path points are sampled in the global space based on the sampling probability map to expand the path tree, so that the sampling of path points in the path planning process is more targeted, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacle have a smaller probability of being sampled. The target path from the starting point to the target point is determined based on the expanded path tree, which can improve the speed and efficiency of path planning, and quickly find the optimal solution for path planning for complex scenarios.
[0054] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0056] Figure 1 A schematic diagram showing an application scenario according to an embodiment of the present application.
[0057] Figure 2 A flow chart of a path planning method according to an embodiment of the present application is shown.
[0058] Figure 3 A schematic diagram of a gravitational potential field according to an embodiment of the present application is shown.
[0059] Figure 4 A schematic diagram of a repulsive potential field according to an embodiment of the present application is shown.
[0060] Figure 5 A schematic diagram of a synthetic potential field according to an embodiment of the present application is shown.
[0061] Figure 6 A schematic diagram of a sampling probability map according to an embodiment of the present application is shown.
[0062] Figure 7 A flow chart of a path planning method according to an embodiment of the present application is shown.
[0063] Figure 8 A flow chart of a path planning method according to an embodiment of the present application is shown.
[0064] Fig. 9 A schematic diagram showing a target path after smoothing according to an embodiment of the present application.
[0065] Fig.10 A rendering of a path planning method according to an embodiment of the present application is shown.
[0066] Fig.11 A structural diagram of a path planning device according to an embodiment of the present application is shown.
[0067] Fig.12 It is a block diagram of a device 1900 for path planning according to an exemplary embodiment. DETAILED DESCRIPTION
[0068] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0069] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0070] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0071] Path planning is a technology used to determine the best path from a starting point to a destination. It is widely used in many application fields, such as navigation systems, driverless cars, logistics, and transportation. Existing path planning methods, such as algorithms based on graph search and path planning algorithms based on numerical optimization, are generally used in specific simple scenarios and are not suitable for complex dynamic environments. The solution complexity in some complex scenarios is very high, and the planning time will be relatively long. In order to take into account efficiency, the planned path is often not the optimal path, but only a suboptimal solution under certain conditions. Therefore, a new path planning method is urgently needed to improve the speed and efficiency of path planning.
[0072] In view of this, the present application proposes a path planning method, device and storage medium. The method constructs a sampling probability map representing path points in the global space and the probability of path points being sampled based on the environmental information of the global space, samples the path points in the global space based on the sampling probability map, and expands the path tree, so that the sampling of path points in the path planning process is more targeted, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacle have a smaller probability of being sampled, and the target path from the starting point to the target point is determined based on the expanded path tree, which can improve the speed and efficiency of path planning, and can quickly find the optimal solution for path planning for complex scenarios.
[0073] Figure 1 A schematic diagram showing an application scenario according to an embodiment of the present application is shown. The method of the embodiment of the present application can be used in Figure 1 In the scenario of path planning for a mobile robot in a multi-obstacle avoidance scenario shown in the figure, the figure shows an obstacle map in a multi-obstacle avoidance scenario, the black quadrilateral blocks in the map can represent different obstacles respectively, the green dots can represent the starting point of the mobile robot, and the yellow dots can represent the target point of the mobile robot. Based on the method of the embodiment of the present application, path planning can be performed based on the environmental information provided by the obstacle map in the figure, and a target path from the starting point to the target point can be determined (the target path can be the shortest path from the starting point to the target point of the mobile robot that meets the constraint conditions) to achieve path planning for the mobile robot.
[0074] The method of the embodiment of the present application can also be applied to other path planning scenarios, such as path planning in autonomous driving scenarios, etc., and the present application does not limit this.
[0075] The method of the embodiment of the present application can be used in a terminal device or a server. The terminal device can be any one or more of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), and a vehicle-mounted device. The embodiment of the present application does not impose any special restrictions on the specific type of the terminal device, and the terminal device can have a wired or wireless communication function.
[0076] The server can be located locally or in the cloud, and can be a physical device or a virtual device, such as a virtual machine, a container, etc., and has a wireless communication function, wherein the wireless communication function can be set in the chip (system) or other parts or components of the server. The wireless communication function can be realized, for example, through mobile communication technologies such as 2G / 3G / 4G / 5G, as well as Wi-Fi, Bluetooth, frequency modulation (FM), digital radio, satellite communication, etc. Communication can also be carried out through wired connection to achieve interaction with other devices.
[0077] The following Figures 2 to 10 , the path planning method of an embodiment of the present application is introduced.
[0078] Figure 2 FIG. 1 is a flow chart showing a path planning method according to an embodiment of the present application. The method can be used in a terminal device or a server, such as Figure 2 As shown, the method may include:
[0079] Step S201, constructing a sampling probability map based on the environmental information of the global space.
[0080] The global space may represent a space (e.g., a two-dimensional space) for path planning, and each point in a non-obstacle area in the global space may be referred to as a path point. The path point may be pre-set, and the object may travel along the path point. The environmental information may be predetermined, including information about a target point and an obstacle. The information about the target point may include the position of the target point, and the information about the obstacle may include the position and size of the obstacle. There may be multiple obstacles in the global space.
[0081] The sampling probability map represents the path points in the global space and the probability of the path points being sampled, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacle have a smaller probability of being sampled.
[0082] In the embodiment of the present application, an artificial potential field can be introduced to construct a sampling probability map, assuming that the object (i.e., the object of path planning, such as a mobile robot) moves in a virtual force field, and the target point of path planning and obstacles during driving are respectively regarded as objects with gravitational and repulsive effects on the mobile robot, so as to assist in path point sampling. See below.
[0083] The step S201 may include:
[0084] Based on the environmental information of the global space, the gravitational potential field and the repulsive potential field in the global space are determined; based on the gravitational potential field and the repulsive potential field, a sampling probability map is determined.
[0085] Among them, the gravitational potential field can be determined based on the target point information in the global space, and the repulsive potential field can be determined based on the obstacle information in the global space. The gravitational potential field can represent the gravitational force of the target point on each path point, and the repulsive potential field can represent the repulsive force of the obstacle on each path point.
[0086] In order to minimize the probability of sampling the path points near obstacles and maximize the probability of sampling the path points near the target point, a quadratic potential field function can be selected as the gravitational potential field, and a reciprocal potential field function can be selected as the repulsive potential field to construct a sampling probability map based on the environmental information of the global space. The potential field function of the gravitational potential field can be obtained by referring to formula (1):
[0087]
[0088] Among them, U 1 It can represent the gravitational potential field. k 1 Indicates the scale factor, which is a preset parameter. X can represent the current position of the object, X g It can represent the position of the target point. m is a preset parameter (for example, 2). 1 It can represent the influence radius of the target point (that is, outside the influence radius of the target point, the target point has no gravitational influence on the object).
[0089] The potential field function of the repulsive potential field obtained can be found in formula (2):
[0090]
[0091] Among them, U 0 It can represent the repulsive potential field. k 0 represents the scale factor, which is a preset parameter. n is a preset parameter. ρ can represent the distance between the object and the obstacle, ρ 0 It can represent the influence radius of the obstacle (that is, outside the influence radius of the obstacle, the obstacle has no repulsive effect on the object).
[0092] by Figure 1 Taking the obstacle map shown in as an example, the gravitational potential field constructed based on the environmental information can be seen in Figure 3 , showing a schematic diagram of a gravitational potential field according to an embodiment of the present application. Figure 3 As shown, the x-axis and y-axis can be used to represent each path point in the obstacle map, and the z-axis can be used to represent the magnitude of the gravitational force exerted on each path point by the target point.
[0093] by Figure 1 Taking the obstacle map shown in as an example, the repulsive potential field constructed based on the environmental information can be seen in Figure 4 , showing a schematic diagram of a repulsive potential field according to an embodiment of the present application. Figure 4As shown, the x-axis and y-axis can be used to represent each path point in the obstacle map, and the z-axis can be used to represent the magnitude of the repulsive force exerted on each path point by the obstacle.
[0094] Other forms of potential field functions (such as high-order power function form, exponential form, etc.) can also be used to construct gravitational potential field and repulsive potential field. This application does not impose any restrictions on this, as long as the probability of path points closer to the target point being sampled is greater, and the probability of path points closer to the obstacle being sampled is smaller.
[0095] The gravitational potential field and the repulsive potential field can be superimposed to determine the composite potential field. The composite potential field can represent the combined force of gravity and repulsion on each path point. Figure 5 , shows a schematic diagram of a synthetic potential field according to an embodiment of the present application. Figure 5 As shown, based on Figure 3 and Figure 4 In the composite potential field obtained by superimposing the gravitational potential field and the repulsive potential field shown, the x-axis and y-axis can be used to represent each path point, and the z-axis can be used to represent the magnitude of the resultant force of gravity and repulsion on each path point.
[0096] Based on the synthetic potential field, a sampling probability map can be constructed. The resultant force in the synthetic potential field can be associated with the probability of sampling, so that the path points with larger resultant force in the synthetic potential field have larger corresponding probabilities in the sampling probability map. There is no restriction on the specific association between probability and resultant force. Figure 6 , shows a schematic diagram of a sampling probability map according to an embodiment of the present application. Figure 5 The synthetic potential field shown can be obtained as Figure 6 The sampling probability map shown in the figure, where the x-axis and y-axis can be used to represent each path point, and the z-axis can be used to represent the probability of each path point being sampled (valued at (0,1)). A location with a high probability in the sampling probability map can indicate that there is no obstacle here and there is no obstacle within a certain range around it. On the contrary, a location with a low probability can indicate that there is an obstacle here or there is an obstacle within a certain range around it.
[0097] In this way, the efficiency of subsequent path planning can be improved, and the problem of unreachable targets or falling into local minima can be solved, combining the advantages of artificial potential fields and sampling algorithms.
[0098] In this application, an artificial potential field method is introduced to construct a sampling probability map for sampling. The target points and obstacle information in the existing environment can be utilized, which reduces the randomness of sampling point generation and makes the sampling generation more targeted. The sampling efficiency can be improved and the sampling time can be shortened in the subsequent path planning process.
[0099] Step S202: sampling path points in the global space based on the sampling probability map to expand the path tree.
[0100] Among them, a sampling-based motion planning algorithm (rapidly-exploring random trees, RRT) can be used to sample path points in the global space based on a sampling probability map, and the path tree can be composed of multiple path points. The path points in the path tree can be called nodes, and the lines between nodes are the edges of the path tree. Taking a mobile robot as an example, the root node (q_init) in the path tree can be the starting point of the mobile robot, and the state of the node can represent the current position and heading angle of the mobile robot (that is, the orientation of the mobile robot).
[0101] The process of extending the path tree can be seen below.
[0102] Figure 7 FIG. 1 is a flow chart showing a path planning method according to an embodiment of the present application. Figure 7 As shown, step S202 may include:
[0103] Step S701, generating a first random number and a second random number.
[0104] The value range of the first random number and the second random number is (0, 1). According to the relationship between the first random number and the preset threshold, sampling based on the sampling probability map or target-oriented sampling can be selected.
[0105] Step S702, when the first random number is less than a preset threshold, path points other than obstacles are sampled in the global space to obtain sampled path points, and when the second random number is not greater than the corresponding sampling probability of the sampled path points in the sampling probability map, the sampled path points are used as candidate extension points.
[0106] Sampling can be performed in the obstacle-free space (X_free). The preset threshold can be set between 5%-10%.
[0107] Based on the sampling probability map, path points with large corresponding probabilities are more likely to be sampled.
[0108] Therefore, the probability of path points being sampled that are closer to the target point is greater, and the probability of path points being sampled that are closer to the obstacle is smaller, which reduces the randomness of sampling point generation and makes the sampling generation more targeted.
[0109] In the case that the second random number is greater than the sampling probability corresponding to the sampled path point in the sampling probability map, the sampled path point can be abandoned and the next sampling can be performed.
[0110] Step S703: When the first random number is not less than a preset threshold, the target point is used as a candidate extension point.
[0111] At this time, target-oriented sampling is performed, so that the path tree can grow toward the target point, making the expansion of the path tree more targeted and improving the convergence speed of path planning.
[0112] Step S704: Expand the path tree based on the candidate extension points.
[0113] By introducing the first random number to determine the candidate extension point, the RRT algorithm of the target bias strategy in the present application can improve the target orientation of the RRT algorithm during sampling.
[0114] Figure 8 FIG. 1 is a flow chart showing a path planning method according to an embodiment of the present application. Figure 8 As shown, the S704 may include:
[0115] Step S801: When a candidate extension point meets a preset condition and the distance between the candidate extension point and a neighboring point is not greater than a preset step length, the candidate extension point is used as a target extension point.
[0116] A collision detection may be performed on the candidate extension point (q_rand) and the nearest neighbor point (q_nearest). The preset condition may represent a constraint of the collision detection, wherein the preset condition includes that a straight line connecting the candidate extension point and the nearest neighbor point to the candidate extension point in the path tree does not pass through any obstacle.
[0117] For example, in the scenario of a mobile robot, the preset step length may be set according to the mechanical structure and kinematic model of the mobile robot, such as the maximum moving step length of the mobile robot.
[0118] Optionally, the preset condition may also represent a turning angle constraint, including that the relative angle between the candidate extension point and the nearest neighbor point in the path tree to the candidate extension point is less than a preset turning angle. The relative angle is the angle between the direction corresponding to the candidate extension point and the line between the candidate point and the nearest neighbor point.
[0119] For example, in a scenario of a mobile robot, the preset steering angle may be set according to the mechanical structure and kinematic model of the mobile robot, such as being the maximum steering angle of the mobile robot.
[0120] When the candidate extension point does not meet the preset condition, the candidate extension point may be discarded and the next sampling may be performed.
[0121] Step S802: when the distance between the candidate extension point and the neighboring point is greater than the preset step length, a middle path point on the straight line connecting the candidate extension point and the neighboring point whose distance from the candidate extension point is not greater than the preset step length is used as a target extension point.
[0122] For example, the candidate extension point (q_rand) and the nearest neighbor point (q_nearest) may be connected, and the middle node q_mid of the middle path point on the line connecting the two nodes whose distance from q_rand is not greater than a preset step length is taken as the new extension node (ie, the target extension point).
[0123] Step S803: when the distance between the target extension point and the target point is not less than the preset step length, the target extension point is added to the path tree to expand the path tree.
[0124] For example, the target extension point may be used as a new leaf node in the path tree.
[0125] Optionally, the S704 may further include:
[0126] Step S804: when the distance between the target extension point and the target point is less than the preset step length, stop extending the path tree to obtain an extended path tree.
[0127] At this point, it can be considered that the target point has been found and the search is over.
[0128] Otherwise, when the distance between the target extension point and the target point is not less than the preset step length, you can return and continue to execute S701 and subsequent steps to continue expanding the path tree until the condition in S804 is met, then stop expanding the path tree to obtain the expanded path tree.
[0129] Return to see Figure 2 :
[0130] Step S203: determine a target path from the starting point to the target point based on the expanded path tree.
[0131] The target path includes all nodes from the starting point to the target point in the expanded path tree.
[0132] Among them, the backtracking method can be used to determine the target path from the starting point to the target point in the expanded path tree.
[0133] According to an embodiment of the present application, a sampling probability map representing path points in the global space and the probability of path points being sampled is constructed based on environmental information in the global space, and path points are sampled in the global space based on the sampling probability map to expand the path tree, so that the sampling of path points in the path planning process is more targeted, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacle have a smaller probability of being sampled. The target path from the starting point to the target point is determined based on the expanded path tree, which can improve the speed and efficiency of path planning, and quickly find the optimal solution for path planning for complex scenarios.
[0134] In order to make the planned target path smoother and capable of being directly tracked by an object such as a mobile robot, the method may further include:
[0135] The target path is smoothed based on a cubic B-spline curve to determine the target path after the smoothing process.
[0136] The equation of the cubic B-spline curve can be found in formula (3):
[0137] B(u)=B 0,3 (u)P 0 +B 1,3 (u)P 1 +B 2,3 (u)P 2 +B 3,3 (u)P 3 Formula (3)
[0138] Among them, B(u) can represent the control curve, and u can represent a set of continuously changing values called a non-decreasing sequence of node vectors, whose first and last values are defined as 0 and 1. 0 ~P 3 It can represent the characteristic points of the control curve, that is, the path points in the target path. 0,3 (u)~B 3,3 (u) can represent the basis function of cubic B-spline.
[0139]
[0140] Fig. 9 FIG. 1 is a schematic diagram showing a target path after smoothing according to an embodiment of the present application. Fig. 9 As shown, in Figure 1 In the scenario of the multi-obstacle map shown, the target path is composed of the green path points in the figure (which are nodes on the path tree). The horizontal and vertical coordinates can represent the positions of the path points in the map. The target path obtained after smoothing is a blue line connecting the green points, which can be directly tracked by objects such as mobile robots.
[0141] The effect of the path planning method of the embodiment of the present application can be seen in Table 1:
[0142] Table 1
[0143] Evaluation indicators Numeric Planning time 1.0555s The number of nodes on the target path 99.3300 Path length 291.4236
[0144] It can be seen that the path planning method of the embodiment of the present application requires a short planning time, has a small number of nodes on the target path, and a short path length.
[0145] Fig.10A rendering of a path planning method according to an embodiment of the present application is shown. Fig.10 The performance of the method of the embodiment of the present application in the multi-obstacle obstacle avoidance scenario is better demonstrated through a bar chart, where RRT is the existing RRT algorithm, RRT-P is a path planning method that adds a target orientation to the RRT algorithm, RRT-P-steer is a path planning method that adds a target orientation and angle constraint to the RRT algorithm, and RRT-APF is a path planning method based on artificial potential field inspired sampling in the RRT algorithm (i.e., the method of the embodiment of the present application).
[0146] from Fig.10 It can be seen that in the multi-obstacle avoidance scenario, in terms of time, the RRT-APF algorithm is 1.0555s, which is 87.88% higher than the 8.7076s of the RRT-P algorithm; in terms of the number of nodes, the RRT-APF algorithm is 99.33, which is 82.02% higher than the 552.42 of the RRT-P algorithm.
[0147] Fig.11 FIG. 2 shows a structural diagram of a path planning device according to an embodiment of the present application. Fig.11 As shown, the device comprises:
[0148] A construction module 1101 is used to construct a sampling probability map based on environmental information in a global space, where the environmental information includes information about a target point and obstacles. The sampling probability map represents path points in a global space and the probability of path points being sampled, where the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacles have a smaller probability of being sampled;
[0149] A sampling module 1102, configured to sample waypoints in a global space based on a sampling probability map to expand a path tree, wherein the path tree is composed of a plurality of waypoints;
[0150] The determination module 1103 is used to determine a target path from the starting point to the target point based on the expanded path tree.
[0151] In a possible implementation, the construction module 1101 is used to:
[0152] Based on the environmental information of the global space, the gravitational potential field and the repulsive potential field in the global space are determined. The gravitational potential field represents the gravitational force of the target point on each path point, and the repulsive potential field represents the repulsive force of the obstacles on each path point.
[0153] Based on the gravitational potential field and the repulsive potential field, a sampling probability map is determined.
[0154] In a possible implementation, the sampling module 1102 is configured to:
[0155] Generate a first random number and a second random number;
[0156] When the first random number is less than a preset threshold, the path points other than the obstacles are sampled in the global space to obtain the sampled path points, and when the second random number is not greater than the sampling probability corresponding to the sampled path points in the sampling probability map, the sampled path points are used as candidate extension points;
[0157] When the first random number is not less than a preset threshold, the target point is used as a candidate extension point;
[0158] The path tree is extended based on the candidate extension points.
[0159] In a possible implementation, extending the path tree based on the candidate extension point includes:
[0160] When the candidate extension point meets the preset conditions, and the distance between the candidate extension point and the neighboring point is not greater than the preset step length, the candidate extension point is used as the target extension point, and the preset conditions include that the straight line between the candidate extension point and the neighboring point closest to the candidate extension point in the path tree does not pass through any obstacle;
[0161] When the distance between the candidate extension point and the neighboring point is greater than the preset step length, the middle path point on the straight line connecting the candidate extension point and the neighboring point, whose distance from the candidate extension point is not greater than the preset step length, is used as the target extension point;
[0162] When the distance between the target extension point and the target point is not less than the preset step length, the target extension point is added to the path tree to expand the path tree.
[0163] In a possible implementation, the preset condition also includes that a relative angle between the candidate extension point and a neighboring point closest to the candidate extension point in the path tree is less than a preset turning angle, and the relative angle is an angle between a direction corresponding to the candidate extension point and a line between the candidate point and the nearest neighboring point.
[0164] In a possible implementation, extending the path tree based on the candidate extension point further includes:
[0165] When the distance between the target extension point and the target point is less than the preset step length, the extension of the path tree is stopped to obtain the extended path tree.
[0166] In a possible implementation, the determining module 1103 is configured to:
[0167] The target path from the starting point to the target point is determined in the expanded path tree using the backtracking method.
[0168] In a possible implementation, the device further includes:
[0169] The smoothing processing module is used to perform smoothing processing on the target path based on the cubic B-spline curve and determine the target path after the smoothing processing.
[0170] According to an embodiment of the present application, a sampling probability map representing path points in the global space and the probability of path points being sampled is constructed based on environmental information in the global space, and path points are sampled in the global space based on the sampling probability map to expand the path tree, so that the sampling of path points in the path planning process is more targeted, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacle have a smaller probability of being sampled. The target path from the starting point to the target point is determined based on the expanded path tree, which can improve the speed and efficiency of path planning, and quickly find the optimal solution for path planning for complex scenarios.
[0171] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0172] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0173] The embodiment of the present disclosure also proposes a path planning device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0174] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0175] Fig.12 1 is a block diagram of a device 1900 for path planning according to an exemplary embodiment. For example, the device 1900 may be provided as a server or a terminal device. Fig.12 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0176] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0177] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.
[0178] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0179] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0180] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0181] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0182] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0183] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0184] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0185] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0186] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A path planning method, characterized in that: The method comprises: Based on the environmental information of the global space, a sampling probability map is constructed, wherein the environmental information includes information of the target point and obstacles, and the sampling probability map represents the path points in the global space and the probability of the path points being sampled, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacles have a smaller probability of being sampled; Sampling the waypoints in a global space based on the sampling probability map to expand a path tree, the path tree consisting of a plurality of waypoints; A target path from a starting point to the target point is determined based on the expanded path tree.
2. The method according to claim 1, characterized in that The step of constructing a sampling probability map based on the environmental information of the global space includes: Based on the environmental information of the global space, determine the gravitational potential field and the repulsive potential field in the global space, wherein the gravitational potential field represents the gravitational force of the target point on each path point, and the repulsive potential field represents the repulsive force of the obstacle on each path point; A sampling probability map is determined based on the gravitational potential field and the repulsive potential field.
3. The method according to claim 1, characterized in that The sampling of the path points in the global space based on the sampling probability map to expand the path tree includes: Generate a first random number and a second random number; When the first random number is less than a preset threshold, sampling the path points other than the obstacles in the global space to obtain the sampled path points, and when the second random number is not greater than the sampling probability corresponding to the sampled path points in the sampling probability map, using the sampled path points as candidate extension points; When the first random number is not less than a preset threshold, taking the target point as a candidate extension point; The path tree is extended based on the candidate extension point.
4. The method according to claim 3, characterized in that The step of extending the path tree based on the candidate extension point includes: When the candidate extension point satisfies a preset condition, and when the distance between the candidate extension point and a neighboring point is not greater than a preset step length, the candidate extension point is used as the target extension point, wherein the preset condition includes that a straight line connecting the candidate extension point and a neighboring point closest to the candidate extension point in the path tree does not pass through any obstacle; When the distance between the candidate extension point and the neighboring point is greater than a preset step length, a middle path point on the straight line connecting the candidate extension point and the neighboring point, the middle path point whose distance from the candidate extension point is not greater than the preset step length, is used as the target extension point; When the distance between the target extension point and the target point is not less than a preset step length, the target extension point is added to the path tree to expand the path tree.
5. The method according to claim 4, characterized in that The preset condition also includes that a relative angle between the candidate extension point and a neighboring point in the path tree closest to the candidate extension point is less than a preset turning angle, the relative angle being an angle between a direction corresponding to the candidate extension point and a line connecting the candidate point and the nearest neighboring point.
6. The method according to claim 4, characterized in that The step of extending the path tree based on the candidate extension point further includes: When the distance between the target extension point and the target point is less than a preset step length, the extension of the path tree is stopped to obtain an extended path tree.
7. The method according to claim 1, characterized in that The determining the target path from the starting point to the target point based on the expanded path tree includes: The target path from the starting point to the target point is determined in the expanded path tree using a backtracking method.
8. The method according to claim 1, characterized in that The method further comprises: The target path is smoothed based on a cubic B-spline curve to determine a smoothed target path.
9. A path planning device, characterized in that: The device comprises: A construction module, configured to construct a sampling probability map based on environmental information of a global space, wherein the environmental information includes information of a target point and obstacles, and the sampling probability map represents path points in the global space and probabilities of path points being sampled, wherein the path points closer to the target point have a greater probability of being sampled, and the path points closer to the obstacles have a smaller probability of being sampled; A sampling module, configured to sample the path points in a global space based on the sampling probability map to expand a path tree, wherein the path tree is composed of a plurality of path points; A determination module is used to determine a target path from a starting point to the target point based on the expanded path tree.
10. A path planning device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 8 when executing the instructions stored in the memory.
11. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Unmanned surface vehicle path planning method based on Bi-RRT algorithm guided by improved artificial potential field method
CN114545931A
RRT-based path planning method, system and equipment and storage medium
CN118730151A
RRT algorithm and grid map-based path planning method and system
CN118776577A
Path planning apparatus and method for robot
US20110035051A1
Method and apparatus for planning obstacle avoidance path of traveling apparatus
US20230159056A1