Three-dimensional path planning method and device for mobile robot based on improved ant colony algorithm
By improving the ant colony algorithm, combining hierarchical advancement with the grid plane method, and employing pseudo-random state transitions and reward/penalty mechanisms, the problem of slow convergence speed and low search efficiency of the traditional ant colony algorithm in 3D environments is solved, achieving more efficient path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SEVNCE ROBOTICS CO LTD
- Filing Date
- 2023-06-06
- Publication Date
- 2026-07-21
AI Technical Summary
Traditional ant colony algorithms are prone to getting stuck in local optima, have slow convergence speed, and low search efficiency when planning paths in 3D environments.
An improved ant colony algorithm is adopted, which combines hierarchical advancement and grid plane method. Pseudo-random state transition rules and dynamic selection factors are introduced. The next node is selected by pheromone concentration and expectation heuristic function. A reward and punishment mechanism is used to update the pheromone increment, thereby improving global search capability and convergence speed.
It improves the search efficiency and convergence speed of 3D path planning, enhances the robustness and adaptability of the algorithm, and is suitable for complex 3D environments.
Smart Images

Figure CN116820094B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence path planning technology, and in particular to a method and device for three-dimensional path planning of mobile robots based on an improved ant colony algorithm. Background Technology
[0002] Path planning is a key technology for mobile robots and a prerequisite for them to autonomously complete various tasks. Its task is to plan a collision-free optimal path from the starting point to the target point for the mobile robot, based on one or more indicators such as shortest distance, shortest time, and lowest energy consumption, given a known or partially known environment. Currently, extensive research has been conducted both domestically and internationally, and corresponding solutions have been proposed, such as the A* algorithm, artificial potential field method, genetic algorithm, particle swarm optimization algorithm, and neural network algorithm. Each algorithm has its own advantages; however, most research is based on two-dimensional spatial environments, which has limitations for complex and large-scale three-dimensional spaces. Furthermore, the difficulty of path planning increases due to the unique terrain of three-dimensional environments, making it difficult to achieve ideal results.
[0003] Ant colony optimization (ACO) is an intelligent optimization algorithm proposed by M. Dorigo et al., which simulates the foraging behavior of ants in nature. Ants secrete pheromones during foraging, and the amount of pheromone is inversely proportional to the length of the path traversed. At path nodes, ants tend to choose paths with higher pheromone levels. As the ant colony explores randomly, the pheromone value on the optimal path increases, eventually leading the entire colony to find the optimal path. Therefore, ACO has strong robustness and adaptability, achieving good results in solving three-dimensional path planning problems.
[0004] The quality of the environmental model directly affects the accuracy of the path planning algorithm. Therefore, reasonably abstracting and representing the three-dimensional environment is crucial for mobile robots to operate autonomously in a three-dimensional environment. In existing technologies, a grid method is used to extend two-dimensional space to three-dimensional space, as shown in Figure 1. A three-dimensional space ABCD-EFGH is constructed, with point A as the origin to establish a spatial coordinate system. The ABCD plane lies on the XOZ plane, and AE is extended along the Y-axis from the origin O. Divide AB into m equal parts along the X-axis and AD into m equal parts along the Z-axis. Divide into equal parts, that is, get There are 3 planes, each plane is divided into 10 planes. One grid. Thus, the ABCD-EFGH space can be obtained from... The space is represented by grids, and each grid corresponds to a path node. The ant colony algorithm then performs path planning, design, and simulation studies on these nodes.
[0005] However, the ant colony algorithm also has shortcomings in 3D spatial path planning, such as being prone to getting trapped in local optima and having a slow convergence speed. In the existing technology, the paper "A Study on 3D Path Planning of AGV Based on Improved Ant Colony Algorithm" (author Jin Xinxin, Computer Applications and Software, 2022, 39(07):275-280.) improves the basic ant colony algorithm by adding a tabu list to solve the 3D polyline path optimization problem. The improved ant colony algorithm can avoid getting trapped in local optima and can effectively improve the operation efficiency of AGV. However, the search efficiency of this algorithm is relatively low and its robustness is not strong. Summary of the Invention
[0006] To address the problems existing in the background technology, the traditional ant colony algorithm is prone to slow convergence speed, low search efficiency and getting trapped in local optima when performing path planning in a 3D environment. Therefore, a 3D path planning method and device for mobile robots based on an improved ant colony algorithm is proposed.
[0007] To achieve the above-mentioned objectives of the present invention, according to a first aspect of the present invention, the present invention provides a three-dimensional path planning method for a mobile robot based on an improved ant colony algorithm, comprising: step S1, establishing a grid-based three-dimensional working environment for the mobile robot, wherein each grid represents a path node, and selecting a starting node and a target node in the grid-based three-dimensional working environment; step S2, iteratively searching until the required number of iterations. Reaching the preset maximum number of iterations , , No. The next iteration search includes: Step S21, releasing all ants to the starting node, initializing the tabu list, and providing variables for dynamic selection. Assign a random value and calculate the dynamic selection factor. Step S22: Each ant selects the next node according to the following steps until it reaches the target node or a deadlock occurs: If The next node is selected based on the pheromone concentration between nodes and the expected heuristic function information. Step S23: Select the next node based on the transition probability between nodes; update the tabu list; Step S24: Discard the ants trapped in deadlock and use a reward and punishment mechanism to obtain the pheromone increment of the path traversed by the ants that successfully reach the target node; Step S25: Update the pheromone concentration of each path segment; Step S26: If... Then let Return to step S21 if ,from In each iteration, the shortest path to the target node is output.
[0008] To achieve the above-mentioned objectives of the present invention, according to a second aspect of the present invention, an electronic device is provided, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the mobile robot three-dimensional path planning method based on the improved ant colony algorithm described in the first aspect of the present invention.
[0009] To achieve the above-mentioned objectives of the present invention, according to a third aspect of the present invention, a mobile robot is provided, wherein the mobile robot is equipped with the electronic device described in the second aspect of the present invention, and the electronic device plans a three-dimensional path for the mobile robot.
[0010] The beneficial technical effects of this invention are as follows: For the path planning problem of mobile robots in a three-dimensional environment, a three-dimensional path planning method based on an improved ant colony algorithm is proposed, making the path of the mobile robot more consistent with actual application scenarios. In each iteration of the search, a pseudo-random state transition rule is used to select the next node, a dynamic selection factor is defined to adaptively change the next node selection strategy, and a distance parameter is introduced in the calculation of the next node transition probability, improving the algorithm's global search capability and search efficiency. Furthermore, the pheromone increment of the path is updated based on a reward and penalty mechanism, improving the algorithm's convergence speed. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the establishment of a grid-based 3D working environment in existing technology; Figure 2 This is a flowchart illustrating a three-dimensional path planning method for a mobile robot based on an improved ant colony algorithm in one embodiment of the present invention. Figure 3 This is a schematic diagram of a three-dimensional space search mode; Figure 4 This is a flowchart of the overall algorithm of the mobile robot three-dimensional path planning method based on the improved ant colony algorithm in an application scenario. Figure 5 This is a schematic diagram of the structure of an electronic device based on an improved ant colony algorithm for three-dimensional path planning of a mobile robot, according to an embodiment of the present invention. Detailed Implementation
[0012] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0013] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0014] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0015] This invention provides a three-dimensional path planning method for mobile robots based on an improved ant colony algorithm. In one embodiment, as follows: Figure 1 As shown, it includes: Step S1: Establish a grid-based 3D working environment for the mobile robot. Each grid represents a path node. Select the starting node and the target node within this grid-based 3D working environment. The established grid-based 3D working environment is as follows: Figure 1 As shown, the starting node is the spatial grid where the starting position coordinates are located, and the target node is the spatial grid where the target position coordinates are located.
[0016] In three-dimensional space, the expanded range of selectable nodes makes the algorithm search exceptionally complex and prone to deadlock, resulting in poor convergence and low global search performance. Therefore, a method such as... Figure 3 The search pattern shown combines layered advancement with the grid-plane method. The starting node of the mobile robot is set as... The target node is The X-axis is selected as the primary forward direction, and the maximum lateral movement distance of the robot is specified. Maximum longitudinal movement distance This means that there is a reachable region for the ant to search for the next node, and the set of grid nodes contained within this reachable region serves as the optional set of nodes for the next node. The ant first starts from the starting node... Starting from the first plane, search for an optional node. Then, a second optional node is found in the second plane. The ants sequentially select path nodes on each plane until they find the target point. Once finished, an optimal path will be found.
[0017] Step S1 also includes a sub-step to initialize the ant colony algorithm parameters, which include the grid pheromone concentration and the maximum number of iterations. ant count Information heuristic factor Expected heuristic factors pheromone volatility coefficient Taboo list and number of iterations . The initial value is 1. The tabu list is used to store nodes that ants cannot choose during pathfinding, such as known obstacle nodes and nodes that ants have already visited. The purpose of initializing the tabu list is to clear the nodes that ants have already visited.
[0018] Step S2, iterative search until the specified number of iterations. Reaching the preset maximum number of iterations , , No. The next iteration search includes: Step S21: Release all ants to the starting node, initialize the tabu list, and set up a dynamic selection variable. Assign a random value and calculate the dynamic selection factor. .
[0019] Step S22: Each ant selects the next node according to the following steps until it reaches the target node or a deadlock occurs, and records the path taken by the ants that successfully reach the target node: like The next node is selected based on the pheromone concentration between nodes and the expected heuristic function information. The next node is selected based on the transition probabilities between nodes; the tabu table is updated. In steps S22 and S23, pseudo-random state transition rules are used for path selection, and a dynamic selection factor is defined. By adaptively updating the selection ratio and strategy, the algorithm's global search capability and search efficiency are improved.
[0020] Step S23 discards the ants trapped in deadlock and uses a reward-penalty mechanism to obtain the pheromone increment of the paths taken by ants that successfully reach the target node, thus improving the algorithm's convergence speed. Ants trapped in deadlock are preferred, but not limited to, those that have not reached the target node.
[0021] Step S24: Update the pheromone concentration of each road segment.
[0022] Step S25, if Then let Return to step S21 if ,from In each iteration, the shortest path to the target node is output.
[0023] In this embodiment, more preferably, the dynamic selection factor is calculated in step S21 according to the following formula. : , .
[0024] In step S22, if , No. The next node of an ant index for: ; in, Indicates the first The set of possible nodes for the next node of an ant; Function representation in sets Find the expression in the middle. The optional node index for obtaining the maximum value; Indicates the current node The index; This represents a pre-defined information heuristic factor; This represents the pre-defined expected heuristic factor. Indicates the first The current node in the next iteration Optional nodes to the next node The pheromone concentration between them Indicates the first The current node in the next iteration Optional nodes to the next node The expected heuristic function information between them.
[0025] Preferably, ;in, Indicates the starting node Optional nodes to the next node The relative importance of Euclidean distance; Indicates the optional node for the next node. To the target node The relative importance of the reciprocal of the Euclidean distance; Indicates the current node Optional nodes to the next node The relative importance of the reciprocal of the Euclidean distance; For the first The starting node in the next iteration Optional nodes to the next node Euclidean distance; For the first The next node in the next iteration is a possible node. To the target node The reciprocal of the Euclidean distance; For the first The current node in the next iteration To the next node The reciprocal of the Euclidean distance.
[0026] ; starting node The three-dimensional position coordinates are Target node The three-dimensional position coordinates are Current node The three-dimensional position coordinates are The next node can be a potential node. The three-dimensional position coordinates are .
[0027] like Obtain the first number according to the following formula. In the nth iteration Only ants from the current node Move to node Transition probability: ; Based on the The current node of the ant Move to node The transition probability is selected by roulette wheel. The next node for an ant. .
[0028] in, Indicates the first The current node in the next iteration To the node The pheromone concentration between them Indicates the first The current node in the next iteration To the node The expected heuristic function information between them For reference The calculation formula is used to obtain it. , , , These are all indices of raster nodes in the raster 3D working environment. A distance parameter is introduced ( , , )calculate ,use Calculating the transition probability improves the algorithm's global search capability and search efficiency.
[0029] The value gradually decreases as the number of iterations increases, especially in the early stages of the algorithm. Larger values can improve the search efficiency of the algorithm in the initial stage, and in the later stages of the algorithm... Smaller values ensure the algorithm's global search capability. The value ensures that most ants rely on the transition probability to select nodes, thereby improving the algorithm's global search capability and search efficiency.
[0030] In another embodiment, step S23 involves using a reward and punishment mechanism to obtain the pheromone increment along the path traversed by the ant that successfully reaches the target node, including: Step S231: Obtain the average path length and optimal path of the ants that successfully reach the target node. Specifically, obtain the path length of all ants that successfully reach the target node, calculate the average of these path lengths to obtain the average path length, and select the path with the shortest path length as the optimal path.
[0031] Step S232, obtain the first Only ants that successfully reach the target node pass through the middle section of the path. Pheromones increment: If the first If only ants that successfully reach the target node have traversed the optimal path, then the path segment... By the The pheromone increase brought by a single ant is: (Update Formula 1); If the first If only ants successfully reach the target node, the path length traversed is greater than the optimal path length but less than the average path length, then the path segment... By the The pheromone increase brought by a single ant is: (Update Formula 2); If the first If only ants successfully reach the target node, and the length of their path is greater than the average path length, then the path segment... By the The pheromone increase brought by a single ant is: (Updated Formula 3); in, This represents the first constant that is greater than 0. This represents a second constant greater than 0. This represents a third constant that is greater than 0. , , , The preferred, but not limited, range of values is 0.1 to 10. Indicates the first The length of the path traversed by only the ants that successfully reach the target node. Indicates the preset pheromone intensity; Step S233: Superimpose the ants that successfully reached the target node on the road segment. The resulting increase in pheromones is obtained from the road segment In the Pheromones increment in the next iteration If there is Only the ants that successfully reached the target node traversed the route. Then we have: .
[0032] In this embodiment, after each iteration, ants trapped in deadlock are discarded, and the average path length of the paths taken by ants that successfully reach the target node is calculated. The pheromone increment on the path planned by the optimal ant is updated using update formula 1. For the optimal path, a pheromone concentration reward is given to enhance the guiding effect of the optimal solution on subsequent iterations. If the path length taken by an ant is greater than the optimal ant path length but less than the average path length, the pheromone increment on the ant's path is updated according to update formula 2. If the path length taken by an ant is greater than the average path length of this generation of ants, the pheromone increment on the ant's path is updated according to update formula 3. By penalizing poor solutions, the misleading effect of poor paths on subsequent iterations is reduced. After each iteration, the pheromone increment is first updated using the improved pheromone increment update formula, and then the pheromone concentration is updated using the global pheromone update formula, which accelerates the global convergence speed of the algorithm.
[0033] In another embodiment, the update of pheromone concentration is primarily used to simulate the accumulation and autonomous volatilization of natural ant pheromones over time. In traditional ant colony algorithms, the pheromone volatilization coefficient... It is a fixed constant, which is detrimental to ensuring the global search capability in the early stage of the algorithm and the fast convergence capability in the later stage. Therefore, in this embodiment, an adaptive pheromone evaporation coefficient is used to update the pheromone concentration in step S24. Step S24 includes: Step S241, calculate the first... The pheromone evaporation coefficient of the next iteration: ; in, This represents the minimum value of the preset pheromone evaporation coefficient. Indicates the first The pheromone evaporation coefficient of the next iteration; Step S242, Update road segment In the Pheromone concentration during iteration: ; in, Indicates road segment In the The pheromone concentration in the next iteration; Indicates the first The pheromone evaporation coefficient of the next iteration.
[0034] Regarding the pheromone evaporation coefficient Adopting an adaptive update strategy can guarantee the algorithm's global search capability in the early stages and improve the convergence speed in the later stages, ensuring path diversity while improving convergence speed. (Pheromone evaporation coefficient) It decreases monotonically with the number of iterations, and stops decreasing after reaching the minimum value.
[0035] In this embodiment, and more preferably, step S24 further includes: Step S243, the road segment In the Pheromone concentration during iteration The pheromone concentration is limited to a preset range. Let the pheromone concentration range be... , This indicates the lower limit of pheromone concentration. This indicates the upper limit of pheromone concentration, calculated using the following formula: Limited to the pheromone concentration range In this way, premature convergence and stagnation of the algorithm can be avoided: .
[0036] This embodiment defines an adaptive pheromone evaporation coefficient and limits the upper and lower limits of pheromone concentration, which improves the globality of the algorithm while also increasing the convergence speed.
[0037] In one application scenario of the mobile robot 3D path planning method based on the improved ant colony algorithm disclosed in this invention, Figure 4 The overall algorithm flowchart is shown, including: Step 1: Construct a 3D working environment and initialize ant colony algorithm parameters. This includes selecting the starting node. Target location node Initialization of grid pheromone concentration, and maximum number of algorithm iterations. ant count Information heuristic factor Expected heuristic factors pheromone volatility coefficient wait.
[0038] Step 2: Ant path selection, Only one ant was released at the starting point. Initialize the tabu list and calculate the expected heuristic function information of the next node's possible nodes.
[0039] Step 3: Select the next node using the random state transition rule and update the tabu list; determine whether an iteration has ended. If it has ended, proceed to Step 4; otherwise, continue executing Step 3.
[0040] Step 4: Update pheromone increments. After the first generation of ants completes the search, discard the ants that did not reach the target point. For the best ant, increase the pheromone increment on the path it traversed according to update formula 1. For the relatively good ants (path length is lower than the average path length of this generation of ants, but not the best ant), update the pheromone increment on the path it traversed according to update formula 2. For the poor ants (path length is greater than the average path length of this generation of ants), decrease the pheromone increment on the path it traversed according to update formula 3.
[0041] Step 5: Output the optimal path. Check if the current iteration count is equal to the maximum iteration count. If it is equal to the maximum iteration count, output the length of the optimal path and the algorithm ends. If it is less than the maximum iteration count, continue the next generation of iterations to find the optimal path, clear all nodes in the tabu list, and return to step 2 to execute the process in a loop until the current iteration count equals the maximum iteration count.
[0042] It should be noted that the mobile robot 3D path planning method and electronic device based on the improved ant colony algorithm provided by this invention are not limited to use on mobile robots, but can also be applied to mobile tools such as self-driving cars and sweeping robots.
[0043] The present invention also discloses an electronic device, in one embodiment of which the electronic device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the mobile robot three-dimensional path planning method based on the improved ant colony algorithm provided by the present invention.
[0044] like Figure 5The diagram shown is a schematic representation of an electronic device for implementing a mobile robot 3D path planning method based on an improved ant colony algorithm, according to an embodiment of the present invention. The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and executable on the processor 10, such as a program for a mobile robot 3D path planning method based on an improved ant colony algorithm.
[0045] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., executing image correction methods) and calls data stored in the memory 11 to perform various functions of the electronic device and process data.
[0046] The memory 11 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 11 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 11 can include both internal and external storage units of the electronic device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device, such as code for image correction methods, but also to temporarily store data that has been output or will be output.
[0047] The communication bus 12 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 11 and at least one processor 10, etc.
[0048] Communication interface 13 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), and optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.
[0049] Figure 5 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 5 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0050] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to at least one processor 10 via a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be elaborated further here.
[0051] It should be understood that the embodiments are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0052] Furthermore, if the modules / units integrated in electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, a computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0053] This invention also discloses a mobile robot equipped with the electronic device provided by this invention, which plans a three-dimensional path for the mobile robot. This electronic device is preferably, but not limited to, the central processor of the mobile robot, or a newly added processor.
[0054] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.
[0055] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0056] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.
[0057] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0058] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0059] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0060] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A three-dimensional path planning method for mobile robots based on an improved ant colony algorithm, characterized in that, include: Step S1: Establish a grid-based 3D working environment for the mobile robot. Each grid represents a path node. Select the starting node and the target node in the grid-based 3D working environment. Step S2: Iterate through the search until the number of iterations t reaches the preset maximum number of iterations. , The t-th iteration search includes: Step S21: Release all ants to the starting node, initialize the tabu list, assign a random value to the dynamic selection variable q, and calculate the dynamic selection factor. ; Current node Optional nodes to the next node The expected heuristic function information between them is: in, Indicates the starting node Optional nodes to the next node The relative importance of Euclidean distance; Indicates the optional node for the next node. To the target node The relative importance of the reciprocal of the Euclidean distance; Indicates the current node Optional nodes to the next node The relative importance of the reciprocal of the Euclidean distance; For the first The starting node in the next iteration Optional nodes to the next node Euclidean distance; For the first The next node in the next iteration is a possible node. To the target node The reciprocal of the Euclidean distance; For the first The current node in the next iteration Optional nodes to the next node The reciprocal of the Euclidean distance; Step S22: Each ant selects the next node according to the following steps until it reaches the target node or a deadlock occurs: like The next node is selected based on the pheromone concentration between nodes and the expected heuristic function information. Select the next node based on the transition probabilities between nodes; update the tabu list; Step S23: Discard the ants that are stuck in deadlock and use a reward and punishment mechanism to obtain the pheromone increment of the path taken by the ants that successfully reach the target node; Step S24: Update the pheromone concentration of each road segment; Step S241, calculate the pheromone evaporation coefficient for the (t+1)th iteration: in, This represents the minimum value of the preset pheromone evaporation coefficient. Indicates the first The pheromone evaporation coefficient of the next iteration; Step S242: Update the pheromone concentration of road segment (i,j) in the (t+1)th iteration based on the pheromone evaporation coefficient of the (t+1)th iteration; Step S25, if Then let t = t + 1, return to step S21, if ,from In each iteration, the shortest path to the target node is output.
2. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 1, characterized in that, In step S21, the dynamic selection factor is calculated according to the following formula. : 。 3. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 1 or 2, characterized in that, In step S22, if The next node of the k-th ant The index j is: ; in, The set of possible nodes for the next node after the k-th ant; the argmax() function represents the set of nodes that can be selected from the set. Find the expression in the middle. The optional node index for obtaining the maximum value; Indicates the current node The index; This represents a pre-defined information heuristic factor; This represents the pre-defined expected heuristic factor. Represents the current node in the t-th iteration. Optional nodes to the next node The pheromone concentration between them Represents the current node in the t-th iteration. Optional nodes to the next node The expected heuristic function information between them.
4. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 1, characterized in that, like The following formula is used to obtain the k-th ant from the current node in the t-th iteration. Move to node Transition probability: ; In the formula, Indicates the first The current node in the next iteration To the node The pheromone concentration between them This represents a pre-defined information heuristic factor. Indicates the first The current node in the next iteration To the node The expected heuristic function information between them This represents the pre-defined expected heuristic factor. This represents the index of a raster node in a raster 3D working environment. Indicates the first The set of possible nodes for the next node of an ant; Based on the current node of the k-th ant Move to node The transition probability is determined by using a roulette wheel to select the next node for the k-th ant.
5. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 1, 2, or 4, characterized in that, In step S23, the step of obtaining the pheromone increment along the path traversed by the ant that successfully reaches the target node using a reward and punishment mechanism includes: Step S231: Obtain the average path length and optimal path of the ants that successfully reach the target node; Step S232: Obtain the pheromone increment of the path segment (i,j) traversed by the kth ant that successfully reaches the target node: If the kth ant that successfully reaches the target node takes the optimal path, then the pheromone increment brought by the kth ant to the road segment (i,j) is: ; If the path length traversed by the kth ant that successfully reaches the target node is greater than the optimal path length and less than the average path length, then the pheromone increment brought to the road segment (i,j) by the kth ant is: ; If the path length of the kth ant that successfully reaches the target node is greater than the average path length, then the pheromone increment brought by the kth ant to the road segment (i,j) is: ; in, This represents the first constant that is greater than 0. This represents a second constant greater than 0. This represents a third constant that is greater than 0. , This represents the path length traversed by the k-th ant that successfully reaches the target node. Indicates the preset pheromone intensity; Step S233: Superimpose the pheromone increment brought by the ant that successfully reaches the target node in road segment (i,j) to obtain the pheromone increment of road segment (i,j) in the (t+1)th iteration. .
6. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 5, characterized in that, Step S24 includes: Step S242, update the pheromone concentration of road segment (i,j) in the (t+1)th iteration: ; in, This represents the pheromone concentration of road segment (i,j) in the t-th iteration; This represents the pheromone evaporation coefficient in the (t+1)th iteration. Indicates road segment In the The pheromone increment in the next iteration.
7. The mobile robot 3D path planning method based on the improved ant colony algorithm as described in claim 6, characterized in that, Step S24 also includes: Step S243: Set the pheromone concentration of road segment (i,j) in the (t+1)th iteration. It is limited to a preset pheromone concentration range.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the mobile robot three-dimensional path planning method based on the improved ant colony algorithm as described in any one of claims 1 to 7.
9. A mobile robot, characterized in that, The mobile robot is equipped with the electronic device as described in claim 8, which plans a three-dimensional path for the mobile robot.