Path planning method and device of mechanical arm, storage medium and electronic equipment

Through the combination of objective function and fuzzy logic controller and genetic algorithm, the problem of low accuracy of robotic arm path planning is solved, the path length, energy consumption, collision risk and path smoothness are optimized, and the overall performance of robotic arm path planning is improved. .

CN119077735APending Publication Date: 2024-12-06GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411327590.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The path planning accuracy of the robotic arms is low. The existing technology mainly focuses on minimizing the path length and fails to effectively consider factors such as energy consumption, collision risk and path smoothness.

Method used

The objective function is used to evaluate the robotic arm path planning performance, combine fuzzy logic controllers and genetic algorithms, calculate the weight value by obtaining environmental information and state data, update the objective function, and based on multiple optimization goals (path length, energy consumption, collision risk, Path smoothness) for path planning.

Benefits of technology

It improves the accuracy and efficiency of path planning, optimizes energy consumption, collision risk and path smoothness, and achieves more comprehensive path optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119077735A_ABST
    Figure CN119077735A_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method and device for a mechanical arm, a storage medium and electronic equipment. Relates to the field of path planning, and the method comprises the steps that a target function corresponding to a mechanical arm is obtained, the target function comprises calculation formulas and calculation weights corresponding to multiple optimization targets, and the multiple optimization targets comprise the path length, the energy consumption, the collision risk and the path smoothness; in the working process of the mechanical arm, the environment information and state data of the mechanical arm at the first moment are processed based on the fuzzy logic controller, and the weight value of each calculation weight is obtained; updating the target function based on the weight value of each calculation weight to obtain an updated target function; and path planning is conducted on a path between the initial position and the target position of the mechanical arm based on the updated target function through a genetic algorithm, and a first target path is obtained. The technical problem of low accuracy of path planning of the mechanical arm in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of path planning, and in particular to a path planning method, device, storage medium and electronic equipment for a robotic arm. Background Art

[0002] With the continuous development of science and technology, more and more industries are beginning to use robots to complete some work. For example, in the power grid scenario, when the robot is performing automated inspections in the substation, the robot arm can be used to inspect and maintain the equipment. Or, in the maintenance of transmission lines, the robot arm can accurately complete tasks such as wiring and unwiring to avoid the risk of manual electric shock. In the application of robots, the path planning of the robot arm has always been a key and complex issue. At present, the relevant technology focuses on minimizing the path length when planning the path to reduce the movement time of the robot arm and improve work efficiency, which leads to the problem of low accuracy of path planning.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] Embodiments of the present invention provide a method, device, storage medium and electronic device for path planning of a robotic arm, so as to at least solve the technical problem of low accuracy of path planning of a robotic arm in the related art.

[0005] According to one aspect of an embodiment of the present invention, a path planning method for a robotic arm is provided, comprising: obtaining an objective function corresponding to the robotic arm, wherein the objective function is used to evaluate the performance of the path planning of the robotic arm, the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness; during the working process of the robotic arm, processing the environmental information and state data of the robotic arm at the first moment based on a fuzzy logic controller to obtain weight values ​​of each calculation weight; updating the objective function based on the weight values ​​of each calculation weight to obtain an updated objective function; performing path planning on the path between the initial position and the target position of the robotic arm based on the updated objective function through a genetic algorithm to obtain a first target path.

[0006] Furthermore, the path planning method of the robotic arm also includes: obtaining fuzzy logic rules, wherein the fuzzy logic rules characterize the mapping relationship between input fuzzy variables and output fuzzy variables, the input fuzzy variables are environmental information and state data of the robotic arm, and the output fuzzy variables are various calculation weights; performing fuzzy reasoning processing on the environmental information and state data of the robotic arm at the first moment based on the fuzzy logic rules by a fuzzy logic controller to obtain a fuzzy output result; and defuzzifying the fuzzy output result to obtain the weight value of each calculation weight.

[0007] Furthermore, the path planning method of the robotic arm also includes: initializing a population, wherein the population includes multiple paths, and each path consists of a sequence of path points; calculating the fitness of each path in the population based on an updated objective function; determining multiple first paths from the population based on the fitness of each path; generating new paths based on the multiple first paths, and updating the population based on the new paths to obtain an updated population; if a preset iteration condition is not met, repeating the step of calculating the fitness of each path in the updated population based on the updated objective function until the preset iteration condition is met, and determining the first target path from the updated population based on the fitness.

[0008] Furthermore, the path planning method of the robotic arm also includes: sorting multiple paths in the population in order of fitness from low to high to obtain multiple sorted paths; determining the first N paths in the sorted multiple paths as multiple first paths, where N is a positive integer greater than 1.

[0009] Furthermore, the path planning method of the robot arm also includes: performing crossover processing in a genetic algorithm on multiple first paths to obtain multiple initial paths; performing mutation processing in a genetic algorithm on the multiple initial paths to obtain at least one new path.

[0010] Furthermore, the path planning method for the robotic arm also includes: determining the path with the highest fitness in the updated population as the first target path.

[0011] Furthermore, the path planning method of the robotic arm also includes: controlling the robotic arm to move to the target position based on the first target path; determining the target position as the updated initial position, and determining the next target position; processing the environmental information and state data of the robotic arm at the second moment based on the fuzzy logic controller to obtain updated weight values ​​of each calculated weight; updating the objective function based on the updated weight values ​​of each calculated weight to obtain an updated objective function again; planning the path between the updated initial position of the robotic arm and the next target position based on the updated objective function through a genetic algorithm to obtain a second target path.

[0012] According to another aspect of an embodiment of the present invention, a path planning device for a robotic arm is also provided, including: an acquisition module, used to acquire an objective function corresponding to the robotic arm, wherein the objective function is used to evaluate the performance of the path planning of the robotic arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness; a first processing module, used to process the environmental information and state data of the robotic arm at the first moment based on a fuzzy logic controller during the operation of the robotic arm, and obtain weight values ​​of each calculation weight; a first updating module, used to update the objective function based on the weight values ​​of each calculation weight, and obtain an updated objective function; a second processing module, used to plan the path between the initial position and the target position of the robotic arm based on the updated objective function through a genetic algorithm, and obtain a first target path.

[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned path planning method for the robotic arm when running.

[0014] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned path planning method for the robotic arm when running.

[0015] In an embodiment of the present invention, a method of path planning for a robot arm based on multiple optimization objectives is adopted, by obtaining the objective function corresponding to the robot arm, and then in the working process of the robot arm, the environmental information and state data of the robot arm at the first moment are processed based on the fuzzy logic controller to obtain the weight value of each calculation weight, and then the objective function is updated based on the weight value of each calculation weight to obtain an updated objective function, so as to plan the path between the initial position and the target position of the robot arm based on the updated objective function through a genetic algorithm to obtain a first target path. Among them, the objective function is used to evaluate the performance of the path planning of the robot arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness.

[0016] In the above process, the objective function is constructed based on multiple optimization objectives such as path length, energy consumption, collision risk and path smoothness, and then the path between the initial position and the target position of the robot is planned based on the updated objective function by the genetic algorithm to obtain the first target path, so that when planning the path of the robot, many factors are considered, so that the planned path is not only relatively short, but also optimized in terms of energy consumption, collision risk and path smoothness, thereby improving the accuracy of path planning. In addition, by processing the environmental information and state data of the robot at the first moment based on the fuzzy logic controller, the weight values ​​of each calculation weight are obtained to update the objective function, and the objective function is adaptively adjusted according to the relevant information of the robot, so that the accuracy of path planning can be further improved.

[0017] It can be seen that the solution provided in the present application achieves the purpose of path planning for the robotic arm based on multiple optimization objectives, thereby achieving the technical effect of improving the accuracy of path planning, and further solving the technical problem of low accuracy of path planning of the robotic arm in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a schematic diagram of an optional path planning method for a robot arm according to an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of an optional method for determining a first target path according to an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of an optional path planning device for a robot arm according to an embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme 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 described embodiments 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 creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned 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 data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and 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 units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0026] Example 1

[0027] According to an embodiment of the present invention, an embodiment of a path planning method for a robotic arm is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0028] Figure 1 is a schematic diagram of an optional path planning method for a robot arm according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0029] Step S101, obtaining the objective function corresponding to the robotic arm, wherein the objective function is used to evaluate the performance of the path planning of the robotic arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness.

[0030] Optionally, electronic devices, application systems, servers and other devices can be used as the execution subject of the present application. In this embodiment, the path planning system is used as the execution subject to execute the path planning method of the robot arm. Among them, the objective function is used to evaluate the performance of the path planning of the robot arm. In layman's terms, it can also be understood that the objective function is used to evaluate the quality of the path planning of the robot arm.

[0031] In some embodiments, the path length refers to the path length of the robot arm from the starting point (ie, the initial position) to the end point (ie, the target position). The calculation formula corresponding to the path length is f 长度 As shown in formula (1):

[0032]

[0033] Among them, P i is the i-th point on the path, P i is the i-1th point on the path, n is the total number of path points on the path, ||·|| is the Euclidean norm of the vector, which represents the Euclidean distance between two path points.

[0034] In some embodiments, energy consumption refers to the energy consumption during the movement of the robot arm. The energy consumption is calculated by the formula f 能耗 As shown in formula (2):

[0035]

[0036] Among them, E(P i , P i-1 ) is from point P i-1 To point P i The energy consumption can be calculated based on the dynamic model of the robot. The energy consumption may depend on many factors, such as path length, robot speed, load weight, acceleration, etc.

[0037] In some embodiments, for each pair of adjacent path points (P i-1 , P i ), the energy consumption of this pair of adjacent path points can be calculated through a simplified model, for example, E(P i , P i-1 )=k·||P i -P i-1 ||, where k is the preset energy consumption coefficient.

[0038] In some embodiments, the collision risk refers to the collision risk during the movement of the robot arm. The calculation formula corresponding to the collision risk is f 碰撞 As shown in formula (3):

[0039]

[0040] Among them, R() is the preset collision risk function, R(P i ) indicates P i The collision risk of the waypoint may depend on the spatial position of the waypoint, the density of surrounding obstacles, the speed and direction of the waypoint, etc. The collision risk of the waypoint can be evaluated by the preset obstacle map and sensor data.i The collision risk of a point, for example, a point close to an obstacle has a higher risk value, based on the distance d to the obstacle. i , the collision risk can be defined as

[0041] In some embodiments, the calculation formula corresponding to the path smoothness is f 平滑 As shown in formula (4):

[0042]

[0043] Among them, P i-2 represents the i-2th path point in the path, ||(P i -P i-1 )-(P i-1 -P i-2 )|| can be understood as the change in direction between adjacent path segments, that is, the degree of change in direction of the path from the i-2th point to the i-th point.

[0044] In some embodiments, the objective function F can be expressed as shown in formula (5):

[0045] F=ω1·f 长度 +ω2·f 能耗 +ω3·f 碰撞 +ω4·f 平滑 (5)

[0046] Among them, ω1 is the calculation weight of the path length (also known as the weight coefficient), which determines the importance of the path length in the overall optimization, ω2 is the calculation weight of the energy consumption, which determines the importance of the energy consumption in the overall optimization, ω3 is the calculation weight of the collision risk, which determines the importance of the collision risk in the overall optimization, ω4 is the calculation weight of the path smoothness, which determines the importance of the path smoothness in the overall optimization.

[0047] Step S102, during the operation of the robot arm, the environmental information and state data of the robot arm at the first moment are processed based on the fuzzy logic controller to obtain weight values ​​of various calculation weights.

[0048] Optionally, during the operation of the robot arm, the environmental information of the robot arm at the first moment can be collected by laser radar, camera, ultrasonic sensor and other devices, and the collected data can be integrated by data fusion technology. Optionally, the path planning system can monitor the current state of the robot arm by communicating with the control module of the robot arm to obtain state data, and record the historical state and motion trajectory of the robot arm.

[0049] In some embodiments, the first moment can be understood as the previous moment when the weight value is determined based on the fuzzy logic controller. In layman's terms, it can also be understood as the current moment (or the latest moment).

[0050] In some embodiments, the environmental information of the robotic arm may include environmental complexity and obstacle density. Environmental complexity indicates the distribution of obstacles in the environment where the robotic arm is located. Obstacle density refers to the number of obstacles per unit area. Status data may include target position changes and robotic arm speed. Target position changes refer to the rate and direction of change of the target position. Robotic arm speed refers to the movement speed of the robotic arm.

[0051] After acquiring the environmental information and status data of the robot arm at the first moment, the path planning system can process the environmental information and status data of the robot arm at the first moment based on the fuzzy logic controller to obtain the weight values ​​of various calculation weights.

[0052] Step S103, updating the objective function based on the weight values ​​of each calculated weight to obtain an updated objective function.

[0053] Optionally, the path planning system may substitute the weight values ​​of each calculated weight into the objective function, thereby updating the objective function and obtaining an updated objective function.

[0054] Step S104, performing path planning on the path between the initial position and the target position of the robot arm based on the updated objective function by using a genetic algorithm to obtain a first target path.

[0055] In some embodiments, the initial position can be understood as the current position of the robot arm, and the target position can be understood as the position to be reached by the robot arm, and the target position is predetermined.

[0056] In some embodiments, the path planning system may perform path planning on the path between the initial position and the target position of the robot arm based on the updated objective function through a genetic algorithm to obtain a first target path. For example, a population is first initialized, the population includes multiple paths, each path is composed of a sequence of path points, and then the fitness of each path in the population is calculated based on the objective function, so as to determine the first target path according to the fitness.

[0057] After determining the first target path, the path planning system may send the first target path to the control module of the robotic arm, so as to control the robotic arm to move from the initial position to the target position based on the first target path through the control module of the robotic arm.

[0058] Based on the scheme defined by the above steps S101 to S104, it can be known that in the embodiment of the present invention, a method of path planning for the robot arm based on multiple optimization objectives is adopted, by obtaining the objective function corresponding to the robot arm, and then in the working process of the robot arm, the environmental information and state data of the robot arm at the first moment are processed based on the fuzzy logic controller to obtain the weight value of each calculation weight, and then the objective function is updated based on the weight value of each calculation weight to obtain the updated objective function, so as to plan the path between the initial position and the target position of the robot arm based on the updated objective function through the genetic algorithm to obtain the first target path. Among them, the objective function is used to evaluate the performance of the path planning of the robot arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness.

[0059] It is easy to notice that in the above process, the objective function is set based on multiple optimization objectives such as path length, energy consumption, collision risk and path smoothness, and then the path between the initial position and the target position of the robot is planned based on the updated objective function by the genetic algorithm to obtain the first target path, so that when planning the path of the robot, many factors are considered, so that the planned path is not only relatively short, but also optimized in terms of energy consumption, collision risk and path smoothness, thereby improving the accuracy of path planning. In addition, by processing the environmental information and state data of the robot at the first moment based on the fuzzy logic controller, the weight values ​​of each calculation weight are obtained to update the objective function, and the objective function is adaptively adjusted according to the relevant information of the robot, so that the accuracy of path planning can be further improved.

[0060] It can be seen that the solution provided in the present application achieves the purpose of path planning for the robotic arm based on multiple optimization objectives, thereby achieving the technical effect of improving the accuracy of path planning, and further solving the technical problem of low accuracy of path planning of the robotic arm in related technologies.

[0061] In an optional embodiment, in the process of processing the environmental information and state data of the robot arm at the first moment based on the fuzzy logic controller to obtain the weight values ​​of each calculation weight, the path planning system can obtain the fuzzy logic rules, and perform fuzzy reasoning processing on the environmental information and state data of the robot arm at the first moment based on the fuzzy logic rules through the fuzzy logic controller to obtain the fuzzy output result, and then defuzzify the fuzzy output result to obtain the weight values ​​of each calculation weight. Among them, the fuzzy logic rules represent the mapping relationship between the input fuzzy variables and the output fuzzy variables, the input fuzzy variables are the environmental information and state data of the robot arm, and the output fuzzy variables are the various calculation weights.

[0062] In some embodiments, the input fuzzy variables include the above-mentioned environment complexity, obstacle density, robot arm speed and target position change.

[0063] Optionally, the fuzzy logic rule can be pre-set by the user, and the fuzzy logic rule can include multiple rules. In some embodiments, the environmental complexity can be an influencing factor of the calculation weight of the collision risk and the path smoothness. For example, if the environmental complexity is high, it means that there are many obstacles in the path and the path is complex, then the calculation weight of the collision risk should be increased to ensure that the robot arm effectively avoids obstacles in a complex environment, and the calculation weight of the path smoothness may also be increased to ensure the smoothness of the path to better cope with the complex environment. In some embodiments, the obstacle density can be an influencing factor of the calculation weight of the collision risk and the path smoothness. For example, when the obstacle density is high, it is necessary to increase the obstacle avoidance priority, and the calculation weight of the path smoothness may also be increased to avoid frequent direction changes. The additional obstacle avoidance difficulties. In some embodiments, the robot arm speed can be an influencing factor of the calculation weight of the path smoothness and energy consumption. For example, a higher speed requires a smoother path to reduce the collision risk caused by inertia, so the calculation weight of the path smoothness should be increased. At the same time, a fast speed may bring higher energy consumption. Therefore, the calculation weight of the energy consumption may need to be appropriately adjusted to weigh the relationship between speed and energy consumption. In some embodiments, the target position change can be an influencing factor of the calculation weight of the path length and path smoothness. For example, if the target location varies greatly, the calculation weight of path length may be increased because a longer path affects efficiency. In this case, the calculation weight of path smoothness may need to be adjusted to balance path length and smoothness.

[0064] For example, an alternative fuzzy logic rule could be as follows:

[0065] Rule 1: If the environment complexity is high, then the calculation weight of collision risk is high;

[0066] Rule 2: If the obstacle density is high and the robot speed is fast, the calculation weight of path smoothness is high;

[0067] Rule 3: If the target position changes greatly, the calculation weight of the path length is high;

[0068] Rule 4: If the environment complexity is low, then the energy consumption weight is calculated with high weight.

[0069] Optionally, the path planning system can perform fuzzy reasoning on the environment information and state data of the robot arm at the first moment based on fuzzy logic rules through a fuzzy logic controller to obtain a fuzzy output result. In this process, the path planning system can fuzzify the environment information and state data of the robot arm at the first moment based on the fuzzy set and membership function predefined for the input fuzzy variables, obtain the fuzzy values ​​corresponding to the aforementioned environment information and state data, and then input the aforementioned fuzzy values ​​into the fuzzy logic controller, which performs fuzzy reasoning based on the input to obtain a fuzzy output result.

[0070] Optionally, after obtaining the fuzzy output result, the path planning system may use a defuzzification method to defuzzify the fuzzy output result based on a fuzzy set and a membership function predefined for the output fuzzy variable to obtain a weight value of each calculation weight. For example, the defuzzification method may be a centroid method or a maximum membership principle.

[0071] Optionally, the fuzzy sets corresponding to the input fuzzy variables and the output fuzzy variables can be expressed as low, medium, and high. For example, the fuzzy sets corresponding to the environmental complexity are: low, medium, and high. Optionally, a triangular or trapezoidal membership function can be used to express the aforementioned fuzzy sets.

[0072] For example, assuming that the obstacle density in the current environment of the robot is high, the robot is moving at a medium speed, and the target position changes little, the following weight values ​​can be obtained through the reasoning of the fuzzy logic controller:

[0073] Calculation weight of path length: ω1 = 0.2 (not paying much attention to path length because the target position changes little);

[0074] Calculation weight of capacity consumption: ω2 = 0.3 (moderate, because the obstacle density is high and the speed is medium);

[0075] Calculation weight of collision risk: ω3 = 0.7 (high attention to obstacle avoidance because the obstacle density is high);

[0076] Calculation weight for path smoothness: ω4 = 0.5 (a smooth path is required to handle obstacles).

[0077] It should be noted that, through the above process, accurate calculation of the weight values ​​of various calculation weights is achieved, thereby effectively improving the accuracy of path planning.

[0078] In an optional embodiment, Figure 2 is a schematic diagram of an optional method for determining a first target path according to an embodiment of the present invention, such as Figure 2As shown, in the process of performing path planning on the path between the initial position and the target position of the robot arm based on the updated objective function through the genetic algorithm to obtain the first target path, the path planning system can perform the following steps:

[0079] Step S201, initializing a population, wherein the population includes multiple paths, and each path is composed of a sequence of path points.

[0080] Optionally, multiple paths in the population start from the initial position and end at the target position.

[0081] Step S202, calculating the fitness of each path in the population based on the updated objective function.

[0082] For each path, the path planning system can substitute the position of the path points in the path into the objective function according to the order between the path points, so as to calculate the objective function value corresponding to the path, and then the path planning system can convert the objective function value into fitness. Among them, the fitness is negatively correlated with the objective function value, and the path planning system can convert the objective function value into fitness by at least one of linear transformation, power function transformation, exponential transformation, etc. Step S203, based on the fitness of each path, determine multiple first paths from the population.

[0083] For example, a path with relatively high fitness is determined as the first path.

[0084] Step S204: generating a new path according to the multiple first paths, and updating the population based on the new path to obtain an updated population.

[0085] Optionally, after determining the first path, the path planning system can generate a new path based on the multiple first paths based on the crossover processing and mutation processing in the genetic algorithm, and update the population based on the new path to obtain an updated population. For example, the new path is directly added to the population to obtain an updated population, or the new path is used to replace the paths in the population except the first path to obtain an updated population.

[0086] Step S205, when the preset iteration condition is not met, repeatedly executing the step of calculating the fitness of each path in the updated population based on the updated objective function until the preset iteration condition is met, and determining the first target path from the updated population according to the fitness.

[0087] The path planning system can determine whether the current iteration meets the preset iteration condition, and the preset iteration condition can be that the number of iterations reaches a preset threshold, or that the difference between the highest fitness in the current iteration and the highest fitness in the historical iteration is less than the preset difference. In the case that the current iteration does not meet the preset iteration condition, the path planning system can repeatedly perform the steps of calculating the fitness of each path in the updated population based on the updated objective function, and then determining a new first path based on the calculated fitness, and then generating a new path based on the new first path to update the population, until the preset iteration condition is met, and the first target path is determined from the updated population according to the fitness.

[0088] It should be noted that, through the above process, the first target path is accurately determined, thereby effectively improving the accuracy of path planning.

[0089] In an optional embodiment, in the process of determining multiple first paths from a population based on the fitness of each path, the path planning system can sort the multiple paths in the population in order of fitness from low to high to obtain multiple sorted paths, and then determine the first N paths in the sorted multiple paths as multiple first paths, where N is a positive integer greater than 1.

[0090] Optionally, for paths that are not ranked in the top N among the sorted multiple paths, the path planning system may retain them in the population, or may subsequently replace such paths with new paths (equivalent to removing such paths from the population).

[0091] It should be noted that since the performance of a path with higher fitness is relatively better (that is, the path is better), by determining the path with higher fitness as the first path, the first path is accurately determined, thereby effectively improving the accuracy of path planning.

[0092] In an optional embodiment, in the process of generating a new path based on multiple first paths, the path planning system can perform crossover processing in a genetic algorithm on the multiple first paths to obtain multiple initial paths, and then perform mutation processing in a genetic algorithm on the multiple initial paths to obtain at least one new path.

[0093] Optionally, during the intersection processing, the path planning system may first determine at least one path pair from the multiple first paths, wherein the path pair includes two first paths. Afterwards, for each path pair, the path planning system may randomly select one or more path points as intersection points, and then segment the first path in the path pair at the intersection points to obtain multiple segmented sub-paths corresponding to the two first paths, and then exchange the segmented sub-paths in the multiple segmented sub-paths corresponding to the two first paths, so as to obtain two initial paths corresponding to the path pair.

[0094] Optionally, during the mutation process, for an initial path among multiple initial paths, the path planning system may randomly select one or more path points in the initial path as mutation points, and then update the selected mutation points to obtain a new path. For example, the original position of the mutation point is (1, 2, 3), and the updated position is (2, 2, 3).

[0095] It should be noted that, through the above process, accurate generation of a new path is achieved, thereby effectively improving the accuracy of path planning.

[0096] In an optional embodiment, after determining the first target path from the updated population according to the fitness, the path planning system may determine the path with the highest fitness in the updated population as the first target path.

[0097] Optionally, the path planning system may perform fitness calculation on new paths in the updated population whose fitness has not been calculated, and then determine the path with the highest fitness in the updated population as the first target path.

[0098] It should be noted that since the performance of the path with higher fitness is relatively better (that is, the path is better), therefore, by determining the path with the highest fitness as the first target path, the first target path is accurately determined, thereby effectively improving the accuracy of path planning.

[0099] In some embodiments, an optional application process of determining the first target path described above is described. For example, assuming that the working scene of the robot arm is on a 2D plane, the robot arm needs to move from the starting point (0, 0) to the end point (10, 10), and there are some obstacles in the middle. The positions of the obstacles are (3, 5), (6, 7), and (8, 2). When initializing the population, 10 paths can be randomly generated, each path consists of 5 path points, and two of the paths can be as follows:

[0100] Path 1: [(0, 0), (2, 3), (5, 5), (7, 8), (10, 10)]

[0101] Path 2: [(0, 0), (3, 2), (4, 6), (6, 9), (10, 10)]

[0102] Afterwards, the path planning system can use the objective function to calculate the objective function value corresponding to each path. For example, the calculation of the path length of path 1 is shown in formula (6):

[0103] L1=||(0,0)-(2,3)||+||(2,3)-(5,5)||+||(5,5)-(7,8)||+||(7,8)-(10,10)||=3.61+3.61+3.61+3.61=14.44 (6)

[0104] Assuming k = 1, the energy consumption of path 1 is calculated as shown in formula (7):

[0105] E1=k·(3.61+3.61+3.61+3.61)=14.44 (7)

[0106] Optionally, assuming that the distance between path 1 and obstacle (3, 5) is relatively close and the collision risk is relatively high, R1=10 may be set.

[0107] The calculation of path smoothness of path 1 is shown in formula (8):

[0108] L1=||(2,3)-2(0,0)+(0,0)||+||(5,5)-2(2,3)+(0,0)||+||(7,8)-2(5 ,5)+(2,3)||+||(10,10)-2(7,8)+(5,5)||=2.24+1.41+2.24+2.24=8.13 (8)

[0109] Further, assuming that ω1=ω2=1, ω3=0.5, ω4=0.3, the objective function value of path 1 can be calculated as F1=14.44+14.44+0.5×10+0.3×8.13=31.88. Afterwards, the path planning system can determine the fitness of path 1 based on the objective function value of path 1.

[0110] Furthermore, after calculating the fitness of each path in the population, the path planning system can determine multiple first paths from the population based on the fitness of each path, generate new paths based on the multiple first paths, and update the population based on the new paths to obtain an updated population, thereby repeating the step of calculating the fitness of each path in the updated population based on the updated objective function until the preset iteration condition is met, and determining the first target path from the updated population according to the fitness.

[0111] In an optional embodiment, after obtaining the first target path, the path planning system can control the robot arm to move to the target position based on the first target path, and then determine the target position as the updated initial position, and determine the next target position, so as to process the environmental information and state data of the robot arm at the second moment based on the fuzzy logic controller to obtain the updated weight values ​​of each calculated weight, and then update the objective function based on the updated weight values ​​of each calculated weight to obtain the updated objective function again, and plan the path between the updated initial position and the next target position of the robot arm based on the updated objective function through a genetic algorithm to obtain the second target path.

[0112] Optionally, after determining the first target path, the path planning system may send the first target path to the control module of the robot arm, so as to control the robot arm to move from the initial position to the target position based on the first target path through the control module. Afterwards, the path planning system may determine the target position as the updated initial position, and determine the next target position, wherein the next target position may be manually input by the user or preset.

[0113] Afterwards, the path planning system can re-determine the weight values ​​of each calculated weight according to the environmental information and state data of the robot arm at the second moment, thereby obtaining an updated objective function, and determine the second target path based on the genetic algorithm and the updated objective function. Optionally, the process of determining the second target path by the path planning system is the same as the process of determining the first target path, so it will not be repeated here.

[0114] Optionally, the second moment mentioned above can be understood as the moment of determining the next target position. In layman's terms, it can also be understood as the current moment (or the latest moment).

[0115] It should be noted that, through the above process, adaptive adjustment of the objective function according to the environmental information and state data of the robot arm is achieved, thereby further improving the accuracy of path planning.

[0116] It can be seen that the solution provided in the present application achieves the purpose of path planning for the robotic arm based on multiple optimization objectives, thereby achieving the technical effect of improving the accuracy of path planning, and further solving the technical problem of low accuracy of path planning of the robotic arm in related technologies.

[0117] Example 2

[0118] According to an embodiment of the present invention, an embodiment of a path planning device for a robot arm is provided, wherein: Figure 3 is a schematic diagram of an optional path planning device for a robot arm according to an embodiment of the present invention, such as Figure 3As shown, the device comprises:

[0119] An acquisition module 301 is used to acquire an objective function corresponding to the robot arm, wherein the objective function is used to evaluate the performance of the path planning of the robot arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness;

[0120] The first processing module 302 is used to process the environmental information and state data of the robotic arm at the first moment based on the fuzzy logic controller during the working process of the robotic arm to obtain the weight value of each calculation weight;

[0121] A first updating module 303, configured to update the objective function based on the weight values ​​of each calculated weight to obtain an updated objective function;

[0122] The second processing module 304 is used to plan the path between the initial position and the target position of the robot arm based on the updated objective function through a genetic algorithm to obtain a first target path.

[0123] It should be noted that the above-mentioned acquisition module 301, first processing module 302, first update module 303 and second processing module 304 correspond to steps S101 to S104 in the above-mentioned embodiment, and the examples and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0124] Optionally, the first processing module 302 also includes: an acquisition submodule, used to acquire fuzzy logic rules, wherein the fuzzy logic rules characterize the mapping relationship between input fuzzy variables and output fuzzy variables, the input fuzzy variables are environmental information and state data of the robot arm, and the output fuzzy variables are various calculation weights; a first processing submodule, used to perform fuzzy reasoning processing on the environmental information and state data of the robot arm at the first moment based on the fuzzy logic rules through a fuzzy logic controller to obtain a fuzzy output result; and a second processing submodule, used to defuzzify the fuzzy output result to obtain the weight value of each calculation weight.

[0125] Optionally, the second processing module 304 also includes: a third processing submodule, used to initialize the population, wherein the population includes multiple paths, and each path consists of a sequence of path points; a calculation submodule, used to calculate the fitness of each path in the population based on the updated objective function; a first determination submodule, used to determine multiple first paths from the population based on the fitness of each path; an update submodule, used to generate new paths based on the multiple first paths, and update the population based on the new paths to obtain an updated population; a second determination submodule, used to repeat the step of calculating the fitness of each path in the updated population based on the updated objective function when a preset iteration condition is not met, until the preset iteration condition is met, and determine the first target path from the updated population according to the fitness.

[0126] Optionally, the first determination submodule also includes: a sorting unit, used to sort multiple paths in the population in order of fitness from low to high to obtain multiple sorted paths; a first determination unit, used to determine the first N paths among the sorted multiple paths as multiple first paths, where N is a positive integer greater than 1.

[0127] Optionally, the update submodule also includes: a first processing unit, used to perform crossover processing in the genetic algorithm on the multiple first paths to obtain multiple initial paths; a second processing unit, used to perform mutation processing in the genetic algorithm on the multiple initial paths to obtain at least one new path.

[0128] Optionally, the second determination submodule further includes: a second determination unit, configured to determine the path with the highest fitness in the updated population as the first target path.

[0129] Optionally, the path planning device of the robotic arm also includes: a control module, used to control the robotic arm to move to the target position based on the first target path; a determination module, used to determine the target position as the updated initial position, and determine the next target position; a third processing module, used to process the environmental information and state data of the robotic arm at the second moment based on the fuzzy logic controller, and obtain the updated weight value of each calculated weight; a second update module, used to update the objective function based on the updated weight value of each calculated weight, and obtain a further updated objective function; a fourth processing module, used to plan the path between the updated initial position of the robotic arm and the next target position based on the further updated objective function through a genetic algorithm, and obtain a second target path.

[0130] Example 3

[0131] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned path planning method for the robotic arm when running.

[0132] Example 4

[0133] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 4 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned path planning method for the robotic arm when running.

[0134] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0135] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, 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 through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0138] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0139] If the integrated unit is implemented in the form of 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0140] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A path planning method for a robotic arm, characterized in that: include: Obtaining an objective function corresponding to the robotic arm, wherein the objective function is used to evaluate the performance of the path planning of the robotic arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness; During the operation of the robotic arm, the environmental information and state data of the robotic arm at the first moment are processed based on the fuzzy logic controller to obtain weight values ​​of various calculation weights; Update the objective function based on the weight values ​​of the respective calculated weights to obtain an updated objective function; A path planning is performed on a path between an initial position and a target position of the robot arm based on the updated objective function by using a genetic algorithm to obtain a first target path.

2. The method according to claim 1, characterized in that The environmental information and state data of the robot arm at the first moment are processed based on the fuzzy logic controller to obtain weight values ​​of various calculation weights, including: Obtaining a fuzzy logic rule, wherein the fuzzy logic rule represents a mapping relationship between an input fuzzy variable and an output fuzzy variable, the input fuzzy variable is environmental information and state data of the robotic arm, and the output fuzzy variable is each calculation weight; Performing fuzzy reasoning processing on the environmental information and state data of the robot arm at the first moment based on the fuzzy logic rules by the fuzzy logic controller to obtain a fuzzy output result; The fuzzy output result is defuzzified to obtain the weight value of each calculation weight.

3. The method according to claim 1, characterized in that The method further comprises: performing path planning on a path between an initial position and a target position of the robot arm based on the updated target function by using a genetic algorithm to obtain a first target path, comprising: Initializing a population, wherein the population includes multiple paths, each path consisting of a sequence of path points; Calculating the fitness of each path in the population based on the updated objective function; determining a plurality of first paths from the population based on the fitness of each path; generating a new path according to the plurality of first paths, and updating the population based on the new path to obtain an updated population; If the preset iteration condition is not met, the step of calculating the fitness of each path in the updated population based on the updated objective function is repeated until the preset iteration condition is met, and the first target path is determined from the updated population according to the fitness.

4. The method according to claim 3, characterized in that Based on the fitness of each path, a plurality of first paths are determined from the population, comprising: Sorting the multiple paths in the population in order of fitness from low to high to obtain the sorted multiple paths; The first N paths among the sorted multiple paths are determined as the multiple first paths, where N is a positive integer greater than 1.

5. The method according to claim 3, characterized in that: Generating a new path according to the multiple first paths includes: Performing crossover processing in the genetic algorithm on the multiple first paths to obtain multiple initial paths; The multiple initial paths are subjected to mutation processing in the genetic algorithm to obtain at least one new path.

6. The method according to claim 3, characterized in that Determining the first target path from the updated population according to the fitness includes: The path with the highest fitness in the updated population is determined as the first target path.

7. The method according to claim 1, characterized in that After obtaining the first target path, the method further includes: Controlling the robotic arm to move to the target position based on the first target path; Determine the target position as the updated initial position, and determine the next target position; Processing the environmental information and state data of the robot arm at the second moment based on the fuzzy logic controller to obtain updated weight values ​​of each calculation weight; Update the objective function based on the updated weight values ​​of the respective calculated weights to obtain an updated objective function; The genetic algorithm is used to plan a path between the updated initial position of the robot arm and the next target position based on the again updated target function to obtain a second target path.

8. A path planning device for a robotic arm, characterized in that: include: An acquisition module is used to acquire an objective function corresponding to the robot arm, wherein the objective function is used to evaluate the performance of the path planning of the robot arm, and the objective function includes calculation formulas and calculation weights corresponding to multiple optimization objectives, and the multiple optimization objectives include: path length, energy consumption, collision risk, and path smoothness; A first processing module is used to process the environmental information and state data of the robotic arm at a first moment based on a fuzzy logic controller during the working process of the robotic arm to obtain weight values ​​of various calculation weights; A first updating module, used for updating the objective function based on the weight values ​​of the respective calculated weights to obtain an updated objective function; The second processing module is used to plan a path between the initial position and the target position of the robot arm based on the updated objective function through a genetic algorithm to obtain a first target path.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the path planning method for the robot arm described in any one of claims 1 to 7 when running.

10. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the path planning method for the robotic arm described in any one of claims 1 to 7 when running.

Citation Information

Cited By

  • Picking path generation method and device of tea leaf picking robot

    CN120663312A

  • A tea leaf picking robot picking path generation method and device

    CN120663312B