Control method, device and storage medium for robot arm path optimization
Patent Information
- Application Number
- CN202611273398.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]本申请的主要目的在于提供一种机械臂路径优化的控制方法、设备和存储介质,旨在解决机械臂运行性能不佳的技术问题
[0016]本申请提供了一种机械臂路径优化的控制方法,包括通过基于路径规划算法生成的初始关节路径结合最大跨越节点数与关节空间最大距离阈值筛选得到候选节点对,对候选节点对之间的路径段进行插值处理生成候选替换路径段并逐点计算各采样点的安全裕度以筛选得到合格候选路径,按照风险运算策略计算合格候选路径的碰撞风险指标并得到合格候选路径对应的多维度评价指标,通过评价指标与路径阈值的偏离程度自适应调整评价权重、构建动态权重综合评价函数并结合路径约束条件生成路径替换判定结果,根据判定结果执行路径替换、校验路径替换后相邻路径段性能波动情况并通过迭代优化得到目标优化路径的多目标闭环优化机制,解决了现有机械臂路径优化方案优化目标单一、安全约束采用静态固定阈值难以适配动态工况、能耗未按关节属性差异化管控、多目标评价权重固定无法动态响应工况变化、局部路径替换易引发相邻段性能劣化,进而导致机械臂运行平滑性不足、动态场景安全冗余不足、整体运行能效偏低的运行性能不佳问题,提升了机械臂路径的运动平滑性与运行平稳性,增强了动态障碍环境下的安全防护能力与工况自适应能力,降低了关节差异化加权的整体运动能耗,实现了路径平滑性、动态安全性与运动能效的多目标协同优化,有效改善了机械臂的综合运行性能。
Smart Images

Figure CN122807941A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial robot technology, and in particular to a control method, device and storage medium for optimizing the path of a robotic arm. Background Technology
[0002] In the scenario of intelligent motion planning for industrial robotic arms, the ability to smooth motion trajectories, control dynamic safety constraints, and optimize energy consumption across multiple objectives directly affects the positioning accuracy, operational safety, and long-term energy-saving performance of the robotic arm.
[0003] In related technologies, the robotic arm motion path planning is achieved by generating a collision-free initial trajectory through a sampling search algorithm and then smoothing the trajectory with the help of parametric curves. This method uses segmented serial processing logic to perform obstacle avoidance and path finding or trajectory smoothing single-item target optimization separately. It is difficult to adapt to industrial scenarios where obstacles change in real time and high-precision, low-energy parallel operations are required, resulting in poor robotic arm performance.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this application is to provide a control method, device, and storage medium for optimizing the path of a robotic arm, aiming to solve the technical problem of poor robotic arm performance.
[0006] To achieve the above objectives, this application proposes a control method for optimizing the path of a robotic arm, the method comprising: The initial joint path generated by the path planning algorithm is used to filter candidate node pairs by combining the maximum number of nodes crossed and the maximum distance threshold in the joint space. Interpolation is performed on the path segments between the candidate node pairs to generate candidate replacement path segments, and the safety margin of each sampling point is calculated point by point to screen out qualified candidate paths. The collision risk index of the qualified candidate path is calculated according to the risk calculation strategy to obtain the evaluation index corresponding to the qualified candidate path; The evaluation weights are adjusted by the degree of deviation between the evaluation index and the path threshold, a comprehensive weight evaluation function is constructed, and a judgment result is generated by combining the path constraint conditions. Based on the determination result, the path is replaced, and the performance fluctuation of adjacent path segments after the path replacement is verified, so as to obtain the target optimized path through the verification result iteration.
[0007] In one embodiment, based on the initial joint path generated by the path planning algorithm, all node combinations with a sequence number interval greater than one are traversed according to the node number, and the number of intermediate nodes in each node pair is compared with the maximum number of nodes crossed to obtain an initial set of node pairs. Calculate the pose distance of each node pair in the initial set of node pairs in the joint space, and remove node pairs whose pose distance is greater than the maximum distance threshold in the joint space to obtain the effective set of node pairs. The set of valid node pairs is sorted from largest to smallest according to the joint space span distance corresponding to each node pair, and candidate node pairs with association priority are generated.
[0008] In one embodiment, based on the candidate node pairs, sampling points are generated in the joint space using cubic spline interpolation according to a preset path resolution, and a set of candidate replacement path sampling points is compiled and output. Based on the set of candidate replacement path sampling points, the minimum actual distance between each mechanical link and surrounding obstacles is calculated point by point, and the end velocity and joint acceleration corresponding to the sampling point are calculated by decomposing the joint pose difference. Based on the minimum actual distance, the end velocity, and the joint acceleration, combined with the obstacle velocity parameters at the current moment, the motion parameter set of the sampling point is calculated; By combining the motion parameter set of the sampling points with the basic safety distance, the dynamic safety distance is calculated point by point, and compared with the minimum actual distance to obtain the path safety margin sequence; The dynamic safety margin of each sampling point in the path safety margin sequence is verified point by point, path segments that meet the safety constraints are selected, and qualified candidate paths are obtained.
[0009] In one embodiment, based on the motion parameter set corresponding to the sampling point and the basic safety distance, safety distance gain coefficients are matched for the end velocity, the obstacle velocity parameter, and the joint acceleration, respectively, and the corresponding safety distance increment values are calculated to obtain a set of sub-item safety distance increments; Based on the set of sub-item safety distance increments, the initial dynamic safety distance is obtained by summing the three types of increments with the basic safety distance; A relative approach speed correction term between the robotic arm and the obstacle is introduced to compensate and correct the initial dynamic safety distance, resulting in a point-by-point dynamic safety distance sequence; Based on the point-by-point dynamic safety distance sequence, the dynamic safety distance of the sampling point is subtracted from the minimum actual distance corresponding to the sampling point to obtain the dynamic safety margin, which is then arranged in the path order to obtain the path safety margin sequence.
[0010] In one embodiment, a negative exponential mapping operation is performed point by point based on the safety margin corresponding to the sampling point as the independent variable. Combined with the risk calculation strategy, a single-point collision risk value that increases exponentially as the safety margin narrows is generated. The single-point collision risk value is accumulated and aggregated according to the path sampling time sequence to obtain the original total collision risk value that represents the overall collision risk level of the candidate path segment. Based on the original total collision risk value, the ratio normalization operation is performed on the collision risk benchmark value corresponding to the qualified candidate path, and the evaluation index corresponding to the qualified candidate path is obtained after unifying the evaluation dimensions.
[0011] In one embodiment, based on the evaluation index and the corresponding index threshold, the deviation of the index from the threshold is calculated for each category, and a set of weight adjustment parameters is generated. The initial weights of the evaluation index are corrected and renormalized according to the rule that the deviation magnitude and weight gain are positive, based on the set of weight adjustment parameters, to obtain a dynamic weight coefficient set. Based on the evaluation indicators and the dynamic weight coefficient group, the weighted comprehensive evaluation function is constructed through weighted aggregation, and the comprehensive evaluation value of the candidate path segment is calculated. The comprehensive evaluation value is jointly verified by evaluating the reduction constraint to generate the determination result of path replacement.
[0012] In one embodiment, based on the evaluation index and the dynamic weight coefficient group, the validity of the mapping values between each evaluation dimension and its corresponding weight is verified, and a set of paired and compliant index weight parameters is output. The weighted evaluation values are obtained by superimposing the corresponding weights on the evaluation indicators according to the dimensional decoupling method of the set of indicator weight parameters. The dimensional sub-item values of the weighted evaluation value set are summed and aggregated to construct the weighted comprehensive evaluation function, and the comprehensive evaluation value corresponding to the candidate path segment is calculated and output.
[0013] In one embodiment, based on the determination result and the current joint path sequence, the candidate path segments that pass the determination are replaced in situ while maintaining the consistency of the pose connection between the first and last nodes, and an updated path sequence after replacement is generated. For the adjacent path segments on both sides of the replacement segment in the updated path sequence, calculate the safety margin, smoothness, and differentiated energy consumption index, and compare the fluctuation range of the index before and after the replacement to obtain the performance verification results of the adjacent segments. When the performance fluctuation in the adjacent segment performance verification result exceeds the fluctuation threshold or the safety margin is abnormally reduced, path rollback or local replanning correction is performed to generate a stable path sequence. Based on the stable path sequence, compliance verification is performed by matching the termination judgment condition. If the condition is not met, the process returns to the node selection stage for iterative optimization. If the condition is met, the target optimized path is output.
[0014] In addition, to achieve the above objectives, this application also proposes a robotic arm path optimization device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for robotic arm path optimization as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the control method for optimizing the robotic arm path as described above.
[0016] This application provides a control method for optimizing the path of a robotic arm. The method includes: filtering candidate node pairs by combining an initial joint path generated based on a path planning algorithm with a threshold for the maximum number of nodes crossed and the maximum distance in the joint space; interpolating the path segments between candidate node pairs to generate candidate replacement path segments and calculating the safety margin of each sampling point to filter qualified candidate paths; calculating collision risk indicators for qualified candidate paths according to a risk calculation strategy and obtaining multi-dimensional evaluation indicators corresponding to qualified candidate paths; adaptively adjusting evaluation weights based on the deviation between the evaluation indicators and path thresholds; constructing a dynamic weight comprehensive evaluation function and generating path replacement judgment results based on path constraints; performing path replacement based on the judgment results; verifying the performance fluctuations of adjacent path segments after path replacement and iteratively optimizing the process. The multi-objective closed-loop optimization mechanism for the target optimization path solves the problems of poor performance in existing robotic arm path optimization schemes, such as single optimization objectives, static fixed thresholds for safety constraints that are difficult to adapt to dynamic working conditions, lack of differentiated energy consumption control based on joint attributes, fixed multi-objective evaluation weights that cannot dynamically respond to changes in working conditions, and the tendency for local path replacement to cause performance degradation of adjacent segments. These problems lead to insufficient smoothness of robotic arm operation, insufficient safety redundancy in dynamic scenarios, and low overall operational energy efficiency. The mechanism improves the motion smoothness and stability of the robotic arm path, enhances safety protection and working condition adaptability in dynamic obstacle environments, reduces the overall motion energy consumption of joint differential weighting, and achieves multi-objective collaborative optimization of path smoothness, dynamic safety, and motion energy efficiency, effectively improving the overall operational performance of the robotic arm.
[0017] In summary, this application solves the technical problem of poor robotic arm performance by using candidate node selection, dynamic safety margin verification, differentiated energy consumption and dynamic weight multi-objective closed-loop optimization, and improves path smoothness, dynamic safety and operational energy efficiency. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the first embodiment of the control method for optimizing the robotic arm path according to this application; Figure 2 This is a flowchart of the robotic arm path closed-loop optimization method of this application; Figure 3 This is a schematic diagram of the robotic arm path closed-loop optimization system structure of this application; Figure 4 This is a flowchart illustrating the fourth embodiment of the control method for optimizing the robotic arm path in this application; Figure 5 This is a flowchart illustrating the seventh embodiment of the control method for optimizing the robotic arm path in this application; Figure 6 This is a schematic diagram of the robotic arm path optimization device of this application.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] In related technologies, the robotic arm motion path planning is achieved by generating a collision-free initial trajectory through a sampling search algorithm and then smoothing the trajectory with the help of parametric curves. This method uses segmented serial processing logic to perform obstacle avoidance and path finding or trajectory smoothing single-item target optimization separately. It is difficult to adapt to industrial scenarios where obstacles change in real time and high-precision, low-energy parallel operations are required, resulting in poor robotic arm performance.
[0024] This application provides a solution: First, based on the initial joint path generated by the path planning algorithm, candidate node pairs are selected by combining the maximum number of nodes crossed and the maximum distance threshold in the joint space. Then, the path segments between the candidate node pairs are interpolated to generate candidate replacement path segments, and the safety margin of each sampling point is calculated point by point to select qualified candidate paths. Next, the collision risk index of the qualified candidate paths is calculated according to the risk calculation strategy to obtain the evaluation index corresponding to the qualified candidate paths. Then, the evaluation weight is adjusted according to the deviation of the evaluation index from the path threshold to construct a weighted comprehensive evaluation function, and a judgment result is generated by combining the path constraint conditions. Finally, the path is replaced according to the judgment result, and the performance fluctuation of adjacent path segments after the path replacement is verified, so as to obtain the target optimized path through the verification result iteration.
[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or robotic arm path optimization device capable of performing the above functions. The following description uses a robotic arm path optimization device as an example to illustrate this embodiment and the subsequent embodiments.
[0026] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0027] This application provides a control method for optimizing the path of a robotic arm, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the control method for optimizing the robotic arm path according to this application.
[0028] In this embodiment, the control method for optimizing the robotic arm path includes steps S10 to S50: Step S10: Based on the initial joint path generated by the path planning algorithm, candidate node pairs are obtained by combining the maximum number of nodes crossed and the maximum distance threshold in the joint space.
[0029] The initial joint path is the original motion path sequence output by the path planning algorithm, composed of discrete joint angle nodes arranged in the order of motion. The maximum number of nodes to span is a threshold representing the maximum allowed interval between candidate node pairs in the path sequence, used to control the span range of a single path segment replacement. The maximum joint space distance threshold is an upper limit threshold representing the sum of Euclidean distances between candidate node pairs across all joint angle dimensions, used to avoid path distortion caused by excessive span. Candidate node pairs are combinations of first and last nodes that simultaneously satisfy both span and distance constraints, and are suitable for path segment replacement optimization.
[0030] After the robotic arm path planning algorithm outputs the initial joint path, the system starts the candidate node pair screening process, using the entire node sequence of the initial joint path as the screening input.
[0031] In this embodiment, the selection methods for candidate node pairs include three types: One method involves full node traversal and dual-constraint sorting and filtering. The system traverses all node combinations with an interval greater than 1 based on their node index, verifying each node's span and joint space distance constraints. Node pairs that satisfy both constraints are retained, and then the nodes are sorted from largest to smallest joint space span distance to generate a candidate queue. This method has complete and comprehensive filtering logic, and its sorting rules align with the goal of path simplification and optimization, making it suitable for conventional work paths with a moderate number of nodes.
[0032] The second approach is segmented sliding window constraint filtering. The system divides the initial path into multiple continuous windows with a fixed number of nodes. Within each window, it performs node span and distance constraint checks, generating candidate node pairs within the window. These pairs are then concatenated into a global candidate queue according to the window order. This method decomposes global filtering into local segmented operations. The computational complexity increases linearly with the path length, making it suitable for path scenarios with large node scale and long-distance continuous operations.
[0033] Thirdly, there is a priority-guided incremental screening method. The system first selects several pairs of large-span node pairs as initial candidates based on the total path length. After verification, the span is gradually reduced to supplement candidate node pairs until all node combinations that meet the constraints are covered. During the process, the priority ranking of the candidate queue is updated in real time. This method prioritizes the generation of candidate node pairs with high optimization potential and can terminate the screening when the iteration converges early, balancing optimization effect and computational efficiency. It is suitable for dynamic operation scenarios with high real-time requirements.
[0034] In an exemplary scheme for determining candidate node pairs, all node data of the initial joint path and preset parameters such as the maximum number of nodes to be crossed and the maximum distance threshold in joint space are first loaded. Then, a span initial screening is performed, traversing all node pairs where j > i+1, and removing combinations where ji exceeds the maximum number of nodes to be crossed, resulting in a preliminary set of node pairs. Next, a distance verification is performed, calculating the Euclidean distance in joint space for each preliminary set of node pairs, and removing combinations whose distance is greater than the maximum distance threshold in joint space, resulting in a set of valid candidate node pairs. Then, a priority sorting is performed, sorting the valid candidate node pairs in descending order of joint space span distance, and simultaneously marking the original path segment interval corresponding to each set of node pairs. Finally, a deduplication verification is performed, removing duplicate candidate pairs with identical first and last nodes, generating the final candidate node pair queue for subsequent generation and verification of candidate replacement path segments.
[0035] In step S20, interpolation processing is performed on the path segments between the candidate node pairs to generate candidate replacement path segments, the safety margin of each sampling point is calculated point by point, and qualified candidate paths are obtained through screening.
[0036] Candidate replacement path segments are smooth path sequences generated after interpolating and reconstructing the paths between candidate node pairs, which are used to replace the node segments in the corresponding interval of the original path. Sampling points are discrete joint pose points generated during interpolation for collision detection and safety verification, and their density is determined by a preset path resolution. Dynamic safety margin is the difference obtained by subtracting the corresponding dynamic safety distance from the actual minimum distance between the robotic arm link and an obstacle at the sampling point, which is used to characterize the safety redundancy degree of the point. A qualified candidate path is a candidate replacement path segment where all sampling points in the whole domain satisfy the non-negative constraint of safety margin and have no collision risk.
[0037] The system selects the current node pair to be processed from the candidate node pair queue in order of priority, starts the interpolation and safety verification process, and takes the head and tail joint poses of the candidate node pair and the real-time motion parameters of obstacles as inputs.
[0038] In this embodiment, there are three implementation modes for interpolation generation and safety margin verification: The first mode is cubic spline interpolation in joint space and point-by-point safety margin verification for all sampling points. With the candidate node pair as the head and tail constraints, the system generates a third-order continuous cubic spline interpolation path, extracts all sampling points according to a fixed resolution, calculates the actual distance and dynamic safety distance point by point, obtains the point-by-point safety margin and verifies the compliance of the whole domain. This mode has high interpolation accuracy and good path smoothness, with no omission in safety verification, and is suitable for precision operation scenarios with high requirements for path continuity.
[0039] The second mode is Bezier interpolation in Cartesian space and real-time correction of dynamic safety distance. The system converts joint space nodes into end Cartesian poses, generates an end path in the form of a Bezier curve, then inversely solves the path into joint space sampling points, and corrects the gain coefficient of the dynamic safety distance in real time by combining the relative movement direction of obstacles during verification. This mode ensures the smoothness of the end trajectory in Cartesian space, and the safety distance adapts to the relative movement trend, which is suitable for handling and welding operation scenarios with strict end trajectory constraints.
[0040] The third mode is variable resolution interpolation and pre-screening of safety margin. The system first generates sparse sampling points with low resolution, quickly calculates the safety margin and predicts the overall safety level, directly judges the path segments with sufficient safety margin as qualified, and encrypts sampling points for verification in areas close to the safety boundary. This mode reduces the amount of calculation through resolution grading while ensuring the verification accuracy of dangerous areas, and is suitable for operation scenarios with sparse obstacles and high overall safety redundancy.
[0041] In an exemplary scheme for generating candidate paths and verifying safety margins, the first and last joint angles of the current candidate node pair, along with preset interpolation resolution and dynamic safety distance parameters, are loaded. Then, cubic spline interpolation is performed, using the joint angles and tangential constraints of the first and last nodes as boundary conditions to solve for the spline coefficients. A sequence of joint angles for intermediate sampling points is generated according to the interpolation resolution, yielding candidate replacement path segments. Next, distance calculation is performed, calling the robotic arm's forward kinematics model point-by-point to calculate the pose of each link and solve for the minimum distance between each link and all current obstacles, obtaining the actual distance point-by-point. Then, dynamic safety distance calculation is performed, calculating the end effector velocity point-by-point using the Jacobian matrix, calculating joint acceleration using second-order differences, matching the current obstacle velocity, and substituting it into the dynamic safety distance formula to obtain the point-by-point safety distance threshold. Subsequently, the point-by-point safety margin is calculated, and the minimum safety margin feature value of the path segment is extracted. Finally, a safety compliance check is performed, determining whether the safety margin of all sampling points is not less than 0. If compliant, the path is marked as a qualified candidate path and the corresponding margin data is output; otherwise, it is discarded, and the next set of candidate node pairs is processed.
[0042] Step S30: Calculate the collision risk index of the qualified candidate path according to the risk calculation strategy to obtain the evaluation index corresponding to the qualified candidate path.
[0043] The risk calculation strategy is based on preset calculation rules for the overall collision risk of a path, quantified by dynamic safety margin. Its core is mapping safety margin to risk value. The collision risk index is a quantitative value characterizing the collision risk level of the entire candidate path segment; a higher value indicates lower safety redundancy and higher collision risk. The evaluation index is a multi-dimensional set of quantitative parameters used for comprehensive path quality assessment, specifically including three categories: second-order difference smoothness index, joint-differential weighted energy consumption index, and collision risk index.
[0044] The system takes the qualified candidate paths, safety margin sequences, and corresponding original path segment data output in the previous step as input and starts the multi-dimensional evaluation index calculation process.
[0045] In this embodiment, the evaluation indicators are calculated in three ways: One approach involves exponentially decaying risk calculation and simultaneous multi-indicator solution. The system uses a negative exponential function as the core of risk calculation, mapping point-by-point safety margins to single-point risk values and accumulating them to obtain the overall collision risk index. It simultaneously calculates the path's second-order difference smoothness and joint-differential weighted energy consumption, outputting the three types of indicators in parallel. This method provides continuous and smooth risk modeling with a sharp increase in penalty at safety boundaries, making it suitable for high-risk operational scenarios with stringent safety requirements.
[0046] Secondly, the system employs segmented weighted risk calculation and inertia-coupled energy consumption calculation. Candidate path segments are divided into safe zones, critical zones, and danger zones based on their safety margins. Different risk weight coefficients are assigned to different zones, and the collision risk index is obtained through weighted summation. Energy consumption calculation incorporates a joint inertia coupling term, comprehensively considering the energy consumption increment brought about by joint linkage. This approach provides clear risk stratification, and the energy consumption calculation aligns with the dynamic characteristics of the robotic arm, making it suitable for heavy-duty operation scenarios with high loads and high inertia.
[0047] Thirdly, the system employs boundary-sensitive risk calculation and current feedback energy consumption calculation. Using a safety margin threshold as a boundary, the system applies a non-linear amplification penalty to sampling points below the threshold, reinforcing the risk weight at the boundary. Energy consumption calculation incorporates historical current data from the joint motors, real-time adjusting the energy consumption weight coefficients of each joint. This approach is highly sensitive to changes in the safety boundary, and the energy consumption model is dynamically updated with the load, making it suitable for flexible operation scenarios with dynamic changes in obstacles and fluctuating loads.
[0048] In an exemplary scheme for calculating multi-dimensional evaluation indicators, the joint angle sequence, point-by-point safety margin data, and benchmark indicator data of the corresponding original path segments are first loaded into the qualified candidate path. Then, the smoothness indicator is calculated by performing a smoothness indicator calculation, calculating the second-order difference value for all adjacent three-point groups of the path, and summing the second-order difference modulus of all nodes to obtain the second-order difference smoothness indicator of the candidate path. Next, the energy consumption indicator is calculated by matching the energy consumption weight of the corresponding inertia and load attributes to each joint, calculating the square of the joint angle change segment by segment and multiplying it by the corresponding weight, and summing them to obtain the joint-differentiated weighted energy consumption indicator. Then, the collision risk indicator is calculated by calling a preset attenuation coefficient, calculating the exponential risk cost value corresponding to the safety margin point by point, and summing them to obtain the collision risk indicator for the entire path. Finally, normalization processing is performed by comparing the three types of indicators with the corresponding benchmark indicators of the original path segments to eliminate dimensional differences, obtaining standardized smoothness, energy consumption, and collision risk normalized evaluation indicators, which are then output to the subsequent weight adjustment and comprehensive evaluation stages.
[0049] Step S40: Adjust the evaluation weights based on the deviation between the evaluation index and the path threshold, construct a weighted comprehensive evaluation function, and generate a judgment result by combining the path constraint conditions.
[0050] Path thresholds are preset acceptable benchmark values for each evaluation indicator, including three categories: smoothing threshold, energy consumption threshold, and safety margin threshold, used to determine whether an indicator deviates from a reasonable range. Evaluation weights are the proportions of smoothness, energy consumption, and collision risk indicators in the comprehensive evaluation; higher weights indicate stronger penalties for the corresponding indicators. The weighted comprehensive evaluation function is a comprehensive path quality assessment function obtained by weighted summation of normalized evaluation indicators and dynamic weight coefficients; lower function values indicate better overall path quality. Path constraints are a set of hard constraints that candidate path replacements must satisfy, including four categories: global collision-free constraints, dynamic safety margin non-negativity constraints, joint limit constraints, and comprehensive evaluation improvement constraints. The judgment result is the final conclusion characterizing whether a candidate path can replace the original path segment, categorized as replaceable or non-replaceable.
[0051] The system takes the three types of normalized evaluation indicators and the minimum safety margin value output in the previous step as input and starts the dynamic weight adjustment and replacement judgment process.
[0052] In this embodiment, the weight adjustment and replacement determination are implemented in three ways: One approach involves a single-threshold triggered closed-loop weight adjustment and multi-constraint joint judgment. When any indicator exceeds its corresponding threshold, the weight of that indicator is directly amplified by a fixed gain, while the remaining weights are scaled proportionally. After weight normalization, a comprehensive evaluation function is constructed, and all path constraints are simultaneously verified. If all constraints are met, the indicator is deemed replaceable. This method features clear adjustment logic, well-defined judgment rules, and a fast system response, making it suitable for routine operating scenarios with stable conditions and minimal indicator fluctuations.
[0053] Secondly, the system employs a deviation-proportional weight adaptive adjustment and constraint-level judgment. It calculates the relative deviation of each indicator from its corresponding threshold and linearly adjusts the corresponding weight according to the deviation ratio; the greater the deviation, the higher the weight increase. Constraint verification is performed in a priority-based, tiered manner: first, safety-related hard constraints are verified, and those failing are directly eliminated; then, evaluation-related soft constraints are verified. This approach matches the weight adjustment magnitude with the degree of indicator deviation, and tiered verification improves judgment efficiency, making it suitable for dynamic operational scenarios with frequent indicator fluctuations.
[0054] Thirdly, the system employs multi-threshold gradient-based dynamic weight adjustment and progressive constraint verification. For each type of indicator, the system sets multiple threshold gradients, with different gradients corresponding to different weight adjustment gains; the closer an indicator is to the severely deviated range, the greater the weight increase. Constraint verification is performed in a progressive order, proceeding to the next level only after passing each constraint level. Unqualified paths can be prematurely removed during the process. This method offers high precision in weight adjustment and a step-by-step approach to constraint verification, making it suitable for complex operational scenarios involving multiple operating conditions and tiered safety requirements.
[0055] In an exemplary scheme for generating replacement determination results, three types of normalized evaluation indicators, a minimum safety margin value, and preset thresholds, initial weight values, and adjustment gain parameters for each indicator are first loaded. Then, adaptive weight adjustment is performed, calculating the deviations of the smoothness indicator from the smoothness threshold, the energy consumption indicator from the energy consumption threshold, and the minimum safety margin from the safety margin threshold. The original values of the three weights (smoothness, energy consumption, and collision risk) are adjusted according to their corresponding gains. The adjusted weights are then normalized to a sum of 1, resulting in a dynamic weight coefficient set. Next, a comprehensive evaluation function is constructed, weighted and summed with the three normalized indicators and their corresponding dynamic weights to calculate the comprehensive evaluation value of the candidate path, while simultaneously calculating the baseline comprehensive evaluation value of the original path segment. Finally, multi-constraint joint verification is performed, sequentially verifying the global collision-free constraint, the non-negative safety margin constraint, the joint angle limit constraint, and the comprehensive evaluation value decrease threshold constraint. If all four constraints are satisfied, the path is determined to be replaceable; if any one constraint is not satisfied, it is determined to be non-replaceable. Finally, the judgment result and the updated dynamic weight coefficient group are output, which are used as the weight benchmark for subsequent path replacement operations and the next round of iteration.
[0056] Step S50: Based on the determination result, perform path replacement and verify the performance fluctuation of adjacent path segments after path replacement, so as to obtain the target optimized path through iterative verification of the verification results.
[0057] Path replacement involves replacing all nodes in the corresponding node interval of the original path with qualified candidate replacement path segments in situ, generating an updated path sequence. Adjacent path segment performance fluctuation refers to the changes in smoothness, safety margin, and energy consumption at the connection between the beginning and end of the replacement segment after path replacement, relative to the corresponding area of the original path before replacement. This is used to verify whether local optimization has caused performance degradation in the surrounding area. Iteration termination conditions are the rules for stopping path optimization iterations, including reaching the maximum number of iterations and convergence of the comprehensive evaluation function. The target optimized path is the final robotic arm motion path output after multiple rounds of iterative optimization and meeting the termination conditions.
[0058] The system takes the replacement judgment result from the previous step, the current path sequence, and the dynamic weight parameters as input, and executes the path replacement and iterative optimization process.
[0059] In this embodiment, the path replacement and iterative optimization are implemented in three ways: One approach involves single-segment successive replacement, neighborhood performance backtesting, and serial iterative optimization. After each path replacement, the system checks the performance fluctuations of adjacent nodes before and after the replacement segment. If the fluctuation exceeds a threshold, the replacement is cancelled; otherwise, it is retained and enters the next round of candidate node selection. Only one replacement is performed per round, and this serial iteration continues until the termination condition is met. This method ensures a stable and controllable optimization process, effectively avoiding global performance degradation caused by local optimization. It is suitable for precision operation scenarios with high path quality requirements and where performance regression is not permissible.
[0060] Secondly, the system employs multi-segment non-overlapping batch replacement, global performance verification, and parallel iterative optimization. In a single iteration, the system filters all non-overlapping qualified candidate path segments, performs batch replacements, and then uniformly verifies the performance metrics of the entire path. If the verification passes, all replacement results are retained, and the next iteration begins. Multiple replacement operations are executed in parallel. This approach offers a large optimization margin per round and fast iterative convergence, making it suitable for large-scale path optimization scenarios with long paths and multiple redundant nodes.
[0061] Thirdly, the system employs a replacement and rollback linkage mechanism, abnormal scenario replanning, and closed-loop iterative optimization. After a replacement is executed, the system synchronously monitors the obstacle's motion state and changes in path safety margin. When abnormal scenarios occur, such as sudden changes in obstacle speed or a continuous decrease in safety margin, the system rolls back to the previous safe path. If necessary, the initial planning algorithm is invoked to perform local replanning, and then iterative optimization continues. This approach possesses fault tolerance and self-healing capabilities, can handle complex dynamic working conditions, and is suitable for open operation scenarios involving human-machine collaboration and dynamic obstacle intervention.
[0062] In an exemplary scheme for iteratively optimizing the final path, the current path sequence, replacement judgment results, preset performance fluctuation thresholds, and iteration termination parameters are first loaded. Then, path replacement is performed. For qualified candidate path segments, nodes in the corresponding intervals of the original path are replaced, maintaining the consistent poses of the first and last nodes, generating an updated path sequence. Next, neighborhood performance verification is performed, recalculating the smoothness, safety margin, and energy consumption indicators of the two node intervals before and after the replacement segment, comparing the fluctuation amplitude before and after replacement. If the fluctuation exceeds the threshold, the replacement is cancelled, and the original path is restored. Then, abnormal scene detection is performed to determine if there are any anomalies such as sudden increases in obstacle speed or a continuous decrease in the global minimum safety margin. If so, path rollback or local replanning is performed to ensure a safe baseline for the path. Finally, iterative cancellation judgment is performed, determining whether the current iteration count has reached the maximum iteration count, or whether the adjacent iteration change rate of the comprehensive evaluation function is lower than the convergence threshold. If either condition is met, the iteration terminates. If the termination condition is not met, the updated path and dynamic weights are used as input, and the candidate node selection process is restarted for the next iteration. After the final iteration terminates, the current path is output as the target optimized path, which is used for the motion control execution of the robotic arm.
[0063] Further, please refer to Figure 2 , Figure 2 This is a flowchart of the robotic arm path closed-loop optimization method of this application. The system first executes the initial path input step, obtaining the path from the following methods: Rapidly-exploring Random Tree (RRT), Asymptotically optimal Rapidly-exploring Random Tree (RRT), Probabilistic Roadmap (PRM), and A algorithm (A). , A-Star) and other path planning algorithms are taken as the optimization input. Then a set of candidate node pairs is constructed, the candidate node pairs are screened and sorted according to the constraint on the number of spanning nodes and the joint space distance threshold, and the current candidate node pair is selected therefrom to determine the path segment to be optimized. Next, cubic spline interpolation is performed on the node pair interval to generate a continuous candidate replacement path segment, and global collision detection is performed on the candidate path segment. If a collision is detected, the process returns to the candidate node pair selection step for re-selection. If the collision detection is passed, dynamic safety distance determination is performed point by point to check whether the actual distance d_k of each sampling point satisfies the constraint of d_k>=d_safe(k), so as to obtain the dynamic safety margin (M_k, Margin_k) corresponding to each sampling point, and synchronously calculate two indicators of the path: second-order difference smoothing (S, Smoothing) and joint differentiated weighted energy consumption (E, Energy). Then a normalized comprehensive evaluation (J, Judgment) system is constructed, which respectively generates a smoothing normalization indicator (S_norm, Smoothing Normalization), an energy consumption normalization indicator (E_norm, Energy Normalization), and a collision risk normalization indicator (C_norm, CollisionNormalization), then path replacement determination is performed, and three conditions are checked simultaneously: no collision, dynamic safety margin M_k>=0, and the comprehensive evaluation value satisfying the improvement threshold (η, eta) constraint of J_new<J_old-η. If all conditions are satisfied, the path is determined to be replaceable. After the determination is passed, a path update operation is performed, the candidate replacement path segment is used to replace the corresponding interval in the original path, and after the replacement is completed, dynamic weight closed-loop update is performed, and the three types of weight coefficients: smoothing weight (α, alpha), energy consumption weight (β, beta), and collision risk weight (γ, gamma) are adaptively adjusted according to the minimum safety margin (margin_min, minimum margin), normalized energy consumption indicator and normalized smoothing indicator of the current path. Abnormal scenario processing is performed synchronously: when abnormal working conditions such as sudden increase in obstacle speed and continuous decrease in safety margin are detected, path backtracking or local re-planning is performed to ensure path safety. Then, convergence or iteration number judgment is performed: if the convergence condition is not met and the maximum number of iterations is not reached, the process returns to the candidate node pair set construction step to start a new round of optimization iteration; if the termination condition is met, the final optimized path is output and used as the input for the motion control of the mechanical arm.
[0064] Second Embodiment This embodiment provides an exemplary scheme for constructing and sorting candidate node pairs. In this example, all node combinations of the initial joint path are traversed first to complete the initial span screening. Then, node pairs exceeding the threshold are eliminated by verifying the joint space pose distance. Finally, candidate node pairs are sorted in descending order of span distance to generate a priority set, thereby efficiently screening out path replacement units with high optimization potential. Step S10 includes steps A11 to A13: Step A11: Based on the initial joint path generated by the path planning algorithm, traverse all node combinations with a sequence number interval greater than one according to the node number, and compare the number of intermediate nodes in each node pair with the maximum number of nodes crossed to obtain the initial set of node pairs.
[0065] Step A12: Calculate the pose distance of each node pair in the initial set of node pairs in the joint space, and remove node pairs whose pose distance is greater than the maximum distance threshold in the joint space to obtain the effective node pair set.
[0066] Step A13: Sort the set of valid node pairs in descending order of the joint space span distance corresponding to each pair, and generate the candidate node pairs with association priority.
[0067] The initial set of node pairs consists of all candidate node combinations that have only undergone node span constraint filtering and have not yet completed distance verification. Pose distance is the Euclidean distance between two sets of joint angle vectors in joint space, used to quantify the overall motion amplitude difference between node pairs. The effective set of node pairs consists of node combinations that simultaneously satisfy both span and distance constraints, possessing the basic feasibility for path interpolation replacement.
[0068] In this example, when filtering candidate node pairs based on the initial joint path to generate a priority candidate set, a serial filtering method with full node traversal and double constraints can be used. Starting from the path's starting node, all node combinations with an interval greater than 1 are enumerated one by one, and span and distance checks are performed sequentially. Once all checks pass, they are included in the valid set, and finally, a descending sort is performed to complete the full construction of candidate node pairs. Alternatively, a segmented sliding window parallel filtering method can be used. The initial joint path is divided into multiple continuous windows with a fixed node size. Node pair traversal and double constraint checks are performed in parallel within each window. A preset number of nodes overlap between windows to ensure that cross-window node pairs are not missed. The valid node pairs output from each window are summarized and sorted uniformly, thereby improving the efficiency of constructing candidate node pairs for large-scale long paths.
[0069] After completing the span screening of the initial set of node pairs, the pose distance verification process is initiated. For each pair of nodes in the initial set, the pose distance in the joint space is calculated sequentially. Then, node pairs whose pose distance exceeds the maximum distance threshold in the joint space are removed to obtain a set of valid node pairs. Next, based on the set of valid node pairs, the nodes are sorted in descending order according to the joint space span distance of each pair to generate candidate node pairs with association processing priority. Large span node pairs are processed first to quickly release the benefits of path simplification and reduce ineffective small span iterations. Thus, through hierarchical constraint screening and priority sorting, both optimization effect and execution efficiency are taken into account.
[0070] For example, there are two ways to generate candidate node pairs for association priority. The first is a full traversal serial sorting and filtering. Starting from the first node of the initial joint path, the starting node is selected sequentially according to the node number, and then the ending node is selected sequentially starting from the next node of the starting node. The number of intermediate nodes in each group is counted and compared with the maximum number of nodes crossed. If the number of nodes meets the span requirement, it is included in the initial set of node pairs. After the full span filtering is completed, the joint space pose distance of each group in the initial set of node pairs is calculated. Node pairs that are greater than the maximum joint space distance threshold are removed to obtain the set of valid node pairs. Then, the set of valid node pairs is sorted in descending order according to the joint space span distance to generate candidate node pairs for association priority. This method uses the logic of enumerating all nodes one by one and serial verification with double constraints. By traversing the entire path without omissions, it ensures complete coverage of candidate node pairs and avoids missing high-potential optimization node pairs. It is suitable for conventional operation path optimization scenarios with moderate node size.
[0071] The second method is sliding window partitioning and parallel sorting filtering. The initial joint path is divided into multiple consecutive node windows of a preset window length. A preset number of overlapping nodes are retained between adjacent windows to fully cover cross-window node pairs. An independent computation unit is allocated to each window, and each window synchronously performs span and distance checks on its internal node pairs, generating a subset of valid node pairs within each window in parallel. After all windows have been computed, all valid node pair subsets are aggregated and deduplicated. Then, a global descending sort is performed based on the joint space span distance to generate candidate node pairs with associated priority. This method uses window partitioning and multi-unit parallel verification logic. By splitting the path into segments beforehand, the global computation is decomposed into multiple independent subtasks, significantly reducing the time required to construct candidate node pairs in long-path scenarios and adapting to path optimization scenarios with large node scales and long-distance continuous operations.
[0072] Further, please refer to Figure 3 , Figure 3This is a schematic diagram of the robotic arm path closed-loop optimization system of this application. The robotic arm path closed-loop optimization system comprises, sequentially along the data processing and optimization iteration link, a path input module, a candidate node pair construction module, a path interpolation module, a collision detection module, a dynamic safety margin calculation module, a smoothness calculation module, a joint differential energy consumption module, a collision risk calculation module, a normalized multi-objective evaluation module, a dynamic weight closed-loop update module, a path replacement determination module, an abnormal scene handling module, a convergence determination module, and a path output module.Wherein, the path input module is configured to acquire an initial joint path generated by the Rapidly-exploring Random Tree (RRT) algorithm and transmit it to downstream components; the candidate node pair construction module is configured to traverse path nodes, complete span / distance screening according to the number of spanning nodes and the joint space distance, and construct a set of candidate node pairs that meet constraints; the path interpolation module is configured to perform interpolation operation on the selected candidate node pairs to generate continuous candidate replacement path segments; the collision detection module is configured to perform full-domain detection on the candidate path segments, and roll back to the candidate node pair construction step to re-select node pairs if collision is detected; the dynamic safety margin calculation module calculates the dynamic safety margin (M_k, Margin_k) point by point based on the formula M_k=d_k-d_safe(k), and completes the adaptive safety constraint determination; the smoothness calculation module adopts the second-order difference method to calculate the second-order difference smoothness (S, Smoothing) index of the path; the joint differential energy consumption module is configured to calculate the joint differential weighted energy consumption (E, Energy) index; the collision risk calculation module calculates the collision risk cost based on safety margin (C, Collision Risk) based on the formula C=Σexp[-λM_k]; the normalized multi-objective evaluation module constructs a multi-objective comprehensive evaluation function based on the formula J=αS+βE+γC, and outputs a normalized evaluation result; the dynamic weight closed-loop updating module adjusts the weight coefficients α (alpha), β (beta), γ (gamma) in closed-loop according to the feedback signals of minimum safety margin (margin_min, minimum margin), normalized energy consumption (E_norm, Energy Normalization), and normalized smoothness (S_norm, Smoothing Normalization), and feeds the updated weights back to the normalized multi-objective evaluation module to realize dynamic weight adaptation; the path replacement determination module completes the feasibility determination of path replacement based on the improved threshold (η, eta) rule of J_new<J_old-η; the abnormal scenario processing module performs rollback / local re-planning operation when abnormal working conditions such as sudden increase of obstacle speed and continuous decrease of safety margin are detected, and feeds the abnormal processing result back to the path replacement determination step; the convergence judgment module is configured to perform iteration termination determination, and returns to the candidate node pair construction step to start the next round of optimization if the convergence condition is not satisfied; the path output module is configured to output the optimized final path to provide input for the motion control of the robotic arm.
[0073] Third Embodiment This embodiment provides an exemplary scheme for candidate replacement path generation and dynamic safety margin verification. In this example, a set of sampling points is first generated by cubic spline interpolation based on candidate node pairs. Then, the link distance and kinematic parameters are calculated point by point. Simultaneously, the motion state of obstacles is matched to generate a set of motion parameters. Then, the dynamic safety distance and safety margin sequence are calculated point by point. Finally, qualified candidate paths are obtained through global safety constraint verification. Step S20 includes steps B11 to B15: Step B11: Based on the candidate node pairs, generate the sampling points in the joint space using cubic spline interpolation according to the preset path resolution, and organize and output the set of candidate replacement path sampling points.
[0074] Step B12: Based on the set of candidate replacement path sampling points, calculate the minimum actual distance between each mechanical link and surrounding obstacles point by point, and calculate the end velocity and joint acceleration corresponding to the sampling point by decomposing the joint position difference.
[0075] Step B13: Based on the minimum actual distance, the end velocity, and the joint acceleration, and combined with the obstacle velocity parameters at the current moment, calculate the motion parameter set of the sampling point.
[0076] Step B14: Calculate the dynamic safety distance point by point using the motion parameter set of the sampling points and the basic safety distance, and compare it with the minimum actual distance to obtain the path safety margin sequence.
[0077] Step B15: Verify the dynamic safety margin of the sampling points in the path safety margin sequence point by point, filter out the path segments that meet the safety constraints, and sort them to obtain the qualified candidate paths.
[0078] The candidate replacement path sampling point set is a sequence of discrete joint pose points with fixed resolution generated by an interpolation algorithm between the beginning and end poses of candidate nodes. It is the smallest computational unit for evaluating path smoothness, energy consumption, and safety. The motion parameter set is a set of parameters for the minimum actual distance, end effector velocity, joint acceleration, and obstacle velocity at a single sampling point, serving as the complete input for dynamic safety distance calculation. The dynamic safety distance is a safety distance threshold dynamically adjusted based on the robot arm's motion state and the obstacle's motion state, replacing the fixed threshold to adapt to dynamic conditions. The path safety margin sequence is a sequence formed by arranging the differences between the actual distance and the dynamic safety distance at each sampling point in path order, used to characterize the safety redundancy level of the path segment across the entire domain.
[0079] In this example, when generating a set of candidate replacement path sampling points based on candidate node pairs, a uniform cubic spline interpolation method can be used across the entire interval. Using the angles of the first and last joints of the candidate node pairs as boundary constraints, the cubic spline coefficients for each joint dimension are solved, and all sampling points are obtained through uniform interpolation at a preset resolution, thus generating a continuous and smooth sequence of sampling points. Alternatively, a variable resolution adaptive interpolation method can be used, reducing the sampling density in intervals where joint angle changes are gradual, and increasing the sampling density in intervals where joint angle changes drastically or near obstacles. This reduces computational load while maintaining verification accuracy, thereby efficiently constructing the sampling point set.
[0080] After constructing the candidate replacement path sampling point set, the motion parameter and safety margin calculation process is initiated. For each pose point in the sampling point set, the minimum actual distance between the link and the obstacle is calculated sequentially, and the corresponding end effector velocity and joint acceleration are calculated. The obstacle's motion velocity at the current moment is matched, and the points are integrated to obtain a point-by-point motion parameter set. Subsequently, based on the motion parameter set and the basic safety distance, the dynamic safety distance of each sampling point is calculated. The difference between the minimum actual distance and the dynamic safety distance is used to obtain the point-by-point safety margin, which is then arranged in the path time sequence to generate a path safety margin sequence. Finally, the margin values of all sampling points in the verification sequence are traversed, path segments with negative margins are removed, and path segments that satisfy the safety constraints across the entire domain are retained as qualified candidate paths. In this way, through layered kinematic calculation and dynamic safety verification, the path safety redundancy under dynamic conditions is improved, avoiding the problem of insufficient adaptability of static safety thresholds.
[0081] For example, there are two ways to screen qualified candidate paths using a path safety margin sequence. The first method starts from the beginning and checks whether the dynamic safety margin of each sampling point satisfies the non-negativity constraint according to the path time sequence of the sampling points. After each sampling point is checked, the minimum margin value of the current path segment is recorded synchronously. If a negative margin sampling point appears in the middle, the candidate path segment is directly determined to be unqualified, the subsequent checks are terminated, and the safety violation location is marked. If all sampling points pass the check, the path segment is included in the set of qualified candidate paths, and its global minimum safety margin feature value is recorded synchronously. This method uses a time-progressive point-by-point serial check and a breakpoint-based early termination calculation logic. By checking the path movement time sequence step by step and truncating violations in advance, it reduces the amount of invalid subsequent calculations and ensures the rigor and efficiency of the safety check.
[0082] The second method is interval-based parallel verification. It reads the path safety margin sequence and analyzes the global margin distribution. Based on the numerical interval characteristics of the margin in the sequence, it performs segmentation processing, dividing sampling points with similar margin levels and spatial continuity into the same safety feature interval, and marking the margin abrupt change boundary points between intervals, generating multiple independent safety verification sub-intervals. Then, parallel verification processing is simultaneously initiated for all divided safety feature intervals. Within each safety feature interval, the safety margin of all sampling points within the interval is verified to ensure compliance with constraints, and the minimum margin and the number of violation points within the interval are counted. After all parallel verification and statistics for all safety feature intervals are completed, the verification results of all intervals are summarized. If there are no negative margin points in any interval across the entire domain, the path is determined to be a qualified candidate path; otherwise, it is determined to be unqualified. This method employs the computational logic of global margin distribution segmentation and full-interval parallel verification. By segmenting the margin distribution characteristics in advance, high-risk verification intervals are identified early, fully utilizing parallel computing capabilities to improve the safety verification efficiency of long path segments.
[0083] Further, the path input is obtained from the initial path P={q1, q2, ..., q...} generated by the path planning algorithm. n The path planning algorithm can be RRT or RRT, which serves as input for subsequent optimization. PRM, A Alternatively, other sampling / search-based path planning algorithms. The focus of the improvement is not on the initial path generation algorithm itself, but on the dynamic safety margin constraints, multi-objective normalization evaluation, dynamic weight closed-loop adjustment, and path segment replacement-based post-processing optimization applied to any initial path.
[0084] Construct a candidate node pair set by traversing the path node sequence and constructing a candidate node pair set Ω that satisfies the following condition: Ω={(q i q j |j>i+1,j i≤N_max,‖q j q i ‖≤L_max}, where N_max is the maximum number of nodes to be crossed (typically 1 / 3 of the total number of nodes in the path), and L_max is the maximum crossing distance threshold in the joint space. Candidate node pairs are ranked according to path segment length ‖q j q i Arrange the nodes in descending order, prioritizing those that span greater distances to maximize path simplification.
[0085] Select node pairs, choose node pairs (q) from the candidate set. i q j (j>i+1), which is the target path segment for the current optimization.
[0086] Path interpolation, using a cubic spline interpolation function to interpolate node pairs (q) in joint space. i q j Interpolate between ) to generate an intermediate state sequence {q}. k}, k=1…m. Specifically, let the interpolation parameter τ∈[0,1], and the intermediate state be: q k =(1 τ k )·q i +τ k ·q j +τ k (1 τ k )[a k (1 τ k )+b k τ k ], where a k b k The spline coefficients are determined by the tangent vectors of adjacent nodes, with an interpolation step size Δτ = 1 / (m+1), where m is the number of intermediate interpolation points, determined by the path segment length and the preset resolution. When high real-time performance is required, it can degenerate into linear interpolation: q k =(1 τ k )·q i +τ k ·q j .
[0087] Fourth embodiment This embodiment provides an exemplary scheme for dynamic safety distance calculation and path safety margin generation. In this example, the incremental safety distance is first calculated based on the corresponding gain coefficients matched with the motion parameter set. The initial dynamic safety distance is then obtained by superimposing the base safety distance. Next, a relative proximity speed correction term is introduced to complete compensation and correction, resulting in a point-by-point dynamic safety distance sequence. Finally, a path safety margin sequence is generated by calculating the difference between the actual distance and the dynamic safety distance. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the fourth embodiment of the control method for optimizing the robotic arm path in this application. Step B14 includes steps C11 to C14: Step C11: Based on the motion parameter set corresponding to the sampling point and the basic safety distance, match the safety distance gain coefficient for the end velocity, the obstacle velocity parameter, and the joint acceleration respectively, calculate the corresponding safety distance increment value, and obtain the sub-item safety distance increment set.
[0088] Step C12: Based on the set of sub-item safety distance increments, sum the three types of increments with the basic safety distance to obtain the initial dynamic safety distance.
[0089] Step C13: Introduce a relative approach speed correction term between the robotic arm and the obstacle to compensate and correct the initial dynamic safety distance, thereby obtaining a point-by-point dynamic safety distance sequence.
[0090] Step C14: Based on the point-by-point dynamic safety distance sequence, subtract the dynamic safety distance of the sampling point from the minimum actual distance corresponding to the sampling point to obtain the dynamic safety margin, and arrange them in the path order to obtain the path safety margin sequence.
[0091] The safety distance gain coefficient is a proportional coefficient that quantifies kinematic parameters into safety distance increments. Different kinematic parameters correspond to independent gain values, used to characterize the degree of influence of the parameter on the safety distance. The set of component safety distance increments is a collection of three types of safety distance increments: end-effector velocity increment, obstacle velocity increment, and joint acceleration increment. It is the component calculation unit constituting the dynamic safety distance. The initial dynamic safety distance is a preliminary safety threshold obtained by superimposing the three types of component increments on the basic safety distance, without considering the risk differences caused by relative motion direction. The relative approach speed correction term is a compensation amount calculated based on the relative motion direction and approach rate between the robotic arm and the obstacle. When moving towards each other, it is positively superimposed to increase safety redundancy; when moving away from each other, it is zero, retaining the basic distance. The point-by-point dynamic safety distance sequence is a sequence formed by arranging the corrected dynamic safety distances of each sampling point in path time sequence. It is the direct benchmark for determining safety constraints.
[0092] In this example, when calculating the set of individual safety distance increments, a linear mapping with fixed gain coefficients can be used. A fixed gain coefficient is preset for each type of motion parameter, and the parameter amplitude is multiplied by the corresponding gain to obtain the individual increment, thus yielding a standardized set of individual safety distance increments. Alternatively, an adaptive gain adjustment method can be used, dynamically adjusting the values of each gain coefficient based on the hazard level of the current work scenario and the robot arm's load status. In human-machine collaborative scenarios, the gain is increased to enhance safety redundancy, while in closed, unmanned scenarios, the feasible space for gain optimization paths is appropriately narrowed, thereby completing the adaptive calculation of the increments.
[0093] After obtaining the set of incremental safety distances, the dynamic safety distance correction and margin generation process is initiated. First, the three types of incremental safety distances are summed with the basic safety distance to obtain the initial dynamic safety distance. Then, the relative velocity vector between the nearest point of the robotic arm and the obstacle is calculated, and the approach velocity component along the line connecting the two is extracted to generate a relative approach velocity correction term. This term is used to compensate and correct the initial dynamic safety distance, resulting in a point-by-point dynamic safety distance sequence. Finally, the difference between the minimum actual distance of each sampling point and the corresponding dynamic safety distance is calculated to obtain the point-by-point dynamic safety margin. This margin is then arranged according to the path time sequence to generate a path safety margin sequence. Through layered incremental calculation and relative motion compensation, the adaptation accuracy of safety distances in dynamic obstacle scenarios is improved, avoiding the problems of insufficient safety redundancy or wasted path space caused by static thresholds.
[0094] For example, there are two ways to generate the path safety margin sequence. The first method calculates the path safety margin sequence point by point in a sequential manner, starting from the initial sampling point of the path segment. It reads the motion parameter set of each sampling point in sequence, calculates the three types of safety distance increments, adds the base safety distance to obtain the initial value, and then substitutes the relative proximity speed to complete the correction, simultaneously calculating the dynamic safety margin of that point. After each sampling point is calculated, the calculation result is stored in the corresponding sequence and the minimum margin marker of the current segment is updated, until all sampling points are calculated, outputting the complete path safety margin sequence. This method uses a sequential calculation and synchronous margin statistics logic, making the calculation link clear and controllable, facilitating the location of single-point safety anomalies, and adapting to conventional operation scenarios with a moderate number of sampling points and high requirements for computational stability.
[0095] The second approach involves dimensional parallel batch computation. The motion parameter set is dimensionally split according to parameter type, generating end-point velocity sequences, obstacle velocity sequences, and joint acceleration sequences for the entire path segment. Simultaneously, incremental parallel computation of these three parameter types is initiated, batching the set of incremental safety distances for all sampling points. Then, vector operations are used to batch perform the summation of initial dynamic safety distances and relative proximity velocity correction, generating a point-by-point dynamic safety distance sequence. Finally, batch interpolation is used to obtain the safety margin sequence for the entire path in one go. This method employs parameter dimensional splitting and full-path batch parallel computation logic, improving overall computational efficiency through vectorized operations, reducing the computational overhead of point-by-point loops, and adapting to refined optimization scenarios with long path segments and high sampling density.
[0096] Further, collision detection is performed on the candidate path segments: if a collision exists, the process returns to select a new node pair. If no collision exists, the subsequent steps continue.
[0097] Safety distance determination: calculate the distance d_k between each interpolation point q_k in the candidate path segment and each obstacle, and perform dynamic safety distance constraint determination point by point according to the time series: d_k≥d_safe(t_k, q_k). Wherein, d_safe is an adaptive safety distance function updated in real time by combining the end effector speed, obstacle speed and joint acceleration, and the candidate path segment enters the comprehensive evaluation only when all sampling points satisfy this constraint. The specific expression of the dynamic safety distance function d_safe(t, q) is: d_safe(t,q)=d0+k1·‖v_end(q)‖+k2·‖v_obs(t)‖+k3·‖a_joint(q)‖, wherein: d0 is the basic safety distance, with a value range of [0.05, 0.15]; v_end(q) is the speed of the robotic arm end effector; v_obs(t) is the movement speed of the obstacle relative to the robot at time t; a_joint(q) is the joint acceleration vector; the typical values of k1, k2 and k3 are 0.1, 0.15 and 0.05 respectively. The end effector speed can be calculated by the Jacobian matrix of the robotic arm: v_end(k)=J(q_k)·q_dot(k), and can also be estimated by difference of adjacent end poses; the joint acceleration is calculated by a_joint(k)=(q_{k+1}-2q_k+q_{k-1}) / Δt². The obstacle speed v_obs(t_k) is obtained by difference of two consecutive frames of position data from vision, lidar or station sensors. To improve safety redundancy in dynamic obstacle scenarios, a relative approach speed correction term can also be introduced: d_safe(k)=d0+k1‖v_end(k)‖+k2‖v_obs(k)‖+k3‖a_joint(k)‖+k4·max(0 v_rel(k)·n_k), wherein v_rel(k)=v_end(k) -v_obs(k), n_k is a unit direction vector from the obstacle to the closest point on the robotic arm, and k4 is the weight of relative approach speed.
[0098] When any sampling point satisfies d_k<d_safe(k), the candidate path segment is marked as failing the safety constraint, and the minimum safety margin is recorded as margin_min=min_k[d_k -d_safe(k)], which is used for subsequent collision risk cost calculation and candidate path sorting. Dynamic safety margin M_k=d_k In this method, d_safe(k) is used for four types of processing: first, as a hard criterion for whether candidate path segments meet dynamic safety constraints; second, as input to the collision risk cost function; third, as feedback to increase the collision risk weight γ in the dynamic weight closed-loop adjustment; and fourth, as a monitoring quantity to determine whether a path segment needs to be backtracked or replanned after replacement. Through this multi-functional mechanism, candidate paths that have not actually collided but have insufficient safety redundancy will also be penalized or rejected in a timely manner.
[0099] Smoothness calculation uses a second-order difference model to calculate the path smoothness index: S=Σ‖q(k+1) 2q(k)+q(k 1)‖.
[0100] Energy consumption is calculated using a joint-differentiated weighted model to determine the path energy consumption index: E=Σ_kΣ_rw_r·(q_r(k+1)). q_r(k))² / Δt², where r is the joint number and w_r is the weight coefficient for the corresponding joint. The weight coefficient w_r is determined based on the equivalent moment of inertia, rated load, reduction ratio, or historical current data of each joint. Higher weights are assigned to joints with large inertia and loads, such as the base and upper arm, while lower weights are assigned to joints with light loads, such as the wrist, thus prioritizing the suppression of large movements of high-energy-consuming joints during the optimization process. In implementations with motor current feedback, w_r can be corrected online according to the average or peak current of joint r in the most recent operating cycle, allowing the energy consumption model to adaptively update with load changes.
[0101] Fifth embodiment This embodiment provides an exemplary scheme for generating collision risk quantification and evaluation indicators based on dynamic safety margin. In this example, the dynamic safety margin of each sampling point is first used as the independent variable to perform a negative exponential mapping operation to obtain the single-point collision risk value. Then, the original total collision risk value is obtained by accumulating and aggregating the samples along the path. Finally, the ratio normalization operation is performed by matching the collision risk benchmark value of the corresponding original path segment, thereby obtaining a qualified candidate path evaluation indicator with unified dimensions. Step S30 includes steps D11 to D13: Step D11: Based on the safety margin corresponding to the sampling point as the independent variable, perform negative exponential mapping calculation point by point, and combine it with the risk calculation strategy to generate a single-point collision risk value that increases exponentially as the safety margin narrows.
[0102] Step D12: Accumulate and aggregate the single-point collision risk values according to the path sampling time sequence to obtain the original total collision risk value that represents the overall collision risk level of the candidate path segment.
[0103] Step D13: Based on the original total collision risk value, match the collision risk benchmark value corresponding to the qualified candidate path, perform ratio normalization calculation, and obtain the evaluation index corresponding to the qualified candidate path after unifying the evaluation dimensions.
[0104] The negative exponential mapping operation is a non-linear calculation rule that converts safety margin values into risk cost values. The smaller the safety margin, the higher the output risk value, exhibiting a sharp increase near the safety boundary, used to strengthen the penalty for critical safety states. The single-point collision risk cost is the quantified collision risk value at a single sampling point, reflecting the instantaneous collision risk level of the robotic arm in that pose. The original total collision risk value is the sum of the risk cost values of all sampling points within the path segment, used to characterize the overall collision risk level of the entire candidate path segment. The collision risk benchmark value is the calculated total collision risk value corresponding to the original path segment, serving as a reference benchmark for normalization operations. The ratio normalization operation is a standardization process that compares the total risk of the candidate path with the benchmark value, used to eliminate the influence of path length and sampling density on risk indicators, achieving horizontal comparability between different path segments.
[0105] In this example, when generating the single-point collision risk value, a standard negative exponential mapping method with a fixed attenuation coefficient can be used. A uniform attenuation coefficient is preset, and the dynamic safety margin of each sampling point is substituted into the negative exponential function to calculate the corresponding risk value, thus obtaining the single-point collision risk value sequence for the entire path segment. Alternatively, a hierarchical adaptive attenuation coefficient method can be used. Different attenuation coefficients are matched according to the safety margin interval level. A larger attenuation coefficient is used in the critical interval where the safety margin is close to zero to strengthen the risk penalty, while a smaller attenuation coefficient is used in intervals with sufficient safety redundancy to reduce the weight ratio, thereby completing the differentiated mapping of risk values.
[0106] After obtaining the single-point collision risk cost sequence, a collision risk aggregation and normalization process is initiated. The risk costs of all single points are accumulated along the sampling time sequence of the path to obtain the original total collision risk value for the candidate path segment. Then, the collision risk benchmark value calculated under the same sampling rules for the corresponding original path segment is retrieved. The total risk of the candidate path is compared with the benchmark value to achieve dimensional unification, ultimately yielding the collision risk evaluation index corresponding to the qualified candidate path. This nonlinear risk mapping and normalization process enhances the sensitivity of the collision risk index to the safety boundary, avoiding the underestimation of critical risk caused by linear evaluation.
[0107] For example, there are two ways to generate evaluation indicators for qualified candidate paths. The first method involves sequentially calculating and accumulating the indicators point by point according to the sampling time sequence. Starting from the initial sampling point of the path segment, the dynamic safety margin of each sampling point is read sequentially, and the risk value of a single point is calculated by substituting it into a negative exponential function. The accumulation operation is completed simultaneously to update the current total risk. After all sampling points have been calculated, the original total collision risk value is obtained, and then compared with the collision risk benchmark value to obtain the normalized evaluation indicator. This method uses a point-by-point serial mapping and synchronous accumulation calculation logic. The calculation chain is simple and clear, and the current cumulative risk can be interrupted at any time. It is suitable for conventional optimization scenarios with a small number of sampling points and a need to quickly determine the risk level.
[0108] The second approach is full-path vectorized batch parallel computation. It uses the safety margin sequence of the entire path segment as vector input, performs batch vector operations to map the negative exponential values of all sampling points in one go, obtaining a single-point risk cost vector. Then, it uses vector summation to calculate the original total collision risk value in one go. Finally, it performs batch normalization to obtain a standardized evaluation index. This method employs vectorized batch computation and parallel processing logic, reducing the time overhead of loop operations. Its computational efficiency increases with the number of sampling points, making it suitable for fine-grained optimization and batch evaluation scenarios involving long path segments and high sampling density.
[0109] Furthermore, a comprehensive evaluation function is constructed, namely: J = α·S_norm + β·E_norm + γ·C_norm, where S_norm, E_norm, and C_norm are the normalized indices of second-order difference smoothness, joint-differential weighted energy consumption, and collision risk, respectively, and α, β, and γ are dynamic weight coefficients. The collision risk cost function C preferably adopts an exponential decay model based on dynamic safety margin. C=Σ_k exp[ λ·(d_k d_safe(k))]; Where d_k is the actual distance between the k-th node on the path and the nearest obstacle, and d_safe(k) is the dynamic safe distance corresponding to that node. d_safe(k) is the dynamic safety margin, and λ is the attenuation coefficient (typically λ = 5~10m). -1 When dynamic obstacle velocity or joint acceleration data is unavailable, C = Σ_k exp( λ·d_k) is used as the basic alternative form. The typical range of weight coefficients is: α∈[0.2, 0.6], β∈[0.1, 0.4], γ∈[0.2, 0.5], and α+β+γ=1. Normalization can be performed using the ratio of the current candidate path segment to the original path segment: S_norm=S_new / (S_old+δ), E_norm=E_new / (E_old+δ), C_norm=C_new / (C_old+δ), where δ is a very small positive number to prevent the denominator from being zero. Through normalization, the direct superposition of different dimensional indicators can be avoided, which may lead to a certain indicator abnormally dominating the evaluation result. The collision risk cost C_norm is calculated in a form related to the safety margin: C_new=Σ_k exp[ λ·(d_k The cost increases rapidly as the candidate path approaches the dynamic safety boundary. When the safety margin is large, the cost tends to be smaller. This form serves as the core preferred form of this scheme, distinguishing it from ordinary collision risk assessment based solely on obstacle distance d_k. The weighting coefficients can be adaptively adjusted in a closed loop according to the task mode and real-time evaluation results: when the minimum safety margin_min is lower than the safety margin threshold M_th, γ is increased to enhance collision risk constraints. When the joint differential energy consumption normalization index E_norm is higher than the energy consumption threshold E_th, β is increased to enhance high-energy-consumption joint suppression. When the second-order difference smoothness normalization index S_norm is higher than the smoothness threshold S_th, α is increased to enhance motion stability constraints. After each adjustment, α, β, and γ are renormalized so that α + β + γ = 1.
[0110] One specific adjustment method is: α'=α·[1+ρ_s·max(0,S_norm) S_th)], β'=β·[1+ρ_e·max(0, E_norm E_th)], γ'=γ·[1+ρ_m·max(0,M_th margin_min)], and then let α=α' / (α'+β'+γ'), β=β' / (α'+β'+γ'), γ=γ' / (α'+β'+γ'); where ρ_s, ρ_e, ρ_m are the adjustment gains.
[0111] Through the above closed-loop adjustment, the comprehensive evaluation function is not a static weighted result with fixed weights, but automatically increases the penalty intensity of the corresponding indicators based on the current problems of insufficient safety margin, high energy consumption or insufficient smoothness of the candidate path segment, thereby reducing the risk of ordinary multi-objective weighted evaluation being directly combined.
[0112] Path replacement judgment: path replacement is performed when the candidate path segment simultaneously meets the following conditions: all global sampling points have no collision; all sampling points satisfy the dynamic safety distance constraint of d_k≥d_safe(k); and J_new<J_old η, where η is a preset improvement threshold; the path after replacement does not damage the start-end constraint and joint limit constraints. Otherwise, return to reselect the node pair.
[0113] Path updating: replace the corresponding node sequence in the original path with the candidate path segment that meets the conditions, and complete the current round of path updating. After each path replacement is completed, recalculate S_norm, E_norm, C_norm and the dynamic safety distance at the affected path segment and its adjacent nodes, so as to avoid the decrease in smoothness or safety margin of adjacent path segments caused by local replacement. If there are multiple candidate node pairs satisfying the conditions in the same round of iteration, according to the decrease of the comprehensive evaluation function ΔJ=J_old -J_new, perform replacement from largest to smallest. When candidate path segments overlap, only the candidate path segment with the largest ΔJ is retained to prevent path oscillation caused by repeated replacement.
[0114] Closed-loop dynamic weight updating: update α, β and γ according to the minimum safety margin margin_min, normalized energy consumption E_norm and normalized smoothness S_norm of the path after the current round of replacement. If margin_min<M_th, increase the collision risk weight γ. If E_norm>E_th, increase the energy consumption weight β. If S_norm>S_th, increase the smoothness weight α. The updated weights are used for evaluation of candidate node pairs in the next round.
[0115] Abnormal scenario handling: when it is detected that the obstacle speed surges between two consecutive frames, margin_min decreases continuously, or M_k<0 still exists after closed-loop weight adjustment, suspend the current candidate path segment replacement, and perform one of the following processing: shorten the span of the candidate node pair, increase the interpolation sampling density, increase the lower limit of γ, roll back to the previous round of safe path, or recall the initial path planning algorithm to generate a local alternative path.
[0116] When multiple candidate path segments simultaneously meet the replacement conditions but overlap each other, the candidate path segment with the largest ΔJ and the largest margin_min is preferentially retained. When the replacement of a certain path segment causes the margin_min of adjacent path segments to decrease by more than a preset threshold, the replacement is canceled or the adjacent path segments are re-evaluated, so as to avoid the decrease of global safety margin caused by local optimization.
[0117] The algorithm determines the termination condition: if the maximum number of iterations has been reached, or the path evaluation function value converges (the change between two adjacent iterations is less than a preset threshold), then the iteration terminates; otherwise, it returns to continue optimization. The convergence condition is: |J (t) J (t-1) | / J (t-1) <ε, where ε typically takes the value of 10. - ³~10 -4 J (t) J represents the comprehensive evaluation function value corresponding to the current path after the t-th iteration, i.e., the quantitative result of the comprehensive performance of the path after this iteration. (t-1) After the (t-1)th iteration, the comprehensive evaluation function value corresponding to the path in the previous iteration is used as the benchmark value for convergence judgment. |J (t) J (t-1) |: The absolute value of the difference between the comprehensive evaluation values of two adjacent iterations, representing the absolute change in the overall performance of the path before and after the iteration. Taking the absolute value allows for a uniform measurement of the change, without needing to distinguish between performance improvement or decline. T_max typically ranges from 100 to 500 iterations.
[0118] The output optimized path is the final path after multiple rounds of iterative optimization, which serves as the input for the motion control of the robotic arm.
[0119] Sixth Embodiment This embodiment provides an exemplary scheme for dynamic weight adaptive adjustment and path replacement comprehensive determination. In this example, firstly, the deviation magnitude is calculated based on various evaluation indicators and corresponding preset thresholds to generate a set of weight adjustment parameters. Then, the initial weights are corrected according to the rule that the deviation magnitude is positively correlated with the weight gain and re-normalized to obtain a dynamic weight coefficient group. Subsequently, the evaluation indicators and dynamic weight coefficients are combined and weighted to construct a weight comprehensive evaluation function to obtain the comprehensive evaluation value of the candidate path segment. Finally, joint verification is performed by combining the evaluation reduction constraint with multi-dimensional constraints to generate the path replacement determination result. Step S40 includes steps E11~E14: Step E11: Based on the evaluation index and the corresponding index threshold, calculate the deviation of the index from the threshold for each category, and generate a set of weight adjustment parameters.
[0120] Step E12: Correct and renormalize the initial weights of the evaluation index according to the rule that the deviation magnitude and weight gain are positive, and obtain the dynamic weight coefficient set.
[0121] Step E13: Based on the evaluation index and the dynamic weight coefficient group, construct the weighted comprehensive evaluation function through weighted aggregation, and calculate the comprehensive evaluation value of the candidate path segment.
[0122] Step E14: Perform joint verification on the comprehensive evaluation value by evaluating the reduction constraint, and generate the determination result of path replacement.
[0123] The weight adjustment parameter set consists of a combination of parameters representing the deviations of various evaluation indicators from their corresponding preset thresholds. These parameters serve as the input for adaptively correcting the weight coefficients. Examples include deviation parameters for smoothness, energy consumption, and collision risk. The dynamic weight coefficient set is a set of weight coefficients for each evaluation dimension after deviation correction and normalization. The weights change dynamically with path performance and include three types of coefficients: smoothness weight, energy consumption weight, and collision risk weight. The weighted comprehensive evaluation function is a weighted summation function using normalized evaluation indicators as input and dynamic weights as coefficients. It quantifies the overall quality of the path; lower values indicate better overall path performance. The evaluation reduction constraint is a hard constraint used to determine whether the improvement in the overall performance of a candidate path meets the standard. It requires that the decrease in the overall evaluation value of the candidate path compared to the original path be no less than a preset improvement threshold.
[0124] In this example, when generating the set of weight adjustment parameters, it can be done in a threshold-triggered discrete adjustment manner, where the adjustment parameter for the corresponding dimension is generated only when the evaluation index exceeds the corresponding preset threshold, and the parameter of the index that has not exceeded the limit is zero. Alternatively, it can be done in a continuous deviation proportional adjustment manner, where the corresponding adjustment parameter is generated according to the proportion of the actual deviation, regardless of whether the index exceeds the threshold. The larger the deviation, the higher the parameter value.
[0125] After constructing the set of weight adjustment parameters, the weight correction and evaluation process is initiated. The initial weights of the three evaluation indicators are corrected according to the rule that deviation magnitude is positively correlated with weight gain. Then, all corrected weights are normalized to obtain a dynamic weight coefficient set with a sum of one. The three normalized evaluation indicators and their corresponding dynamic weight coefficients are weighted and aggregated to construct a comprehensive weight evaluation function and calculate the comprehensive evaluation value of the candidate path segment. Finally, multi-dimensional joint verification is performed, combining global collision-free operation, dynamic safety margin compliance, joint limit compliance, and evaluation reduction constraints, to generate the final path replacement determination result. This dynamic weight closed-loop adjustment mechanism automatically strengthens the constraint weights of the weakest link indicator, avoiding evaluation imbalance when fixed weights change under varying operating conditions, and ensuring the synergy of multi-objective optimization.
[0126] For example, there are two ways to generate dynamic weights and complete the replacement determination. The first is a serial determination method with sequential correction of a single dimension. The deviation parameters of each evaluation index are extracted sequentially, and the weight coefficients of the corresponding dimensions are corrected one by one. After each dimension's weight correction is completed, an intermediate normalization process is performed. After all dimensions are corrected, the final dynamic weight coefficient group is obtained. The comprehensive evaluation value is calculated by substituting the evaluation index into the data, and all constraints are checked item by item. If all constraints are met, the replacement is allowed; if any constraint is not met, the verification is terminated and a conclusion of no replacement is output. This method uses a serial sequential correction and item-by-item constraint verification logic. The adjustment process is clear and controllable, facilitating the identification of driving factors for weight changes, and is suitable for conventional optimization scenarios with stable operating conditions and small index fluctuations.
[0127] The second method is a parallel decision-making approach using multi-dimensional joint mapping. Deviation parameters of the three evaluation indicators are simultaneously input into a pre-defined weight mapping model, completing weight correction and global normalization for all dimensions in one go, and outputting dynamic weight coefficient sets in parallel. The comprehensive evaluation value is calculated simultaneously, and all constraints are verified in parallel. Verification results are output in batches and then aggregated to generate the final decision. This method employs multi-dimensional joint mapping and parallel verification of all constraints, resulting in a short computational chain and fast response speed. It can shorten the decision-making time for a single round of optimization and is suitable for online path optimization scenarios with dynamic obstacle conditions and high real-time requirements.
[0128] Furthermore, the robotic arm path closed-loop optimization system sequentially obtains the following algorithms through the path input module: Rapidly-exploring Random Tree (RRT), Asymptotically optimal Rapidly-exploring Random Tree Star (RRT), Probabilistic Roadmap (PRM), and A algorithm (A). The initial joint paths generated by planning algorithms such as A-Star are filtered and sorted by the candidate node pair construction module according to the constraints of the number of nodes crossed and the joint space distance, resulting in candidate node pairs with processing priorities. The path interpolation module interpolates the intervals of the candidate node pairs to generate candidate replacement path segments, which are then sent to the collision detection module for global collision detection. If a collision is detected, the module returns to the candidate node pair construction stage to reselect node pairs. The path segments that pass the collision detection are sent to the dynamic safety margin calculation module. Based on the minimum actual distance and dynamic safety distance of each sampling point, the dynamic safety margin (M_k, Margin_k) = actual distance d_k - dynamic safety distance d_safe (k) is used to calculate the complete path safety margin sequence point by point, resulting in a smoothness calculation module, a joint differential energy consumption module, and a collision risk calculation module. Subsequently, the smoothness calculation module, the joint differential weighted energy consumption module, and the collision risk calculation module calculate the second-order difference smoothness index (S, Smoothing), the joint differential weighted energy consumption index (E, Energy), and the collision risk index (C, Collision Risk) in parallel. The collision risk index is based on the negative exponential mapping rule and calculated according to the formula Collision Risk Total (C, Collision Risk). Risk) = Σexp[-attenuation coefficient λ × dynamic safety margin M_k] is obtained by summing and aggregating the three types of evaluation indicators. These three types of evaluation indicators are then fed into the normalized multi-objective evaluation module to achieve dimensional unification, generating the normalized smoothness index (S_norm, NormalizedSmoothing), the normalized energy consumption index (E_norm, Normalized Energy), and the normalized collision risk index (C_norm, Normalized Collision). The evaluation index (Risk) is then fed into the dynamic weight closed-loop update module. Based on the evaluation index and the corresponding preset index threshold, the deviation of each index from the threshold is calculated, generating a set of weight adjustment parameters. The initial weights of the three evaluation indexes are corrected and re-normalized according to the rule that the deviation is positively correlated with the weight gain, resulting in a dynamic weight coefficient set containing smoothness weight coefficient (α, alpha), energy consumption weight coefficient (β, beta), and collision risk weight coefficient (γ, gamma). Simultaneously, the updated weight parameters are fed back to the normalized multi-objective evaluation module to adapt to the next round of evaluation. Based on the evaluation index and the dynamic weight coefficient set, a weighted comprehensive evaluation function (J, Judgment) is constructed through weighted aggregation. The comprehensive evaluation value of the candidate path segment is calculated according to the formula J=αS+βE+γC, and then sent to the path replacement determination module. The module uses an evaluation reduction constraint (i.e., the comprehensive evaluation value of the candidate path satisfies J_new < the comprehensive evaluation value of the original path J_old - the improvement threshold (η, eta)) combined with global safety margin constraints and joint limit constraints to perform multi-dimensional joint verification of the comprehensive evaluation value, generating the final determination result for path replacement.If the judgment passes, the corresponding path segment is replaced and updated. Simultaneously, the abnormal scenario handling module monitors for abnormal conditions in real time, such as sudden increases in obstacle speed and continuous decreases in the minimum safety margin (margin_min). When an abnormality is triggered, path rollback or local replanning is performed. Then, the convergence judgment module determines the convergence based on the relative convergence criterion |J. (t) J (t-1) | / J (t-1) The convergence accuracy threshold (ε, epsilon) determines whether the iteration termination condition is met. If the convergence condition is not met, the candidate node is returned to start the next round of optimization iteration in the construction stage. If the termination condition is met, the path output module outputs the final target optimization path to provide input for the robot arm motion control.
[0129] Seventh Embodiment This embodiment provides an exemplary scheme for constructing a weighted comprehensive evaluation function and calculating the comprehensive evaluation value. In this example, the numerical validity of the mapping for each dimension is first verified based on the evaluation indicators and dynamic weight coefficient groups, outputting a set of paired and compliant indicator weight parameters. Then, weighted operations are performed on each evaluation indicator according to the dimension decoupling method to obtain a set of weighted evaluation values for each item. Finally, a summation and aggregation operation is performed on all item values to construct the weighted comprehensive evaluation function, thereby accurately calculating the comprehensive evaluation value corresponding to the candidate path segment. Please refer to... Figure 5 , Figure 5 This is a flowchart illustrating the seventh embodiment of the control method for optimizing the robotic arm path in this application. Step E13 includes steps F11 to F13: Step F11: Based on the evaluation indicators and the dynamic weight coefficient group, verify the validity of the mapping values between each evaluation dimension and its corresponding weight, and output a set of paired and compliant indicator weight parameters.
[0130] Step F12: The set of indicator weight parameters is used to perform weighted operations on the evaluation indicators according to the dimensional decoupling method, so as to obtain a set of weighted evaluation values for each item.
[0131] Step F13: Perform summation and aggregation operations on the dimensional sub-item values of the weighted evaluation value set to construct the weighted comprehensive evaluation function, and calculate and output the comprehensive evaluation value corresponding to the candidate path segment.
[0132] The indicator weight parameter set is a combination of evaluation indicators and their corresponding weight coefficients that have completed a one-to-one mapping between dimensions and passed validity verification. It serves as the input foundation for constructing the comprehensive evaluation function. Examples include smoothness indicators and their corresponding weights, energy consumption indicators and their corresponding weights, and collision risk indicators and their corresponding weights. Dimensional decoupling is a processing method that breaks down multi-dimensional comprehensive evaluation into independent dimensions for separate calculations. The calculation processes of each dimension do not interfere with each other, facilitating item traceability and dynamic weight adjustment. The item-weighted evaluation value set is the set of item results obtained after weighting each evaluation dimension, including three types of item results: smoothness item evaluation value, energy consumption item evaluation value, and collision risk item evaluation value. The weighted comprehensive evaluation function is a quantitative evaluation model composed of multi-dimensional normalized evaluation indicators and their corresponding dynamic weights, used to uniformly represent the comprehensive performance level of a path.
[0133] In this example, when verifying the validity of the mapping values between each evaluation dimension and its corresponding weight, it can be done by performing a full item-by-item verification, checking the correspondence between each evaluation dimension and weight, the range of values, and the compliance of normalization one by one. After all verifications pass, the set of paired and compliant parameters is output. Alternatively, it can be done by performing a dimension label matching verification, attaching a unique dimension label to each evaluation indicator and weight coefficient, and automatically completing the mapping matching and validity verification based on the label, quickly eliminating invalid parameters with dimension mismatch or out-of-bounds values.
[0134] After obtaining the set of matching compliant indicator weight parameters, the comprehensive evaluation function construction and evaluation value calculation process is initiated. Following a dimensional decoupling approach, the three dimensions of smoothness, energy consumption, and collision risk are separated into independent computational units. The normalized evaluation indicators for each dimension are weighted using corresponding weight coefficients, generating a set of weighted evaluation values containing the three categories of results. Then, a summation and aggregation operation is performed on the weighted evaluation values of all dimensions to complete the construction of the weighted comprehensive evaluation function. Finally, the comprehensive evaluation value corresponding to the candidate path segment is calculated and output. This calculation logic, through dimensional decoupling and hierarchical aggregation, ensures computational flexibility during dynamic weight adjustments and improves the traceability and stability of the comprehensive evaluation process.
[0135] For example, there are two ways to construct a weighted comprehensive evaluation function and calculate the comprehensive evaluation value. The first is a sequential accumulation method. Following a preset order of smoothness, energy consumption, and collision risk, the evaluation indicators and weight coefficients for the corresponding dimensions are extracted sequentially. Weighting operations are performed dimension by dimension, and the results are synchronously accumulated into the comprehensive evaluation value. The current comprehensive value is updated after each dimension's calculation is completed. The final comprehensive evaluation value is output after all dimensions have been calculated. This method employs a sequential and synchronous accumulation calculation logic, resulting in a clear computational chain. It facilitates the investigation of calculation deviations dimension by dimension and is suitable for optimization iteration scenarios where weight adjustments are frequent and the contribution of individual items needs to be traced.
[0136] The second method is a full-dimensional parallel aggregation calculation. Based on the indicator weight parameter set, weighted calculations for all dimensions are initiated simultaneously, and the weighted evaluation values for each dimension are output in parallel. Then, a one-time vector summation is used to complete the full-dimensional aggregation, directly obtaining the comprehensive evaluation value of the candidate path segment. This method employs multi-dimensional parallel computation and single-time aggregation calculation logic, significantly reducing the computation time of a single round of evaluation, resulting in higher computational efficiency and making it suitable for online optimization scenarios with batch evaluation of multiple candidate paths and high real-time requirements.
[0137] Furthermore, when calculating the comprehensive evaluation value of candidate path segments, the mapping relationship, numerical range, and normalization compliance of each evaluation dimension and its corresponding weight are verified one by one based on three types of normalized evaluation indicators: smoothness (S), joint-differentiated weighted energy consumption (E), and collision risk (C). This is done in conjunction with a dynamic weight coefficient set containing smoothness weight coefficient (α), energy consumption weight coefficient (β), and collision risk weight coefficient (γ). The result is an output of a paired and compliant index weight parameter set (IWPS). Then, the index weight parameter set is decomposed into three independent operation branches according to dimensional decoupling. Each branch performs a weighted operation on the evaluation indicators of each dimension, superimposing the corresponding weights, to obtain a sub-item weighted value set (SWVS) containing sub-item evaluation values for smoothness, energy consumption, and collision risk. Finally, a summation and aggregation operation is performed on all dimension sub-items within the set of sub-items weighted evaluation values to construct a weighted comprehensive evaluation function (WCEF), and the comprehensive evaluation value (J) corresponding to the candidate path segment is calculated and output.
[0138] Eighth embodiment This embodiment provides an exemplary scheme for path iteration replacement and neighborhood performance fluctuation verification optimization. In this example, firstly, based on the path replacement judgment result and the current joint path sequence, in-situ replacement is performed on qualified candidate path segments while maintaining the consistency of the pose connection between the first and last nodes, generating an updated path sequence. Then, multi-dimensional performance indicators are recalculated for the adjacent path segments on both sides of the replacement segment, and the fluctuation amplitude before and after the replacement is compared to obtain the performance verification result of the adjacent segments. Next, when the performance fluctuation exceeds the limit or the safety margin abnormally decays, path backtracking or local replanning correction is performed to generate a stable path sequence. Finally, the compliance verification is completed by matching the iteration termination judgment condition. If the standard is not met, the process returns to the node selection stage for iterative optimization; if the standard is met, the target optimized path is output. Step S50 includes steps G11~G14: Step G11: Based on the determination result and the current joint path sequence, replace the candidate path segments that have passed the determination in situ while maintaining the consistency of the pose connection between the first and last nodes, and generate the updated path sequence after replacement.
[0139] Step G12: Calculate the safety margin, smoothness, and differentiated energy consumption index for the adjacent path segments on both sides of the replacement segment in the updated path sequence, and compare the fluctuation range of the index before and after the replacement to obtain the performance verification result of the adjacent segments.
[0140] Step G13: When the performance fluctuation in the adjacent segment performance verification result exceeds the fluctuation threshold or the safety margin is abnormally reduced, perform path rollback or local replanning correction to generate a stable path sequence.
[0141] Step G14: Based on the stable path sequence, perform compliance verification by matching the iteration termination judgment condition. If the condition is not met, return to the node selection stage for iterative optimization. If the condition is met, output the target optimized path.
[0142] The updated path sequence is a new version of the joint path sequence obtained after in-situ replacement of candidate path segments. It retains all node features of the unreplaced intervals of the original path and only updates the path shape of the replaced intervals. The adjacent segment performance verification result is a verification conclusion obtained by comparing the performance indicators of adjacent path segments on both sides of the connection between the beginning and end of the replaced segment. It is used to determine whether local replacement causes performance degradation in the surrounding area and includes three core verification items: safety margin fluctuation, smoothness fluctuation, and energy consumption fluctuation. Path rollback is a correction mechanism that cancels the current path replacement operation and restores the path state before replacement when the neighborhood performance verification fails, used to avoid the risk of global performance degradation caused by local optimization. The stable path sequence is a joint path sequence whose global performance fluctuation is within the allowable range after neighborhood performance verification and anomaly correction. It is the input object for iterative cancellation judgment. The iterative cancellation judgment condition is a judgment rule used to stop the path optimization loop, including two judgment dimensions: the upper limit of the number of iterations and the convergence threshold of the comprehensive evaluation value.
[0143] In this example, when performing in-situ replacement of candidate path segments, it can be done by locking the first and last nodes together, completely binding the poses of the first and last joints of the replacement segment with the corresponding nodes of the original path, ensuring zero pose deviation, avoiding sudden motion changes at the connection point, and thus generating a consistent updated path sequence. Alternatively, it can be done by smooth fitting of the transition segment, extending a small number of node intervals at the beginning and end of the replacement segment to perform spline transition fitting, further mitigating the transition step caused by the replacement and improving the overall continuity of the path.
[0144] After obtaining the updated path sequence, the adjacent segment performance verification process is initiated. Preset-length adjacent path intervals to the left and right of the replacement segment are extracted, and three types of indicators—dynamic safety margin, second-order difference smoothness, and joint-differential weighted energy consumption—are recalculated point-by-point. The mean and extreme value changes of the corresponding intervals before and after the replacement are statistically analyzed to generate complete adjacent segment performance verification results. When any performance fluctuation exceeds a preset fluctuation threshold, or when the minimum safety margin across the entire domain exhibits abnormal decay, a path rollback operation is immediately executed to cancel the replacement. Alternatively, local replanning correction is performed on the abnormal connection areas to eliminate performance degradation intervals and generate a globally stable path sequence. Finally, based on the stable path sequence matching iteration cancellation criteria, the convergence status of the current iteration count and comprehensive evaluation value is verified. If the termination condition is not met, the process returns to the candidate node to initiate the next round of optimization in the construction phase. If the condition is met, the final target optimized path is output. This neighbor verification and anomaly correction mechanism avoids performance degradation issues caused by local optimization, ensuring the global stability and asymptotic convergence of the path optimization process.
[0145] For example, there are two ways to complete the path iterative optimization and output the target path. The first is a serial iterative method of single-segment successive replacement and neighborhood back-check. In each iteration, only one optimal candidate path is replaced. After the replacement is completed, a full performance check is performed on the adjacent path segments on both sides. If the check passes, the replacement is retained and the process proceeds to the next round. If the check fails, the process is directly rolled back to the state before the replacement and the next round of selection is started. This method adopts the computational logic of single-step iteration and segment-by-segment check. The optimization process is stable and controllable, which can effectively avoid the risk of performance runaway caused by the superposition of multiple replacements and is suitable for high-precision and high-safety robotic arm operation path optimization scenarios.
[0146] The second approach is a parallel iterative method involving multi-segment non-overlapping batch replacement and global performance verification. In a single iteration, all non-overlapping qualified candidate path segments are selected, and in-situ replacements of all path segments are performed in batches. Then, a unified verification is performed simultaneously on the neighborhood performance and overall global performance of all replacement intervals. If the verification passes, all replacement results are retained; if the verification fails, the replacement segment with the greatest impact is rolled back according to priority until the entire domain complies. This method employs batch optimization and global verification computational logic, significantly reducing the number of iterations, accelerating path convergence, and adapting to large-scale operation path optimization scenarios with large node scale and long total path length.
[0147] Furthermore, based on the operation scenario of a six-DOF serial robotic arm with dynamic obstacles, the core idea of "post-processing optimization" is adopted to decouple path optimization from the planning stage into an independent post-processing module. This module is adaptable to Rapidly-exploring Random Tree (RRT) and Asymptotically optimal Rapidly-exploring Random Tree (RRT) models. The algorithm generates initial joint paths from any path planning algorithm, including Rapidly-exploring Random Tree Star (RAS), Probabilistic Roadmap (PRM), and A-Star (A), exhibiting high versatility and portability. First, a candidate node pair set is generated by constructing and sorting candidate node pairs based on the maximum number of nodes crossed and the maximum distance threshold in the joint space. These pairs are then sorted in descending order of joint space crossing distance, prioritizing large-span node pairs. This significantly improves algorithm iteration efficiency while ensuring optimization quality. For selected candidate node pairs, cubic spline interpolation is performed to generate candidate replacement path segments. After global collision detection, dynamic safety thresholds are calculated point-by-point based on the dynamic safe distance function (d_safe), which integrates the end-effector velocity, obstacle velocity, joint acceleration, and relative approach velocity. This yields point-by-point dynamic safety margins (M_k, Margin_k), with the minimum safety margin (margin_min) serving as the core safety constraint. Compared to static threshold schemes, this approach offers higher adaptability and safety redundancy in dynamic environments. Furthermore, a collision risk modeling method based on safety margins is employed. The dynamic safety margin is used as input to calculate the collision risk index (C, Collision Risk) through a negative exponential mapping. The closer the path is to the dynamic safety boundary, the greater the penalty, unlike static evaluation methods that only use fixed obstacle distances. For the smoothness dimension, a second-order difference smoothness index (S, Smoothing) is used. By calculating the sum of the second-order difference moduli of each node on the path, the path curvature change is quantified, effectively identifying and penalizing sharp turns in the path. The energy consumption dimension employs a joint-differentiated weighted energy consumption index (E), assigning differentiated weights based on the equivalent inertia, rated torque, and load characteristics of each joint. This prioritizes suppressing large-amplitude movements of high-load joints, making the energy consumption assessment more closely reflect actual driving characteristics. Building upon this, and relying on a multi-objective comprehensive evaluation iterative optimization framework, a normalized multi-objective comprehensive evaluation function (J) is constructed, i.e., J = α. S_norm+β E_norm+γ C_norm, where S_norm is the normalized smoothness index (S_norm, Normalized Smoothing), E_norm is the normalized energy consumption index (E_norm, Normalized Energy), and C_norm is the normalized collision risk index (C_norm, Normalized Collision Risk). α, β, and γ are the dynamic weight coefficients for the corresponding dimensions. The system uses a dynamic weight closed-loop update mechanism to adaptively adjust the three weight coefficients based on the minimum safety margin of the current path, the deviation of normalized energy consumption and normalized smoothness from their corresponding thresholds, ensuring that the optimization direction automatically aligns with the bottleneck indicators of the current operating condition. Candidate path segments must simultaneously meet four conditions: no collision, non-negative global dynamic safety margin, compliant joint constraints, and a reduction in comprehensive evaluation value meeting the improvement threshold (η, eta) before in-situ replacement can be performed. This avoids deterioration of safety or energy consumption indicators due to simply shortening the path. After replacement, the performance fluctuations of adjacent path segments are checked. When abnormal conditions such as a sudden increase in obstacle speed or a continuous decrease in safety margin occur, path backtracking or local replanning is performed. Subsequently, the iteration termination condition is determined by the convergence judgment module. If convergence fails, the process returns to the candidate node to start the next round of optimization in the construction phase. After convergence, the final optimized path is output for robotic arm motion control. To verify the technical effect of this solution, a reproducible simulation example can be built. The simulation platform can be MATLAB Robotics Toolbox, Robot Operating System (ROS) / MoveIt, Gazebo simulation environment, CoppeliaSim simulation platform, PyBullet physics engine, or a self-developed joint space simulation program. The platform must support the output of data on the joint angles, joint velocities, joint accelerations, end-effector poses, end-effector velocities, and relative positions of obstacles of the robotic arm. The robotic arm adopts a six-degree-of-freedom serial model, with joint variables denoted as q = [q1, q2, q3, q4, q5, q6]^T. Each joint is configured with a corresponding angle range, upper speed limit, and upper acceleration limit. Differential energy consumption weights wr are determined based on the joint's equivalent inertia, rated torque, load, or motor current records. Dynamic obstacles are set as at least one spherical, cylindrical, or polyhedral obstacle moving along a straight line, broken line, or periodic curve. The obstacle's position is denoted as p_obs(t), and its velocity as v_obs(t). At each sampling time tk, dk is calculated based on the closest distance between the robotic arm link or end effector and the obstacle, and combined with d_safe(k), the dynamic safety margin M_k is obtained. Four comparison schemes are set up: Scheme A is the original path planning result without smoothing or closed-loop optimization. Scheme B is the original path smoothed by cubic spline interpolation. Scheme C is the original path optimized by combining a fixed safety distance and a fixed-weight multi-objective evaluation.Scheme D is a joint scheme for dynamic safety margin, joint-differentiated energy consumption, normalized multi-objective evaluation, dynamic weight closed-loop adjustment, and path segment replacement criteria. Evaluation indicators include the number of path nodes (N), second-order difference smoothness index S, joint-differentiated weighted energy consumption index E, collision risk index C based on dynamic safety margin, minimum safety margin (margin_min), maximum joint acceleration (a_max), path execution time (T_run), comprehensive evaluation function J, as well as the number of times safety constraints failed, the number of times dynamic weight adjustments were made, and the number of times abnormal scenarios were triggered. Data recording tables are created by scheme number, number of path nodes N, S, E, C, margin_min, a_max, T_run, J, number of times safety constraints failed, number of times dynamic weight adjustments were made, whether abnormal scenario handling was triggered, and remarks fields. The judgment rule is as follows: under the same starting point, ending point, robotic arm model, obstacle trajectory, and parameter boundary conditions, if scheme D reduces the smoothness or collision risk index compared to schemes A and B, and increases the minimum safety margin or reduces at least one of the following: energy consumption, collision risk, or comprehensive evaluation value compared to scheme C, without increasing the number of safety constraint failures, then it proves that the comprehensive optimization effect of this scheme is superior. Its technical effectiveness stems from the synergistic effect of multiple mechanisms. Because the dynamic safety margin simultaneously participates in safety constraint determination, collision risk calculation, and collision risk weight γ adjustment, the system automatically increases the safety penalty weight when a dynamic obstacle approaches. Since the energy consumption index uses joint-differential weighting, large movements of high-load joints are preferentially suppressed. Because all three types of indicators are normalized and incorporated into the comprehensive evaluation function, evaluation imbalances of indicators with different dimensions are avoided. Since the comprehensive evaluation value reduction constraint and the safety margin constraint are used as replacement criteria simultaneously, the problem of sacrificing safety margin or energy consumption indexes simply by shortening the path is effectively prevented. Overall, it can reduce sharp turns and lower smoothness index values compared to the original RRT path, maintain a higher minimum safety margin when dynamic obstacles are approaching compared to the simple spline smoothing scheme, and automatically adapt weights to the working conditions to reduce collision risk and energy consumption imbalance compared to the fixed safety distance and fixed weight scheme.
[0148] This application provides a robotic arm path optimization device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the robotic arm path optimization control method in the first embodiment described above.
[0149] The following is for reference. Figure 6The diagram illustrates a structural schematic of a robotic arm path optimization device suitable for implementing embodiments of this application. The robotic arm path optimization device in this application may include, but is not limited to, mobile terminals such as motion control and trajectory calculation hardware, simulation and offline path optimization hardware carriers, and environmental sensing devices, as well as fixed terminals such as 3D laser trackers and calibration devices. Figure 6 The robotic arm path optimization device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0150] like Figure 6 As shown, the robotic arm path optimization device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the robotic arm path optimization device. The processing unit 1001, the ROM 1002, and the RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the robotic arm path optimization device to communicate wirelessly or wiredly with other devices to exchange data. Although a robotic arm path optimization device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0151] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0152] The robotic arm path optimization device provided in this application, employing the robotic arm path optimization control method in the above embodiments, can solve the technical problem of poor robotic arm operating performance. Compared with the prior art, the beneficial effects of the robotic arm path optimization device provided in this application are the same as those of the robotic arm path optimization control method provided in the above embodiments, and other technical features in this robotic arm path optimization device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0153] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0154] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
[0155] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the control method for optimizing the robotic arm path in the above embodiments.
[0156] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.
[0157] The aforementioned computer-readable storage medium may be included in the robotic arm path optimization device; or it may exist independently and not assembled into the robotic arm path optimization device.
[0158] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the robotic arm path optimization device, the robotic arm path optimization device performs the following actions: Based on an initial joint path generated by a path planning algorithm, it filters candidate node pairs by combining the maximum number of nodes crossed and the maximum distance threshold in the joint space; it performs interpolation processing on the path segments between the candidate node pairs to generate candidate replacement path segments, and calculates the safety margin of each sampling point to filter qualified candidate paths; it calculates the collision risk index of the qualified candidate paths according to a risk calculation strategy to obtain the evaluation index corresponding to the qualified candidate paths; it adjusts the evaluation weights based on the deviation between the evaluation index and the path threshold, constructs a weighted comprehensive evaluation function, and generates a judgment result based on path constraints; it performs path replacement based on the judgment result, and verifies the performance fluctuation of adjacent path segments after path replacement, so as to obtain the target optimized path through iteration using the verification results.
[0159] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0161] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0162] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described control method for optimizing the robotic arm path, thereby solving the technical problem of poor robotic arm performance. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the control method for optimizing the robotic arm path provided in the above embodiments, and will not be repeated here.
[0163] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A control method for optimizing the path of a robotic arm, characterized in that, The method includes: The initial joint path generated by the path planning algorithm is used to filter candidate node pairs by combining the maximum number of nodes crossed and the maximum distance threshold in the joint space. Interpolation is performed on the path segments between the candidate node pairs to generate candidate replacement path segments, and the safety margin of each sampling point is calculated point by point to screen out qualified candidate paths. The collision risk index of the qualified candidate path is calculated according to the risk calculation strategy to obtain the evaluation index corresponding to the qualified candidate path; The evaluation weights are adjusted by the degree of deviation between the evaluation index and the path threshold, a comprehensive weight evaluation function is constructed, and a judgment result is generated by combining the path constraint conditions. Based on the determination result, the path is replaced, and the performance fluctuation of adjacent path segments after the path replacement is verified, so as to obtain the target optimized path through the verification result iteration.
2. The control method for optimizing the path of a robotic arm as described in claim 1, characterized in that, The step of selecting candidate node pairs by combining the initial joint path generated based on the path planning algorithm with the maximum number of nodes crossed and the maximum distance threshold in the joint space includes: Based on the initial joint path generated by the path planning algorithm, all node combinations with a sequence number interval greater than one are traversed according to the node number, and the number of intermediate nodes in each node pair is compared with the maximum number of nodes crossed to obtain the initial set of node pairs. Calculate the pose distance of each node pair in the initial set of node pairs in the joint space, and remove node pairs whose pose distance is greater than the maximum distance threshold in the joint space to obtain the effective set of node pairs. The set of valid node pairs is sorted from largest to smallest according to the joint space span distance corresponding to each node pair, and candidate node pairs with association priority are generated.
3. The control method for optimizing the path of a robotic arm as described in claim 1, characterized in that, The steps of interpolating the path segments between the candidate node pairs to generate candidate replacement path segments, and calculating the safety margin of each sampling point to screen qualified candidate paths include: Based on the candidate node pairs, the sampling points are generated in the joint space using cubic spline interpolation according to the preset path resolution, and the set of candidate replacement path sampling points is organized and output. Based on the set of candidate replacement path sampling points, the minimum actual distance between each mechanical link and surrounding obstacles is calculated point by point, and the end velocity and joint acceleration corresponding to the sampling point are calculated by decomposing the joint pose difference. Based on the minimum actual distance, the end velocity, and the joint acceleration, combined with the obstacle velocity parameters at the current moment, the motion parameter set of the sampling point is calculated; By combining the motion parameter set of the sampling points with the basic safety distance, the dynamic safety distance is calculated point by point, and compared with the minimum actual distance to obtain the path safety margin sequence; The dynamic safety margin of each sampling point in the path safety margin sequence is verified point by point, path segments that meet the safety constraints are selected, and qualified candidate paths are obtained.
4. The control method for optimizing the path of a robotic arm as described in claim 3, characterized in that, The steps of calculating the dynamic safety distance point by point using the motion parameter set of the sampling points and the basic safety distance, and comparing it with the minimum actual distance to obtain the path safety margin sequence include: Based on the motion parameter set corresponding to the sampling point and the basic safety distance, safety distance gain coefficients are matched for the end velocity, the obstacle velocity parameter, and the joint acceleration, respectively, and the corresponding safety distance increment values are calculated to obtain the sub-item safety distance increment set; Based on the set of sub-item safety distance increments, the initial dynamic safety distance is obtained by summing the three types of increments with the basic safety distance; A relative approach speed correction term between the robotic arm and the obstacle is introduced to compensate and correct the initial dynamic safety distance, resulting in a point-by-point dynamic safety distance sequence; Based on the point-by-point dynamic safety distance sequence, the dynamic safety distance of the sampling point is subtracted from the minimum actual distance corresponding to the sampling point to obtain the dynamic safety margin, which is then arranged in the path order to obtain the path safety margin sequence.
5. The control method for optimizing the path of a robotic arm as described in claim 1, characterized in that, The step of calculating the collision risk index of the qualified candidate path according to the risk calculation strategy, and obtaining the evaluation index corresponding to the qualified candidate path, includes: Based on the safety margin corresponding to the sampling point as the independent variable, a negative exponential mapping operation is performed point by point. Combined with the risk calculation strategy, a single-point collision risk value that increases exponentially as the safety margin narrows is generated. The single-point collision risk value is accumulated and aggregated according to the path sampling time sequence to obtain the original total collision risk value that represents the overall collision risk level of the candidate path segment. Based on the original total collision risk value, the ratio normalization operation is performed on the collision risk benchmark value corresponding to the qualified candidate path, and the evaluation index corresponding to the qualified candidate path is obtained after unifying the evaluation dimensions.
6. The control method for optimizing the path of a robotic arm as described in claim 1, characterized in that, The steps of adjusting the evaluation weights based on the deviation between the evaluation indicators and the path thresholds, constructing a comprehensive weight evaluation function, and generating a judgment result by combining the path constraints include: Based on the evaluation indicators and their corresponding thresholds, the deviation of each indicator from the threshold is calculated for each category, and a set of weight adjustment parameters is generated. The initial weights of the evaluation index are corrected and renormalized according to the rule that the deviation magnitude and weight gain are positive, based on the set of weight adjustment parameters, to obtain a dynamic weight coefficient set. Based on the evaluation indicators and the dynamic weight coefficient group, the weighted comprehensive evaluation function is constructed through weighted aggregation, and the comprehensive evaluation value of the candidate path segment is calculated. The comprehensive evaluation value is jointly verified by evaluating the reduction constraint to generate the determination result of path replacement.
7. The control method for optimizing the path of a robotic arm as described in claim 6, characterized in that, The step of constructing the weighted comprehensive evaluation function by weighted aggregation based on the evaluation index and the dynamic weight coefficient group, and calculating the comprehensive evaluation value of the candidate path segment includes: Based on the evaluation indicators and the dynamic weight coefficient group, verify the validity of the mapping values between each evaluation dimension and its corresponding weight, and output a set of paired and compliant indicator weight parameters. The weighted evaluation values are obtained by superimposing the corresponding weights on the evaluation indicators according to the dimensional decoupling method of the set of indicator weight parameters. The dimensional sub-item values of the weighted evaluation value set are summed and aggregated to construct the weighted comprehensive evaluation function, and the comprehensive evaluation value corresponding to the candidate path segment is calculated and output.
8. The control method for optimizing the path of a robotic arm as described in claim 1, characterized in that, The steps of performing path replacement based on the determination result, verifying the performance fluctuation of adjacent path segments after path replacement, and iteratively obtaining the target optimized path through the verification results include: Based on the determination result and the current joint path sequence, the candidate path segments that pass the determination are replaced in situ while maintaining the consistent pose connection between the first and last nodes, and the updated path sequence after replacement is generated. For the adjacent path segments on both sides of the replacement segment in the updated path sequence, calculate the safety margin, smoothness and differentiated energy consumption index, and compare the fluctuation range of the index before and after replacement to obtain the performance verification result of the adjacent segments. When the performance fluctuation in the adjacent segment performance verification result exceeds the fluctuation threshold or the safety margin is abnormally reduced, path rollback or local replanning correction is performed to generate a stable path sequence. Based on the stable path sequence, compliance verification is performed by matching the termination judgment condition. If the condition is not met, the process returns to the node selection stage for iterative optimization. If the condition is met, the target optimized path is output.
9. A robotic arm path optimization device, characterized in that, The robotic arm path optimization device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the control method for robotic arm path optimization as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the control method for optimizing the robotic arm path as described in any one of claims 1 to 8.