Robot trajectory self-planning method based on discrete point cloud coverage
Through the robotic trajectory self-planning method covered by discrete point clouds, combined with genetic algorithms and fitness functions, the problem of adaptive optimization of spray paths in existing spraying technologies is solved, and efficient and uniform spraying effect is achieved, improving the spray quality and automation level.
Patent Information
- Application Number
- CN202510015716.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing spraying technology cannot effectively solve the adaptive optimization problem of spraying paths, especially when facing changing spraying needs and complex workpieces, the lack of flexibility and intelligent path planning capabilities, resulting in unstable spraying quality and difficulty in achieving high efficiency and high uniformity spraying effects.
The robot trajectory self-planning method covered by discrete point clouds is used to calculate the optimal point of the deposition model through the optimal discrete distribution algorithm, and the genetic algorithm is used for selection, crossover and mutation operations, and the fitness function is designed to evaluate coverage and uniformity, so as to realize adaptive optimization of the spray path.
The automation level and spray quality of the spraying operation are improved, adaptive optimization of the spraying path is achieved, manual intervention is reduced, production costs are reduced, spray efficiency and coverage are improved, and the uniformity of the spraying thickness is ensured, thereby improving the quality of the final product.
Smart Images

Figure CN119704194A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated spraying technology, and more specifically, to a robot trajectory self-planning method covered by discrete point clouds. Background Art
[0002] Existing spraying technologies have certain limitations in automatically generating robot trajectories. Traditional spraying methods often rely on fixed spraying paths and patterns, which may not be able to adapt to complex or changing spraying needs, resulting in uneven spraying effects and low efficiency. In addition, these methods often require a lot of manual intervention and adjustments when dealing with complex geometries or large-area spraying, which increases production costs and time. In terms of technical principles, traditional spraying equipment lacks intelligent path planning capabilities and cannot dynamically adjust the spraying trajectory according to the actual spraying situation to optimize the spraying effect.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems or defects in the prior art: the existing spraying technology cannot effectively solve the problem of adaptive optimization of the spraying path, especially when facing changing spraying requirements and complex workpieces, it lacks flexibility and intelligent path planning capabilities, resulting in unstable spraying quality and difficulty in achieving high-efficiency and high-uniformity spraying effects. Summary of the invention
[0004] The present invention provides a robot trajectory self-planning method covered by discrete point clouds, comprising: Problem definition steps: according to the spraying requirements, the geometric shape of the model is clarified, the area is determined by setting the parameter given range, and the relevant parameters of the deposition model are determined, and the relevant parameters include diameter, height and grid resolution; the optimal point position when the deposition model is discretely distributed is calculated by the optimal discrete distribution algorithm; Initialize the population step: determine the population size, which is adjusted according to the computing resources and actual operation effect by setting different parameters. The population size in the code is between 500 and 1000, and the initial positions are randomly generated to ensure that these positions are reasonably distributed in the specified area; Fitness function design steps: design a fitness function based on discrete point cloud coverage to evaluate the coverage and uniformity of each individual, wherein the fitness function is calculated by combining coverage and uniformity, wherein the coverage reflects the degree of coverage of the target area by the model, and the uniformity measures the uniformity of the distribution of the deposition thickness; Genetic algorithm operation steps: selection, crossover and mutation operations are performed to generate a new population. The selection operation selects excellent individuals as parents of the next generation according to the fitness value, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutations on individual genes to increase the diversity of the population. Main loop steps: set up parallel computing pools for the surface area to improve computing efficiency, execute multi-generation evolution process, calculate fitness value in each generation, and perform selection, crossover and mutation operations, and decide whether to continue the algorithm according to the fitness value and the preset termination condition. The termination condition includes fitness function value no improvement count ≥ no improvement limit, optimal coverage ≥ stop threshold, and number of iterations ≥ maximum number of generations; Result display step: visualize the thickness distribution of the optimal solution, display the uniformity and coverage of the deposition model, and output the point coordinates of the optimal solution for further analysis and application; Data reading step: read the coordinate information output in the previous step, and select the point farthest from the origin as the starting point; Parameter setting steps: define algorithm parameters, including setting population size, crossover rate, and mutation rate. The population size, crossover rate, and mutation rate are adjusted through experience and theoretical research of the algorithm, as well as repeated experiments on specific problems. Maximum and minimum values are set for the crossover rate and mutation rate, which are dynamically adjusted with the evolutionary algebra during the operation of the algorithm. At the same time, the population is initialized, and each individual is a randomly arranged point sequence for the initial input of the genetic algorithm. The size of the spraying area is set, and the grid points of the surface are generated for the surface area using polar coordinates and height coordinates, and the algorithm is set for parallel computing; Fitness function calculation steps: Calculate the fitness value of each individual, and the fitness is calculated based on the uniformity of the path thickness; Genetic algorithm operation optimization steps: perform selection, crossover and mutation operations, use roulette and elite selection operations on the surface area to improve the performance of the genetic algorithm; Stop condition judgment step: update and check the stop condition, update the best fitness value of the current generation, and check whether the stagnation limit or maximum generation is reached; Result output and drawing steps: output the coordinates of the optimized path points, draw the path and thickness distribution, draw the cylinder and optimized path, and calculate and display the path thickness distribution.
[0005] Furthermore, in the fitness function calculation step, the fitness value is set to , the number of covered grid points is The total number of grid points is , covering the area The thickness value of the grid point is , the number of grid points in the coverage area is , the average thickness value in the coverage area is , fitness value Calculated by the following formula: ; in, Represents the fitness value, which is a comprehensive indicator used to measure the coverage and uniformity of individuals; Indicates the number of covered grid points, that is, the total number of grid points in the model coverage area; represents the total number of grid points, that is, the total number of grid points outside and inside the model coverage area; Indicates the coverage area The thickness value of each grid point; Indicates the number of grid points in the coverage area; It represents the average value of thickness in the coverage area, and the calculation formula is: ; It is a weight coefficient used to balance the impact of coverage and uniformity. Its value is between 0 and 1. The specific value is determined according to the actual problem and optimization goal.
[0006] Furthermore, in the genetic algorithm operation steps, the selection operation selects excellent individuals as parents of the next generation according to the fitness value, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutation on individual genes to increase the diversity of the population.
[0007] Furthermore, in the main loop step, a parallel computing pool is set for the surface area, and a multi-generation evolution process is executed. The fitness value is calculated in each generation, and selection, crossover and mutation operations are performed. The algorithm is determined to continue based on the fitness value and a preset termination condition. The termination condition includes a comparison of the fitness function value no improvement count, the optimal coverage rate, and the number of iterations with corresponding limits.
[0008] Furthermore, in the parameter setting step, the population size, crossover rate, and mutation rate are adjusted through algorithm experience, theoretical research, and repeated experiments. The crossover rate and mutation rate are set with maximum and minimum values, which are dynamically adjusted with the evolutionary algebra during algorithm operation. At the same time, the population is initialized, the spraying area size is set, grid points are generated for the surface area using polar coordinates and height coordinates, and parallel computing is set.
[0009] Furthermore, in the genetic algorithm operation optimization step, roulette and elite selection operations are used on the surface area to improve the performance of the genetic algorithm.
[0010] Furthermore, in the stopping condition judgment step, the stopping condition is updated and checked, including updating the best fitness value of the current generation and checking whether a stagnation limit or a maximum generation is reached.
[0011] Furthermore, in the result output and drawing step, the coordinates of the optimized path points are output, the path and thickness distribution are drawn, the cylinder and the optimized path are drawn, and the path thickness distribution is calculated and displayed.
[0012] Furthermore, in the spraying area, the uniformity of the discrete distribution deposition model in the area is optimized by genetic algorithm, the point information during uniform distribution is calculated, the points during uniform distribution are used as path nodes, and the genetic algorithm is applied to perform trajectory planning calculation for the most uniform thickness in the area, and finally the most uniform spraying path in the spraying area is obtained.
[0013] Furthermore, the method further comprises: The optimal position when the deposition model is discretely distributed is calculated by the optimal discrete distribution algorithm.
[0014] According to the above-mentioned embodiment of the present invention, at least the following beneficial effects are achieved: the robot trajectory self-planning method covered by discrete point cloud can improve the automation level and spraying quality of spraying operation. Through intelligent path planning, the method can adapt to different spraying requirements and the geometric shape of complex workpieces, and realize adaptive optimization of spraying path. The application of this method can reduce manual intervention and production costs, while improving the efficiency and coverage of spraying operation, ensuring the uniformity of spraying thickness, and thus improving the quality of the final product.
[0015] In addition, through parallel computing and multi-generation evolution process, this method can quickly iterate and find the optimal spraying path, reducing the waste of materials during the spraying process. The implementation of this method can also shorten the production cycle, improve the flexibility and response speed of the production line, and adapt to the rapidly changing market needs. By visualizing the thickness distribution of the optimal solution and the uniformity of the deposition model, this method also provides intuitive feedback for further analysis and improvement of the spraying process. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which: Figure 1 A schematic flow chart of a robot trajectory self-planning method covered by discrete point clouds provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0017] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0018] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0019] It should be noted that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0020] Reference below Figure 1 , Figure 1 A schematic diagram of a process flow of a robot trajectory self-planning method covered by discrete point clouds provided by an embodiment of the present invention. Figure 1 As shown, a robot trajectory self-planning method 100 covered by discrete point cloud includes: Step 101, problem definition step: according to the spraying requirements, the geometric shape of the model is clarified, the area is determined by setting the parameter given range, and the relevant parameters of the deposition model are determined, and the relevant parameters include diameter, height and grid resolution; Step 102, initialization of the population step: determine the population size, the population size is adjusted according to the computing resources and the actual operation effect by setting different parameters, the population size in the code is 500-1000, and the initial positions are randomly generated to ensure that these positions are reasonably distributed in the specified area; Step 103, fitness function design step: design a fitness function to evaluate the coverage and uniformity of each individual, wherein the fitness function is calculated by combining the coverage and uniformity, wherein the coverage reflects the degree of coverage of the model to the target area, and the uniformity measures the distribution uniformity of the deposition thickness; Step 104, genetic algorithm operation steps: performing selection, crossover and mutation operations to generate a new population, wherein the selection operation selects excellent individuals as parents of the next generation according to fitness values, the crossover operation performs recombination between parent genes, and the mutation operation performs small probability random mutation on individual genes to increase the diversity of the population; Step 105, main loop step: set a parallel computing pool for the surface area to improve computing efficiency, execute a multi-generation evolution process, calculate the fitness value in each generation, and perform selection, crossover and mutation operations, and decide whether to continue the algorithm according to the fitness value and a preset termination condition, wherein the termination condition includes that the fitness function value no improvement count ≥ no improvement limit, the best coverage ≥ the stop threshold, and the number of iterations ≥ the maximum number of generations; Step 106, result display step: visualize the thickness distribution of the optimal solution, display the uniformity and coverage of the deposition model, and output the point coordinates of the optimal solution for further analysis and application; Step 107, data reading step: read the coordinate information output in the previous step, and select the point farthest from the origin as the starting point; Step 108, parameter setting step: define algorithm parameters, including setting population size, crossover rate, and mutation rate. The population size, crossover rate, and mutation rate are adjusted through experience and theoretical research of the algorithm, as well as repeated experiments for specific problems. Maximum and minimum values are set for the crossover rate and mutation rate, which are dynamically adjusted with the evolutionary algebra during the operation of the algorithm. At the same time, the population is initialized, and each individual is a randomly arranged point sequence for the initial input of the genetic algorithm. The size of the spraying area is set, and the grid points of the surface of the surface area are generated using polar coordinates and height coordinates, and the algorithm is set for parallel calculation; Step 109, fitness function calculation step: calculating the fitness value of each individual, and the fitness is calculated based on the uniformity of the path thickness; Step 110, genetic algorithm operation optimization step: performing selection, crossover and mutation operations, using roulette and elite selection operations on the surface area, and improving the performance of the genetic algorithm; Step 111, stop condition judgment step: update and check the stop condition, update the best fitness value of the current generation, and check whether the stagnation limit or the maximum generation is reached; Step 112, result output and drawing step: output the coordinates of the optimized path points, draw the path and thickness distribution, draw the cylinder and the optimized path, and calculate and display the path thickness distribution.
[0021] It should be noted that the method first involves the problem definition step, that is, the geometric shape of the model is clarified according to the spraying requirements, and the parameter given range is set to determine the area, and the relevant parameters of the deposition model are determined, including diameter, height and grid resolution. Here, the deposition model refers to the model used for spraying, and the grid resolution refers to the fineness of the grid into which the model is divided, which directly affects the accuracy of the spraying.
[0022] Specifically, in the problem definition step, the population size is determined by adjusting the computing resources and the actual operation effect. The population size is between 500 and 1000, and the initial positions are randomly generated to ensure that these positions are reasonably distributed in the specified area. The population size refers to the number of individuals in the genetic algorithm, which affects the algorithm's search ability and efficiency. The designated area refers to the physical space range of the spraying operation, which needs to be determined based on the actual spraying objects and requirements.
[0023] Preferably, in the genetic algorithm operation steps, the selection operation selects excellent individuals as parents of the next generation according to the fitness value, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutation on individual genes to increase the diversity of the population.
[0024] Furthermore, different selection strategies, such as roulette wheel selection or tournament selection, and different crossover and mutation operators, such as single-point crossover or uniform mutation, can be selected to meet different optimization requirements and improve the adaptability of the algorithm. In addition, the crossover rate and mutation rate can be adjusted based on the algorithm's experience and theoretical research, as well as repeated experiments for specific problems, to achieve better optimization results.
[0025] In some embodiments, in the fitness function calculation step, the fitness value is set to , the number of covered grid points is The total number of grid points is , covering the area The thickness value of the grid point is , the number of grid points in the coverage area is , the average thickness value in the coverage area is , fitness value Calculated by the following formula: ; in, Represents the fitness value, which is a comprehensive indicator used to measure the coverage and uniformity of individuals; Indicates the number of covered grid points, that is, the total number of grid points in the model coverage area; represents the total number of grid points, that is, the total number of grid points outside and inside the model coverage area; Indicates the coverage area The thickness value of each grid point; Indicates the number of grid points in the coverage area; It represents the average value of thickness in the coverage area, and the calculation formula is: ; It is a weight coefficient used to balance the impact of coverage and uniformity. Its value is between 0 and 1. The specific value is determined according to the actual problem and optimization goal.
[0026] It should be noted that this embodiment involves a fitness function calculation step, in which the fitness value is a comprehensive indicator used to measure the coverage and uniformity of an individual. In this step, coverage refers to the degree of coverage of the target area by the model, while uniformity measures the uniformity of the distribution of the deposition thickness. The calculation of the fitness value combines these two factors to evaluate the performance of each individual.
[0027] Specifically, the design of the fitness function includes the number of covered grid points, the total number of grid points, the thickness value of each grid point in the coverage area, and the average thickness value in the coverage area. These parameters together determine how the fitness value is calculated. The number of covered grid points and the total number of grid points are used to calculate the coverage rate, while the deviation between the thickness value of each grid point in the coverage area and the average thickness value is used to calculate the uniformity. The weight coefficient is used to balance the impact of coverage and uniformity. Its value is between 0 and 1, and the specific value is determined according to the actual problem and optimization goal.
[0028] Preferably, the calculation of the fitness value can be refined by the following formula: the fitness value is equal to the weight coefficient multiplied by the coverage plus (1 minus the weight coefficient) multiplied by the inverse of the uniformity. In this formula, the coverage can be calculated by dividing the number of covered grid points by the total number of grid points, and the uniformity can be determined by calculating the inverse of the average of the sum of the squares of the difference between the thickness value of each grid point and the average thickness value in the coverage area. This calculation method ensures that both the coverage and uniformity can be properly reflected in the fitness value, and the weight coefficient can be adjusted according to actual needs to achieve the best spraying effect.
[0029] In some embodiments, in the genetic algorithm operation steps, the selection operation selects excellent individuals as parents of the next generation according to fitness values, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutation on individual genes to increase the diversity of the population.
[0030] It should be noted that this embodiment describes the genetic algorithm operation steps in detail, which involve three key operations: selection, crossover and mutation. These operations act together on individuals in a population to generate a new population. Here, the selection operation refers to the process of selecting excellent individuals from the current population based on fitness values, the crossover operation refers to the process of performing genetic recombination between selected parent individuals, and the mutation operation refers to the random change of individual genes with a small probability to increase the diversity of the population.
[0031] Specifically, the selection operation can be performed by fitness value, where individuals with higher fitness values have a greater probability of being selected as parents of the next generation. The crossover operation can perform recombination between parental genes. For example, different crossover methods such as single-point crossover, multi-point crossover or uniform crossover can be used. The mutation operation involves random changes to individual genes, which can be achieved by randomly changing certain parts of the individual gene sequence. The mutation probability is usually set low to avoid excessive randomness from destroying existing good gene combinations.
[0032] Preferably, in the selection operation, strategies such as roulette wheel selection or tournament selection can be used to select excellent individuals. In the crossover operation, in addition to the basic crossover method, adaptive crossover can also be considered, which can dynamically adjust the crossover rate according to the fitness of the population. In the mutation operation, more complex mutation strategies such as non-uniform mutation or Gaussian mutation can be used to improve the exploration ability and adaptability of the algorithm. The specific parameters and strategies of these operations can be adjusted according to the actual problem and optimization goal to achieve the best genetic algorithm performance.
[0033] In some embodiments, in the main loop step, a parallel computing pool is set for the surface area, and a multi-generation evolution process is executed. The fitness value is calculated in each generation, and selection, crossover and mutation operations are performed. The algorithm is determined to continue based on the fitness value and a preset termination condition. The termination condition includes a comparison of the fitness function value no improvement count, the optimal coverage rate, and the number of iterations with corresponding limits.
[0034] It should be noted that this implementation involves a main loop step, in which a parallel computing pool is set for the surface area to improve computing efficiency and a multi-generation evolution process is performed. In this process, the parallel computing pool refers to the technology of using multi-core processors or distributed computing resources to process multiple computing tasks simultaneously, which can significantly reduce the overall running time of the algorithm. The multi-generation evolution process refers to the process of the algorithm continuously optimizing the solution through multiple rounds of iterations.
[0035] Specifically, in the main loop step, the fitness value is calculated for each generation, and selection, crossover and mutation operations are performed. The fitness value is calculated based on the previously defined fitness function, while selection, crossover and mutation operations are the core operations of the genetic algorithm, which are used to generate a new generation of populations. The preset termination conditions include the fitness function value no improvement count, the best coverage and the comparison of the number of iterations with the corresponding limits. These conditions are used to determine whether the algorithm should stop to avoid unnecessary calculations and waste of resources.
[0036] Preferably, the main loop step can be further refined into the following key points: First, a maximum number of iterations can be set as a hard termination condition for the algorithm to ensure that the algorithm does not run infinitely. Second, a threshold for fitness improvement can be introduced. When the fitness improvement of multiple consecutive generations is less than this threshold, the algorithm can be terminated early.
[0037] Furthermore, a threshold for optimal coverage can be set, and the algorithm can also stop when this threshold is reached or exceeded. The specific values of these parameters can be adjusted according to the actual problem and optimization goals to achieve the best performance and efficiency. Alternatives may include using different parallel computing strategies, such as GPU acceleration or cloud computing resources, to further improve computing efficiency.
[0038] In some embodiments, in the parameter setting step, the population size, crossover rate, and mutation rate are adjusted through algorithm experience, theoretical research, and repeated experiments. The crossover rate and mutation rate are set with maximum and minimum values, which are dynamically adjusted with the evolutionary generations during the operation of the algorithm. At the same time, the population is initialized, the spraying area size is set, grid points are generated for the surface area using polar coordinates and height coordinates, and parallel computing is set.
[0039] It should be noted that this implementation describes in detail the parameter setting steps, including the adjustment of population size, crossover rate, and mutation rate. Here, population size refers to the number of individuals in the genetic algorithm, which directly affects the algorithm's search ability and diversity; crossover rate refers to the probability of performing a crossover operation in the genetic algorithm; and mutation rate refers to the probability of individual genes mutating. The adjustment of these parameters is based on algorithm experience, theoretical research, and repeated experiments on specific problems.
[0040] Specifically, in the parameter setting step, the settings of population size, crossover rate, and mutation rate need to be adjusted according to the performance of the algorithm and the needs of the specific problem. For example, the population size can be set according to the computing resources and the complexity of the problem, while the crossover rate and mutation rate can determine their maximum and minimum values based on experimental results and theoretical analysis. During the operation of the algorithm, these parameters can be dynamically adjusted according to the evolutionary algebra to adapt to the evolution process of the algorithm. At the same time, initializing the population involves each individual as a randomly arranged sequence of points, which is the initial input of the genetic algorithm. Setting the size of the spray area involves generating grid points for the surface area using polar coordinates and height coordinates, which is the mathematical model used to represent the spray area in the algorithm.
[0041] Preferably, the parameter setting step can be further refined into the following key points: First, the population size can be dynamically adjusted according to the scale of the problem and the computing resources to balance the coverage of the search space and the computing efficiency. Second, the crossover rate and mutation rate can be dynamically adjusted according to the fitness improvement during the evolution process to maintain the diversity and search ability of the population. In addition, the size of the spraying area and the generation of grid points can be customized according to the actual spraying object and requirements to ensure the accuracy and optimization effect of the spraying path. Alternatives include using different parameter adjustment strategies, such as adaptive parameter adjustment or machine learning-based parameter optimization methods, to further improve the performance and adaptability of the algorithm.
[0042] In some embodiments, in the genetic algorithm operation optimization step, roulette and elite selection operations are used on the surface area to improve the performance of the genetic algorithm.
[0043] It should be noted that this implementation focuses on the optimization steps of genetic algorithm operations, especially using roulette and elite selection operations in the surface area to improve the performance of the genetic algorithm. Here, roulette is a selection mechanism that determines the probability of an individual being selected for reproduction based on its fitness value; elite selection is a strategy to retain the best individuals, ensuring that the best solutions in each generation can be passed on to the next generation.
[0044] Specifically, in the optimization step of the genetic algorithm operation, the roulette selection operation can allocate the selection probability according to the fitness value of the individual, and the individuals with higher fitness values have a higher probability of being selected. The elite selection operation ensures that the best performing individuals in each generation directly enter the next generation without being affected by the roulette selection. The specific parameter settings of these operations, such as the proportion of elite individuals and the selection pressure of the roulette wheel, can be adjusted according to the complexity of the problem and the solution goal.
[0045] Preferably, the optimization steps of genetic algorithm operation can be further refined into the following key points: First, in the elite selection operation, a fixed ratio or number of elite individuals can be set, and these individuals will be directly copied to the next generation without crossover and mutation. Second, in the roulette selection operation, the selection pressure, that is, the degree of influence of the fitness value on the selection probability, can be adjusted to control the exploration and development balance of the algorithm.
[0046] Furthermore, other selection mechanisms such as tournament selection or ranking selection can be considered to provide more selection strategies to adapt to different optimization requirements. Alternatives may include using adaptive selection strategies based on fitness landscapes, or combining multiple selection mechanisms to improve the robustness and efficiency of the algorithm.
[0047] In some embodiments, in the stop condition determination step, the stop condition is updated and checked, including updating the best fitness value of the current generation and checking whether a stagnation limit or a maximum generation is reached.
[0048] It should be noted that this implementation involves a stop condition judgment step, wherein the stop condition refers to the criterion used to decide whether to continue iteration during the execution of the algorithm. These conditions include the no-improvement count of the fitness function value, the best coverage rate, and the comparison of the number of iterations and the maximum number of generations. Here, the no-improvement count refers to the number of times the fitness function value has not been significantly improved within a certain number of generations; the best coverage rate refers to the best coverage effect found so far; and the number of iterations refers to the number of generations that the algorithm has executed.
[0049] Specifically, in the stop condition judgment step, specific parameter values need to be set to determine when to stop the algorithm. For example, a threshold can be set to define the no-improvement count. When the change in the fitness function value for multiple consecutive generations is less than this threshold, the algorithm can stop. Similarly, a target coverage rate can be set. When the algorithm reaches or exceeds this coverage rate, it is considered that a satisfactory solution has been found and the iteration can be stopped. The maximum number of iterations is a hard limit. Regardless of whether other stop conditions are met, the algorithm will stop when the number of iterations reaches this value.
[0050] Preferably, the stop condition judgment step can be further refined into the following key points: First, a dynamically adjusted threshold can be set, which can be adjusted according to the changing trend of the current generation and the historical best fitness value to respond more flexibly to the progress of the algorithm. Second, the target value of the best coverage can be set according to the needs of the actual application and historical data to ensure that the algorithm can find a satisfactory solution within a reasonable time.
[0051] Furthermore, other stopping conditions can be introduced, such as computing time limits or resource usage limits, to adapt to different operating environments and requirements. Alternative solutions may include using machine learning-based prediction models to predict the convergence trend of the algorithm and decide in advance whether to stop the algorithm based on this.
[0052] In some embodiments, in the result output and drawing step, the coordinates of the optimized path points are output, the path and thickness distribution are drawn, the cylinder and the optimized path are drawn, and the path thickness distribution is calculated and displayed.
[0053] It should be noted that this implementation describes the result output and drawing steps, including outputting the coordinates of the optimized path points, drawing the path and thickness distribution, drawing the cylinder and the optimized path, and calculating and displaying the path thickness distribution. Here, the coordinates of the optimized path points refer to the specific position data of the spray path obtained after algorithm optimization; the path and thickness distribution refer to the spray path diagram drawn according to the optimized path points and the corresponding thickness distribution.
[0054] Specifically, the result output and drawing steps involve displaying the optimal solution obtained by the algorithm in a graphical manner. This includes outputting the coordinates of the optimized path points to a file or display interface, and using these coordinate data to draw spray paths and thickness distribution diagrams. These charts can help users intuitively understand the uniformity and coverage of the spray path. When drawing cylinders and optimized paths, three-dimensional graphics software can be used to more intuitively display the spraying effect. The calculation of the path thickness distribution can be completed by analyzing the deposition thickness data of the path points and displayed in the form of a chart.
[0055] Preferably, the result output and drawing steps can be further refined into the following key points: First, the coordinates of the optimized path points can be output through a text file, a database or a graphical user interface for further analysis or application. Second, the drawing of the path and thickness distribution can be achieved using professional graphics drawing software or programming libraries, such as MATLAB, Python's matplotlib library, etc.
[0056] Further, 3D drawing of the cylinder and optimized path can be done using 3D modeling software or a dedicated 3D graphics library to provide a more intuitive visual effect. Alternatives include using augmented reality (AR) or virtual reality (VR) technology to display the spray path and thickness distribution, providing users with an immersive viewing and analysis experience.
[0057] In some embodiments, within the spraying area, a genetic algorithm is used to optimize the uniformity of a discrete distribution deposition model within the area, and point information during uniform distribution is calculated. The points during uniform distribution are used as path nodes, and a genetic algorithm is applied to perform trajectory planning calculations for the most uniform thickness within the area, ultimately obtaining the most uniform spraying path within the spraying area.
[0058] It should be noted that this embodiment describes a method for optimizing the uniformity of a discrete distribution deposition model in a spraying area by covering discrete point clouds. The discrete distribution deposition model mentioned here refers to the process of dispersing the spraying material into multiple small dots or small areas in the area for deposition, in order to achieve uniformity of spraying. This method calculates the point information when uniformly distributed, uses these points as path nodes, and applies a genetic algorithm to perform trajectory planning calculations for the most uniform thickness in the area, and finally obtains the most uniform spraying path in the spraying area.
[0059] Specifically, the implementation of this method involves several key steps in the genetic algorithm: initializing the population, fitness function design, selection, crossover, and mutation operations. When initializing the population, each individual represents a potential spray path, consisting of a series of discrete points. In the fitness function design step, a function needs to be defined to evaluate the uniformity of each path, which may include statistical indicators such as the variance or standard deviation of the deposition thickness. The selection operation will select excellent paths based on these fitness values, the crossover operation will generate new paths based on the characteristics of these excellent paths, and the mutation operation will introduce random changes to maintain the diversity of the population.
[0060] Preferably, the implementation of the method can be further refined into the following key points: First, a variety of fitness function designs can be adopted. For example, in addition to considering the uniformity of the deposition thickness, the total length of the spraying path or the spraying time can also be considered to achieve multi-objective optimization. Second, in the selection operation, a weighted mechanism of fitness values can be introduced to balance the importance of different optimization objectives.
[0061] Furthermore, in the crossover and mutation operations, various strategies such as simulated annealing or genetic programming techniques can be used to improve the algorithm's search capability and adaptability. Alternatives include using other optimization algorithms such as particle swarm optimization or ant colony optimization to achieve spray path optimization. These alternatives can be adjusted according to the actual spray equipment and material characteristics to achieve the best spraying effect.
[0062] In some embodiments, the method further comprises: The optimal position when the deposition model is discretely distributed is calculated by the optimal discrete distribution algorithm.
[0063] It should be noted that this implementation involves calculating the optimal position of the discrete distribution of the deposition model through the optimal discrete distribution algorithm. Here, the optimal discrete distribution algorithm refers to an algorithm that can determine how to optimally distribute discrete deposition points in a given area to achieve the best effect of spraying. The optimal position refers to the optimal position of these discrete points in space to achieve uniformity and efficiency of spraying.
[0064] Specifically, when implementing this method, it is necessary to determine the discrete distribution parameters of the deposition model, including the number, spacing and distribution pattern of the points. These parameters can be set according to the size and shape of the spraying area and the characteristics of the spraying material. For example, the number of points can be determined based on the area of the spraying area and the coverage of the spraying material, while the point spacing can be adjusted according to the uniformity requirements of the spraying and the accuracy of the spraying equipment. The distribution pattern can be a grid, random or other specific pattern to meet different spraying requirements.
[0065] Preferably, the following key points can be further refined when implementing this method: First, multiple algorithms can be used to determine the optimal position, such as genetic algorithm, simulated annealing algorithm or particle swarm optimization algorithm, to find the optimal discrete distribution scheme. Second, an adaptive mechanism can be introduced to adjust the distribution of discrete points according to real-time feedback during the spraying process to cope with changes in spraying conditions.
[0066] Furthermore, dynamic planning of the spraying path can also be considered, that is, dynamically adjusting the path during the spraying process to adapt to the complexity of the spraying area or the consumption of the spraying material. Alternative solutions may include using machine learning methods, such as deep learning, to predict and optimize the distribution of discrete points to improve the intelligence level of the spraying process.
[0067] The above-mentioned embodiments of the present invention have the following beneficial effects: the robot trajectory self-planning method covered by discrete point cloud described in the present invention can effectively optimize the spraying path and improve the uniformity and coverage of the spraying. This method designs a fitness function by comprehensively considering the coverage and uniformity, so that the spraying path planning is more scientific and accurate. Through the selection, crossover and mutation operations of the genetic algorithm, a better spraying path can be generated, thereby improving the spraying efficiency and reducing the material consumption while ensuring the spraying quality.
[0068] In addition, this method can improve computing efficiency and shorten the time of spray path planning by setting up parallel computing pools and multi-generation evolution processes. The preset termination conditions can ensure that the algorithm automatically stops when the optimal solution is reached or specific conditions are met, avoiding unnecessary waste of computing resources. Through the result display step, the thickness distribution of the optimal solution and the uniformity of the deposition model can be intuitively displayed, which is convenient for further analysis and application. The application of this method can greatly improve the intelligence level of the spraying process and bring revolutionary changes to industrial production.
[0069] Furthermore, the storage medium of the embodiment of the present application stores program instructions that can implement all the above methods, wherein the program instructions can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.
[0070] The above descriptions are only some preferred embodiments of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present invention is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the embodiments of the present invention.
Claims
1. A robot trajectory self-planning method covered by discrete point cloud, characterized in that: The following steps are involved: Problem definition steps: according to the spraying requirements, the geometric shape of the model is clarified, the area is determined by setting the parameter given range, and the relevant parameters of the deposition model are determined, and the relevant parameters include diameter, height and grid resolution; The optimal position when the deposition model is discretely distributed is calculated by the optimal discrete distribution algorithm; Initialize the population step: determine the population size, which is adjusted according to the computing resources and actual operation effect by setting different parameters. The population size in the code is between 500 and 1000, and the initial positions are randomly generated to ensure that these positions are reasonably distributed in the specified area; Fitness function design steps: design a fitness function based on discrete point cloud coverage to evaluate the coverage and uniformity of each individual, wherein the fitness function is calculated by combining coverage and uniformity, wherein the coverage reflects the degree of coverage of the target area by the model, and the uniformity measures the uniformity of the distribution of the deposition thickness; Genetic algorithm operation steps: selection, crossover and mutation operations are performed to generate a new population. The selection operation selects excellent individuals as parents of the next generation according to the fitness value, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutations on individual genes to increase the diversity of the population. Main loop steps: set up parallel computing pools for the surface area to improve computing efficiency, execute multi-generation evolution process, calculate fitness value in each generation, and perform selection, crossover and mutation operations, and decide whether to continue the algorithm according to the fitness value and the preset termination condition. The termination condition includes fitness function value no improvement count ≥ no improvement limit, optimal coverage ≥ stop threshold, and number of iterations ≥ maximum number of generations; Result display step: visualize the thickness distribution of the optimal solution, display the uniformity and coverage of the deposition model, and output the point coordinates of the optimal solution for further analysis and application; Data reading step: read the coordinate information output in the previous step, and select the point farthest from the origin as the starting point; Parameter setting steps: define algorithm parameters, including setting population size, crossover rate, and mutation rate. The population size, crossover rate, and mutation rate are adjusted through experience and theoretical research of the algorithm, as well as repeated experiments on specific problems. Maximum and minimum values are set for the crossover rate and mutation rate, which are dynamically adjusted with the evolutionary algebra during the operation of the algorithm. At the same time, the population is initialized, and each individual is a randomly arranged point sequence for the initial input of the genetic algorithm. The size of the spraying area is set, and the grid points of the surface are generated for the surface area using polar coordinates and height coordinates, and the algorithm is set for parallel computing; Fitness function calculation steps: Calculate the fitness value of each individual, and the fitness is calculated based on the uniformity of the path thickness; Genetic algorithm operation optimization steps: perform selection, crossover and mutation operations, use roulette and elite selection operations on the surface area to improve the performance of the genetic algorithm; Stop condition judgment step: update and check the stop condition, update the best fitness value of the current generation, and check whether the stagnation limit or maximum generation is reached; Result output and drawing steps: output the coordinates of the optimized path points, draw the path and thickness distribution, draw the cylinder and optimized path, and calculate and display the path thickness distribution.
2. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the fitness function calculation step, the fitness value is set to , the number of covered grid points is The total number of grid points is , covering the area The thickness value of the grid point is , the number of grid points in the coverage area is , the average thickness value in the coverage area is , fitness value Calculated by the following formula: ; in, Represents the fitness value, which is a comprehensive indicator used to measure the coverage and uniformity of individuals; Indicates the number of covered grid points, that is, the total number of grid points in the model coverage area; represents the total number of grid points, that is, the total number of grid points outside and inside the model coverage area; Indicates the coverage area The thickness value of each grid point; Indicates the number of grid points in the coverage area; It represents the average value of thickness in the coverage area, and the calculation formula is: ; It is a weight coefficient used to balance the impact of coverage and uniformity. Its value is between 0 and 1. The specific value is determined according to the actual problem and optimization goal.
3. The robot trajectory self-planning method covered by discrete point cloud according to claim 1, characterized in that: In the genetic algorithm operation steps, the selection operation selects excellent individuals as parents of the next generation according to the fitness value, the crossover operation performs recombination between parent genes, and the mutation operation performs small-probability random mutation on individual genes to increase the diversity of the population.
4. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the main loop step, a parallel computing pool is set for the surface area, and a multi-generation evolution process is executed. The fitness value is calculated in each generation, and selection, crossover and mutation operations are performed. The algorithm is determined to continue based on the fitness value and a preset termination condition. The termination condition includes a comparison of the fitness function value no improvement count, the optimal coverage rate, and the number of iterations with corresponding limits.
5. The method for self-planning robot trajectory covered by discrete point cloud according to claim 1, characterized in that: In the parameter setting step, the population size, crossover rate, and mutation rate are adjusted through algorithm experience, theoretical research, and repeated experiments. The crossover rate and mutation rate are set with maximum and minimum values, which are dynamically adjusted with the evolutionary algebra during algorithm operation. At the same time, the population is initialized, the spraying area size is set, grid points are generated for the surface area using polar coordinates and height coordinates, and parallel computing is set.
6. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the genetic algorithm operation optimization step, roulette and elite selection operations are used on the surface area to improve the performance of the genetic algorithm.
7. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the stopping condition judgment step, the stopping condition is updated and checked, including updating the best fitness value of the current generation and checking whether a stagnation limit or a maximum generation is reached.
8. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the result output and drawing step, the coordinates of the optimized path points are output, the path and thickness distribution are drawn, the cylinder and the optimized path are drawn, and the path thickness distribution is calculated and displayed.
9. The method for robot trajectory self-planning based on discrete point cloud coverage according to claim 1, characterized in that: In the spraying area, the uniformity of the discrete distribution deposition model in the area is optimized by genetic algorithm, the point information of uniform distribution is calculated, the points of uniform distribution are used as path nodes, and the genetic algorithm is applied to calculate the trajectory planning with the most uniform thickness in the area, and finally the most uniform spraying path in the spraying area is obtained.
Citation Information
Cited By
Control method and system of TC bearing spraying robot
CN120395914A
Nail painting method and system based on image recognition
CN120816479A