Track planning method, device and equipment of mechanical arm, medium and program product
The path and trajectory of the robot arm are optimized through greedy algorithms and five-degree polynomial interpolation method, combined with the artificial hummingbird algorithm to optimize speed and acceleration, the problems of inefficiency and motion impact of the robot arm in banking services are solved, and efficient and stable robot arm operation is achieved.
Patent Information
- Application Number
- CN202510902752.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-08-01
AI Technical Summary
The robotic arms used in the banking service field have inefficiency and poor path planning, which leads to a large motion impact of the robotic arms during the grabbing and delivery process, affecting the grabbing accuracy and equipment wear, and increasing maintenance costs.
The greedy algorithm is used to optimize the initial path redundantly, and the five-order polynomial interpolation method and the artificial hummingbird algorithm are combined to optimize the movement trajectory of the robotic arm, generate a continuous and smooth joint motion trajectory, and determine the velocity and acceleration values of the path point.
Improve the path planning efficiency of the robotic arm, reduce motion shock, reduce customer complaint rate, extend equipment life, and reduce operating costs.
Smart Images

Figure CN120395909A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of fintech, and more particularly to a method, apparatus, device, medium, and program product for trajectory planning of a robotic arm. Background Art
[0002] With the in-depth application of fintech such as robotic process automation and artificial intelligence in the banking industry, robotic arms are gradually expanding from the traditional manufacturing field to diverse physical delivery operations such as large-amount cash withdrawal and precious metal delivery. Especially in an environment with frequent customer interactions and high service requirements, robotic arms can significantly improve service efficiency and quality, reduce labor costs, and enhance the customer experience.
[0003] However, the robotic arms currently used in the field of bank services still have the problem of low efficiency. Summary of the Invention
[0004] In view of the above problems, the present disclosure provides a method, apparatus, device, medium, and program product for trajectory planning of a robotic arm.
[0005] According to a first aspect of the present disclosure, there is provided a method for trajectory planning of a robotic arm, the method including:
[0006] Determine an initial path of the robotic arm from a starting point to a target point;
[0007] Use a greedy algorithm to perform redundancy optimization on the initial path to obtain an optimized path;
[0008] Utilize a quintic polynomial interpolation method to determine a quintic polynomial interpolation trajectory of the robotic arm based on the optimized path;
[0009] Use an artificial hummingbird algorithm to determine the speed and acceleration values of each path point on the quintic polynomial interpolation trajectory.
[0010] According to an embodiment of the present disclosure, the determining an initial path of the robotic arm from a starting point to a target point includes:
[0011] Establish two search trees with the starting point and the target point as root nodes;
[0012] Adopt a heuristic strategy to select optimal sampling points in the free space, guide the search directions of the two search trees, determine the expansion direction of the search directions through nearest neighbor search, and grow the two search trees in a collision-free manner;
[0013] Alternately expand the two search trees until successful connection to obtain a complete path;
[0014] Extract the initial path from the complete path by backtracking the parent nodes.
[0015] According to an embodiment of the present disclosure, the redundant optimization of the initial path using the greedy algorithm to obtain the optimized path includes:
[0016] Set the starting point of the initial path as the current starting point of the optimized path, and the ending point of the initial path as the current target point of the optimized path;
[0017] Connect the current starting point and the current target point to obtain a temporary path;
[0018] Perform collision detection on the temporary path;
[0019] In the case of detecting a collision, update the parent node of the current target point to the current target point;
[0020] In the case of not detecting a collision, add the current target point to the optimized path, update the current starting point to the current target point, and update the current target point to the ending point of the optimized path;
[0021] Perform the operation of performing collision detection on the temporary path again until the current starting point and the current target point coincide to obtain the optimized path.
[0022] According to an embodiment of the present disclosure, the determination of the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path using the quintic polynomial interpolation method includes:
[0023] Establish a quintic polynomial function of the joint angle of the robotic arm with respect to time;
[0024] Apply constraint conditions to the quintic polynomial function, and the constraint conditions include boundary constraints on the position, velocity, and acceleration of the starting point and the target point;
[0025] Determine the coefficients of the quintic polynomial function by solving the system of simultaneous equations under the constraint conditions;
[0026] Generate the quintic polynomial interpolation trajectory of the robotic arm based on the coefficients.
[0027] According to an embodiment of the present disclosure, the determination of the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory using the artificial hummingbird algorithm includes:
[0028] Determine the fitness function with the minimization of the angular velocity and angular acceleration during the joint movement of the robotic arm as the optimization goal;
[0029] Set the joint angular velocity and angular acceleration at the starting point and the ending point of the trajectory to 0, and use the angular velocity and angular acceleration of the path points other than the starting point and the ending point in the trajectory as the population of the artificial hummingbird algorithm;
[0030] Determine the population with the lowest fitness value through iterative optimization;
[0031] Based on the population with the lowest fitness value, determine the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory.
[0032] According to an embodiment of the present disclosure, during the iteration process of the artificial hummingbird algorithm, the method further includes:
[0033] Construct an interpolation trajectory based on the current population value;
[0034] Calculate the fitness value of the interpolation trajectory;
[0035] Based on the fitness value of the interpolation trajectory, select a foraging strategy from the threshold foraging strategies, and the foraging strategies include guided foraging, territorial foraging, and migratory foraging;
[0036] Update the population based on the selected prime foraging strategy.
[0037] According to an embodiment of the present disclosure, during the process of growing the two search trees in a collision-free manner, the method further includes:
[0038] Shorten the length of the paths generated by the two search trees by rewriting the parent nodes and / or randomly reconnecting.
[0039] A second aspect of the present disclosure provides a trajectory planning device for a robotic arm, and the device includes:
[0040] A path determination module, configured to determine an initial path of the robotic arm from a starting point to a target point;
[0041] An optimization module, configured to perform redundancy optimization on the initial path by using a greedy algorithm to obtain an optimized path;
[0042] A trajectory determination module, configured to use the quintic polynomial interpolation method to determine the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path;
[0043] A velocity determination module, configured to use the artificial hummingbird algorithm to determine the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory.
[0044] A third aspect of the present disclosure provides an electronic device, including: one or more processors; a memory, configured to store one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0045] The fourth aspect of the present disclosure further provides a computer-readable storage medium, on which a computer program or instructions are stored. When the computer program or instructions are executed by a processor, the steps of the above method are implemented.
[0046] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, the steps of the above method are implemented.
[0047] According to the robotic arm trajectory planning method, device, equipment, medium and program product provided by the embodiments of the present disclosure, at least the following partial technical effects can be achieved:
[0048] (1) By improving the bidirectional RRT* algorithm with a heuristic strategy, invalid sampling and consumption of computing resources are reduced, and the path search speed is improved to meet the real-time requirements during the peak period of banking business.
[0049] (2) By using a greedy algorithm to remove redundant path points and simplify the path structure, and combining the quintic polynomial interpolation method and the artificial hummingbird algorithm to generate a continuous and smooth joint motion trajectory, the sudden change of the acceleration at the end of the robotic arm is reduced, the motion impact is lowered, the slipping or damage of items caused by vibration is avoided, the customer complaint rate is reduced. At the same time, equipment wear is alleviated, the maintenance cycle is extended, and the operation cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Through the following description of the embodiments of the present disclosure with reference to the drawings, the above content and other objects, features and advantages of the present disclosure will become clearer. In the drawings:
[0051] Figure 1 Schematically shows a flowchart of the robotic arm trajectory planning method according to an embodiment of the present disclosure;
[0052] Figure 2 Schematically shows a flowchart of the robotic arm path planning according to an embodiment of the present disclosure;
[0053] Figure 3 Schematically shows a flowchart of the robotic arm trajectory optimization according to an embodiment of the present disclosure;
[0054] Figure 4 Schematically shows a flowchart of the robotic arm trajectory optimization based on the artificial hummingbird algorithm according to an embodiment of the present disclosure;
[0055] Figure 5 Schematically shows a flight direction diagram of the guided foraging strategy according to an embodiment of the present disclosure;
[0056] Figure 6 Schematically shows a structural block diagram of the robotic arm trajectory planning device according to an embodiment of the present disclosure;
[0057] Figure 7 A block diagram of an electronic device suitable for implementing a transaction method according to an embodiment of the present disclosure is schematically shown. Detailed implementation manners
[0058] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.
[0059] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising" and the like used herein indicate the presence of the described features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
[0060] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0061] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0062] In the technical solution of the present disclosure, the user information involved (including but not limited to user personal information, user image information, user transaction record information, user device information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. And the processing of the relevant data, such as collection, storage, use, processing, transmission, provision, disclosure and application, etc., all comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0063] In the scenario of making automated decisions using personal information, the methods, devices, and systems provided by the embodiments of the present disclosure all provide corresponding operation entrances for users to choose to agree or reject the results of automated decisions; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision" here refers to the activity of automatically analyzing and evaluating an individual's behavior habits, hobbies, or economic, health, credit status, etc. through a computer program and making decisions. The expression "expert decision" here refers to the activity of making decisions by personnel who are specialized in a certain field, have specialized experience, knowledge, and skills, and have reached a certain professional level.
[0064] During the peak period of banking business, customers have extremely high requirements for the real-time nature of services. If the path planning and trajectory optimization efficiency of the robotic arm is not high, it may lead to slow task execution, thereby increasing the customer waiting time and reducing customer satisfaction. In addition, complex path planning algorithms often require a large amount of computation, affecting the real-time nature of system response.
[0065] Banking operations require the robotic arm to have high-precision operation capabilities, especially when handling items such as cash and documents. Most of the existing path planning of robotic arms lacks fine control of joint movement, resulting in large movement impacts during the grasping and delivery processes of the robotic arm. The impact will not only affect the grasping accuracy, but also exacerbate the wear of the equipment, increase the maintenance cost, and even affect the stability of the service.
[0066] Based on this, the embodiments of the present disclosure provide a trajectory planning method for a robotic arm, including: determining the initial path of the robotic arm from the starting point to the target point, using the greedy algorithm to perform redundancy optimization on the initial path to obtain an optimized path, using the quintic polynomial interpolation method to determine the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path, and using the artificial hummingbird algorithm to determine the speed and acceleration values of each path point on the quintic polynomial interpolation trajectory. It can enable the robotic arm to quickly generate obstacle avoidance paths in a complex working environment, optimize the movement trajectory of the robotic arm, reduce impacts, and extend the equipment life, thereby meeting the requirements of banking operations for the high real-time nature, accuracy, and stability of automated service equipment, and reducing the operating cost of bank automated services.
[0067] Figure 1 Schematically shows a flowchart of the trajectory planning method for a robotic arm according to an embodiment of the present disclosure.
[0068] As Figure 1 shown, the trajectory planning method for the robotic arm in this embodiment may include operations S110 to S140.
[0069] In operation S110, determine the initial path of the robotic arm from the starting point to the target point.
[0070] According to an embodiment of the present disclosure, a robotic arm is an automatic operating device that can imitate certain motion functions of human hands and arms to grasp, transport objects or operate tools according to a fixed program. It can complete various complex tasks through programming.
[0071] According to an embodiment of the present disclosure, trajectory planning refers to planning a motion path from a starting point to a target point and the motion states (such as speed, acceleration, etc.) of each point on this path for a motion system such as a robotic arm, to ensure that the robotic arm can complete the motion task safely, efficiently and accurately.
[0072] According to an embodiment of the present disclosure, the initial path can be the motion path preliminarily planned by the robotic arm from the starting point to the target point, and this path may not consider the optimization of the path and the rationality of the motion state.
[0073] In operation S120, the greedy algorithm is used to perform redundancy optimization on the initial path to obtain an optimized path.
[0074] According to an embodiment of the present disclosure, the greedy algorithm is an algorithm that makes the best or optimal (i.e., most favorable) choice in each step of selection, hoping that the result will be the best or optimal globally.
[0075] According to an embodiment of the present disclosure, in robotic arm trajectory planning, the greedy algorithm can be used to process the initial path, gradually removing the redundant parts in the path, such as merging adjacent straight line segments, removing unnecessary turning points, etc., so as to obtain a more concise and efficient optimized path. The greedy algorithm makes a locally optimal choice at each step, hoping to finally obtain a globally optimal optimized path.
[0076] In operation S130, using the quintic polynomial interpolation method, based on the optimized path, the quintic polynomial interpolation trajectory of the robotic arm is determined.
[0077] According to an embodiment of the present disclosure, the quintic polynomial interpolation method is a mathematical interpolation method that constructs a quintic polynomial function to fit the given data points.
[0078] According to an embodiment of the present disclosure, in robotic arm trajectory planning, after obtaining the optimized path, the quintic polynomial interpolation method can be used to perform interpolation processing on the points on the path. Using the quintic polynomial interpolation method, the positions, speeds and accelerations of the robotic arm at each point on the optimized path can be determined, making the motion of the robotic arm smoother and more continuous.
[0079] In operation S140, using the artificial hummingbird algorithm, the speed and acceleration values of each path point on the quintic polynomial interpolation trajectory are determined.
[0080] According to an embodiment of the present disclosure, the artificial hummingbird algorithm is an intelligent optimization algorithm inspired by the foraging behavior of hummingbirds. It simulates the behaviors of hummingbirds during foraging, such as searching, following, and competing, and continuously iterates to find the optimal solution.
[0081] According to an embodiment of the present disclosure, in the trajectory planning of a robotic arm, the artificial hummingbird algorithm can search for the optimal speed and acceleration values in the feasible solution space of the quintic polynomial interpolation trajectory by simulating the foraging behavior of hummingbirds to meet the motion performance requirements of the robotic arm, such as minimizing the motion time and reducing energy consumption.
[0082] According to an embodiment of the present disclosure, on the one hand, the greedy algorithm is used to optimize the redundancy of the initial path, effectively removing the redundant parts in the path, making the motion path of the robotic arm more concise and efficient, reducing unnecessary motion distance and time, and improving work efficiency. On the other hand, the quintic polynomial interpolation method is used to determine the interpolation trajectory, which can ensure the continuity and smoothness of the position, speed, and acceleration of the robotic arm during motion, avoid impacts and vibrations, improve the motion accuracy and stability, and ensure the safety of the robotic arm and the operating object. On yet another hand, by using the artificial hummingbird algorithm to determine the speed and acceleration values of each path point, the motion performance of the robotic arm can be further optimized and flexibly adjusted according to actual needs, such as minimizing the motion time and reducing energy consumption. While ensuring the motion quality, the overall performance and adaptability of the robotic arm are improved, enabling it to better meet the requirements of complex and changing industrial production scenarios.
[0083] The trajectory planning method of the robotic arm provided by the embodiment of the present disclosure includes two parts, namely the path planning part and the trajectory optimization part. The following is based on Figure 2 A schematic description of the path planning part provided by the embodiment of the present disclosure is given, and based on Figures 3 - 5 A schematic description of the trajectory optimization part provided by the embodiment of the present disclosure is given.
[0084] Figure 2 The flowchart of the path planning of the robotic arm according to an embodiment of the present disclosure is schematically shown.
[0085] As Figure 2 shown, the path planning of the robotic arm in this embodiment may include operations S210 to S240.
[0086] In operation S210, two search trees are established with the starting point and the target point as the root nodes.
[0087] In operation S220, a heuristic strategy is used to select the optimal sampling points in the free space to guide the search directions of the two search trees, and the expansion direction of the search direction is determined through the nearest neighbor search to grow the two search trees in a collision-free manner.
[0088] In operation S230, the two search trees are alternately expanded until they are successfully connected to obtain a complete path.
[0089] In operation S240, the initial path is extracted from the complete path by backtracking the parent nodes.
[0090] Use the improved bidirectional RRT* algorithm based on the heuristic strategy to quickly find a high-quality path that is as short as possible and absolutely safe and collision-free.
[0091] In some embodiments, the improved bidirectional RRT* algorithm based on the heuristic strategy can be used to quickly find a high-quality path that is as short as possible and absolutely safe and collision-free.
[0092] The bidirectional RRT* algorithm is a sampling-based algorithm. The bidirectional RRT* algorithm is based on probabilistic completeness, ensuring the possibility of finding a feasible path in a complex environment. At the same time, it also has strong adaptability and can handle various complex constraint conditions. However, due to the lack of clear guiding information in the sampling process of the algorithm, a large number of ineffective samplings often need to be carried out, resulting in waste of computing resources and restricting its application in real life. In the embodiments of the present disclosure, a heuristic function is used to utilize a certain form of cost value or estimated value to guide the search process, making it more efficiently tend to the target state. Therefore, the improved bidirectional RRT* algorithm based on the heuristic strategy in the embodiments of the present disclosure provides a more explicit and effective guiding mechanism for the bidirectional RRT* algorithm by assigning a cost value related to its position to each sampling point. The form of its heuristic function is as follows:
[0093] (1)
[0094] Wherein, is the sampling point is the cost value of; is the sampling node and the target node is the Euclidean distance between; is the sampling node and the starting node is the Euclidean distance between; is the weight parameter. The weight parameter can determine the degree of importance of the heuristic function for the distances between the sampling point and the starting node and the target node. The larger the value of, the higher the degree of importance of the heuristic function for the distance between the sampling node and the starting node. When When the value is large, it will be more inclined to select sampling points closer to the target node to construct a path from the starting node to the target node as soon as possible, thereby reducing unnecessary search directions and improving the efficiency of the algorithm. By precisely adjusting the weights of the two types of distances and ensuring that the sum of the weights is strictly equal to 1, the sampling process can be made more dispersed and uniform. This not only helps to avoid the phenomenon of over-concentration of sampling points that may occur during the search process but also increases the possibility of finding an effective path, thereby enhancing the overall success rate and planning speed of path construction.
[0095] The specific steps of the improved bidirectional RRT* algorithm based on the heuristic strategy are as follows:
[0096] 1) Initialization: Create two trees and , with the starting point and the ending point as the root nodes respectively.
[0097] 2) Heuristic sampling: Select a sampling node with the lowest cost in the free space .
[0098] 3) Nearest neighbor search: Find the node i.e., or that is closest to in .
[0099] 4) Expand the tree: Extend a distance from towards to obtain a new node .
[0100] 5) Connect nodes: If the edge formed between and does not intersect with obstacles, then add and to , and mark as the parent node of .
[0101] 6) Rewrite: Re-select the parent node for to minimize the path length from it to the root node of .
[0102] 7) Random reconnect: Check if, by setting the parent node of the nodes within a certain range near to , the path lengths of these nodes to Whether the path lengths of the root nodes will decrease. If they do, change the parent nodes of these nodes to ; otherwise, do not change.
[0103] 8) Repeat: Switch and and repeat steps 2)-7) for iterative search and connection attempts or check if the search has reached the maximum number of iterations (connection attempt means trying to find the node closest to in another tree . If and have no path collision, connect the two trees to form a complete path).
[0104] 9) Backtrack the path: Backtrack the parent nodes from the target node in sequence to find a path connecting the start node to the target node.
[0105] Figure 3 Schematically shows a flowchart of the trajectory optimization of a robotic arm according to an embodiment of the present disclosure.
[0106] As Figure 3 shown, the idea of the greedy algorithm can be used to perform redundancy optimization on the initial path generated by the RRT algorithm, and a more efficient and smooth robotic arm motion trajectory can be constructed. The embodiments of the present disclosure adopt the greedy algorithm, where each step of the selection is based on the optimal decision in the current state, and it is expected to achieve the global optimal or approximate optimal through a series of locally optimal selections. In the redundancy path optimization of the embodiments of the present disclosure, the specific operations of the greedy algorithm are as follows:
[0107] 1) Initialize the initial path obtained by RRT path planning, include the start point and end point of the initial path in the new path, and at the same time set the start point as the current start point of the new path and the end point as the current target point of the new path.
[0108] 2) Connect the current start point and the current target point to construct a temporary line segment.
[0109] 3) Perform collision detection on this temporary line segment. If a collision is detected, update the current target point to the parent node of the current target point; if no collision is detected, add the current target point to the new path, update the current start point to the current target point, and update the current target point to the end point of the new path.
[0110] 4) Loop through steps 2) and 3) until the current start point coincides with the current target point. At this time, a new path optimized by the greedy algorithm is obtained, that is, the optimized path.
[0111] According to the embodiments of the present disclosure, the length of the paths generated by the two search trees can be shortened by rewriting the parent nodes and / or randomly reconnecting.
[0112] According to the embodiments of the present disclosure, the greedy algorithm is used for redundant path optimization, which can not only improve the overall quality of the path, but also significantly reduce the number of inflection points, making the path smoother. This optimization process not only simplifies the complexity of the path, but also helps the calculation of subsequent optimization algorithms, improving the efficiency and convenience of the algorithms.
[0113] In some embodiments, after obtaining the redundant optimized path, the path points can be converted into the trajectory of the robotic arm. The embodiments of the present disclosure adopt the fifth-order polynomial interpolation method to determine the fifth-order polynomial interpolation trajectory of a robotic arm. By establishing a fifth-order polynomial function of the joint angle of the robotic arm with respect to time and imposing constraint conditions on the fifth-order polynomial function, the constraint conditions include the boundary constraints of the positions, velocities, and accelerations of the starting point and the target point. By solving the system of simultaneous equations under the constraint conditions, the coefficients of the fifth-order polynomial function are determined, and based on these coefficients, the fifth-order polynomial interpolation trajectory of the robotic arm is generated.
[0114] Specifically, by constructing the relationship curve between the joint angle and time, various parameter changes of the robotic arm during the movement can be determined, so as to accurately achieve the required positions and postures of the end effector. The general expression of the fifth-order polynomial of the joint angle is:
[0115] (2)
[0116] where represents the angle of the i-th joint of the robotic arm, represents the running time, and represents the coefficients of the corresponding polynomial. By taking the first derivative and the second derivative of Equation (2), the angular velocity and the angular acceleration can be obtained respectively, and a system of simultaneous equations is constructed:
[0117] (3)
[0118] In order to solve the six coefficients of the fifth-order polynomial function, constraint conditions need to be imposed on Equation (2). These constraints not only ensure the accuracy of the starting and ending positions, but also limit the initial velocity, the final velocity, the initial acceleration, and the final acceleration during the movement process. The starting and ending times are represented by and respectively. The following are the six specific constraint conditions imposed:
[0119] (4)
[0120] Substituting the above constraint conditions into Equation (3), the coefficients of the polynomial can be obtained as:
[0121] (5)
[0122] According to the embodiments of the present disclosure, through calculation, the quintic polynomial interpolation trajectory of the robotic arm can be obtained. When the positions, velocities, and accelerations of the two endpoints of a given trajectory are given, the motion trajectory of the end of the robotic arm along this trajectory over time can be accurately obtained.
[0123] Figure 4 The flowchart of the trajectory optimization of the robotic arm based on the artificial hummingbird algorithm according to the embodiments of the present disclosure is schematically shown.
[0124] As Figure 4 shown, the fitness function can be determined with the minimization of the angular velocity and angular acceleration during the joint motion of the robotic arm as the optimization goal; the joint angular velocities and angular accelerations at the start and end points of the trajectory are both 0, and the angular velocities and angular accelerations of the path points other than the start and end points in this trajectory are used as the population of the artificial hummingbird algorithm; the population with the lowest fitness value is determined through iterative optimization; based on the population with the lowest fitness value, the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory are determined. Specifically as follows:
[0125] 1) Initialization
[0126] Randomly select types of different food sources and prepare hummingbirds. Then, these hummingbirds are randomly placed on each food source to perform the initialization operation on the artificial hummingbird population:
[0127] (6)
[0128] Among them, represents the position of the i-th food source, Low and Up respectively set the upper and lower bounds of the d-dimensional space of the problem solution, and r is a random generator that can generate a random number uniformly distributed in the interval [0, 1]. The food source access table is initialized as follows:
[0129] (7)
[0130] Among them, i represents the hummingbird and j represents the food point. Since each iteration is a comparison of the values of the hummingbird i and the food point j. Therefore, the access values on the diagonal of the access table VT are uniformly null values.
[0131] 2) Foraging strategy
[0132] In the embodiments of the present disclosure, the artificial hummingbird algorithm has three foraging strategies, namely guided foraging, territorial foraging, and migratory foraging.
[0133] Guided foraging strategy: In AHA, hummingbirds first identify those frequently visited food sources and use this information to guide their foraging behavior. Then, they further screen out the one with the highest nectar replenishment rate among these sources and determine it as the target food source. After determining the target, the hummingbird will fly towards it. During the flight, the hummingbird will use three flight skills: axial flight, diagonal flight, and omnidirectional flight, as Figure 5 shown. In the d-dimensional space D, the three flight skills are described as follows:
[0134] Axial flight:
[0135] (8)
[0136] Diagonal flight:
[0137]
[0138]
[0139]
[0140] Omnidirectional flight:
[0141] =1 i = 1, 2,..., d (9)
[0142] where represents the i-th dimension in the hummingbird's flight, generates a random integer from 1 to d, generates a random integer permutation from 1 to k, is a random number uniformly distributed between [0, 1].
[0143] With these flight capabilities, the hummingbird can access the target food source and thus obtain candidate food sources. Therefore, the hummingbird will update the old food sources based on the target food source selected from all existing food sources. The mathematical formulas for the guided foraging behavior and candidate food sources are as follows:
[0144] (10)
[0145] where, is the position of the i-th food source at time t, is the position of the target food source that the i-th hummingbird intends to visit, a is the guiding factor, following a normal distribution with a mean . Equation (10) enables each current food source to update its position near the target food source and simulates the guided foraging of hummingbirds through different flight patterns. The position update of the -th food source is as follows:
[0146] (11)
[0147] Among them, f is the honey replenishment rate of the food source, which is the fitness function in the optimization algorithm. It can be seen from Equation (11) that if the honey replenishment rate of the candidate food source is better than that of the current food source, the hummingbird will abandon the current food source and stay at the candidate food source obtained from Equation (11) to feed.
[0148] In the AHA algorithm, the access table records the access information of the food sources, helping the hummingbirds quickly find the target food sources. At the same time, the access table also reflects the frequency of access. Hummingbirds tend to choose food sources that have not been accessed for a long time and have a high honey replenishment rate. After implementing the territorial foraging strategy, the hummingbirds will update the access table according to the foraging results and may replace the current food source to optimize the algorithm.
[0149] Territorial foraging strategy: Imitating hummingbirds, after visiting the target food source, they tend to explore new food sources rather than repeatedly visit the existing ones. This habit enables them to search for potentially better food resources as potential candidate solutions. The specific expressions of the territorial foraging behavior and the candidate food sources are as follows:
[0150] = (12)
[0151] Among them, b is the territorial factor, which follows a normal distribution with a mean Similarly, after implementing the territorial foraging strategy, the hummingbirds will update the access table.
[0152] Migration foraging strategy: When the number of iterations of the algorithm exceeds a certain predetermined value, the hummingbird located at the food source with the lowest honey replenishment rate will randomly migrate to a new food source. In this way, the hummingbird will abandon the original food source, forage at the new food source instead, and update the access table. The specific expression of the migration foraging strategy is as follows:
[0153] (13)
[0154] Among them, is the food source with the worst honey replenishment rate in the population. When the number of iterations of the algorithm reaches twice the population size, the migration foraging strategy will be triggered. In the most unfavorable case, if there are no substitutes for all food sources during the guided foraging and territorial foraging processes, the hummingbirds will visit each food source in turn according to the access table of each iteration. Then the migration foraging strategy will be executed to improve the stagnation situation and explore the search space.
[0155] To ensure the stability of the robotic arm during movement, the embodiments of the present disclosure employ the artificial hummingbird algorithm to optimize and determine the velocities of each path point on the entire trajectory. The rate of change of angular acceleration, i.e., jerk, under the constraint conditions of angular velocity and angular acceleration during the movement of the robotic arm joints is selected as the core optimization objective of the algorithm.
[0156] The constraint conditions for the angular velocity and angular acceleration of each joint of an n-axis robotic arm are
[0157] , i = 1, 2, ..., n (14)
[0158] Where and respectively represent the maximum allowable angular velocity and angular acceleration of the robotic arm joints.
[0159] To improve the smoothness and fluency of the robotic arm when performing operation tasks and minimize the total joint shock of the robotic arm moving along the given path points under kinematic constraint conditions, the following fitness function f is defined:
[0160] (15)
[0161] Where represents the derivative of the acceleration of the i-th joint angle of the robotic arm at time point t during the movement of the robotic arm, i.e., the jerk of the joint. This parameter is directly related to the vibration and shock levels of the robotic arm during movement and is a key indicator reflecting the dynamic performance of the robotic arm.
[0162] After determining the fitness function, i.e., the objective function, the artificial hummingbird algorithm can be used to optimize the robotic arm trajectory. During this process, the angular velocity and angular acceleration of the starting and ending points of the joints must be set to 0, and for other points on the path, their angular velocity and angular acceleration values will serve as the population of the artificial hummingbird algorithm.
[0163] In each iteration process, an interpolation trajectory can be constructed based on the current population values. Then, by calculating the fitness value of this interpolation trajectory, the algorithm can evaluate the quality of the current trajectory. Subsequently, the corresponding foraging strategy is selected according to the preset probability. After continuous iteration and optimization processes, the position of the population with the lowest fitness value can finally be located, thereby determining the optimal angular velocity parameters of the robotic arm trajectory.
[0164] Based on the above robotic arm trajectory planning method, the present disclosure also provides a trading device. The following will be combined with Figure 4 to describe this device in detail.
[0165] Figure 6 Schematically shows the structural block diagram of the robotic arm trajectory planning device according to the embodiments of the present disclosure.
[0166] As Figure 6 shown, the trajectory planning device of the robotic arm in this embodiment includes a path determination module 610, an optimization module 620, a trajectory determination module 630, and a speed determination module 640.
[0167] The path determination module 610 is configured to determine an initial path of the robotic arm from the starting point to the target point. In one embodiment, the path determination module 610 may be used to perform the operation S110 described above, which will not be elaborated here.
[0168] The optimization module 620 is configured to perform redundant optimization on the initial path using a greedy algorithm to obtain an optimized path. In one embodiment, the optimization module 620 may be used to perform the operation S120 described above, which will not be elaborated here.
[0169] The trajectory determination module 630 is configured to determine a quintic polynomial interpolation trajectory of the robotic arm based on the optimized path using the quintic polynomial interpolation method. In one embodiment, the trajectory determination module 630 may be used to perform the operation S130 described above, which will not be elaborated here.
[0170] The speed determination module 640 is configured to determine the speed and acceleration values of each path point on the quintic polynomial interpolation trajectory using the artificial hummingbird algorithm. In one embodiment, the speed determination module 640 may be used to perform the operation S140 described above, which will not be elaborated here.
[0171] According to an embodiment of the present disclosure, the determination of the initial path of the robotic arm from the starting point to the target point includes: establishing two search trees with the starting point and the target point as root nodes; selecting optimal sampling points in the free space using a heuristic strategy to guide the search directions of the two search trees, determining the expansion direction of the search directions through nearest neighbor search, and growing the two search trees in a collision-free manner; alternately expanding the two search trees until they are successfully connected to obtain a complete path; and extracting the initial path from the complete path by backtracking the parent nodes.
[0172] According to an embodiment of the present disclosure, the greedy algorithm is used to perform redundancy optimization on the initial path, and the obtained optimized path includes: setting the starting point of the initial path as the current starting point of the optimized path, and setting the ending point of the initial path as the current target point of the optimized path; connecting the current starting point and the current target point to obtain a temporary path; performing collision detection on the temporary path; in the case of detecting a collision, updating the parent node of the current target point to the current target point; in the case of not detecting a collision, adding the current target point to the optimized path, updating the current starting point to the current target point, and updating the current target point to the ending point of the optimized path; performing the operation of performing collision detection on the temporary path again until the current starting point and the current target point coincide, and obtaining the optimized path.
[0173] According to an embodiment of the present disclosure, the five-degree polynomial interpolation method is used to determine the five-degree polynomial interpolation trajectory of the robotic arm based on the optimized path, including: establishing a five-degree polynomial function of the joint angle of the robotic arm with respect to time; imposing constraint conditions on the five-degree polynomial function, and the constraint conditions include boundary constraints on the positions, velocities, and accelerations of the starting point and the target point; determining the coefficients of each term of the five-degree polynomial function by solving the system of simultaneous equations under the constraint conditions; generating the five-degree polynomial interpolation trajectory of the robotic arm based on the coefficients of each term.
[0174] According to an embodiment of the present disclosure, the artificial hummingbird algorithm is used to determine the velocity and acceleration values of each path point on the five-degree polynomial interpolation trajectory, including: determining a fitness function with the minimization of the angular velocity and angular acceleration during the joint movement of the robotic arm as the optimization goal; setting the joint angular velocity and angular acceleration at both the starting point and the ending point of the trajectory to 0, and using the angular velocity and angular acceleration of the path points other than the starting point and the ending point in the trajectory as the population of the artificial hummingbird algorithm; determining the population with the lowest fitness value through iterative optimization; determining the velocity and acceleration values of each path point on the five-degree polynomial interpolation trajectory based on the population with the lowest fitness value.
[0175] According to an embodiment of the present disclosure, during the iterative process of the artificial hummingbird algorithm, the device further includes: a construction module for constructing an interpolation trajectory based on the current population value; a calculation module for calculating the fitness value of the interpolation trajectory; a selection module for selecting a foraging strategy from the foraging strategies of the threshold based on the fitness value of the interpolation trajectory, and the foraging strategies include guided foraging, territorial foraging, and migratory foraging; an update module for updating the population based on the selected foraging strategy.
[0176] According to an embodiment of the present disclosure, during the process of growing the two search trees in a collision-free manner, the device further includes: a shortening module for shortening the lengths of the paths generated by the two search trees by rewriting the parent nodes and / or randomly reconnecting.
[0177] According to an embodiment of the present disclosure, redundant path points are removed by a greedy algorithm and the path structure is simplified. Combining the quintic polynomial interpolation method and the artificial hummingbird algorithm to generate a continuous and smooth joint motion trajectory, reducing the sudden change of the acceleration of the end of the robotic arm, reducing the motion impact, avoiding the slipping or damage of items caused by vibration, reducing the customer complaint rate. At the same time, it reduces equipment wear, extends the maintenance cycle, and reduces the operation cost.
[0178] According to an embodiment of the present disclosure, any multiple of the path determination module 610, the optimization module 620, the trajectory determination module 630, and the speed determination module 640 can be combined and implemented in one module, or any one of them can be split into multiple modules. Or, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the path determination module 610, the optimization module 620, the trajectory determination module 630, and the speed determination module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by any other reasonable means such as integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in any suitable combination of several of them. Or, at least one of the path determination module 610, the optimization module 620, the trajectory determination module 630, and the speed determination module 640 can be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.
[0179] Figure 7 A block diagram of an electronic device suitable for implementing a transaction method according to an embodiment of the present disclosure is schematically shown.
[0180] As Figure 7 shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. The processor 701 can include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 701 can also include on-board memory for caching purposes. The processor 701 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0181] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present disclosure by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs can also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 can also perform various operations of the method flow according to the embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0182] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, and the input / output (I / O) interface 705 is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read from it can be installed into the storage portion 708 as needed.
[0183] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
[0184] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include one or more memories other than the ROM 702 and / or RAM 703 and / or ROM 702 and RAM 703 described above.
[0185] An embodiment of the present disclosure also includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the transaction method provided by the embodiment of the present disclosure.
[0186] When the computer program is executed by the processor 701, it executes the above functions defined in the system / apparatus of the embodiment of the present disclosure. According to an embodiment of the present disclosure, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0187] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 709, and / or be installed from the removable medium 711. The program code contained in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0188] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or be installed from the removable medium 711. When the computer program is executed by the processor 701, it executes the above functions defined in the system of the embodiment of the present disclosure. According to an embodiment of the present disclosure, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0189] In accordance with embodiments of the present disclosure, program code for executing the computer programs provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages. Specifically, these computing programs may be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, programming languages such as Java, C++, Python, the "C" language, or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0190] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0191] Those skilled in the art can understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.
Claims
1. A trajectory planning method for a robotic arm, characterized in that, The method includes: Determine the initial path of the robotic arm from the starting point to the target point; Use the greedy algorithm to perform redundancy optimization on the initial path to obtain an optimized path; Utilize the quintic polynomial interpolation method to determine the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path; Use the artificial hummingbird algorithm to determine the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory.
2. The method according to claim 1, characterized in that, The determination of the initial path of the robotic arm from the starting point to the target point includes: Establish two search trees with the starting point and the target point as the root nodes; Adopt a heuristic strategy to select the optimal sampling points in the free space, guide the search directions of the two search trees, determine the expansion direction of the search direction through nearest neighbor search, and grow the two search trees in a collision-free manner; Alternately expand the two search trees until they are successfully connected to obtain a complete path; Extract the initial path from the complete path by backtracking the parent nodes.
3. The method according to claim 1, wherein The use of the greedy algorithm to perform redundancy optimization on the initial path to obtain an optimized path includes: Set the starting point of the initial path as the current starting point of the optimized path, and set the end point of the initial path as the current target point of the optimized path; Connect the current starting point and the current target point to obtain a temporary path; Perform collision detection on the temporary path; In the case of detecting a collision, update the parent node of the current target point to the current target point; In the case of not detecting a collision, add the current target point to the optimized path, update the current starting point to the current target point, and update the current target point to the end point of the optimized path; Execute the operation of performing collision detection on the temporary path again until the current starting point and the current target point coincide to obtain the optimized path.
4. The method according to claim 1, characterized in that, The utilization of the quintic polynomial interpolation method to determine the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path includes: Establish a quintic polynomial function of the joint angle of the robotic arm with respect to time; Apply constraint conditions to the quintic polynomial function, and the constraint conditions include the boundary constraints of the positions, velocities, and accelerations of the starting point and the target point; Determine the coefficients of the quintic polynomial function by solving the system of simultaneous equations under the constraint conditions; Generate the quintic polynomial interpolation trajectory of the robotic arm based on the coefficients.
5. The method according to claim 1, characterized in that, The use of the artificial hummingbird algorithm to determine the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory includes: Determine the fitness function with the minimization of the angular velocity and angular acceleration during the joint movement of the robotic arm as the optimization objective; Set the joint angular velocity and angular acceleration at the starting point and the end point of the trajectory to 0, and use the angular velocity and angular acceleration of the path points other than the starting point and the end point in the trajectory as the population of the artificial hummingbird algorithm; Determine the population with the lowest fitness value through iterative optimization; Based on the population with the lowest fitness value, determine the velocity and acceleration values of each path point on the quintic polynomial interpolation trajectory.
6. The method according to claim 5, wherein During the iterative process of the artificial hummingbird algorithm, the method further includes: Construct an interpolation trajectory based on the current population value; Calculate the fitness value of the interpolation trajectory; Based on the fitness value of the interpolation trajectory, select a foraging strategy from the threshold foraging strategies, where the foraging strategies include guided foraging, territorial foraging, and migratory foraging; Update the population based on the selected foraging strategy.
7. The method according to claim 2, characterized in that During the process of growing the two search trees in a collision-free manner, the method further includes: Shorten the length of the paths generated by the two search trees by rewriting the parent nodes and / or randomly reconnecting.
8. A trajectory planning device for a robotic arm, characterized in that, The device includes: A path determination module for determining the initial path of the robotic arm from the starting point to the target point; An optimization module for redundantly optimizing the initial path using a greedy algorithm to obtain an optimized path; A trajectory determination module for determining the quintic polynomial interpolation trajectory of the robotic arm based on the optimized path using the quintic polynomial interpolation method; A speed determination module for determining the speed and acceleration values of each path point on the quintic polynomial interpolation trajectory using the artificial hummingbird algorithm.
9. An electronic device, characterized in that, Comprising: One or more processors; A memory for storing one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, The computer program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or instruction, when executed by the processor, implements the steps of the method according to any one of claims 1 to 7.