Six-axis robot trajectory planning method and system
By using multi-objective particle swarm optimization algorithm and spline curve interpolation, the problems of abrupt joint trajectory changes and tool center point trajectory deviation in traditional six-axis robotic arm trajectory planning are solved, thereby improving the accuracy of tool center point trajectory and motion smoothness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IND TECH RES INST OF YIBIN SICHUAN UNIV
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-14
AI Technical Summary
Traditional six-axis robotic arm trajectory planning methods, when meeting joint limit and collision avoidance conditions, can lead to abrupt changes in joint trajectories, distortion of tool center point trajectory, and severe speed fluctuations, affecting machining quality.
The optimal joint variables are searched in the bound inverse solution space using a multi-objective particle swarm optimization algorithm, and a smooth and continuous joint trajectory is generated by spline curve interpolation and time interval adjustment.
Ensuring the accuracy of the tool center point trajectory improves motion smoothness, avoids joint trajectory jumps, and enhances the machining quality of six-axis robotic arms in high-precision industrial applications.
Smart Images

Figure CN122165444B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method and system for trajectory planning of a six-axis robotic arm. Background Technology
[0002] Six-axis robotic arms play a crucial role in high-precision industrial applications such as welding, laser cutting, and grinding / polishing. These tasks place stringent requirements on the motion trajectory of the tool's end effector, ensuring it precisely follows a pre-defined Cartesian path to maintain process stability and product consistency. Traditional trajectory planning methods typically employ a step-by-step strategy: first, end-effector pose constraints are set to fix the tool's center point trajectory; then, inverse kinematics calculations are used to transform the discrete end-effector trajectory points into joint space, obtaining the corresponding joint variable sequence; finally, interpolation is performed on the discrete points of each joint to generate a continuous motion trajectory. However, this method has significant drawbacks in practical implementation. Each discrete trajectory point must not only satisfy the end-effector trajectory constraints but also simultaneously consider multiple safety conditions, such as the physical limits of the joints and collision avoidance between robotic arm components and the working environment. These constraints are coupled, significantly compressing the feasible domain of selectable joint variables, especially in areas with sharp turns or complex curvature changes on the workpiece surface, drastically reducing the number of selectable joint solutions. At this point, the planned joint trajectory is prone to discontinuous jumps, causing problems such as the tool center point trajectory deviating from the preset path and violent oscillations in movement speed, which in turn leads to a decrease in processing quality, such as uneven weld formation during welding and increased roughness of the cut during laser cutting.
[0003] 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
[0004] The main purpose of this application is to provide a six-axis robotic arm trajectory planning method and system, which aims to ensure the accuracy of the tool center point trajectory and improve the smoothness of motion.
[0005] To achieve the above objectives, this application proposes a trajectory planning method for a six-axis robotic arm, the method comprising:
[0006] Obtain preset tool center point trajectory data, and discretize the tool center point trajectory data to obtain discrete trajectory point data;
[0007] For each discrete trajectory point data, construct the corresponding bound inverse solution space data;
[0008] The bound inverse solution space data is input into a multi-objective particle swarm optimization algorithm, and the multi-objective particle swarm optimization algorithm searches for the optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point.
[0009] The optimal joint variable sequence data is obtained by traversing all discrete trajectory points;
[0010] The optimal joint variable sequence data is subjected to spline curve interpolation to obtain the initial interpolated joint trajectory data.
[0011] The initial interpolated joint trajectory data is subjected to secondary interpolation processing, and the time interval is adjusted so that the average speed of the tool center point is consistent with the target speed, thus obtaining the final joint trajectory data.
[0012] In one embodiment, the step of constructing the corresponding bound inverse solution space data for each discrete trajectory point data includes:
[0013] For each discrete trajectory point data, a spherical coordinate system is established with the discrete trajectory point as the center to obtain the end pose space data;
[0014] For each point in the end-effector pose space data, the Jacobi iteration method is used to calculate multiple inverse kinematics solutions of the robotic arm under the same end-effector pose.
[0015] A binding inverse solution data is selected from the plurality of inverse kinematic solution data using a preset binding function, wherein the binding function is a continuous function of joint variables;
[0016] The binding inverse solution datasets corresponding to all points in the end pose space data are combined into binding inverse solution space data.
[0017] In one embodiment, the step of calculating multiple inverse kinematic solutions of the robotic arm in the same end-effector pose using the Jacobi iteration method for each point in the end-effector pose space data includes:
[0018] Set different initial joint variable data, and perform iterative solution for each initial joint variable data;
[0019] In each iteration, the error data between the current end-effector pose and the target end-effector pose is calculated;
[0020] The differential changes of joint variables are calculated using the Jacobian matrix, and the joint variable data are updated accordingly.
[0021] Repeat the iteration until the end pose error is less than the preset accuracy threshold to obtain converged inverse kinematics solution data;
[0022] Collect convergent inverse kinematics solutions corresponding to all different initial joint variable data as multiple inverse kinematics solutions.
[0023] In one embodiment, the step of inputting the bound inverse solution space data into a multi-objective particle swarm optimization algorithm, and searching for optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point by the multi-objective particle swarm optimization algorithm includes:
[0024] A set of particle position data is randomly initialized in the bound inverse solution space data; each particle position data corresponds to a candidate joint variable data.
[0025] Based on the candidate joint variable data and the historical best joint variable sequence data, calculate the velocity fitness data and the acceleration fitness data; the historical best joint variable sequence data is the optimal joint variable data sequence corresponding to the previously searched discrete trajectory points;
[0026] Based on the Pareto dominance relation, non-dominated solution data are selected from all particle position data to construct the Pareto optimal solution set data;
[0027] The target space is divided into multiple grid cell data using an adaptive grid partitioning technique; the target space is composed of the velocity fitness data and the acceleration fitness data.
[0028] A roulette wheel selection method is used to select one grid cell from the grid cell data, and a particle position is randomly selected from the selected grid cell data as the global optimal position data;
[0029] The particle velocity and position data are updated based on the individual particle's historical best position data and the global best position data.
[0030] Repeat the above steps for iterative optimization until the preset termination condition is met, and select the optimal joint variable data from the Pareto optimal solution set data.
[0031] In one embodiment, the steps of calculating velocity fitness data and acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data include:
[0032] The candidate joint variable data is combined with the historical best joint variable sequence data to form candidate joint variable sequence data;
[0033] Calculate the weighted norm of the difference vector between adjacent joint variable data in the candidate joint variable sequence data, and accumulate the weighted norm to obtain the velocity fitness data;
[0034] Calculate the weighted norm of the second-order difference vector of adjacent joint variable data in the candidate joint variable sequence data, and accumulate the weighted norm to obtain the acceleration fitness data.
[0035] In one embodiment, the step of calculating the velocity fitness data and the acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data further includes:
[0036] Obtain preset joint limitation range data, and check whether the candidate joint variable data is within the joint limitation range data;
[0037] Obtain robotic arm model data and working environment model data, adjust the robotic arm to the position corresponding to the candidate joint variable data, and perform collision detection processing between various components of the robotic arm and between the robotic arm and the working environment;
[0038] When the joint limit check result or the model interference check result indicates a violation, the corresponding characterization velocity fitness data and the aforementioned characterization acceleration fitness data are set to maximum values.
[0039] In one embodiment, the step of dividing the target space into multiple grid cell data using an adaptive grid partitioning technique includes:
[0040] Read the velocity fitness data and acceleration fitness data corresponding to the position data of each particle from the Pareto optimal solution set data;
[0041] The first dimension range data is determined based on the maximum and minimum values of the velocity fitness data, and the second dimension range data is determined based on the maximum and minimum values of the acceleration fitness data.
[0042] Based on the first dimension range data and the aforementioned second dimension range data, the target space is divided into multiple grid cell data.
[0043] The size of the grid cells is dynamically adjusted based on the distribution density of the Pareto optimal solution set data.
[0044] In one embodiment, the step of performing spline curve interpolation on the optimal joint variable sequence data to obtain the initial interpolated joint trajectory data includes:
[0045] The optimal joint variable sequence data is split into independent sequence data for each joint;
[0046] Spline curve interpolation is performed on the independent sequence data of each joint, and the time interval between adjacent discrete trajectory points in the spline curve interpolation is preset to a fixed value.
[0047] Set the interpolation boundary condition so that the endpoint slope of the independent sequence data for each joint is equal to the average slope of the initial two points and the last two points of the independent sequence data;
[0048] The continuous trajectory data of each joint obtained by interpolation are merged into the initial interpolated joint trajectory data.
[0049] In one embodiment, the step of performing secondary interpolation on the initial interpolated joint trajectory data and adjusting the time interval to make the average velocity of the tool center point consistent with the target velocity to obtain the final joint trajectory data includes:
[0050] The initial interpolated joint trajectory data is subjected to high-density time-isolated sampling to obtain new joint variable sequence data;
[0051] The time interval between adjacent joint variables in the new joint variable sequence data is adjusted so that the average velocity of the tool center point of the corresponding trajectory segment is consistent with the target velocity, thus obtaining the adjusted time node data;
[0052] Using the adjusted time node data and the new joint variable sequence data as interpolation points, spline curve interpolation is performed again, and the resulting trajectory data is used as the final joint trajectory data.
[0053] Furthermore, to achieve the above objectives, this application also proposes a six-axis robotic arm trajectory planning system, which includes: a memory, a processor, and a six-axis robotic arm trajectory planning program stored in the memory and executable on the processor. The six-axis robotic arm trajectory planning program is configured to implement the steps of the six-axis robotic arm trajectory planning method.
[0054] The six-axis robotic arm trajectory planning method and system proposed in this application solves the problems of joint trajectory jumps, tool center point trajectory deviations, and velocity oscillations in traditional trajectory planning by discretizing the tool center point trajectory, constructing a bound inverse solution space, applying a multi-objective optimization algorithm to search for the optimal joint variable sequence, and performing double interpolation. It can avoid joint trajectory jumps, ensure the accuracy of the tool center point trajectory, and improve motion smoothness. Attached Figure Description
[0055] 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.
[0056] 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.
[0057] Figure 1 This is a flowchart illustrating an embodiment of the six-axis robotic arm trajectory planning method of this application;
[0058] Figure 2 This is a structural schematic diagram of an embodiment of the six-axis robotic arm trajectory planning system of this application.
[0059] Explanation of icon numbers:
[0060] 10. Memory; 20. Processor.
[0061] 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
[0062] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of this application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0063] It should be understood that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0064] In existing technologies, the trajectory planning methods for six-axis robotic arms, when mapping discrete end-effector trajectories to joint space, have a limited number of selectable joint variables due to the need to meet safety conditions such as joint limits and collision avoidance. This makes the planned joint trajectories prone to abrupt changes at workpiece surface transitions, causing distortion of the tool center point trajectory and severe speed fluctuations, thereby reducing trajectory tracking accuracy and process performance, making it difficult to plan smooth, safe, and high-performance joint trajectories.
[0065] Based on this, embodiments of this application provide a six-axis robotic arm trajectory planning method, referring to... Figure 1 The six-axis robotic arm trajectory planning method includes steps S100 to S600, wherein:
[0066] Step S100: Obtain preset tool center point trajectory data, and discretize the tool center point trajectory data to obtain discrete trajectory point data;
[0067] Step S200: For each discrete trajectory point data, construct the corresponding bound inverse solution space data;
[0068] Step S300: Input the bound inverse solution space data into the multi-objective particle swarm optimization algorithm, and use the multi-objective particle swarm optimization algorithm to search for the optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point;
[0069] Step S400: After traversing all discrete trajectory points, the optimal joint variable sequence data is obtained;
[0070] Step S500: Perform spline curve interpolation on the optimal joint variable sequence data to obtain the initial interpolated joint trajectory data;
[0071] Step S600: Perform secondary interpolation on the initial interpolated joint trajectory data, adjust the time interval to make the average speed of the tool center point consistent with the target speed, and obtain the final joint trajectory data.
[0072] In this embodiment, tool center point trajectory data refers to the path information of a specific point on the robotic arm's end effector in Cartesian space as it changes over time. This data is typically given as a series of three-dimensional coordinates and attitude angles, representing the spatial path the robotic arm should follow when performing a task. Discrete trajectory point data refers to a series of discontinuous points obtained by sampling continuous tool center point trajectory data at certain time or spatial intervals. Each discrete trajectory point contains the position and attitude information of the robotic arm's end effector at that moment. Bound inverse kinematics spatial data refers to a set of joint variable solutions calculated using inverse kinematics methods at each discrete trajectory point of the robotic arm. Each solution in this set enables the robotic arm's end effector to reach that discrete trajectory point, and these solutions are associated through a preset binding function to ensure continuity in space.
[0073] In this embodiment, the multi-objective particle swarm optimization algorithm is a swarm intelligence-based optimization algorithm used to solve optimization problems with multiple conflicting objective functions. This algorithm simulates the foraging behavior of a flock of birds to find a set of non-dominated solutions, i.e., a Pareto optimal solution set, in the search space to balance different optimization objectives. Optimal joint variable data refers to the best joint variable configuration selected from the bound inverse solution space data for each discrete trajectory point during the multi-objective particle swarm optimization algorithm's search process, which simultaneously satisfies optimization objectives such as velocity stability and acceleration stability. Optimal joint variable sequence data refers to the sequence of optimal joint variable data corresponding to all discrete trajectory points arranged in chronological order. This sequence represents a series of optimal postures of the robotic arm in the joint space from the starting point to the ending point.
[0074] In this embodiment, spline curve interpolation is used to generate a smooth, continuous curve passing through a series of discrete data points. In joint trajectory planning, this process is used to convert discrete joint variable data into continuous joint motion trajectories. The initial interpolated joint trajectory data refers to the preliminary continuous joint motion trajectory obtained after processing the optimal joint variable sequence data through spline curve interpolation. This trajectory is smooth in joint space, but the corresponding tool center point velocity may not yet be completely consistent with the target velocity. The secondary interpolation process further optimizes the joint trajectory based on the initial interpolated joint trajectory data, by adjusting the time interval or resampling, so that the average velocity of the corresponding tool center point is consistent with the preset target velocity. The final joint trajectory data refers to the smooth and safe continuous joint motion trajectory obtained after secondary interpolation, which meets the target velocity requirements of the tool center point. This trajectory is the motion command followed by the robotic arm when actually performing the task.
[0075] The six-axis robotic arm trajectory planning method provided in this embodiment first acquires preset tool center point trajectory data and then discretizes this data to obtain a series of discrete trajectory point data. For example, continuous tool center point trajectories can be obtained through manual teaching, CAD / CAM software generation, or mathematical model calculation. Subsequently, a fixed time step sampling method or a spatial distance-based sampling method is used to convert the continuous trajectory into a discrete point set.
[0076] In this embodiment, for each discrete trajectory point data, it is necessary to construct corresponding bound inverse kinematics space data. Specifically, for each discrete trajectory point, all inverse kinematic solutions of the robotic arm in that end-effector pose can be calculated using analytical or numerical iterative methods. Subsequently, a strategy can be adopted, such as selecting the solution with the smallest Euclidean distance to the joint variables at the previous moment, or combining multiple inverse solutions into a representative solution using a preset weighting function, thereby determining one or a set of "bound" joint variable solutions for each discrete trajectory point.
[0077] In this embodiment, the bound inverse solution space data is then input into a multi-objective particle swarm optimization algorithm. This algorithm searches for optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point. For example, a traditional single-objective optimization algorithm can be used, combining multiple optimization objectives such as velocity stability and acceleration stability into a single objective function through weighted summation, and then searching in the bound inverse solution space. Alternatively, joint variable data that meets preset conditions can be selected from the bound inverse solution space through random sampling and filtering. After traversing all discrete trajectory points and completing the above search process, the optimal joint variable data found at each discrete trajectory point are combined in chronological order to obtain the optimal joint variable sequence data. This sequence represents a series of discrete optimal postures of the robotic arm in the joint space.
[0078] In this embodiment, the optimal joint variable sequence data is then subjected to spline curve interpolation to obtain initial interpolated joint trajectory data. For example, linear interpolation or cubic polynomial interpolation can be performed on the discrete variable sequence of each joint to generate a continuous motion trajectory in the joint space. During the interpolation process, the time interval between adjacent discrete trajectory points can be preset to a fixed value. Finally, the initial interpolated joint trajectory data is subjected to secondary interpolation to adjust the time interval so that the average velocity of the tool center point is consistent with the target velocity, thereby obtaining the final joint trajectory data. Specifically, the time axis of the initial interpolated trajectory can be scaled as a whole to match the total travel time of the tool center point with the target velocity. Alternatively, the trajectory can be uniformly resampled over time, and then the velocity of the tool center point corresponding to the sampled points can be smoothed to achieve velocity consistency.
[0079] In this embodiment, by introducing a bound inverse solution space and a multi-objective particle swarm optimization algorithm, the problems of abrupt joint trajectory changes, distortion of the tool center point trajectory, and severe speed fluctuations in traditional methods are effectively solved while ensuring that the tool center point trajectory remains unchanged. This enables the planning of smooth, safe, and high-performance joint trajectories, improving the trajectory tracking accuracy and process performance of the six-axis robotic arm in high-precision industrial applications.
[0080] In one feasible implementation, the step of constructing the corresponding bound inverse kinematics space data for each discrete trajectory point data includes: for each discrete trajectory point data, establishing a spherical coordinate system centered on the discrete trajectory point to obtain end-effector pose space data; for each point in the end-effector pose space data, using the Jacobi iteration method to calculate multiple inverse kinematics solutions of the robotic arm under the same end-effector pose; selecting a bound inverse kinematics solution from the multiple inverse kinematics solutions using a preset binding function, wherein the binding function is a continuous function with respect to joint variables; and combining the bound inverse kinematics data corresponding to all points in the end-effector pose space data into bound inverse kinematics space data.
[0081] In this embodiment, for each discrete trajectory point, a local spherical coordinate system is established centered on that point. This aims to define a set of end-effector poses encompassing the discrete trajectory point and its surrounding region, thereby obtaining the end-effector pose spatial data. The purpose of this is to allow for consideration not only of the precise target pose but also exploration of feasible poses within its neighborhood during subsequent inverse kinematics solving, providing greater optimization space for trajectory smoothness and obstacle avoidance. Specifically, based on the position and orientation of the discrete trajectory point, a series of end-effector poses with minor perturbations can be generated by defining a certain radius and angle range in the spherical coordinate system (e.g., rotating a certain angle around the X, Y, and Z axes of the end-effector coordinate system).
[0082] In this embodiment, for each point in the aforementioned end-effector pose space data, the Jacobi iteration method is used to calculate multiple inverse kinematics solutions for the robotic arm in that end-effector pose. The Jacobi iteration method is a commonly used numerical method for solving inverse kinematics, which approximates the target end-effector pose through continuous iteration. To obtain "multiple" inverse kinematic solutions, different initial joint variable data can be set for each iteration. For example, different initial configurations can be randomly selected or systematically traversed in the joint space to guide the iteration process to converge to different inverse kinematic solutions. These different solutions represent different postures (such as "on-elbow" or "under-elbow" configurations) that the robotic arm may adopt when reaching the same end-effector pose.
[0083] In this embodiment, after obtaining multiple inverse kinematics solutions, to ensure the continuity and smoothness of the trajectory, a pre-defined binding function is used to select a binding inverse solution from these solutions. The core requirement of this binding function is that it must be a continuous function of joint variables. This means that when the end-effector pose changes continuously in space, the joint variables selected by the binding function should also change continuously. For example, the binding function can be designed to select the solution that is closest in joint space to the optimal joint variable data determined for the previous discrete trajectory point, or to select the solution that minimizes joint motion, or to select based on specific robotic arm configuration preferences (such as avoiding singularities or maintaining a specific posture). In this way, jumps in joint variables between adjacent trajectory points can be avoided, thereby ensuring the smoothness of the trajectory.
[0084] In this embodiment, the binding inverse solution data corresponding to all points in the end-effector pose space data, selected by the binding function, are finally aggregated to form the binding inverse solution space data. This set represents the joint variable solution space constructed for the current discrete trajectory point after considering the end-effector pose neighborhood and joint continuity constraints, which can be searched by subsequent multi-objective particle swarm optimization algorithms.
[0085] In this embodiment, end-effector pose space data is established centered on each discrete trajectory point. This allows trajectory planning to go beyond a single, precise target pose and explore feasible poses within its neighborhood, thereby increasing the flexibility and robustness of trajectory planning. Secondly, the Jacobi iteration method is used to calculate multiple inverse kinematic solutions for the same end-effector pose, ensuring comprehensive consideration of all possible configurations of the robotic arm. More importantly, a bound inverse solution is intelligently selected from these multiple inverse kinematic solutions using a pre-defined, continuous binding function for joint variables, effectively solving the trajectory discontinuity problem caused by the pluralism of inverse kinematics. This selection mechanism ensures that continuously changing poses in the end-effector pose space correspond to continuously changing joint variables in the joint space, thus providing a comprehensive and inherently continuous bound inverse solution space for subsequent multi-objective particle swarm optimization algorithms. This significantly improves the smoothness and feasibility of the planned joint trajectories, avoids unnecessary shocks and vibrations during robotic arm movement, and improves the robotic arm's motion efficiency and accuracy.
[0086] In one feasible implementation, the step of calculating multiple inverse kinematics solutions for the robotic arm under the same end-effector pose using the Jacobi iteration method for each point in the end-effector pose space data includes: setting different initial joint variable data, performing iterative solutions for each initial joint variable data; calculating the error data between the current end-effector pose and the target end-effector pose in each iteration; calculating the differential change data of the joint variables using the Jacobi matrix, and updating the joint variable data; repeating the iteration until the end-effector pose error is less than a preset accuracy threshold to obtain converged inverse kinematics solutions; and collecting the converged inverse kinematics solutions corresponding to all different initial joint variable data as multiple inverse kinematics solutions.
[0087] In this embodiment, different initial joint variable data are set, and iterative solutions are performed for each initial joint variable data. The aim is to increase the probability of finding multiple inverse kinematic solutions by searching from multiple starting points. These initial joint variable data can be obtained by random sampling within the joint constraints of the robotic arm, or they can be selected based on a preset strategy (e.g., uniformly distributed grid points in the joint space). By providing different initial configurations for each iteration, the entire configuration space of the robotic arm can be effectively explored, avoiding the algorithm getting stuck in local optima and missing other feasible inverse kinematic solutions.
[0088] In this embodiment, calculating the error data between the current end-effector pose and the target end-effector pose in each iteration is a crucial step in evaluating the gap between the current robotic arm configuration and the desired target. The current end-effector pose is calculated using the robotic arm's forward kinematics model based on the current joint variable data. The target end-effector pose is the preset position and orientation that the robotic arm's end-effector is expected to achieve. The error data can be a comprehensive metric, for example, including position errors (such as Euclidean distance) and orientation errors (such as differences between rotation matrices or quaternions), or a weighted combination thereof. This error data provides the direction and magnitude for subsequent joint variable adjustments.
[0089] In this embodiment, the core of the Jacobi iteration method is to use the Jacobi matrix to calculate the differential changes in joint variables and update the joint variable data. The Jacobi matrix describes the linear relationship between the joint velocities of the robotic arm and the linear and angular velocities of the end effector. By calculating the inverse or pseudo-inverse of the Jacobi matrix, the error (differential change) in the end effector pose can be mapped to the differential changes in the joint variables. The calculated differential change data is then superimposed onto the current joint variable data, thereby updating the joint configuration of the robotic arm and making its end effector pose closer to the target pose.
[0090] In this embodiment, the iteration is repeated until the end-effector pose error is less than a preset accuracy threshold, resulting in converged inverse kinematics solution data. A termination condition for the iteration process is defined. The preset accuracy threshold is a small positive value used to determine whether the error between the current end-effector pose and the target end-effector pose is sufficiently small, indicating that an inverse kinematics solution meeting the accuracy requirements has been found. When the error is less than this threshold, the iteration stops, and the current joint variable data is considered a converged inverse kinematics solution. Furthermore, to prevent infinite iteration, a maximum number of iterations is typically set as another termination condition.
[0091] In this embodiment, convergent inverse kinematics solutions corresponding to all different initial joint variable data are collected as multiple inverse kinematics solution data. Thus, starting from different initial joint variable data, iterative solutions are performed independently, and all joint variable data that successfully converge to the target end-effector pose are collected. During the collection process, these solutions can be deduplicated to ensure that the collected multiple inverse kinematics solutions are mutually independent and have practical significance. These diverse inverse kinematics solutions provide a broader search space for subsequent binding function selection, thereby enabling the construction of a more comprehensive and robust binding inverse solution space.
[0092] In this embodiment, by employing the aforementioned technical solution, the limitation of the traditional Jacobi iteration method, which may only find a single inverse kinematic solution, can be effectively overcome when constructing bound inverse kinematic space data for each discrete trajectory point. By setting different initial joint variable data and performing iterative solutions, this application can systematically explore the configuration space of the robotic arm, thereby discovering and collecting multiple, or even all, feasible inverse kinematic solutions under the same end-effector pose. This significantly increases the diversity and completeness of the bound inverse kinematic space data, providing a richer selection basis for subsequent binding functions, enabling the bound inverse kinematic space data to more comprehensively reflect all possible configurations of the robotic arm under a specific end-effector pose. Based on this, the multi-objective particle swarm optimization algorithm will have a broader and more representative solution space when searching for optimal joint variable data, thereby more effectively avoiding local optima and finding globally optimal joint variable sequence data that performs better in terms of joint continuity, velocity, and acceleration, ultimately planning a smoother, more efficient, and collision-free six-axis robotic arm motion trajectory.
[0093] In one feasible implementation, the step of inputting the bound inverse solution space data into a multi-objective particle swarm optimization algorithm (MPS) and searching for optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point by the MPS includes: randomly initializing a set of particle position data in the bound inverse solution space data; each particle position data corresponding to a candidate joint variable data; calculating velocity fitness data and acceleration fitness data based on the candidate joint variable data and historical optimal joint variable sequence data; the historical optimal joint variable sequence data being the optimal joint variable data sequence corresponding to the previously searched discrete trajectory points; and calculating the optimal joint variable data from all particle positions based on the Pareto dominance relation. Non-dominated solution data is filtered from the target data to construct a Pareto optimal solution set. An adaptive grid partitioning technique is used to divide the target space into multiple grid cells. The target space consists of velocity fitness data and acceleration fitness data. A roulette wheel selection method is used to select one grid cell from the selected grid cells, and a particle position is randomly selected from the selected grid cell as the global optimal position. The particle velocity and position data are updated based on the individual particle's historical optimal position data and the global optimal position data. The above steps are repeated for iterative optimization until a preset termination condition is met, and the optimal joint variable data is selected from the Pareto optimal solution set.
[0094] In this embodiment, a set of particle position data is first randomly initialized in the bound inverse solution space data, where each particle position data corresponds to a candidate joint variable data. This step aims to provide an initial search starting point for the multi-objective particle swarm optimization algorithm. Specifically, a certain number of joint variable combinations can be randomly generated within the joint variable range defined by the bound inverse solution space data, and each combination represents the initial position of a particle in the search space. The number of particles can be adjusted according to the complexity of the problem and computational resources; for example, a fixed number of particles can be preset, or it can be dynamically determined based on the characteristics of the search space.
[0095] In this embodiment, velocity fitness data and acceleration fitness data are then calculated based on the candidate joint variable data and the historical best joint variable sequence data. The historical best joint variable sequence data is the sequence of optimal joint variable data corresponding to the previously searched discrete trajectory points. The purpose of this step is to evaluate the quality of each candidate joint variable data, ensuring that it simultaneously considers the velocity smoothness and acceleration smoothness of the trajectory, while maintaining continuity with the planned trajectory segment. Specifically, a multi-objective function can be constructed, with one objective function evaluating velocity smoothness and another evaluating acceleration smoothness. For example, velocity fitness can be calculated based on the difference between the current candidate joint variable and the optimal joint variable of the previous discrete trajectory point (representing velocity), while acceleration fitness can be calculated based on the second-order difference between the current candidate joint variable and the optimal joint variables of the previous two discrete trajectory points (representing acceleration). These calculations typically employ a weighted norm to quantify their smoothness.
[0096] In this embodiment, non-dominated solution data is then selected from all particle position data based on Pareto dominance to construct a Pareto optimal solution set. This step aims to identify candidate solutions that perform well across multiple objective functions and cannot be completely surpassed by other solutions. In multi-objective optimization, a solution is said to dominate another solution if it is superior to another solution in at least one objective and not inferior to another solution in all other objectives. By comparing the velocity fitness data and acceleration fitness data of all particles, solutions that are not dominated by any other particle can be identified. These solutions collectively constitute the Pareto optimal solution set, representing the trade-offs between different objectives.
[0097] Based on this, an adaptive meshing technique is used to divide the target space into multiple mesh cells; the target space consists of the velocity fitness data and the acceleration fitness data. This step aims to provide structured management of the Pareto optimal solution set data to maintain solution diversity and avoid excessive concentration of solutions in the target space. Specifically, the two-dimensional target space composed of velocity fitness data and acceleration fitness data can be divided into several mesh cells. The adaptability is reflected in the fact that the size of the mesh cells can be dynamically adjusted according to the distribution density of the Pareto optimal solution set data. For example, in regions with high solution density, the mesh can be finer to better distinguish different solutions; in regions with low solution density, the mesh can be coarser to cover a wider range.
[0098] Furthermore, a roulette wheel selection method is employed to select one grid cell from the grid cell data, and a particle position is randomly selected from the selected grid cell data as the global optimal position. This step aims to select a representative global optimal solution from the Pareto optimal solution set to guide the search direction of the particle swarm, while introducing a certain degree of randomness and diversity through the roulette wheel mechanism. Specifically, the selection probability can be assigned based on the number of non-dominated solutions contained in each grid cell; for example, grid cells containing fewer solutions may be assigned a higher selection probability to encourage the algorithm to explore sparse regions. Then, a grid cell is selected by simulating the roulette wheel process, and a particle is randomly selected from that cell as the global optimal position for the current iteration.
[0099] In this embodiment, the particle velocity and position data are then updated based on the individual particle's historical best position data and the global best position data. This step is the core dynamic mechanism of the particle swarm optimization algorithm, driving the particles to move in the search space. Each particle adjusts its velocity and direction based on its own best position (individual historical best position data) and the best position found by the entire particle swarm (global best position data). Specifically, the particle velocity update typically considers its current velocity, the difference between its individual historical best position data and its current position, and the difference between its global best position data and its current position, and introduces a random factor and inertia weight. Then, the particle's position is updated based on the updated velocity, causing it to move towards a better region.
[0100] In this embodiment, the above steps are repeated iteratively until a preset termination condition is met, at which point the optimal joint variable data is selected from the Pareto optimal solution set. This step ensures that the algorithm can continuously explore and optimize until a satisfactory convergence state or a preset computational resource limit is reached. The preset termination condition may include reaching the maximum number of iterations, the Pareto optimal solution set no longer changing significantly within a certain number of iterations, or the objective function value reaching a preset accuracy requirement. After the optimization process is completed, the final optimal joint variable data needs to be determined from the final Pareto optimal solution set data according to specific decision criteria (e.g., selecting the solution that achieves the best balance between velocity and acceleration smoothness, or selecting a solution with specific weights according to user preference).
[0101] In this embodiment, through the above technical solution, this application can effectively solve the problem of how to efficiently and robustly search for optimal joint variable data in a complex bound inverse solution space while ensuring trajectory smoothness and continuity during multi-objective particle swarm optimization. Specifically, by randomly initializing particle position data, diverse starting points are provided for the optimization process; by calculating velocity fitness data and acceleration fitness data, the optimization can simultaneously consider the velocity and acceleration smoothness of the trajectory and maintain good connection with historical trajectory data; by filtering non-dominated solution data through Pareto dominance relations, a Pareto optimal solution set data that reflects the multi-objective trade-offs is constructed; by using adaptive grid partitioning technology and roulette wheel selection method, the diversity of Pareto optimal solution set data is effectively maintained, and the particle swarm is guided to search for a better and more evenly distributed region, avoiding local optima; by iteratively updating particle velocity and position, the convergence of the algorithm is ensured. Ultimately, this scheme can provide joint variable data with excellent performance in both velocity and acceleration for each discrete trajectory point, thereby generating a smooth, continuous, and kinematically constrained six-axis robotic arm trajectory, which significantly improves the stability and efficiency of the robotic arm's movement and reduces mechanical shock and wear.
[0102] In one feasible implementation, the steps of calculating velocity fitness data and acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data include: combining the candidate joint variable data with the historical best joint variable sequence data to form candidate joint variable sequence data; calculating the weighted norm of the difference vector of adjacent joint variable data in the candidate joint variable sequence data, and accumulating the weighted norm to obtain velocity fitness data; calculating the weighted norm of the second-order difference vector of adjacent joint variable data in the candidate joint variable sequence data, and accumulating the weighted norm to obtain acceleration fitness data.
[0103] In this embodiment, when evaluating candidate joint variable data, the currently evaluated candidate joint variable data is first combined with the already determined historical best joint variable sequence data. This combination operation aims to construct a temporary, continuous candidate joint variable sequence data, which contains all joint configurations from the trajectory start point to the current evaluation point, thereby providing a complete context for subsequent velocity and acceleration calculations. In this way, it can be ensured that the evaluation of the current point considers not only its own characteristics, but also its continuity and smoothness with previous trajectory points.
[0104] In this embodiment, to quantify the velocity characteristics of the trajectory, a difference vector is calculated between adjacent joint variable data in the candidate joint variable sequence data. This difference vector reflects the change in the angle of each joint within adjacent time steps, directly corresponding to the joint velocity. A weighted norm is calculated for these difference vectors, and the weighted norms of all adjacent point pairs are summed to obtain the velocity fitness data. The use of the weighted norm allows different weights to be assigned based on the physical characteristics or importance of different joints, enabling the velocity fitness data to more accurately reflect the actual motion state and limitations of the robotic arm.
[0105] Based on this, to quantify the acceleration characteristics of the trajectory, the second-order difference vectors of adjacent joint variable data in the candidate joint variable sequence data are calculated. The second-order difference vectors represent the rate of change of joint velocity, i.e., joint acceleration. Similarly, the weighted norms of these second-order difference vectors are calculated, and the weighted norms of all adjacent point pairs are accumulated to obtain the acceleration fitness data. In this way, the smoothness of the trajectory and dynamic impact can be effectively evaluated, ensuring that the robotic arm does not generate excessive impact or vibration during movement.
[0106] In this embodiment, through the above technical solution, this application provides a refined and accurate mechanism for evaluating candidate joint variable data in a multi-objective particle swarm optimization algorithm. Combining candidate joint variable data with historical best joint variable sequence data allows for full consideration of the overall trajectory continuity when evaluating the current point, avoiding global unsmoothness caused by local optima. By calculating and summing the weighted norms of the difference vectors of adjacent joint variable data, joint velocity can be effectively characterized, thereby guiding the optimization algorithm to find trajectories with gradual velocity changes. Furthermore, by calculating and summing the weighted norms of the second-order difference vectors of adjacent joint variable data, joint acceleration can be accurately characterized, effectively suppressing drastic changes in joint acceleration and ensuring the smoothness and dynamic feasibility of the robotic arm's motion. This method provides a reliable fitness evaluation basis for the multi-objective particle swarm optimization algorithm, enabling it to more effectively search for optimal joint variable data that satisfies velocity and acceleration constraints in the bound inverse solution space data, ultimately planning a smoother, more efficient trajectory that conforms to the robotic arm's dynamic characteristics, significantly improving the quality of trajectory planning and the robotic arm's operational performance.
[0107] In one feasible implementation, the step of calculating the velocity fitness data and acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data further includes: acquiring preset joint limit range data, and checking whether the candidate joint variable data is within the joint limit range data; acquiring robotic arm model data and working environment model data, adjusting the robotic arm to the position corresponding to the candidate joint variable data, and performing collision detection processing between the components of the robotic arm and between the robotic arm and the working environment; when the joint limit check result or the model interference check result indicates a violation, setting the corresponding velocity fitness data and the acceleration fitness data to maximum values.
[0108] In this embodiment, joint limit range data refers to the minimum and maximum angle or displacement values allowed for each joint of the six-axis robotic arm during movement. These limits are typically determined by the physical structure and design of the robotic arm and can be obtained from its specifications. During the inspection process, the system compares each joint value in the current candidate joint variable data with its corresponding joint limit range data. If any joint value exceeds its preset limit range, the candidate joint variable data is deemed to be in violation. This step aims to ensure that the generated joint variable data is within the physical reach of the robotic arm, avoiding damage or inability to perform actions due to exceeding joint limits.
[0109] In this embodiment, the robotic arm model data typically includes the geometric shape information of each link, joint, and end effector of the robotic arm, which can be a simplified geometry (such as a sphere, cylinder, or bounding box) or a detailed CAD model. The working environment model data describes the three-dimensional geometric information of obstacles, grippers, or other equipment within the robotic arm's workspace. During collision detection, the precise position and orientation of each component of the robotic arm in three-dimensional space are first calculated using forward kinematics based on candidate joint variable data. Subsequently, specialized collision detection algorithms, such as those based on Bounding Volume Hierarchy (BVH) or Distance Field, are used to determine whether there is mutual interference (self-collision) between the various components of the robotic arm, and whether any component of the robotic arm comes into contact with or penetrates obstacles in the working environment. This step aims to ensure that the robotic arm does not experience physical collisions during its execution trajectory, thereby ensuring operational safety and equipment integrity.
[0110] In this embodiment, based on the above-mentioned joint constraint check or collision detection, when a violation is found in the candidate joint variable data, i.e., the robot arm posture corresponding to the data is infeasible or unsafe, the system will set both the velocity fitness data and the acceleration fitness data corresponding to the candidate joint variable data to a preset maximum value. In multi-objective particle swarm optimization algorithms, a smaller fitness value usually indicates a better solution. Therefore, setting the fitness of the violation solution to a maximum value can effectively reduce its competitiveness in the Pareto optimal solution set, causing it to be eliminated by the algorithm, thereby guiding the particle swarm to search for regions that satisfy joint constraints and collision-free constraints, ensuring that the final optimal joint variable data is physically feasible.
[0111] In this embodiment, the above-described technical solution introduces joint constraint checks and collision detection on candidate joint variable data during the multi-objective particle swarm optimization algorithm's search for optimal joint variable data. This allows the algorithm to not only consider the smoothness of the trajectory's velocity and acceleration but also effectively eliminate infeasible solutions that exceed the physical limitations of the robotic arm or cause collisions. When violations are detected, setting the corresponding velocity fitness data and acceleration fitness data to their maximum values significantly reduces the competitiveness of these infeasible solutions, thereby guiding the particle swarm optimization algorithm to more effectively search for joint variable data that satisfy physical constraints and are collision-free in the bound inverse solution space. This greatly improves the practical feasibility, safety, and reliability of the planned trajectory, avoids malfunctions or damage to the robotic arm during actual operation, and ensures that the trajectory planning results can be directly applied to actual robotic arm control.
[0112] In one feasible implementation, the step of dividing the target space into multiple grid cell data using adaptive grid partitioning technology includes: reading the characterization velocity fitness data and characterization acceleration fitness data corresponding to each particle position data from the Pareto optimal solution set data; determining a first dimension range data based on the maximum and minimum values of the characterization velocity fitness data, and determining a second dimension range data based on the maximum and minimum values of the characterization acceleration fitness data; dividing the target space into multiple grid cell data based on the first dimension range data and the second dimension range data; and dynamically adjusting the size data of the grid cells according to the distribution density of the Pareto optimal solution set data.
[0113] In this embodiment, during the iterative process of the multi-objective particle swarm optimization algorithm, when generating or updating the Pareto optimal solution set data, each non-dominated solution (i.e., particle position data) is associated with its corresponding velocity fitness data and acceleration fitness data. Reading this fitness data is the basis for subsequent target space partitioning. For example, each particle in the Pareto optimal solution set data can be traversed, and its stored fitness value can be accessed. Subsequently, to dynamically determine the effective boundary of the target space, the dimensional range needs to be determined based on the maximum and minimum values of the fitness data in the current Pareto optimal solution set data. Specifically, all read velocity fitness data can be traversed, and the maximum and minimum values can be found as the range data for the first dimension (velocity dimension). Similarly, all acceleration fitness data can be traversed, and their maximum and minimum values can be found as the range data for the second dimension (acceleration dimension). These range data define the actual occupied area of the current Pareto front in the target space, avoiding the partitioning of excessively large invalid spaces or excessively small omitted spaces. After determining the effective range of the target space, the target space is divided into multiple grid cell data based on the first dimension range data and the aforementioned second dimension range data. For example, a uniform division method can be used, dividing the first dimension range data and the second dimension range data into several sub-intervals respectively. The combination of these sub-intervals forms the grid cell data. Each grid cell data represents a specific region in the target space. To achieve adaptability, this application further dynamically adjusts the size of the grid cells according to the distribution density of the Pareto optimal solution set data. This aims to solve the problem of fixed grid division when dealing with non-uniformly distributed Pareto fronts. For example, the density can be evaluated by calculating the number of Pareto optimal solutions contained in each grid cell data. For grid cell data containing a large number of solutions, it can be further subdivided, i.e., the grid cell size data of that region can be reduced. Conversely, for grid cell data containing a small number of solutions, merging or maintaining a larger grid cell size data can be considered. For example, a density threshold can be set, and when the solution density of a certain grid cell data exceeds the threshold, it is recursively divided into smaller sub-grids until a certain minimum grid size or density requirement is met.
[0114] In this embodiment, through the above technical solution, the mesh partitioning of the target space in the multi-objective particle swarm optimization algorithm is no longer fixed. First, by dynamically determining the dimensional range of the target space, it is ensured that the mesh partitioning closely matches the actual distribution of the current Pareto optimal solution set data, avoiding the partitioning of invalid space. More importantly, the size of the mesh cells is dynamically adjusted according to the distribution density of the Pareto optimal solution set data, allowing for finer partitioning in regions with high solution density, thus better preserving the diversity of solutions and preventing oversimplification or loss of solutions in dense regions; while in regions with low solution density, a coarser partitioning can be used, improving computational efficiency. This adaptive mesh partitioning strategy effectively solves the efficiency and diversity problems faced by fixed mesh partitioning when dealing with unevenly distributed Pareto fronts, thereby improving the convergence speed and solution quality of the multi-objective particle swarm optimization algorithm when searching for optimal joint variable data, resulting in smoother, more efficient joint trajectory data that conforms to the kinematic constraints of the robotic arm.
[0115] In one feasible implementation, the step of performing spline curve interpolation on the optimal joint variable sequence data to obtain initial interpolated joint trajectory data includes: splitting the optimal joint variable sequence data into independent sequence data for each joint; performing spline curve interpolation on the independent sequence data for each joint, wherein the time interval between adjacent discrete trajectory points in the spline curve interpolation is preset to a fixed value; setting the interpolation boundary condition that the endpoint slope of the independent sequence data for each joint is equal to the average slope data of the initial two points and the last two points of the independent sequence data; and merging the continuous trajectory data of each joint obtained by the interpolation process into initial interpolated joint trajectory data.
[0116] In this embodiment, splitting the optimal joint variable sequence data into independent sequence data for each joint means decomposing the multidimensional joint variable sequence into multiple one-dimensional joint variable sequences. For example, for a six-axis robotic arm, the optimal joint variable sequence data is a sequence composed of multiple six-dimensional vectors, each vector representing the variable values of all joints at a discrete time. This step extracts the first component from each six-dimensional vector to form the independent sequence data for the first joint, extracts the second component to form the independent sequence data for the second joint, and so on, until the independent sequence data for the sixth joint is formed. This splitting simplifies subsequent interpolation calculations, allowing the trajectory of each joint to be processed independently, reducing the complexity of multidimensional interpolation.
[0117] In this embodiment, spline curve interpolation is performed on the independent sequence data of each joint, and the time interval between adjacent discrete trajectory points in the spline curve interpolation process is preset to a fixed value. Spline curve interpolation is a commonly used mathematical method to construct a smooth, continuous curve from a set of discrete data points. For the independent sequence data of each joint, for example, cubic spline interpolation can be used to generate a continuous joint angle function. During the interpolation process, the preset fixed time interval means that when performing spline curve fitting, it is assumed that the time step between each discrete trajectory point is uniform and constant. This fixed time interval setting provides a unified basis for subsequent time adjustments and ensures the uniformity of the initial interpolated trajectory in the time dimension.
[0118] In this embodiment, the interpolation boundary condition is set such that the endpoint slope of the independent sequence data for each joint is equal to the average slope of the initial two points and the final two points of the independent sequence data. In spline interpolation, the setting of boundary conditions is crucial to the smoothness of the interpolation result. The boundary conditions here aim to ensure a smooth transition in velocity (i.e., slope) of the trajectory at the starting and ending points, avoiding abrupt changes. For the starting point, its slope is set to the average slope determined by the first two points of the independent sequence data; similarly, for the ending point, its slope is set to the average slope determined by the last two points of the independent sequence data. This boundary condition setting, compared to forcing zero slope (zero velocity) or natural splines (second derivative is zero), better reflects the actual motion trend, thus generating a smoother trajectory that conforms to physical laws.
[0119] In this embodiment, the continuous trajectory data of each joint obtained through interpolation are merged into initial interpolated joint trajectory data. After the independent sequence data of each joint undergoes spline curve interpolation, a series of continuous joint angle functions are obtained. This step synchronously combines these independent continuous functions in the time dimension to form a multidimensional continuous trajectory data. At any given time, the initial interpolated joint trajectory data will be a vector representing the continuous angle values of all joints of the robotic arm at that moment.
[0120] In this embodiment, the multidimensional joint variable sequence data is split into independent sequence data for each joint using the above technical solution. This significantly reduces the complexity of the interpolation process, allowing each joint's trajectory to be interpolated independently and efficiently using spline curves. Spline curve interpolation is performed on the independent sequence data for each joint separately, and the time interval between adjacent discrete trajectory points is preset to a fixed value, ensuring the continuity and temporal uniformity of the initial trajectory. Crucially, by setting the interpolation boundary condition that the endpoint slope of each joint's independent sequence data is equal to the average slope of the initial two points and the last two points of that independent sequence data, sudden velocity changes at the start and end of the trajectory are effectively avoided, resulting in a smoother and physically more reasonable joint motion trajectory. Finally, the continuous trajectory data of each joint obtained from the interpolation process are merged into the initial interpolated joint trajectory data, laying a solid foundation for subsequent secondary interpolation processing and precise speed control, which helps improve the stability, accuracy, and safety of the six-axis robotic arm's motion.
[0121] In one feasible implementation, the step of performing secondary interpolation on the initial interpolated joint trajectory data and adjusting the time interval to make the average velocity of the tool center point consistent with the target velocity to obtain the final joint trajectory data includes: performing high-density time isochronous sampling on the initial interpolated joint trajectory data to obtain new joint variable sequence data; adjusting the time interval between adjacent joint variables in the new joint variable sequence data to make the average velocity of the tool center point of the corresponding trajectory segment consistent with the target velocity to obtain adjusted time node data; using the adjusted time node data and the new joint variable sequence data as interpolation points, performing spline curve interpolation again, and using the obtained trajectory data as the final joint trajectory data.
[0122] In this embodiment, high-density time-isolated sampling is performed on the initial interpolated joint trajectory data to convert the continuous initial interpolated joint trajectory data into a more refined discrete sequence data. This processing is achieved by uniformly sampling the continuous joint trajectory obtained from the initial interpolation at a fixed time step much smaller than that used in the initial discretization. For example, if the time interval between the initial discrete trajectory points is ΔT, the time step for high-density sampling can be set to ΔT / N, where N is an integer greater than 1, thereby obtaining a series of denser joint variable data points with equal time intervals. These data points constitute a new joint variable sequence data, which more precisely describes the motion path of the robotic arm, providing a richer data foundation for subsequent time interval adjustments and speed control.
[0123] In this embodiment, after obtaining new joint variable sequence data with high-density sampling, it is necessary to adjust the time interval between adjacent joint variables in the new joint variable sequence data so that the average velocity of the tool center point of the corresponding trajectory segment is consistent with the target velocity. This adjustment process first calculates the pose of the tool center point in Cartesian space corresponding to each sampling point in the new joint variable sequence data based on the robot arm's forward kinematics model. Then, for any two adjacent joint variable data points in the new joint variable sequence data, the displacement of their corresponding tool center point in Cartesian space can be calculated. By dividing the magnitude of this displacement by the preset target velocity, the required time interval for the trajectory segment can be obtained. This process iteratively adjusts the time interval between each pair of adjacent joint variable data points so that the average velocity of the tool center point in each trajectory segment is as consistent as possible with the target velocity. Finally, these adjusted time intervals accumulate to form the adjusted time node data. These time nodes are no longer equidistant but dynamically change according to the velocity requirements.
[0124] In this embodiment, finally, using the adjusted time node data and the new joint variable sequence data as interpolation points, spline curve interpolation is performed again, and the resulting trajectory data is used as the final joint trajectory data. After time interval adjustment, we obtain new joint variable sequence data and corresponding, non-equidistant, adjusted time node data. These data pairs (time node, joint variable) constitute new interpolation points. To obtain a smooth final joint trajectory that meets the speed requirements, spline curve interpolation is performed again. This interpolation no longer uses a fixed time interval, but instead uses the adjusted time node data as interpolation parameters to ensure that the generated continuous joint trajectory accurately reflects the target speed requirement of the tool center point in the time dimension. The final trajectory data obtained is the final joint trajectory data, which is not only smooth but also highly consistent with the target speed in terms of speed characteristics.
[0125] In this embodiment, the above-described technical solution first performs high-density time-isolated sampling on the initial interpolated joint trajectory data, obtaining more refined joint variable sequence data, which provides a foundation for subsequent speed adjustment. Subsequently, by precisely adjusting the time interval between adjacent joint variables, the average speed of the tool center point in each trajectory segment is made consistent with the preset target speed, effectively solving the speed unevenness problem that may be caused by the initial interpolation. Finally, using the adjusted time node data and the new joint variable sequence data as interpolation points, a secondary spline curve interpolation process is performed. This not only ensures the smoothness of the final joint trajectory data but also ensures that the tool center point can move smoothly at the desired speed when the robotic arm executes the trajectory, significantly improving the accuracy and efficiency of trajectory execution and avoiding impacts and vibrations caused by speed mismatch.
[0126] In the embodiments of this application, the six-axis robotic arm trajectory planning method solves the problems of joint trajectory jumps, tool center point trajectory deviations, and velocity oscillations in traditional trajectory planning by discretizing the tool center point trajectory, constructing a bound inverse solution space, applying a multi-objective optimization algorithm to search for the optimal joint variable sequence, and performing double interpolation. It can avoid joint trajectory jumps, ensure the accuracy of the tool center point trajectory, and improve motion smoothness.
[0127] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the six-axis robotic arm trajectory planning method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0128] This application also provides a six-axis robotic arm trajectory planning system, referenced... Figure 2 The six-axis robotic arm trajectory planning system includes: a memory 10, a processor 20, and a six-axis robotic arm trajectory planning program stored in the memory 10 and executable on the processor 20. The six-axis robotic arm trajectory planning program is configured to implement the steps of the six-axis robotic arm trajectory planning method.
[0129] The six-axis robotic arm trajectory planning system provided in this application, employing the six-axis robotic arm trajectory planning method described in the above embodiments, can ensure the accuracy of the tool center point trajectory and improve motion smoothness. Compared with the prior art, the beneficial effects of the six-axis robotic arm trajectory planning system provided in this application are the same as those of the six-axis robotic arm trajectory planning method provided in the above embodiments, and other technical features of the six-axis robotic arm trajectory planning system are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0130] 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.
[0131] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. All equivalent structural transformations made under the technical concept of this application using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included within the scope of patent protection of this application.
Claims
1. A trajectory planning method for a six-axis robotic arm, characterized in that, The method includes: Obtain preset tool center point trajectory data, and discretize the tool center point trajectory data to obtain discrete trajectory point data; For each discrete trajectory point data, construct the corresponding bound inverse solution space data; The bound inverse solution space data is input into a multi-objective particle swarm optimization algorithm, and the multi-objective particle swarm optimization algorithm searches for the optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point. The optimal joint variable sequence data is obtained by traversing all discrete trajectory points; The optimal joint variable sequence data is subjected to spline curve interpolation to obtain the initial interpolated joint trajectory data. The initial interpolated joint trajectory data is subjected to secondary interpolation processing, and the time interval is adjusted so that the average speed of the tool center point is consistent with the target speed, thus obtaining the final joint trajectory data. The steps of inputting the bound inverse solution space data into a multi-objective particle swarm optimization algorithm, and searching for optimal joint variable data in the bound inverse solution space data corresponding to each discrete trajectory point by the multi-objective particle swarm optimization algorithm include: A set of particle position data is randomly initialized in the bound inverse solution space data; each particle position data corresponds to a candidate joint variable data. Based on the candidate joint variable data and the historical best joint variable sequence data, calculate the velocity fitness data and the acceleration fitness data; the historical best joint variable sequence data is the optimal joint variable data sequence corresponding to the previously searched discrete trajectory points; Based on the Pareto dominance relation, non-dominated solution data are selected from all particle position data to construct the Pareto optimal solution set data; The target space is divided into multiple grid cell data using an adaptive grid partitioning technique; the target space is composed of the velocity fitness data and the acceleration fitness data. A roulette wheel selection method is used to select one grid cell from the grid cell data, and a particle position is randomly selected from the selected grid cell data as the global optimal position data; The particle velocity and position data are updated based on the individual particle's historical best position data and the global best position data. Repeat the above steps for iterative optimization until a preset termination condition is met, and select the optimal joint variable data from the Pareto optimal solution set data. The steps of performing secondary interpolation on the initial interpolated joint trajectory data and adjusting the time interval to make the average velocity of the tool center point consistent with the target velocity to obtain the final joint trajectory data include: The initial interpolated joint trajectory data is subjected to high-density time-isolated sampling to obtain new joint variable sequence data; The time interval between adjacent joint variables in the new joint variable sequence data is adjusted so that the average velocity of the tool center point of the corresponding trajectory segment is consistent with the target velocity, thus obtaining the adjusted time node data; Using the adjusted time node data and the new joint variable sequence data as interpolation points, spline curve interpolation is performed again, and the resulting trajectory data is used as the final joint trajectory data.
2. The six-axis robotic arm trajectory planning method as described in claim 1, characterized in that, For each discrete trajectory point data, the steps to construct the corresponding bound inverse solution space data include: For each discrete trajectory point data, a spherical coordinate system is established with the discrete trajectory point as the center to obtain the end pose space data; For each point in the end-effector pose space data, the Jacobi iteration method is used to calculate multiple inverse kinematics solutions of the robotic arm under the same end-effector pose. A binding inverse solution data is selected from the plurality of inverse kinematic solution data using a preset binding function, wherein the binding function is a continuous function of joint variables; The binding inverse solution datasets corresponding to all points in the end pose space data are combined into binding inverse solution space data.
3. The six-axis robotic arm trajectory planning method as described in claim 2, characterized in that, For each point in the end-effector pose space data, the steps of calculating multiple inverse kinematic solutions of the robotic arm under the same end-effector pose using the Jacobi iteration method include: Set different initial joint variable data, and perform iterative solution for each initial joint variable data; In each iteration, the error data between the current end-effector pose and the target end-effector pose is calculated; The differential changes of joint variables are calculated using the Jacobian matrix, and the joint variable data are updated accordingly. Repeat the iteration until the end pose error is less than the preset accuracy threshold to obtain converged inverse kinematics solution data; Collect convergent inverse kinematics solutions corresponding to all different initial joint variable data as multiple inverse kinematics solutions.
4. The six-axis robotic arm trajectory planning method as described in claim 1, characterized in that, The steps for calculating velocity fitness data and acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data include: The candidate joint variable data is combined with the historical best joint variable sequence data to form candidate joint variable sequence data; Calculate the weighted norm of the difference vector between adjacent joint variable data in the candidate joint variable sequence data, and accumulate the weighted norm to obtain the velocity fitness data; Calculate the weighted norm of the second-order difference vector of adjacent joint variable data in the candidate joint variable sequence data, and accumulate the weighted norm to obtain the acceleration fitness data.
5. The six-axis robotic arm trajectory planning method as described in claim 4, characterized in that, The steps of calculating the velocity fitness data and acceleration fitness data based on the candidate joint variable data and the historical best joint variable sequence data further include: Obtain preset joint limitation range data, and check whether the candidate joint variable data is within the joint limitation range data; Obtain robotic arm model data and working environment model data, adjust the robotic arm to the position corresponding to the candidate joint variable data, and perform collision detection processing between various components of the robotic arm and between the robotic arm and the working environment; When the joint limit check result or the model interference check result indicates a violation, the corresponding characterization velocity fitness data and the aforementioned characterization acceleration fitness data are set to maximum values.
6. The six-axis robotic arm trajectory planning method as described in claim 1, characterized in that, The steps for dividing the target space into multiple grid cell data using adaptive gridding techniques include: Read the velocity fitness data and acceleration fitness data corresponding to the position data of each particle from the Pareto optimal solution set data; The first dimension range data is determined based on the maximum and minimum values of the velocity fitness data, and the second dimension range data is determined based on the maximum and minimum values of the acceleration fitness data. Based on the first dimension range data and the aforementioned second dimension range data, the target space is divided into multiple grid cell data. The size of the grid cells is dynamically adjusted based on the distribution density of the Pareto optimal solution set data.
7. The six-axis robotic arm trajectory planning method as described in claim 1, characterized in that, The steps of performing spline curve interpolation on the optimal joint variable sequence data to obtain the initial interpolated joint trajectory data include: The optimal joint variable sequence data is split into independent sequence data for each joint; Spline curve interpolation is performed on the independent sequence data of each joint, and the time interval between adjacent discrete trajectory points in the spline curve interpolation is preset to a fixed value. Set the interpolation boundary condition so that the endpoint slope of the independent sequence data for each joint is equal to the average slope of the initial two points and the last two points of the independent sequence data; The continuous trajectory data of each joint obtained by interpolation are merged into the initial interpolated joint trajectory data.
8. A six-axis robotic arm trajectory planning system, characterized in that, The six-axis robotic arm trajectory planning system includes: a memory, a processor, and a six-axis robotic arm trajectory planning program stored in the memory and executable on the processor, the six-axis robotic arm trajectory planning program being configured to implement the steps of the six-axis robotic arm trajectory planning method as described in any one of claims 1 to 7.