A Robot Navigation Method and Device Based on Improved A Star-MMAS

By combining the A* algorithm with improved MMAS algorithm and optimizing the heuristic function and pheromone change strategy of MMAS, the problem of the A* algorithm being limited by the eight-field criterion and the ant colony algorithm being low in efficiency and poor convergence is achieved, and a more efficient and more stable robot path planning is achieved.

CN116380065BActive Publication Date: 2025-06-17XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310064396.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-13
Publication Date
2025-06-17
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

The existing A* algorithm is limited by eight-field criterion and cannot converge to the optimal path, and the generated path has many inflection points and large angles; the ant colony algorithm is low in efficiency and poor in convergence, making it difficult to balance the efficiency and local optimal problems.

Method used

A robot navigation method based on improved A STAR-MMAS is proposed. Combined with the A* algorithm and the improved MMAS algorithm, the inflection point of the initial path is extracted through the slope method as the search space of MMAS, and the heuristic function, transfer function and pheromone change strategy of MMAS are optimized.

Benefits of technology

It effectively solves the problem that the A* algorithm is limited by eight-field criteria, and generates shorter and smoother paths; at the same time, it improves the computational efficiency and convergence of the MMAS algorithm, and balances its efficiency with the local optimal balance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116380065B_ABST
    Figure CN116380065B_ABST
Patent Text Reader

Abstract

The present invention proposes a robot navigation method based on an improved A STAR-MMAS, which includes: representing the environment where the robot is located as a grid map and determining the positions of obstacles and safe areas; setting the initial position information of the robot and various parameter information; generating an initial path from the starting point to the ending point by using the A* algorithm; judging whether three points are collinear through the slope method, extracting all inflection points in the initial path and the two points before and after the inflection points to form a new point set; performing secondary path planning on the new point set by using the improved MMAS algorithm to obtain the finally planned path. By combining the A* algorithm and the MMAS algorithm and optimizing the heuristic function, transfer function and pheromone update function of the MMAS algorithm, the problem that the A* algorithm is limited by the eight-neighborhood and cannot converge to the optimal path and the generated path has many inflection points and large angles is effectively solved; at the same time, the calculation efficiency of the MMAS algorithm is improved, and its ability to jump out of the local optimum is enhanced, achieving the effect of balancing its convergence efficiency and local optimum balance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of path planning for intelligent robots, and particularly relates to a robot navigation method and device based on improved A STAR-MMAS. Background Art

[0002] In recent years, with the rapid growth of the demand for intelligence, mobile robots have been applied to various fields, such as logistics transportation, emergency rescue, etc. As one of the most important components of mobile robots, path planning has always attracted much attention. It mainly consists of two parts: global path planning and local path planning. Global path planning, as the basis of path planning, affects the overall effect of robot tracking; local path planning is the basic requirement for the safe movement and task execution of robots, which can ensure the safety and stability during the navigation of mobile robots.

[0003] Currently, there are many mature global path algorithms that can generate paths, such as the A* algorithm, Ant Colony Optimization (ACO), Particle Swarm Optimization (PSO), etc. However, in path planning, not only the length but also the smoothness, efficiency, and robustness of the algorithm need to be considered. Most algorithms cannot meet all these requirements simultaneously. For example, although the A* algorithm can quickly generate a path, its output is not optimal and has many inflection points; similarly, the ACO algorithm can generate the shortest path, but it is inefficient and has a slow convergence speed. In addition, the ant colony algorithm has a certain randomness, which will lead to the instability of its path generation and even cause the problem of local optimality; finally, the initial values of the particle swarm algorithm are randomly generated, which also greatly affects the robustness and stability of the algorithm. Therefore, there is still a large room for research and improvement in global path planning algorithms.

[0004] Currently, there are many studies on improving the A* algorithm and the ant colony algorithm, but they are still insufficient. First of all, the current research on the A* algorithm mainly focuses on improving its heuristic function. However, the biggest problem with the A* algorithm is the limitation of the eight-neighborhood criterion, which not only increases the path length but also restricts the robot's movement to only eight directions. Due to the existence of the eight-neighborhood criterion, the path (blue path) generated by the A* algorithm is significantly longer than the black path that breaks through the limitation. Therefore, to better improve the performance of the A* algorithm, one should not only start from the heuristic function but more importantly, from how to handle the eight-neighborhood criterion. In addition, in terms of the ant colony algorithm, current research mostly only focuses on the efficiency or convergence issues of the ant colony algorithm. However, as the complexity of the map increases, due to the expansion of the search space, the efficiency of the ant colony algorithm will slow down, and its convergence will also be greatly affected. Therefore, when improving the ant colony algorithm, both aspects should be considered simultaneously to achieve a balance between the two, which can not only improve the efficiency of the algorithm but also optimize its convergence characteristics.

[0005] In view of this, it is very meaningful to propose a robot navigation method and its device based on improved A STAR-MMAS. Summary of the Invention

[0006] In order to solve the problems that the existing A* algorithm is limited by the eight-neighborhood criterion and cannot converge to the optimal path, and the generated path has many inflection points and large angles, as well as to enhance the computational efficiency of the MMAS algorithm and its ability to jump out of local optima, and to solve the problems such as the balance between the convergence efficiency and local optima of MMAS, the present invention provides a robot navigation method and its device based on improved A STAR-MMAS, specifically relating to a global path planning method and its device based on improved A*-Max-Min Ant System (MMAS) to solve the above-mentioned existing technical defect problems.

[0007] In the first aspect, the present invention proposes a robot navigation method based on improved A STAR-MMAS, and this method includes the following steps:

[0008] Represent the environment where the robot is located as a grid map, and determine the positions of obstacles and safe areas;

[0009] Set the initial position information and various parameter information of the robot;

[0010] Use the A* algorithm to generate an initial path from the starting point to the ending point;

[0011] Judge whether three points are collinear by the slope method, so as to extract all the inflection points in the initial path and the two points before and after the inflection points, and form a new point set;

[0012] Use the improved MMAS algorithm to perform secondary path planning on the new point set to obtain the finally planned path.

[0013] Preferably, the slope method is used to determine whether the three points are collinear, so as to extract all the inflection points in the initial path and the two points before and after the inflection points to form a new point set, which specifically includes:

[0014] Select any three nodes in the initial path generated by the A* algorithm to determine whether the three points are collinear using the slope method. The three points are recorded as A(x1, y1), B(x2, y2) and C(x3, y3).

[0015] Use the slope formula to calculate the slope K of points AB and BC;

[0016] If k AB =k BC , then points A, B, and C are collinear, remove point B; if k AB ! =k BC , it means that point B is an inflection point, and the path point before and after point B is added to the new point set P;

[0017] Further traverse all nodes in the path, remove points on the same straight line, and obtain a new point set P consisting of the starting point, end point, inflection point, and its previous path points and subsequent path points;

[0018] The slope K is calculated as follows:

[0019]

[0020] Further preferably, the improved MMAS algorithm is used to perform secondary path planning on the new point set to obtain the final planned path, which specifically includes:

[0021] Calculate the distance between each point in the new point set P to form a distance matrix D, calculate the distance from each point in the new point set P to the end point to form a vector E, and calculate the contemporary maximum pheromone τ max and the minimum pheromone τ min , finally initialize the initial pheromone matrix and set the fixed parameters in the MMAS algorithm;

[0022] Place m ants at the starting point S and start this iteration;

[0023] Through the matrix D, we can get the distance between the ant's current position i and the next candidate position j as D ij , through vector E, we can get the distance between the current position i and the end point G as E i , and obtain the expected heuristic information through calculation;

[0024] The node reverse learning formula is further used to calculate the pheromone value in the selection strategy and calculate the transition probability;

[0025] Randomly select a candidate grid j according to the calculated transfer probability;

[0026] Judge whether all m ants have completed traversal. If so, end this iteration and continue to the next step to update the pheromone matrix according to the preset adaptive update strategy; otherwise, continue this iteration;

[0027] Judge whether all the loop times have been completed. If so, output the final path; otherwise, continue the next loop.

[0028] Further preferably, the contemporary maximum pheromone τ max and the minimum pheromone τ min are calculated as follows:

[0029]

[0030]

[0031] where ρ represents the rate of pheromone evaporation; L gb is the length of the current optimal path; avg = M / 2, where M is the preset total number of ants; p dec represents the probability of selecting the corresponding solution component at the selection point; p best represents the probability of finding the best solution when MMAS converges.

[0032] Further preferably, the formula for calculating the expected heuristic information is as follows:

[0033]

[0034] Further preferably, the formula for calculating the pheromone value in the selection strategy is as follows:

[0035]

[0036] The formula for calculating the transfer probability is as follows:

[0037]

[0038] where τ is the pheromone matrix of the current loop; is the set of feasible nodes around node i for ant k; λ0 and λ respectively represent the preset reverse learning rate and random number.

[0039] Further preferably, the formula for updating the pheromone by the preset adaptive update strategy is as follows:

[0040] τ ij (t + 1) = (1 - ρ)τ ij (t) + Δτ ij (t)

[0041]

[0042] Among them, Δτ ij (t) represents the pheromone deposition amount on the path between point i and point j at the midpoint of the t-th iteration, and is composed of and as follows:

[0043]

[0044]

[0045]

[0046] Among them, and respectively represent the pheromone amounts accumulated by the elite ants and ordinary ants on the path between node i and node j at iteration t; Q represents a fixed constant in the ant colony algorithm; m best and N(L ib ) represent the number of elite ants and the number of consecutive occurrences of the best length in this iteration; P r k (0 < P r k < 1) is a uniformly random number, which is calculated by the Metropolis criterion:

[0047]

[0048] L k and L ib represent the length of the path of the k-th ant and the current optimal length.

[0049] In a second aspect, an embodiment of the present invention further provides a robot navigation device based on an improved A STAR-MMAS. The device specifically includes:

[0050] A grid map module, configured to represent the environment where the robot is located as a grid map and determine the positions of obstacles and safe areas;

[0051] A setting module, configured to set the initial position information and various parameter information of the robot;

[0052] An A* algorithm module, configured to generate an initial path from the starting point to the ending point by using the A* algorithm;

[0053] A judgment module, configured to judge whether three points are collinear by the slope method, so as to extract all inflection points and the two points before and after the inflection points in the initial path, and form a new point set;

[0054] The MMAS algorithm module is used to perform secondary path planning on the new point set using the improved MMAS algorithm to obtain the finally planned path.

[0055] In a third aspect, an embodiment of the present invention provides an electronic device, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner of the first aspect.

[0056] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.

[0057] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0058] (1) The present invention proposes a robot navigation algorithm based on improved A STAR-MMAS, which integrates the advantages of the A* algorithm and MMAS; first, the A* algorithm is used to quickly generate an initial path, and then, the inflection points of the initial path are extracted as the search space of MMAS to improve efficiency; in addition, to improve the convergence performance of MMAS, a new heuristic function, transfer function, and pheromone change strategy are proposed; this not only enables the A* algorithm to break out of the limitation of the eight-neighborhood criterion but also optimizes the efficiency and convergence of MMAS. The robot navigation algorithm based on improved A STAR-MMAS can generate a shorter and smoother path more quickly.

[0059] (2) The present invention combines the A* algorithm and the MMAS algorithm, and optimizes the heuristic function, transfer function, and pheromone update function of the MMAS algorithm, effectively solving the problems that the A* algorithm is limited by the eight-neighborhood and cannot converge to the optimal path, and the generated path has many inflection points and large angles; at the same time, it effectively improves the calculation efficiency of the MMAS algorithm and enhances its ability to jump out of the local optimum problem, achieving the effect of balancing its convergence efficiency and local optimum balance. Description of the Drawings

[0060] The drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The drawings illustrate the embodiments and, together with the description, are used to explain the principles of the present invention. Other embodiments and many of the expected advantages of the embodiments will be readily recognized, as they become better understood by reference to the following detailed description. The elements of the drawings are not necessarily to scale with each other. The same reference numerals refer to corresponding similar components.

[0061] Figure 1 It is an exemplary device architecture diagram to which an embodiment of the present invention can be applied;

[0062] Figure 2 Schematic diagram of the process of the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0063] Figure 3 Overall process schematic diagram of the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0064] Figure 4 Comparison diagram of the shortest path generated by the traditional A* algorithm and the actual shortest path in the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0065] Figure 5 Schematic diagram of the description of the robot running environment in the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0066] Figure 6 Map information used in the simulation in the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0067] Figure 7 Simulation comparison diagram of the paths generated by improved A*-MMAS and other algorithms in the robot navigation method based on improved A STAR-MMAS according to an embodiment of the present invention;

[0068] Figure 8 Schematic diagram of the process of the robot navigation device based on improved A STAR-MMAS according to an embodiment of the present invention;

[0069] Figure 9 Schematic diagram of the structure of the computer device of the electronic device suitable for implementing the embodiment of the present invention. Detailed implementation manners

[0070] In the following detailed description, reference is made to the accompanying drawings, which form a part of the detailed description and illustrate illustrative specific embodiments in which the present invention may be practiced. In this regard, directional terms such as "top", "bottom", "left", "right", "up", "down", etc. are used with reference to the orientation of the described figures. Since the components of the embodiments may be positioned in several different orientations, the directional terms are used for purposes of illustration and are in no way limiting. It should be understood that other embodiments may be utilized or logical changes may be made without departing from the scope of the present invention. Accordingly, the following detailed description should not be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.

[0071] It should be understood that Figure 1The numbers of the terminal devices, networks, and servers in [it] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers.

[0072] Figure 1 FIG. 100 shows an exemplary system architecture for a method of processing information or an apparatus for processing information to which embodiments of the present invention can be applied.

[0073] As Figure 1 shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0074] Users may use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0075] The terminal devices 101, 102, 103 may be various electronic devices having communication functions, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.

[0076] The server 105 may be a server that provides various services, such as a background information processing server that processes the verification request information sent by the terminal devices 101, 102, 103. The background information processing server may analyze and process the received verification request information and obtain a processing result (such as verification success information indicating that the verification request is a legal request).

[0077] It should be noted that the method for processing information provided by the embodiments of the present invention is generally executed by the server 105. Correspondingly, the apparatus for processing information is generally disposed in the server 105. Additionally, the method for sending information provided by the embodiments of the present invention is generally executed by the terminal devices 101, 102, 103. Correspondingly, the apparatus for sending information is generally disposed in the terminal devices 101, 102, 103.

[0078] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., for providing distributed services), or as a single software or multiple software modules, and no specific limitation is made here.

[0079] Currently, there are many studies on improving the A* algorithm and the ant colony algorithm, but they are still insufficient. First, the current research on the A* algorithm mainly focuses on improving its heuristic function. However, the biggest problem with the A* algorithm is the limitation of the eight-neighborhood criterion, which not only increases the path length but also restricts the movement of the robot to only eight directions, as Figure 4 shown. Due to the existence of the eight-neighborhood criterion, the path (blue path) generated by the A* algorithm is significantly longer than the black path that breaks through the limitation. Therefore, to better improve the performance of the A* algorithm, one should not only start from the heuristic function but more importantly from how to handle the eight-neighborhood criterion. In addition, in terms of the ant colony algorithm, current research mostly only focuses on the efficiency problem or the convergence problem of the ant colony algorithm. However, with the increase in map complexity, due to the expansion of the search space, the efficiency of the ant colony algorithm will slow down and its convergence will also be greatly affected. Therefore, when improving the ant colony algorithm, both aspects should be considered simultaneously to achieve a balance between the two, which can not only improve the efficiency of the algorithm but also optimize its convergence characteristics.

[0080] Figure 2 The embodiments of the present invention disclose a robot navigation method based on improved A STAR-MMAS, as Figure 2 and Figure 3 shown. The method includes the following steps:

[0081] S1. Represent the environment where the robot is located as a grid map and determine the positions of obstacles and safe areas;

[0082] Specifically, the working environment of the mobile robot is described as an M×N (M and N can be equal) equally spaced grid map, and each grid is located at a coordinate point, as Figure 5 shown. On the map, static obstacles with known positions and shapes are represented by black grids, free grids are represented by white grids, and the starting position and the ending position are respectively represented by green grids and red grids through pre-random setting. In addition, to avoid accidental collisions, a high-risk area is set around the obstacles, such as Figure 5 the yellow grids shown. The high-risk area should be avoided as much as possible, but in necessary cases, the robot is allowed to pass through. The mobile robot is regarded as a particle and moves at a fixed speed.

[0083] S2. Set the initial position information and various parameter information of the robot;

[0084] Specifically, the robot pre-randomly sets the starting position and ending position and map information such as Figure 6 shown.

[0085] S3, using the A* algorithm to generate an initial path from the starting point to the end point;

[0086] S4, judging whether the three points are collinear by the slope method, thereby extracting all the turning points in the initial path and the two points before and after the turning points to form a new point set;

[0087] Furthermore, in order to deal with the problem that the A* algorithm is restricted by eight fields, in S4, the slope method is used to filter out the path point set that can be directly connected on the map from the initial path generated by the A* algorithm. On the one hand, it is ensured that the connected path will not pass through obstacles, that is, the path is valid; on the other hand, the redundant path points in the path generated by the A* algorithm are removed, which effectively reduces the search space of the MMAS algorithm and improves the efficiency of the MMAS algorithm. In this embodiment, it specifically includes:

[0088] S41, selecting any three nodes in the initial path generated by the A* algorithm to determine whether the three points are collinear by using the slope method, and the three points are respectively recorded as A(x1, y1), B(x2, y2) and C(x3, y3);

[0089] S42, using the slope formula to calculate the slope K of points AB and BC;

[0090] The slope K is calculated as follows:

[0091]

[0092] S43, if k AB =k BC , then points A, B, and C are collinear, remove point B; if k AB ! =k BC , it means that point B is an inflection point, and the path point before and after point B is added to the new point set P;

[0093] S44. Traverse all nodes in the path according to S41-S43, remove points on the same straight line, and obtain a new point set P consisting of the starting point, the end point, the turning point, and the previous path points and the next path points.

[0094] S5. Use the improved MMAS algorithm to perform secondary path planning on the new point set to obtain the final planned path.

[0095] Further, in S5, to enhance the computational efficiency of the MMAS algorithm and its ability to jump out of local optima, and to solve the balance problem between the convergence efficiency and local optima of MMAS, the model of MMAS is improved, and a new heuristic function, transfer function, and pheromone update strategy are proposed.

[0096] In the present invention, by combining the A* algorithm with MMAS, the problem that the A* algorithm is restricted by the eight-neighborhood is addressed, and the search space of MMAS is effectively reduced. In addition, to enhance the computational efficiency of the MMAS algorithm and its ability to jump out of local optima, and to solve the balance problem between the convergence efficiency and local optima of MMAS, the model of MMAS is improved, and its heuristic function, transfer function, and pheromone change strategy are optimized. The specific new MMAS model and the quadratic programming method are as follows:

[0097] S51. Calculate the distances between the points in the obtained new point set P to form a distance matrix D, calculate the distances from each point in the new point set P to the end point to form a vector E, and calculate the maximum pheromone τ of the current generation max and the minimum pheromone τ min , and finally initialize the initial pheromone matrix and set the fixed parameters in the MMAS algorithm;

[0098] Specifically, the calculation formulas for the maximum pheromone τ of the current generation max and the minimum pheromone τ min are as follows:

[0099]

[0100]

[0101] where ρ represents the rate of pheromone evaporation; L gb is the length of the current optimal path; avg = M / 2, where M is the preset total number of ants; p dec represents the probability of selecting the corresponding solution component at the selected point; p best represents the probability of finding the best solution when MMAS converges.

[0102] S52. Place m ants at the starting point S and start this iteration;

[0103] S53. Through the matrix D, the distance between the current position i of the ant and the next candidate position j can be obtained as D ij , and through the vector E, the distance between the current position i and the end point G can be obtained as E i , and the expected heuristic information is calculated;

[0104] The formula for calculating the expected heuristic information is as follows:

[0105]

[0106] S54. Further, use the node reverse learning formula to calculate the pheromone value in the selection strategy and calculate the transition probability;

[0107] The formula for calculating the pheromone value in the selection strategy is as follows:

[0108]

[0109] The formula for calculating the transition probability is as follows:

[0110]

[0111] Among them, τ is the pheromone matrix of the current cycle; is the set of feasible nodes around node i for ant k; λ0 and λ respectively represent the preset reverse learning rate and random number.

[0112] S55. Randomly select a candidate grid j according to the calculated transition probability;

[0113] S56. Determine whether all m ants have completed traversal. If so, end this iteration, jump to S57, and update the pheromone matrix according to the preset adaptive update strategy; otherwise, jump to S53 to continue this iteration;

[0114] S57. Calculate and update the pheromone according to the calculation formula of the pheromone updated by the adaptive update strategy;

[0115] The calculation formula for updating the pheromone by the preset adaptive update strategy is as follows:

[0116] τ ij (t + 1) = (1 - ρ)τ ij (t) + Δτ ij (t)

[0117]

[0118] Among them, Δτ ij (t) represents the pheromone deposition amount on the path from point i to point j in the t-th iteration, which is composed of and as shown in the following three formulas:

[0119]

[0120]

[0121]

[0122] Among them, and respectively represent the amounts of pheromone accumulated by the elite ants and ordinary ants on the path between node i and node j at iteration t; Q represents a fixed constant in the ant colony algorithm; m best and N(L ib ) represent the number of elite ants and the number of consecutive occurrences of the best length in this iteration; P r k (0 < P r k < 1) is a uniformly random number, which is calculated by the Metropolis criterion:

[0123]

[0124] L k and L ib represent the length of the path of the k-th ant and the current optimal length respectively.

[0125] S58. Determine whether all the loop times are completed. If so, output the final path; otherwise, jump to S51 to continue the next loop.

[0126] Finally, Figure 6 generate the corresponding optimal path on the map introduced above, and the final effect is as Figure 7 shown.

[0127] By combining the A* algorithm and the MMAS algorithm, and optimizing the heuristic function, transfer function and pheromone update function of the MMAS algorithm, the present invention effectively solves the problems that the A* algorithm is limited by the eight-neighborhood and cannot converge to the optimal path, and the generated path has many inflection points and large angles; at the same time, it effectively improves the calculation efficiency of the MMAS algorithm and enhances its ability to jump out of the local optimum, achieving the effect of balancing its convergence efficiency and local optimum balance.

[0128] In the second aspect, the embodiment of the present invention also discloses a robot navigation device based on the improved A STAR-MMAS, as Figure 8 shown, the device specifically includes: a grid map module 81, a setting module 82, an A* algorithm module 83, a judgment module 84 and an MMAS algorithm module 85.

[0129] In a more specific embodiment, a grid map module 81 is configured to represent the environment where the robot is located as a grid map and determine the positions of obstacles and safe areas; a setting module 82 is configured to set the initial position information and various parameter information of the robot; an A* algorithm module 83 is configured to generate an initial path from a starting point to an ending point by using the A* algorithm; a judgment module 84 is configured to judge whether three points are collinear by using the slope method, so as to extract all inflection points and two points before and after the inflection points in the initial path to form a new point set; an MMAS algorithm module 85 is configured to perform secondary path planning on the new point set by using an improved MMAS algorithm to obtain a finally planned path.

[0130] Reference is now made to Figure 9 , which shows a schematic structural diagram of a computer device 900 suitable for use in implementing an embodiment of the present invention (such as Figure 1 the server or terminal device shown). Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.

[0131] As Figure 9 shown, the computer device 900 includes a central processing unit (CPU) 901 and a graphics processing unit (GPU) 902, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 903 or a program loaded from a storage section 909 into a random access memory (RAM) 906. In the RAM 904, various programs and data required for the operation of the device 900 are also stored. The CPU 901, GPU 902, ROM 903, and RAM 904 are connected to each other via a bus 905. An input / output (I / O) interface 906 is also connected to the bus 905.

[0132] The following components are connected to the I / O interface 906: an input portion 907 including a keyboard, a mouse, etc.; an output portion 908 including, for example, a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 909 including a hard disk, etc.; and a communication portion 910 including a network interface card such as a LAN card, a modem, etc. The communication portion 910 performs communication processing via a network such as the Internet. A drive 911 may also be connected to the I / O interface 906 as needed. A removable medium 912, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 911 as needed so that a computer program read from it can be installed into the storage portion 909 as needed.

[0133] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 910 and / or installed from the removable medium 912. When the computer program is executed by the central processing unit (CPU) 901 and the graphics processing unit (GPU) 902, the above-mentioned functions defined in the methods of the present invention are executed.

[0134] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium, a computer-readable medium, or any combination of the two. The computer-readable medium can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, apparatuses, or components, or any combination of the above. More specific examples of the computer-readable medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution device, apparatus, or component. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution device, apparatus, or component. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0135] Computer program code for performing the operations of the present invention may be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through 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., through the Internet using an Internet service provider).

[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of apparatuses, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based device that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0137] The modules described in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor.

[0138] As another aspect, the present invention also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is caused to: represent the environment where the robot is located as a grid map and determine the positions of obstacles and safe areas; set the initial position information and various parameter information of the robot; generate an initial path from the starting point to the ending point by using the A* algorithm; determine whether three points are collinear by the slope method, so as to extract all inflection points and the two points before and after the inflection points in the initial path to form a new point set; perform secondary path planning on the new point set by using the improved MMAS algorithm to obtain the finally planned path.

[0139] The above description is only the preferred embodiments of the present invention and the description of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the present invention is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present invention.

Claims

1. A robot navigation method based on improved A STAR-MMAS, characterized in that, The method includes the following steps: Represent the environment where the robot is located as a grid map, and determine the positions of obstacles and safe areas; Set the initial position information and various parameter information of the robot; Use the A* algorithm to generate an initial path from the starting point to the ending point; Judge whether three points are collinear by the slope method, so as to extract all inflection points and the two points before and after the inflection points in the initial path, and form a new point set; Use the improved MMAS algorithm to perform secondary path planning on the new point set to obtain the finally planned path, specifically including: calculating the distances between the points in the obtained new point set P to form a distance matrix D, calculating the distances from each point in the new point set P to the end point to form a vector E, and calculating the maximum pheromone τ in the current generation max and the minimum pheromone τ min , and finally initializing the initial pheromone matrix and setting the fixed parameters in the MMAS algorithm; Place m ants at the starting point S and start this iteration; The distance between the current position i of the ant and the next candidate position j can be obtained through the matrix D as D ij , the distance between the current position i and the end point G can be obtained through the vector E as E i , and the expected heuristic information is obtained through calculation; Further calculate the pheromone value in the selection strategy using the node reverse learning formula, and calculate the transition probability; Randomly select a candidate grid j according to the calculated transition probability; Judge whether all m ants have completed traversal. If so, end this iteration and continue the next step to update the pheromone matrix according to the preset adaptive update strategy; otherwise, continue this iteration; Judge whether all loop times have been completed. If so, output the final path; otherwise, continue the next loop.

2. The robot navigation method based on improved A STAR-MMAS according to claim 1, characterized in that, Judge whether three points are collinear by the slope method, so as to extract all inflection points and the two points before and after the inflection points in the initial path, and form a new point set, specifically including: Select any three nodes in the initial path generated by the A* algorithm to judge whether three points are collinear by the slope method. The three points are denoted as A(x1, y1), B(x2, y2) and C(x3, y3) respectively; Calculate the slopes K of points A and B and points B and C using the slope formula; If k AB = k BC , then points A, B, and C are collinear, and point B is removed; if k AB != k BC , it indicates that point B is an inflection point, and the path point before point B and the path point after it are added to the new point set P; Further traverse all nodes in the path, eliminate the points located on the same straight line, and obtain a new point set P composed of the starting point, the ending point, the inflection points, and the path points before and after them; Among them, the slope K calculation formula is as follows:

3. The robot navigation method based on improved A STAR-MMAS according to claim 2, characterized in that, The contemporary maximum pheromone τ max and the minimum pheromone τ min are calculated as follows: Among them, ρ represents the rate of pheromone evaporation; L gb is the length of the current optimal path; avg = M / 2, where M is the preset total number of ants; p dec represents the probability of selecting the corresponding solution component at the selected point; p best represents the probability of finding the best solution when MMAS converges.

4. The robot navigation method based on improved A STAR-MMAS according to claim 3, characterized in that, The formula for calculating the expected heuristic information is as follows:

5. The robot navigation method based on improved A STAR-MMAS according to claim 4, characterized in that, The formula for calculating the pheromone value in the selection strategy is as follows: The formula for calculating the transition probability is as follows: where τ is the pheromone matrix of the current iteration; is the set of feasible nodes around node i for ant k; λ0 and λ respectively represent the preset reverse learning rate and random number.

6. The robot navigation method based on the improved A STAR-MMAS according to claim 5, wherein, The calculation formula for updating the pheromone by the preset adaptive update strategy is as follows: τ ij (t + 1) = (1 - ρ)τ ij (t) + Δτ ij (t) Among them, Δτ ij (t) represents the pheromone deposition amount on the path between point i and point j at the t-th iteration, which consists of and as follows: Among them, and respectively represent the amounts of pheromone accumulated by the elite ant and the ordinary ant on the path between node i and node j at iteration t; Q represents a fixed constant in the ant colony algorithm; m best and N(L ib ) represent the number of elite ants and the number of consecutive occurrences of the best length in this iteration; is a uniformly distributed random number, which is calculated through the Metropolis criterion: L k and L ib represent the length of the path of the k-th ant and the current optimal length, respectively.

7. A robot navigation device based on the improved A STAR-MMAS, wherein, Based on the method described in any one of claims 1 to 6, the device specifically includes: A grid map module, which is used to represent the environment where the robot is located as a grid map, and determine the positions of obstacles and safe areas; A setting module, which is used to set the initial position information and various parameter information of the robot; An A* algorithm module, which is used to generate an initial path from the starting point to the ending point using the A* algorithm; A judgment module, which is used to judge whether three points are collinear by the slope method, so as to extract all inflection points and the two points before and after the inflection points in the initial path, and form a new point set; The MMAS algorithm module is used to perform secondary path planning on the new point set using the improved MMAS algorithm to obtain the finally planned path, specifically including: calculating the distances between the points in the obtained new point set P to form a distance matrix D, calculating the distances from each point in the new point set P to the end point to form a vector E, and calculating the maximum pheromone τ of the current generation max and the minimum pheromone τ min , and finally initializing the initial pheromone matrix and setting the fixed parameters in the MMAS algorithm; Place m ants at the starting point S and start this iteration; The distance between the current position i of the ant and the next candidate position j can be obtained through the matrix D as D ij , and the distance between the current position i and the end point G can be obtained through the vector E as E i , and the expected heuristic information can be obtained through calculation; Further calculate the pheromone value in the selection strategy using the node reverse learning formula, and calculate the transition probability; Randomly select a candidate grid j according to the calculated transition probability; Judge whether all m ants have completed traversal. If so, end this iteration and continue the next step to update the pheromone matrix according to the preset adaptive update strategy; otherwise, continue this iteration; Judge whether all loop times have been completed. If so, output the final path; otherwise, continue the next loop.

8. An electronic device, comprising: One or more processors; A storage device, which is used to store one or more programs; When the one or more programs are executed by the one or more processors such that the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, on which a computer program is stored, wherein, When the program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Parking AGV path planning method based on improved ant colony algorithm

    CN111289007A

  • Mobile robot path planning method based on improved ant colony algorithm

    CN112650229A