Robot path optimization method based on RRT algorithm and particle swarm algorithm and related device
By combining RRT and particle swarm optimization, the robot's path planning is optimized to generate a high-quality, smooth path away from obstacles, solving the problem of poor path quality in existing technologies and improving the robot's mobility efficiency and dynamic response capabilities in complex environments.
Patent Information
- Application Number
- CN202511099953.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-08-07
AI Technical Summary
The paths generated by existing RRT algorithms in complex environments are of poor quality, with repetitions and twists, resulting in low robot movement efficiency, increased energy consumption, and limited adaptability to dynamic obstacles.
Combining the RRT algorithm and particle swarm optimization, the initial path is generated by obtaining the target path task, the local feature vector of the path segment is extracted, and a comprehensive score analysis is performed to generate a set of critical path segments. The path individuals are generated using Gaussian perturbation, the path fitness is optimized in stages, and the optimized path is finally output.
The quality of the path and the robot's mobility efficiency in complex environments are improved, the ability to cope with dynamic obstacles is enhanced, the generated path is smoother and away from obstacles, and it adapts to the planning needs of different environmental complexities.
Smart Images

Figure CN120609362A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot path planning, and in particular to a robot path optimization method based on an RRT algorithm and a particle swarm algorithm and related devices. Background Art
[0002] With the rapid development of intelligent manufacturing, automation, and robotics, mobile robots are increasingly being used in fields such as logistics, healthcare, and industrial manufacturing. The demand for path planning in complex environments is also increasing. Achieving efficient, safe, and dynamic obstacle-aware path planning in these environments has become a key technology in the design of modern mobile robotics. Among existing path planning technologies, the Rapidly Exploring Random Tree (RRT) algorithm and its improved RRT algorithm offer a series of highly implementable planning algorithms. These algorithms leverage random trees to find feasible paths in complex, high-dimensional environments, providing basic mobility capabilities. However, the paths generated by these algorithms are suboptimal in terms of path quality. RRT-based paths often exhibit significant repetition, tortuosity, and unplanned nature, resulting in low robot mobility efficiency, high oscillation, and increased energy consumption. Furthermore, RRT-based algorithms have limited adaptability to dynamic obstacles and unexpected situations in the environment. Unexplored obstacles can easily lead to complete replanning of the path, resulting in reduced efficiency. Summary of the Invention
[0003] The present invention provides a robot path optimization method and related devices based on the RRT algorithm and the particle swarm algorithm, which are used to solve the technical problem that the path quality generated by the existing robot path planning method in complex environments is poor.
[0004] The present invention provides a robot path optimization method based on RRT algorithm and particle swarm algorithm, the method comprising:
[0005] Obtaining a target path task of the robot, and generating an initial path according to the target path task based on the RRT algorithm;
[0006] Extracting local feature vectors of each path segment in the initial path, and performing comprehensive scoring analysis on the local feature vectors of each path segment to determine a critical path segment set;
[0007] Generate multiple path individuals according to the Gaussian perturbation of the critical path segment set, and calculate the path fitness of each path individual; sort the path individuals in descending order according to the path fitness to obtain particle swarms in multiple fitness intervals;
[0008] The particle swarms in different fitness intervals are optimized in the corresponding exploration phase, development phase and equilibrium phase to obtain new path individuals and calculate the path fitness of the new path individuals; the new path individuals are sorted in descending order according to the path fitness to obtain new particle swarms in multiple fitness intervals;
[0009] When the number of iterations does not reach the predetermined number of cycles, the process jumps to the step of optimizing the particle swarms in different fitness intervals in the corresponding exploration phase, development phase, and equilibrium phase, optimizing to obtain new path individuals and calculating the path fitness of the new path individuals; when the number of iterations reaches the preset threshold, the path individual with the best path fitness in the entire iterative process is selected as the target path individual and output.
[0010] Optionally, the step of extracting the local feature vector of each path segment in the initial path, performing comprehensive scoring analysis on the local feature vector of each path segment, and determining the critical path segment set includes:
[0011] Extracting segment length features, curvature features, and obstacle distance features of each path segment in the initial path;
[0012] Performing a comprehensive scoring analysis on the segment length characteristics, curvature characteristics, and obstacle distance characteristics of each path segment based on a preset comprehensive scoring function to obtain a scoring result for each path segment;
[0013] All the path segments are sorted in ascending order according to the corresponding scoring results, the first Z path segments are selected as critical path segments, and a critical path segment set is generated based on all the critical path segments; where Z is a positive integer.
[0014] Optionally, the step of generating a plurality of path individuals according to the Gaussian perturbation of the critical path segment set and calculating the path fitness of each of the path individuals; and sorting the path individuals in descending order according to the path fitness to obtain a particle swarm of a plurality of fitness intervals includes:
[0015] Taking the midpoint of each key path segment in the key path segment set as the individual generation center;
[0016] By taking the segment length of each critical path segment as the Gaussian perturbation standard deviation, sampling around the individual generation center corresponding to each critical path segment obtains the path individuals of each critical path segment;
[0017] Calculating the fitness of each path individual based on a preset evaluation function to obtain the path fitness of each path individual;
[0018] The path individuals are sorted in descending order according to the path fitness, and the sorted path individuals are divided based on a preset division ratio to obtain particle swarms corresponding to the first fitness interval, the second fitness interval, and the third fitness interval.
[0019] Optionally, the step of performing corresponding optimization of the exploration phase, the development phase, and the equilibrium phase on the particle swarms in different fitness intervals, optimizing to obtain new path individuals and calculating the path fitness of the new path individuals includes:
[0020] Calculate the dynamic adjustment operator, adjustment speed and weight factor of the search according to the current number of iterations and the predetermined number of cycles;
[0021] Performing differential optimization updates on the particle swarm in the first fitness interval in the exploration phase based on the dynamic adjustment operator to obtain new path individuals;
[0022] performing an optimization update on the particle swarm in the second fitness interval in a development phase based on the adjustment speed to obtain a new path individual;
[0023] Based on the weight factor, the particle swarm in the third fitness interval is subjected to differential optimization and update in the equilibrium phase to obtain a new path individual;
[0024] Calculate the path fitness of each of the new path individuals.
[0025] Optionally, in the exploration phase, when the dynamic adjustment operator is greater than the preset adjustment operator, the optimization update method of the new path individual is:
[0026]
[0027]
[0028] Where: represents the position vector of the individual differential random solution, represents the factor of variation, and Represents the position vectors of two path individuals before the update by random sampling from the particle swarm in the first fitness interval; represents the position vector of the Kth path individual after update, represents the position adjustment factor, Represents the position vector of the k-th path individual before the update in the particle swarm of the first fitness interval, represents a random number between [0,1], Represents a random number vector that conforms to the standard normal distribution; round(*) is the rounding function;
[0029] When the dynamic adjustment operator is less than or equal to the preset adjustment operator, the optimization update method of the new path individual is:
[0030]
[0031] Where: Represents a local update position operation, Represents dimension index; Represents a random integer in the interval [1, D], where D represents the path dimension.
[0032] Optional, optimization updates during the development phase include:
[0033]
[0034] Where: represents the dynamic iteration factor, Indicates the adjustment speed. Indicates the dynamic scaling factor.
[0035] Optionally, the differential optimization update process during the balancing phase includes:
[0036] when When , the update method of the new path individual is expressed as:
[0037]
[0038] Where: represents the weight factor, Represents the position vector of the path individual in the optimal position in the particle swarm of the current three fitness intervals, represents a uniform random number matrix with 1 row and D columns, represents the spiral trajectory adjustment factor, represents the dynamic perturbation factor used to adjust the particle position update, Represents the dynamic step size adjustment factor, which is used to adaptively adjust the search step size according to the number of iterations during the optimization process. When , the update method of the new path individual is expressed as:
[0039]
[0040] Where: Represents random initialization of individual operations; Represents a uniform random number matrix with N rows and D columns, whose element values range from [0,1];
[0041] when When , the update method of the new path individual is expressed as:
[0042]
[0043] Where: represents the displacement operator.
[0044] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the above-described robot path optimization methods.
[0045] The present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps of any of the above-described robot path optimization methods.
[0046] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above-mentioned robot path optimization methods when executed by a processor.
[0047] It can be seen from the above technical solutions that the present invention has the following advantages:
[0048] The present invention provides a robot path optimization method and related devices based on the RRT algorithm and the particle swarm algorithm, wherein the method comprises: obtaining the target path task of the robot, generating an initial path according to the target path task based on the RRT algorithm; extracting the local feature vector of each path segment in the initial path, and performing a comprehensive scoring analysis on the local feature vector of each path segment to determine the key path segment set; generating multiple path individuals based on the Gaussian perturbation of the key path segment set, and calculating the path fitness of each path individual; sorting the path individuals in descending order according to the path fitness to obtain particle swarms in multiple fitness intervals; and performing comparison on the particle swarms in different fitness intervals. The optimization of the corresponding exploration phase, development phase and equilibrium phase is performed to optimize the new path individuals and calculate the path fitness of the new path individuals; the new path individuals are sorted in descending order according to the path fitness to obtain new particle swarms with multiple fitness intervals; when the number of iterations does not reach the predetermined number of cycles, the execution is jumped to the steps of optimizing the particle swarms with different fitness intervals in the corresponding exploration phase, development phase and equilibrium phase, optimizing the new path individuals and calculating the path fitness of the new path individuals; when the number of iterations reaches the preset threshold, the path individual with the best path fitness in the entire iterative process is selected as the target path individual and output.
[0049] In the present invention, the key path segment set is used as the key guide of the initial population to improve the quality and information coordination of the initial path individuals; at the same time, the path individuals are explored and optimized in stages based on the path fitness, and the search process is divided into three stages: exploration, development and balance. This improves the global optimization ability and search diversity in complex environments, adapts to the complexity and planning requirements of different environments, and provides high-quality path planning for robots dynamically, thereby solving the technical problem of poor path quality generated by existing robot path planning methods in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 A flowchart of a robot path optimization method based on the RRT algorithm and the particle swarm algorithm provided in an embodiment of the present invention;
[0052] Figure 2 This is a flowchart of an execution of a robot path optimization method based on the RRT algorithm and the particle swarm algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The embodiment of the present invention provides a robot path optimization method and related devices based on the RRT algorithm and the particle swarm algorithm, which are used to solve the technical problem that the path quality generated by the existing robot path planning method in complex environments is poor.
[0054] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] The method provided in this application involves concepts related to path optimization. For ease of understanding, the related concepts of path optimization are introduced below.
[0056] The Rapidly Exploring Random Tree (RRT) algorithm is a probabilistic algorithm commonly used in robotic motion planning and path search, belonging to the category of undirected graph search methods. Its core idea is to construct an expanding tree structure in the state space through random sampling, gradually exploring the unknown space and ultimately finding a feasible path from the starting point to the target point. Its improved version, the RRT* algorithm, introduces a rewiring mechanism to optimize path costs and ensure asymptotic optimality.
[0057] Gaussian Perturbation-based Self-Organizing Multi-stage Optimization (GPSOM): This intelligent optimization algorithm combines the principles of particle swarm optimization (PSO) with Gaussian perturbation and a self-organizing multi-stage mechanism. Gaussian perturbation is often combined with techniques such as simulated annealing and mutation operators in optimization algorithms, while the self-organizing multi-stage mechanism draws on the staged adaptation strategies in biological evolution. By combining a mathematical model (Gaussian distribution) with logical control (stage switching conditions), this algorithm outperforms traditional PSO in solving high-dimensional, multi-modal optimization problems.
[0058] See also Figure 1 and Figure 2 The present invention provides a robot path optimization method based on RRT algorithm and particle swarm algorithm, the method comprising:
[0059] Step 101: Obtain the target path task of the robot, and generate an initial path according to the target path task based on the RRT algorithm.
[0060] In this embodiment, the robot's target path task includes information about the path's starting and ending points, as well as obstacles along the path. This step uses an improved RRT algorithm (such as the Informed RRT*-Connect algorithm) to generate an initial path from the robot's starting point to the end point, avoiding collisions with obstacles. This initial path consists of multiple discrete waypoints, ensuring path connectivity and feasibility, while meeting planning space constraints and safety requirements.
[0061] Each discrete path point includes two-dimensional or three-dimensional coordinate information. The overall dimension D of the initial path is determined by the number of discrete path points and the coordinate dimension. For example, for n discrete path points in two-dimensional space, D = 2n. Then an initial path P from the starting point to the end point can be expressed as, ,in Represents the i-th path discrete point of the initial path P.
[0062] Step 102 : extracting the local feature vector of each path segment in the initial path, and performing comprehensive scoring analysis on the local feature vector of each path segment to determine a critical path segment set.
[0063] This step specifically includes:
[0064] Sub-step 1021 : extracting the segment length feature, curvature feature, and obstacle distance feature of each path segment in the initial path.
[0065] In this embodiment, the segment length feature of each path segment in the initial path , curvature characteristics and obstacle distance characteristics The specific extraction method is:
[0066] Calculate segment length feature by Euclidean length of path segment ,Right now:
[0067]
[0068] Where: Indicates the length of the i-th path segment.
[0069] Calculate the local curvature of a path segment using a three-point approximation ,Right now:
[0070]
[0071] Where: represents the local curvature of the i-th path segment, Represents discrete points on the path The local turning angle.
[0072] Path discrete points Obstacle distance feature to the nearest obstacle Expressed as:
[0073]
[0074] Where, represents the obstacle distance of the i-th path segment, Represents a collection of obstacle information.
[0075] The above features together constitute the local feature vector of the corresponding path segment :
[0076]
[0077] Where: represents the local feature vector of the i-th path segment.
[0078] In this embodiment, for each path segment of the initial path, three key structural features are calculated: segment length, local curvature, and distance to obstacles. Among them, segment length is calculated using Euclidean distance, curvature is approximated using the three-point method, and obstacle distance is obtained by measuring the minimum distance from the node to the nearest obstacle boundary. The above features comprehensively reflect the smoothness, safety, and rationality of each path segment.
[0079] Sub-step 1022 , performing a comprehensive scoring analysis on the segment length characteristics, curvature characteristics, and obstacle distance characteristics of each path segment based on a preset comprehensive scoring function to obtain a scoring result for each path segment.
[0080] It is understandable that the preset comprehensive scoring function is used to evaluate the structural quality of the path segment. The higher the scoring result of the path segment, the better the structure of the path segment is, the smoother it is, the farther away from obstacles, and the more reasonable the path length.
[0081] Among them, the preset comprehensive scoring function is expressed as:
[0082]
[0083] Where: represents the scoring result of the i-th path segment, 、 and are weighted characteristic coefficients, represents a small constant that prevents division by zero, Represents the average path length of the initial paths.
[0084] Sub-step 1023, sorting all path segments in ascending order according to the corresponding scoring results, selecting the first Z path segments as critical path segments, and generating a critical path segment set based on all critical path segments; where Z is a positive integer.
[0085] Step 103 , generating multiple path individuals according to the Gaussian perturbation of the key path segment set, and calculating the path fitness of each path individual; sorting the path individuals in descending order according to the path fitness, and obtaining particle swarms of multiple fitness intervals.
[0086] This step specifically includes:
[0087] Sub-step 1031 , taking the midpoint of each key path segment in the key path segment set as the individual generation center.
[0088] In the traditional GPSOM algorithm, the initial population is randomly generated by performing Gaussian perturbations on the basic path. In this method, the population generation process is guided by the information of key path segments, so that the individuals in the population are concentrated in the potential optimal solution area.
[0089] Among them, the midpoint of the critical path segment of the i-th critical path segment is Expressed as:
[0090]
[0091] In sub-step 1032 , the length of each key path segment is used as the Gaussian perturbation standard deviation, and path individuals of each key path segment are sampled around the individual generation center corresponding to each key path segment.
[0092] It can be understood that based on the midpoint position of the critical path segment, a Gaussian perturbation mechanism is adopted, and the perturbation intensity is based on the path segment length as the standard deviation, which ensures that the initial solution distribution is concentrated in the area with good structure, thereby improving the convergence speed of the swarm intelligence optimization algorithm and the quality of the solution.
[0093] The path individual corresponding to each critical path segment is expressed as:
[0094]
[0095] Where: represents the position vector of the path individual generated by the i-th critical path segment, represents the disturbance intensity factor, express The identity matrix of .
[0096] By executing the above sampling process on multiple key path segments respectively and connecting the disturbance points of each segment in sequence, a complete path individual can be constructed. By repeatedly executing this process, multiple high-quality initial path individuals concentrated in the potential optimal solution area can be generated, forming the initial population of the optimization algorithm. , .
[0097] In response to the problems of randomness in the initial population generation and insufficient global search capabilities of traditional optimization algorithms, the present invention introduces a guided population initialization strategy based on the structural characteristics of path nodes. Under this strategy, by finely extracting the segment length, local curvature and minimum distance from the node to the obstacle for each segment in the path, a comprehensive scoring function combining smoothness, safety distance and reasonable path length is constructed. This function uses weight parameters to regulate the contribution of each feature, scientifically screens out the key path segments with the highest scores, and then uses the midpoint of the key segment as the center point of the generated individual. The segment length is used as the standard deviation of the Gaussian perturbation, combined with the perturbation intensity factor and the unit matrix to achieve Gaussian perturbation sampling of the initial population. This strategy effectively improves the quality of the initial solution of the population and the degree of information coordination, and can significantly enhance the ability to focus on the optimal solution area.
[0098] Sub-step 1033 , calculating the fitness of each path individual based on a preset evaluation function to obtain the path fitness of each path individual.
[0099] Among them, the preset evaluation function is expressed as:
[0100]
[0101] Where: represents the path fitness of the i-th path individual, represents the total path length of the i-th path individual, and Both represent penalty coefficients, represents the number of collisions between the path of the i-th path individual and the obstacle, Represents the overall curvature of the path of the i-th path individual (such as the square of the turning angle).
[0102] This embodiment constructs a preset evaluation function that comprehensively considers path length, collision risk, and curvature smoothness, which can achieve a dynamic trade-off between path safety, smoothness, and efficiency.
[0103] Step 1034 , sorting the path individuals in descending order according to the path fitness, and dividing the sorted path individuals based on a preset division ratio to obtain particle swarms corresponding to the first fitness interval, the second fitness interval, and the third fitness interval.
[0104] In the initial stage, the path individuals are sorted in descending order according to the path fitness, and then the path individuals of the initial population are divided into three stages for exploration; specifically, this embodiment uses the path individuals with a proportion of 30%-40% in the path fitness ranking as the particle swarm of the first fitness interval, the path individuals with a proportion of 20%-30% in the path fitness ranking as the particle swarm of the second fitness interval, and the path individuals with a proportion of 30%-40% in the middle of the path fitness ranking as the particle swarm corresponding to the third fitness interval.
[0105] Step 104, the particle swarms in different fitness intervals are optimized in the corresponding exploration phase, development phase, and equilibrium phase, and new path individuals are obtained by optimization and the path fitness of the new path individuals is calculated; the new path individuals are sorted in descending order according to the path fitness to obtain new particle swarms in multiple fitness intervals.
[0106] It should be noted that this paper incorporates the Gaussian Perturbation-based Self-Organizing Multi-stage Optimization (GPSOM) algorithm, dividing the path individuals in the initial population into three phases for exploration, and thus dividing the search process into three stages: exploration, exploitation, and balancing. This phased mechanism effectively alleviates the vulnerability of traditional particle swarm algorithms to falling into local optimality, improving global optimization capabilities and search diversity.
[0107] In this step, the particle swarms in different fitness intervals are optimized in the corresponding exploration phase, development phase, and equilibrium phase. The process of optimizing to obtain new path individuals and calculating the path fitness of the new path individuals specifically includes:
[0108] Step S11 , calculating the dynamic adjustment operator, adjustment speed and weight factor of the search according to the current number of iterations and the predetermined number of cycles.
[0109] It can be understood that the dynamic adjustment operator, Sine-Cosine speed regulation and weight factor are used to adjust the search progress of the exploration phase, the exploitation phase and the equilibrium phase in sequence.
[0110] Among them, the dynamic adjustment operator The calculation method is:
[0111]
[0112] Where: represents a random number between [0,1], represents the step size factor that decreases with the number of iterations, Indicates the current iteration number, Indicates the scheduled number of cycles.
[0113] Among them, Sine-Cosine speed regulation The calculation method is:
[0114]
[0115]
[0116]
[0117] Where: represents the nonlinear speed adjustment factor; Represents a uniform random number matrix with 1 row and D columns, whose element value range is [0,1]; and Respectively represent the upper and lower boundaries of regulation; Represents the disturbance term, which is dynamically adjusted as the iteration progresses.
[0118] Among them, the weight factor The calculation method is:
[0119]
[0120] Step S12: performing differential optimization and updating of the particle swarm in the first fitness interval in the exploration phase based on the dynamic adjustment operator to obtain new path individuals.
[0121] In this embodiment, during the exploration phase, a dynamic adjustment operator is used to remove particles with poor fitness from the local optimal search. Specifically, a gradually decreasing step size factor and a random perturbation mechanism are used to enhance the global search capability. To reduce computational complexity, the default adjustment operator can be set to 1.
[0122] When dynamically adjusting the operator When it is greater than 1, the update methods of the new path individuals include:
[0123]
[0124]
[0125]
[0126]
[0127] Where: represents the position vector of the individual differential random solution, represents the factor of variation, and Indicates the positions of two path individuals before the update by random sampling from the particle swarm in the first fitness interval; represents the position of the Kth path individual after update, represents the position adjustment factor, Represents the position vector of the k-th path individual before the update in the particle swarm of the first fitness interval, represents a random number vector that conforms to the standard normal distribution (mean 0 and variance 1); represents the decay factor, which decreases with iteration; represents the constraint factor, which is initialized to a zero vector; Represents the natural logarithm base; round(*) is the rounding function (rounding to the nearest integer).
[0128] When dynamically adjusting the operator When it is less than or equal to 1, the update methods of the new path individual include:
[0129]
[0130]
[0131]
[0132] Where: Represents a local update position operation, is the dimension index; represents a random integer in the interval [1,D]; represents the iterative control factor, which decreases with iteration and is multiplied by the normal random disturbance; Represents the diagonal matrix extracted OK.
[0133] Step S13: performing optimization and update of the particle swarm in the second fitness interval in the development phase based on the adjustment speed to obtain new path individuals.
[0134] In this embodiment, the development phase focuses on fine-tuning elite particles with higher fitness, and uses nonlinear Sine-Cosine speed adjustment and dynamic scaling factors to improve local search accuracy and path smoothness.
[0135] During the development phase, new path entities are updated in the following ways:
[0136]
[0137]
[0138]
[0139]
[0140] Where: represents the dynamic iteration factor, Indicates the dynamic scaling factor; Represents the adjustment factor that changes with iteration.
[0141] Step S14: performing differential optimization and updating of the particle swarm in the third fitness interval in the balance phase based on the weight factor to obtain new path individuals.
[0142] In this embodiment, the global and local search strategies are dynamically switched through weight factors during the balancing phase to maintain population diversity and prevent premature convergence.
[0143] when When , the update method of the new path individual is expressed as:
[0144]
[0145]
[0146]
[0147] Where: Represents the position vector of the path individual in the optimal position in the particle swarm of the current three fitness intervals, represents the dynamic perturbation factor used to adjust the particle position update, Represents the dynamic step size adjustment factor, which is used to adaptively adjust the search step size according to the number of iterations during the optimization process; Represents the spiral trajectory adjustment factor; M represents the maximum algebra, and its value range is [t,T].
[0148] when When , the update method of the new path individual is expressed as:
[0149]
[0150]
[0151] Where: Represents the random initialization individual operation, which is used to enhance the particle diversity of the particle swarm; Represents a uniform random number matrix with N rows and D columns, whose element values range from [0, 1], where N represents the scene dimension. When the path is in two-dimensional space, N is 2, and when the path is in three-dimensional space, N is 3.
[0152] when When , the update method of the new path individual is expressed as:
[0153]
[0154]
[0155] Where: Represents the displacement operator, which is used to control the optimal solution The degree of movement.
[0156] Step S15: Calculate the path fitness of each new path individual.
[0157] After each round of iteration, the path fitness of the new path individuals needs to be recalculated and the population needs to be updated. That is, the new path individuals are sorted in descending order according to the path fitness, and a new particle swarm with multiple fitness intervals is obtained.
[0158] Step 105: When the number of iterations does not reach the predetermined number of cycles, the process jumps to the step of optimizing the particle swarms in different fitness intervals in the corresponding exploration phase, development phase, and equilibrium phase, optimizing to obtain new path individuals and calculating the path fitness of the new path individuals; when the number of iterations reaches the preset threshold, the path individual with the best path fitness in the entire iterative process is selected as the target path individual and output.
[0159] This paper integrates the RRT and GPSOM algorithms to design a Gaussian perturbation population initialization strategy based on path node characteristics. This effectively guides the optimized population distribution toward high-potential areas, enhances the synergy between path information and path optimization, and significantly improves the path quality and optimization efficiency of multi-degree-of-freedom robots in dynamic and complex environments. During the iterative optimization process, multiple dynamic adjustment parameters are introduced, such as the perturbation intensity factor, the step-size reduction factor, and the weight adjustment coefficient. This enables flexible control of the algorithm at different iteration stages, adapting to different environmental complexities and planning requirements. Simultaneously, the fitness of all new solutions is calculated in real time, and the stage division is dynamically adjusted. The globally optimal particle is retained, ensuring stable convergence of the algorithm and providing high-quality path planning for dynamic robots.
[0160] This invention is also compatible with both two-dimensional and three-dimensional spatial planning, making it suitable for path planning tasks for multi-degree-of-freedom robots in complex, indoor and outdoor environments with multiple obstacles. Overall, this invention achieves efficient information fusion between path generation and optimization, significantly improving the accuracy, robustness, and computational efficiency of path planning, and providing an optimization technology for autonomous robot navigation in dynamic environments.
[0161] The robot path optimization method based on the RRT algorithm and the particle swarm algorithm provided by the present invention has the following advantages:
[0162] 1. Combining the RRT algorithm's ability to quickly explore complex configuration spaces with the GPSOM algorithm's global optimization capabilities, this method effectively couples path planning results with swarm intelligence algorithms, improves the distribution quality of the initial solution, and provides fast and precise path planning.
[0163] 2. Population initialization guided by path structural features and a comprehensive scoring function based on path segment structural features scientifically quantifies the quality of paths, providing precise guidance for optimization. The intensity of Gaussian perturbations is dynamically adjusted using path structural features, allowing individuals in the population to more closely track potential optimal solutions, enhancing optimization efficiency and solution diversity, thereby improving the convergence speed and stability of the optimization algorithm and reducing ineffective searches.
[0164] 3. Based on the GPSOM algorithm, the initial population is iteratively optimized to achieve phased exploration, coordinate global exploration and local development, and gradually improve the smoothness of the path. This effectively solves the problem that traditional path planning algorithms are prone to falling into local optimality and uneven paths when used alone. The generated path is smoother and away from obstacles, adapting to complex dynamic environments.
[0165] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps of the above robot path optimization method.
[0166] The present invention also provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the above robot path optimization methods when executed by a processor.
[0167] The present invention also provides a computer program product, comprising a computer program / instruction, which implements the steps of any of the above robot path optimization methods when executed by a processor.
[0168] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0169] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0170] The units described as separate components may or may not be physically separate, and the components shown as units 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0171] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0172] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0173] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules that are clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products, or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps may be executed in a different order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0174] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot path optimization method based on RRT algorithm and particle swarm algorithm, characterized in that: The method comprises: Obtaining a target path task of the robot, and generating an initial path according to the target path task based on the RRT algorithm; Extracting local feature vectors of each path segment in the initial path, and performing comprehensive scoring analysis on the local feature vectors of each path segment to determine a critical path segment set; Generate multiple path individuals according to the Gaussian perturbation of the critical path segment set, and calculate the path fitness of each path individual; sort the path individuals in descending order according to the path fitness to obtain particle swarms in multiple fitness intervals; The particle swarms in different fitness intervals are optimized in the corresponding exploration phase, development phase and equilibrium phase to obtain new path individuals and calculate the path fitness of the new path individuals; the new path individuals are sorted in descending order according to the path fitness to obtain new particle swarms in multiple fitness intervals; When the number of iterations does not reach the predetermined number of cycles, the process jumps to the step of optimizing the particle swarms in different fitness intervals in the corresponding exploration phase, development phase, and equilibrium phase, optimizing to obtain new path individuals and calculating the path fitness of the new path individuals; when the number of iterations reaches the preset threshold, the path individual with the best path fitness in the entire iterative process is selected as the target path individual and output.
2. The robot path optimization method according to claim 1, characterized in that: The step of extracting the local feature vector of each path segment in the initial path, performing comprehensive scoring analysis on the local feature vector of each path segment, and determining a critical path segment set includes: Extracting segment length features, curvature features, and obstacle distance features of each path segment in the initial path; Performing a comprehensive scoring analysis on the segment length characteristics, curvature characteristics, and obstacle distance characteristics of each path segment based on a preset comprehensive scoring function to obtain a scoring result for each path segment; All the path segments are sorted in ascending order according to the corresponding scoring results, the first Z path segments are selected as critical path segments, and a critical path segment set is generated based on all the critical path segments; where Z is a positive integer.
3. The robot path optimization method according to claim 2, characterized in that: generating a plurality of path individuals according to the Gaussian perturbation of the critical path segment set, and calculating the path fitness of each of the path individuals; The step of sorting the path individuals in descending order according to the path fitness to obtain particle swarms in multiple fitness intervals includes: Taking the midpoint of each key path segment in the key path segment set as the individual generation center; By taking the segment length of each critical path segment as the Gaussian perturbation standard deviation, sampling around the individual generation center corresponding to each critical path segment obtains the path individuals of each critical path segment; Calculating the fitness of each path individual based on a preset evaluation function to obtain the path fitness of each path individual; The path individuals are sorted in descending order according to the path fitness, and the sorted path individuals are divided based on a preset division ratio to obtain particle swarms corresponding to the first fitness interval, the second fitness interval, and the third fitness interval.
4. The robot path optimization method according to claim 3, characterized in that: The step of optimizing the particle swarms in different fitness intervals in the corresponding exploration phase, development phase, and equilibrium phase, optimizing to obtain new path individuals, and calculating the path fitness of the new path individuals includes: Calculate the dynamic adjustment operator, adjustment speed and weight factor of the search according to the current number of iterations and the predetermined number of cycles; Performing differential optimization updates on the particle swarm in the first fitness interval in the exploration phase based on the dynamic adjustment operator to obtain new path individuals; performing an optimization update on the particle swarm in the second fitness interval in a development phase based on the adjustment speed to obtain a new path individual; Based on the weight factor, the particle swarm in the third fitness interval is subjected to differential optimization and update in the equilibrium phase to obtain a new path individual; Calculate the path fitness of each of the new path individuals.
5. The robot path optimization method according to claim 4, characterized in that: In the exploration phase, when the dynamic adjustment operator is greater than the preset adjustment operator, the optimization update method of the new path individual is: Where: represents the position vector of the individual differential random solution, represents the factor of variation, and Represents the position vectors of two path individuals before the update by random sampling from the particle swarm in the first fitness interval; represents the position vector of the Kth path individual after update, represents the position adjustment factor, Represents the position vector of the k-th path individual before the update in the particle swarm of the first fitness interval, represents a random number between [0,1], Represents a random number vector that conforms to the standard normal distribution, and round(*) is a rounding function; When the dynamic adjustment operator is less than or equal to the preset adjustment operator, the optimization update method of the new path individual is: Where: Represents a local update position operation, Represents dimension index; Represents a random integer in the interval [1, D], where D represents the path dimension.
6. The robot path optimization method according to claim 4, characterized in that: The optimization and update process during the development phase includes: Where: represents the dynamic iteration factor, Indicates the adjustment speed. Indicates the dynamic scaling factor.
7. The robot path optimization method according to claim 4, characterized in that: The differentiated optimization update process in the balancing phase includes: when When , the update method of the new path individual is expressed as: Where: represents the weight factor, Represents the position vector of the path individual in the optimal position in the particle swarm of the current three fitness intervals, represents a uniform random number matrix with 1 row and D columns, represents the spiral trajectory adjustment factor, represents the dynamic perturbation factor used to adjust the particle position update; Represents the dynamic step size adjustment factor, which is used to adaptively adjust the search step size according to the number of iterations during the optimization process; when When , the update method of the new path individual is expressed as: Where: Represents random initialization of individual operations; Represents a uniform random number matrix with N rows and D columns, whose element values range from [0,1]; when When , the update method of the new path individual is expressed as: Where: represents the displacement operator.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the robot path optimization method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the robot path optimization method according to any one of claims 1 to 7 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the robot path optimization method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Three-dimensional path multi-stage planning method for low-altitude unmanned aerial vehicle
CN120403660A
Unmanned aerial vehicle path planning method and system for complex urban environment
CN120428746A
Path planning method and apparatus and readable storage medium
US20250155895A1
Cited By
Unmanned aerial vehicle three-dimensional path planning method based on 26-direction movement operator compression coding
CN122237569A