Mobile robot path planning method and system
By improving the neighborhood search mechanism, optimizing nodes, and employing a bidirectional search strategy, combined with dynamic weight adjustment, the path planning was optimized, solving the problems of low efficiency and redundant nodes in mobile robot path planning and achieving more efficient path planning.
Patent Information
- Application Number
- CN202411259337.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-09-09
AI Technical Summary
Existing mobile robot path planning algorithms suffer from low search efficiency, excessive expansion nodes, and redundant nodes. They are particularly slow in large-scale environments and have strong heuristic function dependencies, resulting in low path planning efficiency.
A multi-neighborhood hybrid search mechanism is adopted, combining eight-neighborhood and new sixteen-neighborhood search, invalid nodes are deleted, a bidirectional search strategy is adopted and a dynamic weight coefficient adjustment heuristic function is added, and finally the path is optimized through a redundant inflection point deletion strategy.
This improves the search efficiency of the path planning algorithm, reduces invalid nodes and redundant inflection points, and enhances the overall efficiency and accuracy of path planning for mobile robots.
Smart Images

Figure CN119124160B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and in particular to a method and system for path planning of mobile robots. Background Technology
[0002] Path planning has always been one of the key technologies in the field of mobile robot research. The main purpose of path planning is to quickly and accurately find an optimal path from the starting position to the target position without collision in an unknown environment.
[0003] Currently, researchers have developed various path planning algorithms to address different environments and needs. Path planning for mobile robots can be categorized into three main types: traditional algorithms, sampling-based planning methods, and intelligent algorithms. Traditional algorithms, such as Dijkstra's algorithm and A* algorithm, are classic algorithms in path planning. The A* algorithm improves search efficiency by introducing a heuristic function, but it cannot guarantee finding the global optimum. Sampling-based planning methods include Probabilistic Roadmap (PRM) and Randomized Tree Search (RRT). These methods explore the state space through random sampling and construct feasible paths. They are particularly suitable for problems in high-dimensional spaces and with complex constraints, but may require a large amount of sampling to ensure path feasibility. Currently, intelligent algorithms are also being widely applied. With the development of artificial intelligence technology, more and more intelligent algorithms are being used in path planning, such as neural networks, fuzzy logic, and genetic algorithms. These algorithms can provide more flexible and adaptable solutions, especially in dynamic and unknown environments. In summary, research on mobile robot path planning is developing towards improving adaptability and efficiency, as well as more intelligent decision-making. With the continuous advancement of technology, future path planning algorithms will become more intelligent and automated, and will be better able to adapt to complex and ever-changing environments.
[0004] The A* algorithm is a heuristic search algorithm widely used in path planning, including path planning for mobile robots. While favored for its efficiency and accuracy, the A* algorithm has some drawbacks in practical applications: 1) Slow search speed: When using the A* algorithm for mobile robot path planning, the commonly used neighborhood search methods are four-neighborhood and eight-neighborhood search modes. When the search space is large and there are few obstacles, this search method becomes very inefficient, slowing down the algorithm's search speed. 2) Existence of useless nodes: When expanding outwards, the A* algorithm needs to calculate the cost function of all possible next positions. However, in actual search, nodes deviating from the search direction of the final target position are often invalid nodes, which consumes search time and reduces the algorithm's search efficiency. 3) Heuristic function dependency: The performance of the A* algorithm is highly dependent on the choice of heuristic function. An inappropriate heuristic function selection may lead to reduced algorithm efficiency or failure to find the optimal solution. 4) Existence of redundant nodes: Paths obtained using the A* algorithm often contain many redundant nodes, resulting in numerous inflection points and reducing the efficiency of the mobile robot.
[0005] Existing mobile robot path planning algorithms typically suffer from low search efficiency, excessive expansion nodes, and redundant nodes. In the prior art, invention application number 202110837144.2 discloses using the RRT* algorithm to generate multiple feasible paths and calculating the time cost of each path through a turning characteristic function, ultimately selecting the path with the minimum time cost as the planned path. This method can reduce the path time cost of the robot's actual task and improve the efficiency of task execution, but the computational load is large, resulting in low algorithm efficiency. Invention application number 201711374451.1 discloses a path planning method that first performs global path pre-planning in a static obstacle environment, and then performs secondary smoothing on the pre-planned path. When encountering dynamic obstacles, an artificial potential field method is used for local path planning. This method effectively improves the efficiency and smoothness of path planning, but when facing frequently changing dynamic environments, the algorithm's real-time updates and adaptability are insufficient. Application No. 202010639974.X discloses a method for global path planning using the A* algorithm and improving the evaluation function with a weighted approach to eliminate redundant points. When encountering dynamic obstacles, an artificial potential field algorithm is used for local path planning. However, this method increases computational complexity and reduces computational efficiency through algorithm fusion.
[0006] It is evident that existing technologies still have many shortcomings in mobile robot path planning, and there is an urgent need to propose a new path planning method to improve the overall efficiency of robot path planning. Summary of the Invention
[0007] In view of this, it is necessary to provide a mobile robot path planning method and system to overcome the above-mentioned deficiencies of the prior art.
[0008] To address the aforementioned problems, in a first aspect, embodiments of the present invention provide a mobile robot path planning method, comprising:
[0009] S1, Based on whether there are obstacles in the eight neighborhoods of the current node, determine the multi-neighborhood hybrid search mechanism that uses a combination of eight neighborhoods and new sixteen neighborhoods;
[0010] S2, Based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node;
[0011] S3 employs a bidirectional search strategy and incorporates a dynamic weight coefficient adjustment heuristic function to obtain the planned path;
[0012] S4. The redundant inflection point deletion strategy is used on the planned path to remove useless inflection points and obtain the optimal path.
[0013] Preferably, before step S1, the method further includes:
[0014] The environment is simulated using a grid method to obtain a grid map for path planning of mobile robots.
[0015] Preferably, in step S1, based on whether there are obstacles in the current node's eight neighbors, a multi-neighborhood hybrid search mechanism that combines the eight neighbors and the new sixteen neighbors is determined, including:
[0016] Determine if there are obstacles in the eight neighbors of the current node:
[0017] If there are obstacles, use the eight-neighbor search method;
[0018] If there are no obstacles, a sixteen-neighbor search method is used; wherein, the sixteen-neighbor search method is an optimization of the eight-neighbor search method and the twenty-four-neighbor search method.
[0019] Preferably, in step S2, based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node, including:
[0020] Determine the positions of the current node and the target node in the grid map, and calculate the angle α between the line connecting the current node and the target node and the positive x-axis direction of the grid map;
[0021] Based on the range of the included angle α and the current neighborhood search method, invalid nodes are removed: When using the eight-neighbor search method, based on the range of the included angle α, 3 invalid nodes in the eight-neighbor area are removed, and 5 valid nodes are retained. When using the sixteen-neighbor search method, based on the range of the included angle α, 9 invalid nodes in the sixteen-neighbor area are removed, and 7 valid nodes are retained.
[0022] Preferably, in step S3, a bidirectional search strategy is adopted, and a dynamic weight coefficient adjustment heuristic function is added to obtain the planned path, specifically including:
[0023] Initialize the lists for forward search and reverse search; forward search searches from the starting point to the ending point, and reverse search searches from the ending point to the starting point;
[0024] Calculate the cost value of each node in the list based on the cost calculation function, and select the node with the smallest cost value as the next node to be explored.
[0025] Determine if the forward search and reverse search intersect; if they intersect, the algorithm terminates; otherwise, the search continues.
[0026] During the bidirectional search process, the heuristic function is adjusted using dynamic weight coefficients to dynamically adjust the search speed.
[0027] Preferably, the step of using dynamic weight coefficients to adjust the heuristic function during the bidirectional search process to dynamically adjust the search speed includes:
[0028] During the bidirectional search process, a dynamic weight coefficient w(n) is used to adjust the heuristic function h(n) to dynamically balance the proportional relationship between g(n) and h(n); where g(n) represents the cost from the starting point to the current node n, and h(n) represents the cost from the current node n to the end point.
[0029] The formula for calculating the total cost of the bidirectional search algorithm after using dynamic weight coefficients w(n) is:
[0030] f(n) = g(n) + w(n)·h(n)
[0031] In the formula, f(n) represents the total cost from the starting point to the ending point;
[0032] In the forward search, the expression for the dynamic weight coefficient is:
[0033]
[0034] During reverse search, the expression for the dynamic weight coefficient is:
[0035]
[0036] In the formula, x sand y s Let x be the starting coordinate. g and y g Let x be the coordinate of the endpoint. t and y t x is the current coordinate of the forward search. u and y u The current coordinates for the reverse search;
[0037] The dynamic weighting coefficient w(n) uses a combination of exponential and logarithmic functions to dynamically adjust the search speed based on the distance between the current node and the target endpoint. If the distance between the current node and the target endpoint is greater than the preset distance, the search speed is increased; if the distance between the current node and the target endpoint is less than the preset distance, the search speed is decreased to improve search accuracy.
[0038] Preferably, in step S4, the redundant inflection point deletion strategy for the planned path to remove useless inflection points includes:
[0039] S41, connect the starting node forward to the adjacent inflection points, and determine whether there are obstacles in the line connecting the starting node and the adjacent inflection points; wherein, the end point of the planned path is taken as the initial starting node;
[0040] S42, If there are no obstacles, delete the inflection point between the starting node and the adjacent inflection point, and return to S41; if there are obstacles, treat the adjacent inflection point as an inflection point that cannot be deleted, use the resulting inflection point as the new starting node, and return to S41.
[0041] S43, repeat S41~S42, and process forward step by step to the starting point of the path;
[0042] S44 reconnects all the non-deletable inflection points to form the optimal path.
[0043] Secondly, embodiments of the present invention provide a mobile robot path planning system, comprising:
[0044] The neighborhood search optimization module is used to determine a multi-neighborhood hybrid search mechanism that combines the eight neighborhoods and the new sixteen neighborhoods, based on whether there are obstacles in the eight neighborhoods of the current node.
[0045] The node optimization module is used to delete invalid nodes based on the position of the current node and the target node according to the multi-neighborhood hybrid search mechanism.
[0046] The bidirectional search module is used to obtain the planned path by adopting a bidirectional search strategy and adding a heuristic function for adjusting dynamic weight coefficients.
[0047] The redundant inflection point removal module is used to apply a redundant inflection point removal strategy to the planned path, remove useless inflection points, and obtain the optimal path.
[0048] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein,
[0049] The memory is used to store programs;
[0050] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the mobile robot path planning method as described in the first aspect embodiment of the present invention.
[0051] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the mobile robot path planning method as described in the first aspect embodiment of the present invention.
[0052] The mobile robot path planning method provided by this invention has the following advantages compared with the prior art:
[0053] Beneficial effects:
[0054] The mobile robot path planning method and system provided in this invention improves the search efficiency of the path planning algorithm by expanding the selectable next target position during the algorithm's search through an improved neighborhood search mechanism. It also reduces the search time by removing invalid nodes during the algorithm's search process through a node optimization strategy. Furthermore, it enhances the search efficiency by introducing a bidirectional search mechanism and incorporates a dynamic weight factor to adjust the search speed, ensuring that bidirectional searches converge at intermediate points to successfully plan the optimal path. Finally, it removes useless inflection points through a redundant inflection point deletion strategy, further improving the mobile robot's driving efficiency. Attached Figure Description
[0055] Figure 1 The flowchart of the mobile robot path planning method provided by the present invention is shown below.
[0056] Figure 2 The grid map provided by this invention for path planning of mobile robots;
[0057] Figure 3(a) is a schematic diagram of the principle of the eight-neighbor search provided by the present invention;
[0058] Figure 3(b) is a schematic diagram of the twenty-four neighborhood search method provided by the present invention;
[0059] Figure 4 A schematic diagram illustrating the principle of the sixteen-neighbor search provided by this invention;
[0060] Figure 5(a) is a node diagram of the eight-neighbor search provided by the present invention;
[0061] Figure 5(b) is a node diagram of the sixteen-neighborhood search provided by the present invention;
[0062] Figure 6 A schematic diagram of redundant node deletion provided by the present invention;
[0063] Figure 7 This is a structural block diagram of the mobile robot path planning system provided by the present invention;
[0064] Figure 8 This is a structural block diagram of the electronic device provided by the present invention. Detailed Implementation
[0065] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0066] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0067] The A* algorithm is a heuristic search algorithm widely used in path planning, including path planning for mobile robots. While favored for its efficiency and accuracy, the A* algorithm has some drawbacks in practical applications: 1) Slow search speed: When using the A* algorithm for mobile robot path planning, the commonly used neighborhood search methods are four-neighborhood and eight-neighborhood search modes. When the search space is large and there are few obstacles, this search method becomes very inefficient, slowing down the algorithm's search speed. 2) Existence of useless nodes: When expanding outwards, the A* algorithm needs to calculate the cost function of all possible next positions. However, in actual search, nodes deviating from the search direction of the final target position are often invalid nodes, which consumes search time and reduces the algorithm's search efficiency. 3) Heuristic function dependency: The performance of the A* algorithm is highly dependent on the choice of heuristic function. An inappropriate heuristic function selection may lead to reduced algorithm efficiency or failure to find the optimal solution. 4) Existence of redundant nodes: Paths obtained using the A* algorithm often contain many redundant nodes, resulting in numerous inflection points and reducing the efficiency of the mobile robot.
[0068] To address the aforementioned shortcomings of the traditional A* algorithm, this invention provides a mobile robot path planning method that improves upon the traditional A* algorithm, thereby enhancing the overall efficiency of robot path planning. The following will elaborate and describe this method through several embodiments.
[0069] Figure 1 This is a flowchart of the mobile robot path planning method provided by the present invention. Figure 1 As shown, the mobile robot path planning method includes steps S1 to S43, wherein:
[0070] Step S1: Determine the multi-neighborhood hybrid search mechanism that combines the eight neighborhoods and the new sixteen neighborhoods based on whether there are obstacles in the eight neighborhoods of the current node.
[0071] Specifically, before executing step S1, the environment is simulated using a grid method to obtain a grid map for mobile robot path planning. Environment modeling is one of the important steps in mobile robot path planning research. A suitable map environment model helps improve the search efficiency of the algorithm. This invention uses a grid method to simulate environment modeling. At the same time, in order to better realize the localization of the mobile robot, and considering that the center point of the grid map is a regularly arranged point, the nodes of the path planning are restricted to the grid center point. The robot is regarded as a movable point mass, and its position is determined by the grid on the map, which can effectively reduce the complexity of the path.
[0072] Figure 2 The grid map provided by this invention is for path planning of mobile robots. Figure 2 The image shows a 10x10 grid instance. The grid in the lower left corner represents the starting position of the mobile robot, the grid in the upper right corner represents the ending position of the mobile robot, the remaining black grids represent obstacles, and the white grids represent passable areas. After the grid map is created, each grid needs to be coded. Each grid has only two states: idle or occupied. When the grid code is 1, that is, the grid color is black, it means that the grid is occupied, i.e., there is an obstacle. When the grid code is 0, that is, the grid color is white, it means that the grid is idle, i.e., the robot can pass through normally.
[0073] After establishing the raster map and encoding the raster, step S1 is executed to optimize the neighborhood search method. Neighborhood search involves expanding the current node outwards along different directions. The traditional A* algorithm often uses an eight-neighbor search method, that is, expanding the neighborhood from the current node in eight different directions, with each direction separated by an angle of 45°. The principle diagram of the eight-neighbor search is shown in Figure 3(a), and the coordinate set of the eight-neighbor search is represented as follows:
[0074] T n ={(xn ±1,y n ),(x n ,y n ±1),(x n ±1,y n ±1)} (1)
[0075] In the formula, T n Let x be the set of coordinates. n Let x be the x-coordinate of the current search node n, and y be the y-coordinate of the current search node n. n The y-coordinate of the current search node n.
[0076] Since the eight-neighbor search method only expands to eight surrounding nodes at a time, it suffers from low search efficiency and excessive node expansion in environments with few obstacles. Therefore, a twenty-four-neighbor search method is proposed. This method expands the search range from one layer of surrounding nodes to two layers, allowing the algorithm to search 24 different nodes at a time. Its principle is illustrated in Figure 3(b). The coordinate set of the twenty-four-neighbor search method is represented as follows:
[0077]
[0078] However, while the 24-neighborhood search method can explore multiple nodes at once, its search efficiency is greatly reduced when there are obstacles in the surrounding first-level nodes. When the algorithm expands to the second-level nodes, it must first determine whether there are obstacles in the first-level nodes it passes through. At the same time, the multi-point search method will also cause the algorithm to explore too many useless nodes, which greatly reduces the efficiency of the algorithm.
[0079] To address the aforementioned shortcomings of the eight-neighbor search and twenty-four-neighbor search methods, this invention optimizes these methods by proposing a new sixteen-neighbor search method. The principle diagram of the sixteen-neighbor search is shown below. Figure 4 As shown. The coordinate set for the sixteen-neighbor search method is represented as:
[0080]
[0081] The sixteen-neighbor search method proposed in this invention is based on the traditional eight-neighbor and twenty-four-neighbor expansion methods. The sixteen-neighbor is formed by removing the eight-neighbor of the first-level node in the twenty-four-neighbor. When there are no obstacles in the eight-neighbor of the first-level node around the current node, the sixteen-neighbor of the second-level node can be explored directly.
[0082] In step S1, a multi-neighborhood hybrid search mechanism using a combination of eight-neighborhood and new sixteen-neighborhood methods is determined. Specifically, it checks whether there are obstacles in the current node's eight-neighborhood. If obstacles exist, the eight-neighborhood search method is used; otherwise, the sixteen-neighborhood search method is used. This multi-neighborhood hybrid search algorithm determines whether to use the eight-neighborhood expansion method or the new sixteen-neighborhood expansion method by determining whether there are obstacles in the current node's eight-neighborhood. This algorithm can effectively explore across nodes, significantly improving search efficiency and reducing the expansion of useless nodes.
[0083] In this embodiment of the invention, by improving the neighborhood search mechanism, the number of next target locations that can be selected during the algorithm search is expanded, thereby improving the search efficiency of the path planning algorithm.
[0084] Step S2: Based on the multi-neighborhood hybrid search mechanism, delete invalid nodes according to the positions of the current node and the target node.
[0085] Specifically, the multi-neighborhood hybrid search mechanism provided by this invention, which uses a combination of eight-neighborhood and new sixteen-neighborhood, has search nodes as shown in Figures 5(a) and 5(b). During the exploration process from the current node (the robot's current location) to the target node (the location the robot needs to reach), invalid nodes will be generated when using either eight-neighborhood or new sixteen-neighborhood search, which will waste the algorithm's search resources. In order to improve the efficiency of the algorithm search, this invention removes useless nodes that have no impact on the search results during the search process.
[0086] First, determine the positions of the current node and the target node in the grid map, and calculate the angle α between the line connecting the current node and the target node and the positive x-axis direction of the grid map;
[0087] Then, based on the range of the included angle α and the current neighborhood search method, invalid nodes are removed.
[0088] When using the eight-neighbor search method, as shown in Table 1, based on the range of the included angle α, three invalid nodes in the eight-neighbor area are removed, and five valid nodes are retained.
[0089] Table 1. Node Selection Table for Eight Neighborhood Search Method
[0090]
[0091] When using a 16-neighborhood search, as shown in Table 2, based on the range of the included angle α, 9 invalid nodes in the 16-neighborhood are removed, and 7 valid nodes are retained.
[0092] Table 2. Node Selection Table for the New Sixteen Neighborhood Search Method
[0093]
[0094] In this embodiment of the invention, invalid nodes in the algorithm search process are removed through a node optimization strategy, thereby reducing the search time of the path planning algorithm.
[0095] Step S3: A bidirectional search strategy is adopted, and a heuristic function for adjusting dynamic weight coefficients is added to obtain the planned path.
[0096] Understandably, while the traditional A* algorithm has significantly improved search speed compared to other heuristic algorithms, it remains relatively slow, leading to a marked decrease in search efficiency when searching in large-scale map environments. Therefore, this invention employs a bidirectional search strategy to reduce the number of nodes traversed by the algorithm and improve its search speed.
[0097] Bidirectional search is divided into forward search and reverse search. After determining the coordinates of the starting point and the ending point, forward search searches from the starting point to the ending point, and reverse search searches from the ending point to the starting point. The current node of the algorithm is the parent node and is defined as Pnode, and the nearest search node is the child node and is defined as Snode.
[0098] In step S3, the bidirectional search strategy may specifically include the following steps S31 to S34:
[0099] S31, Initialize the lists for forward search and reverse search; forward search searches from the starting point to the ending point, and reverse search searches from the ending point to the starting point.
[0100] Specifically, in the actual operation, the forward search Openlist1 and Closelist1 are initialized. The starting point is added to Closelist1 and defined as the current parent node Pnode1. The reverse search Openlist2 and Closelist2 are initialized. The ending point is added to Closelist2 and defined as the current parent node Pnode2.
[0101] The Chinese definitions of the relevant terms are as follows:
[0102] Openlist1: An open list for forward search, used to store nodes to be explored.
[0103] Closelist1: The closed list for forward search, used to store nodes that have been explored.
[0104] Openlist2: An open list for reverse search, used to store nodes to be explored (starting from the endpoint).
[0105] Closelist2: A closed list for reverse search, used to store explored nodes (starting from the endpoint).
[0106] Pnode1: The current parent node in the forward search.
[0107] SPnode1: The neighboring nodes around Pnode1, i.e. the child nodes to be evaluated in the forward search.
[0108] S32, calculate the cost value of each node in the list according to the cost calculation function, and select the node with the smallest cost value as the node to be explored next.
[0109] Specifically, the forward search process includes: defining the neighboring nodes around Pnode1 as SPnode1 and adding these nodes to Openlist1. Calculating the cost value of all nodes in Openlist1 according to the cost calculation function. Selecting the node with the smallest cost value as the next node to be explored, defining it as SPnode2, removing it from Openlist1, and adding it to Closelist1.
[0110] The reverse search process includes: defining the neighboring nodes around Pnode2 as SRnode1 and adding these nodes to Openlist2. Calculating the cost value of all nodes in Openlist2 using the cost calculation function. Selecting the node with the lowest cost value as the next node to be explored, defining it as SRnode2, removing it from Openlist2, and adding it to Closelist2.
[0111] S33: Determine whether the forward search and reverse search intersect. If they intersect, the algorithm ends; otherwise, continue the search.
[0112] Specifically, check if SPnode2 exists in Openlist2 and if SRnode2 exists in Closelist1. If they exist, it means the forward search and reverse search intersect at a point, at which point the algorithm ends and the optimal path is found. If they do not exist, it means the forward search and reverse search have not yet intersected, and SPnode2 needs to be redefined as the new parent node Pnode1, and SRnode2 needs to be redefined as the new parent node Pnode2. Then repeat steps S31 and S32 until the forward and reverse searches intersect at a point.
[0113] S34. During the bidirectional search process, the heuristic function is adjusted using dynamic weight coefficients to dynamically adjust the search speed.
[0114] Understandably, in bidirectional search, if the starting point and the destination are far apart, the forward and reverse searches may intersect or fail to intersect, leading to reduced efficiency and accuracy of the algorithm. To address this issue, this invention uses a dynamic weight coefficient w(n) to adjust the heuristic function h(n), dynamically balancing the ratio between g(n) and h(n), thereby dynamically controlling the search speed and search range of the path planning algorithm. Here, g(n) represents the cost (actual cost) from the starting point to the current node n, and h(n) represents the cost (heuristic cost) from the current node n to the destination.
[0115] The formula for calculating the total cost of the bidirectional search algorithm after using dynamic weight coefficients w(n) is:
[0116] f(n)=g(n)+w(n)·h(n) (4)
[0117] In the formula, f(n) represents the total cost from the starting point to the ending point;
[0118] In the forward search, the expression for the dynamic weight coefficient is:
[0119]
[0120] During reverse search, the expression for the dynamic weight coefficient is:
[0121]
[0122] In the formula, x s and y s Let x be the starting coordinate. g and y g Let x be the coordinate of the endpoint. t and y t x is the current coordinate of the forward search. u and y u The current coordinates for the reverse search;
[0123] The dynamic weighting coefficient w(n) uses a combination of exponential and logarithmic functions to dynamically adjust the search speed based on the distance between the current node and the target endpoint. If the distance between the current node and the target endpoint is greater than the preset distance, the search speed is increased; if the distance between the current node and the target endpoint is less than the preset distance, the search speed is decreased to improve search accuracy.
[0124] In this embodiment of the invention, the efficiency of the algorithm search is improved by introducing a bidirectional search mechanism. At the same time, a dynamic weight factor is added to adjust the algorithm search speed and reduce the search for invalid areas, thereby improving search efficiency and ensuring that the bidirectional search can meet at the intermediate point.
[0125] Step S4: Apply a redundant inflection point deletion strategy to the planned path to remove useless inflection points and obtain the optimal path.
[0126] Even after the A* algorithm plans the optimal path, there are still many useless inflection points. To address this issue, this invention employs a redundant inflection point removal strategy on the planned path, effectively removing useless inflection points by determining whether there are obstacles between nodes.
[0127] Step S4 specifically includes the following steps S41 to S44. Figure 6 This is a schematic diagram of redundant node deletion provided by the present invention, combined with Figure 6 The redundant inflection point removal strategy provided by this invention is described below:
[0128] S41: Connect the starting node forward to the adjacent inflection points and determine whether there are obstacles in the line connecting the starting node and the adjacent inflection points; wherein, the end point of the planned path is taken as the initial starting node.
[0129] Figure 6 In this diagram, P1 is the starting point of the planned path, and P10 is the ending point of the planned path. The ending point P10 is taken as the initial starting node.
[0130] S42, if there are no obstacles, delete the inflection point between the starting node and the adjacent inflection point, and return to S41; if there are obstacles, treat the adjacent inflection point as an inflection point that cannot be deleted, use the resulting inflection point as the new starting node, and return to S41.
[0131] Reference Figure 6 Starting from the endpoint P10, connect the next inflection point P8 forward and determine if there are any obstacles in the connection. If there are no obstacles, delete the inflection point P9 between the starting node P10 and the next inflection point P8.
[0132] If an obstacle exists, the inflection point P8 that is separated from the node is designated as an inflection point that cannot be deleted, and the new inflection point P8 that cannot be deleted is designated as the new starting node. Return to S41, connect the starting node P8 forward to the inflection point P6 that is separated from it, and determine whether there is an obstacle in the line connecting the starting node P8 and the inflection point P6 that is separated from it.
[0133] S43, repeat S41~S42, and process forward step by step to the starting point of the path;
[0134] S44 reconnects all the non-deletable inflection points to form the optimal path.
[0135] In this embodiment, a redundant inflection point deletion strategy is used to remove useless inflection points, thereby improving the efficiency of the mobile robot's movement.
[0136] Figure 7The above is a structural block diagram of the mobile robot path planning system provided by the present invention, with reference to... Figure 7 The mobile robot path planning system 700 includes:
[0137] The neighborhood search optimization module 701 is used to determine a multi-neighborhood hybrid search mechanism that combines eight neighborhoods and new sixteen neighborhoods based on whether there are obstacles in the eight neighborhoods of the current node.
[0138] The node optimization module 702 is used to delete invalid nodes based on the position of the current node and the target node according to the multi-neighborhood hybrid search mechanism.
[0139] The bidirectional search module 703 is used to obtain the planned path by adopting a bidirectional search strategy and adding a dynamic weight coefficient adjustment heuristic function.
[0140] The redundant inflection point deletion module 704 is used to apply a redundant inflection point deletion strategy to the planned path, remove useless inflection points, and obtain the optimal path.
[0141] The mobile robot path planning system provided by the present invention executes the mobile robot path planning method provided in the above embodiments through the above modules. The mobile robot path planning method has been described in detail in the above embodiments, and will not be repeated here.
[0142] Figure 8 A structural block diagram of the electronic device provided by the present invention, such as Figure 8 As shown, the present invention also provides an electronic device, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 800 includes a processor 801 and a memory 802, wherein the memory 802 stores a mobile robot path planning program 808.
[0143] In some embodiments, memory 802 may be an internal storage unit of a computer device, such as a hard disk or memory. In other embodiments, memory 802 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 802 may include both internal and external storage units of the computer device. Memory 802 is used to store application software and various types of data installed on the computer device, such as program code installed on the computer device. Memory 802 can also be used to temporarily store data that has been output or will be output. In one embodiment, when the mobile robot path planning program 808 is executed by processor 801, the following steps are implemented:
[0144] S1, Based on whether there are obstacles in the eight neighborhoods of the current node, determine the multi-neighborhood hybrid search mechanism that uses a combination of eight neighborhoods and new sixteen neighborhoods;
[0145] S2, Based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node;
[0146] S3 employs a bidirectional search strategy and incorporates a dynamic weight coefficient adjustment heuristic function to obtain the planned path;
[0147] S4. The redundant inflection point deletion strategy is used on the planned path to remove useless inflection points and obtain the optimal path.
[0148] In some embodiments, processor 801 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 802 or process data, such as executing a mobile robot path planning program.
[0149] This embodiment also provides a computer-readable storage medium storing a mobile robot path planning program thereon, which, when executed by a processor, performs the following steps:
[0150] S1, Based on whether there are obstacles in the eight neighborhoods of the current node, determine the multi-neighborhood hybrid search mechanism that uses a combination of eight neighborhoods and new sixteen neighborhoods;
[0151] S2, Based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node;
[0152] S3 employs a bidirectional search strategy and incorporates a dynamic weight coefficient adjustment heuristic function to obtain the planned path;
[0153] S4. The redundant inflection point deletion strategy is used on the planned path to remove useless inflection points and obtain the optimal path.
[0154] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A path planning method for a mobile robot, characterized in that, include: S1, Based on whether there are obstacles in the eight neighborhoods of the current node, determine the multi-neighborhood hybrid search mechanism that uses a combination of eight neighborhoods and new sixteen neighborhoods; S2, Based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node; S3 employs a bidirectional search strategy and incorporates a dynamic weight coefficient adjustment heuristic function to obtain the planned path; Step S3 specifically includes: S31, Initialize the lists for forward search and reverse search; forward search searches from the starting point to the ending point, and reverse search searches from the ending point to the starting point; S32, calculate the cost value of each node in the list according to the cost calculation function, and select the node with the smallest cost value as the next node to be explored; S33, determine whether the forward search and the reverse search intersect. If they intersect, the algorithm ends; otherwise, continue the search. S34, During the bidirectional search process, the heuristic function is adjusted using dynamic weight coefficients to dynamically adjust the search speed; Step S34 specifically includes: During the bidirectional search process, a dynamic weight coefficient w(n) is used to adjust the heuristic function h(n) to dynamically balance the proportional relationship between g(n) and h(n); where g(n) represents the cost from the starting point to the current node n, and h(n) represents the cost from the current node n to the end point. The formula for calculating the total cost of the bidirectional search algorithm after using dynamic weight coefficients w(n) is: f(n) = g(n) + w(n)·h(n) In the formula, f(n) represents the total cost from the starting point to the ending point; In the forward search, the expression for the dynamic weight coefficient is: During reverse search, the expression for the dynamic weight coefficient is: In the formula, x s and y s Let x be the starting coordinate. g and y g Let x be the coordinate of the endpoint. t and y t x is the current coordinate of the forward search. u and y u The current coordinates for the reverse search; The dynamic weighting coefficient w(n) uses a combination of exponential and logarithmic functions to dynamically adjust the search speed based on the distance between the current node and the target endpoint. If the distance between the current node and the target endpoint is greater than the preset distance, the search speed is increased; if the distance between the current node and the target endpoint is less than the preset distance, the search speed is decreased to improve search accuracy. S4. The redundant inflection point deletion strategy is used on the planned path to remove useless inflection points and obtain the optimal path.
2. The mobile robot path planning method according to claim 1, characterized in that, Prior to step S1, the method further includes: The environment is simulated using a grid method to obtain a grid map for path planning of mobile robots.
3. The mobile robot path planning method according to claim 2, characterized in that, In step S1, based on whether there are obstacles in the current node's eight neighbors, a multi-neighborhood hybrid search mechanism that combines the eight neighbors and the new sixteen neighbors is determined, including: Determine if there are obstacles in the eight neighborhoods of the current node; If there are obstacles, use the eight-neighbor search method; If there are no obstacles, a sixteen-neighbor search method is used; wherein, the sixteen-neighbor search method is an optimization of the eight-neighbor search method and the twenty-four-neighbor search method.
4. The mobile robot path planning method according to claim 3, characterized in that, In step S2, based on the multi-neighborhood hybrid search mechanism, invalid nodes are deleted according to the positions of the current node and the target node, including: Determine the positions of the current node and the target node in the grid map, and calculate the angle α between the line connecting the current node and the target node and the positive x-axis direction of the grid map; Based on the range of the included angle α and the current neighborhood search method, invalid nodes are removed: when using the eight-neighbor search method, based on the range of the included angle α, 3 invalid nodes in the eight-neighbor area are removed, and 5 valid nodes are retained; when using the sixteen-neighbor search method, based on the range of the included angle α, 9 invalid nodes in the sixteen-neighbor area are removed, and 7 valid nodes are retained.
5. The mobile robot path planning method according to claim 1, characterized in that, In step S4, the redundant inflection point deletion strategy is applied to the planned path to remove useless inflection points, including: S41, connect the starting node forward to the adjacent inflection points, and determine whether there are obstacles in the line connecting the starting node and the adjacent inflection points; wherein, the end point of the planned path is taken as the initial starting node; S42, If there are no obstacles, delete the inflection point between the starting node and the adjacent inflection point, and return to S41; if there are obstacles, treat the adjacent inflection point as an inflection point that cannot be deleted, use the resulting inflection point as the new starting node, and return to S41. S43, repeat S41~S42, and process forward step by step to the starting point of the path; S44 reconnects all the non-deletable inflection points to form the optimal path.
6. A mobile robot path planning system, the system being used to execute the mobile robot path planning method according to any one of claims 1-5, characterized in that, include: The neighborhood search optimization module is used to determine a multi-neighborhood hybrid search mechanism that combines the eight neighborhoods and the new sixteen neighborhoods, based on whether there are obstacles in the eight neighborhoods of the current node. The node optimization module is used to delete invalid nodes based on the position of the current node and the target node according to the multi-neighborhood hybrid search mechanism. The bidirectional search module is used to obtain the planned path by adopting a bidirectional search strategy and adding a heuristic function for adjusting dynamic weight coefficients. The redundant inflection point removal module is used to apply a redundant inflection point removal strategy to the planned path, remove useless inflection points, and obtain the optimal path.
7. An electronic device, Its features are, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the mobile robot path planning method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the mobile robot path planning method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Mobile robot path planning method based on improved A-star algorithm
CN108253984A
Mobile robot path planning method based on A* algorithm and artificial potential field algorithm
CN111736611A
Mobile robot path planning method and system
CN113515127A