Hybrid trajectory planning method, device, industrial robot and storage medium

By analyzing and reconstructing the hybrid trajectory into the original tool trajectory set, and combining adaptive discretization of chord height difference and sharp point segmentation, the problem of low accuracy and efficiency in trajectory planning in traditional methods is solved, and high-precision and high-efficiency hybrid trajectory planning is achieved.

CN121552399BActive Publication Date: 2026-03-24YOUJI TECH (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-26
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional trajectory planning methods process joint space trajectories and Cartesian space trajectories separately, resulting in poor accuracy, information loss, and difficulties in connecting them, making it difficult to effectively unify the processing of mixed trajectories.

Method used

By analyzing the mixed trajectories contained in the current task of the industrial robot, a set of original tool trajectories is generated. Then, discretization based on chord height difference is used to adaptively adjust the discrete step length. Combined with inverse kinematics processing and sharp point segmentation processing, the target trajectory is generated.

Benefits of technology

It improves the accuracy and efficiency of trajectory planning, avoids the problems of discontinuous trajectory connection and complex data processing logic caused by spatial type switching in traditional methods, and ensures the continuity and smoothness of motion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121552399B_ABST
    Figure CN121552399B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial robot trajectory planning, and particularly relates to a hybrid trajectory planning method and device, an industrial robot and a storage medium. The method comprises the following steps: analyzing a hybrid trajectory contained in a current task of an industrial robot to obtain an original tool trajectory set composed of a plurality of parameterized trajectory segments; performing a discretization processing based on a chord height difference on a Cartesian space trajectory in the parameterized trajectory segment to generate a Cartesian space discrete point sequence; performing an inverse kinematics processing on the Cartesian space discrete point sequence to obtain a joint space trajectory after discretization processing; performing a segmentation processing on the joint space trajectory after discretization processing based on a sharp point in the joint space trajectory after discretization processing, and performing a trajectory planning on each segment to generate a target trajectory for controlling the movement of the industrial robot. Compared with related technologies, the application provides a planning method capable of processing a joint space and a Cartesian space hybrid trajectory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial robot trajectory planning technology, and in particular to a hybrid trajectory planning method, device, industrial robot and storage medium. Background Technology

[0002] Industrial robots are core equipment in modern intelligent manufacturing systems, and their trajectory planning technology directly determines the robot's motion accuracy, processing quality, and operational efficiency. In practical industrial applications, robot tasks often involve both point-to-point motion in joint space and continuous path motion in Cartesian space. For example, in complex operations such as welding, cutting, and painting, robots need to frequently switch between the rapidly positioning joint space and the high-precision contour tracking Cartesian space. The planning and execution of this hybrid trajectory has become a key challenge restricting the improvement of robot performance.

[0003] In related technologies, traditional trajectory planning methods typically process joint space trajectories and Cartesian space trajectories separately. For point-to-point trajectories in joint space, linear interpolation with polynomials or spline curves is often used for smooth transitions. For continuous trajectories in Cartesian space, a fixed-step-size discretization method is used to convert them into a series of dense path points, which are then mapped to joint space through inverse kinematics. This method suffers from problems such as poor discretization accuracy, information loss during the mapping process, and difficulty in connecting mixed trajectories.

[0004] Therefore, designing a planning method that can uniformly handle mixed trajectories in joint space and Cartesian space has become an urgent problem to be solved. Summary of the Invention

[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a hybrid trajectory planning method, device, industrial robot and storage medium. The main purpose is to solve the problems of poor accuracy, information loss and difficulty in connection caused by the current traditional trajectory planning method processing joint space trajectory and Cartesian space trajectory separately.

[0006] To achieve the above objectives, the main technical solutions adopted in this application include:

[0007] In a first aspect, embodiments of this application provide a hybrid trajectory planning method, including:

[0008] The mixed trajectories contained in the current task of the industrial robot are analyzed to obtain the original tool trajectory set consisting of multiple parameterized trajectory segments; wherein, the original tool trajectory set is a trajectory set in which the mixed trajectory is divided into multiple parameterized trajectory segments according to the trajectory execution order and the trajectory type.

[0009] For the Cartesian space trajectory in the parameterized trajectory segment, a discretization process based on chord height difference is performed to generate a Cartesian space discrete point sequence. The discretization process based on chord height difference uses a preset chord height difference threshold as an accuracy constraint. Under the condition that the discretization error does not exceed the preset chord height difference threshold, the discretization step size is iteratively adjusted to generate a Cartesian space discrete point sequence.

[0010] Perform inverse kinematics processing on the discrete point sequence in Cartesian space to obtain the joint space trajectory after discretization.

[0011] Based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, and trajectory planning is performed on each segment to generate a target trajectory for controlling the movement of the industrial robot; the sharp points are determined according to the velocity change and spatial angle of the discretized joint space trajectory.

[0012] Optionally, the task includes at least two subtask instructions;

[0013] The process of parsing the hybrid trajectory contained in the current task of the industrial robot to obtain an original tool trajectory set composed of multiple parameterized trajectory segments includes: parsing each sub-task instruction in the hybrid trajectory, identifying the trajectory type and motion parameters corresponding to each sub-task instruction; the trajectory type includes at least linear segments and circular arc segments; constructing basic parameterized trajectory segments connecting the spatial points corresponding to the two adjacent sub-task instructions based on the trajectory type and motion parameters of the two adjacent sub-task instructions; traversing each basic parameterized trajectory segment according to the trajectory execution order, merging basic parameterized trajectory segments with the same trajectory type and adjacent to each other into one parameterized trajectory segment to obtain the original tool trajectory set.

[0014] Optionally, for the Cartesian space trajectory in the parameterized trajectory segment, discretization processing based on chord height difference is performed to generate a Cartesian space discrete point sequence, including: taking the starting point of the first parameterized trajectory segment as the current point and the initial discrete step length as the current discrete step length, calculating the actual chord height difference between the current point and the next parameter point; if the actual chord height difference does not meet the preset chord height difference threshold requirement, adjusting the current discrete step length and recalculating the actual chord height difference between the current point and the next parameter point; if the actual chord height difference meets the preset chord height difference threshold requirement, taking the space point corresponding to the next parameter point as a valid discrete point in the Cartesian space discrete point sequence and using it as the new current point, continuing to calculate the next parameter point, until all parameterized trajectory segments have completed the discretization processing to obtain the Cartesian space discrete point sequence.

[0015] Optionally, the actual chord height difference is determined by both the position chord height difference and the attitude chord height difference; calculating the actual chord height difference from the current point to the next parameter point includes: determining the trajectory type of the current parameterized trajectory segment; if the trajectory type is a linear parameterized trajectory, projecting the midpoint of the current parameterized trajectory segment onto the straight line determined between the current point and the next parameter point to obtain a projection point; calculating the Euclidean distance between the midpoint and the projection point to obtain the position chord height difference; and calculating the quaternion angle between the attitude of the midpoint and the attitude of the projection point to obtain the attitude chord height difference.

[0016] Optionally, calculating the actual chord height difference from the current point to the next parameter point further includes: when the trajectory type is a circular arc parameter trajectory, performing dense sampling based on the parameter interval from the current point to the next parameter point to obtain a set of sampling points; calculating the distance between the intermediate point and all sampling points in the set of sampling points, and taking the minimum distance as the position chord height difference; and calculating the quaternion angle between the attitude of the intermediate point and the attitude of the sampling point corresponding to the minimum distance as the attitude chord height difference.

[0017] Optionally, adjusting the current deviation step length includes: calculating a scaling factor based on the actual chord height difference; and adjusting the current deviation step length based on the scaling factor.

[0018] Optionally, based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, including: obtaining the positions of all sharp points in the discretized joint space trajectory; and truncating the continuous joint space trajectory into multiple independent sub-trajectory segments at all sharp points to complete the segmentation process.

[0019] The determination of the sharp point includes: identifying and traversing each joint space point in the discretized joint space trajectory to obtain the smoothing value of each joint space point; calculating the velocity change between the previous segment of the trajectory and the next segment of the trajectory passing through the current joint space point; calculating the spatial angle between the vector of the previous segment of the trajectory and the vector of the next segment of the trajectory; and determining the current joint space point as a sharp point if the velocity change exceeds a preset velocity threshold, or the spatial angle is less than a preset angle threshold, or the smoothing value indicates a non-smooth state.

[0020] Secondly, embodiments of this application provide a hybrid trajectory planning device, comprising:

[0021] The parsing unit is configured to parse the mixed trajectory contained in the current task of the industrial robot to obtain an original tool trajectory set consisting of multiple parameterized trajectory segments; wherein, the original tool trajectory set is a trajectory set in which the mixed trajectory is divided into multiple parameterized trajectory segments according to the trajectory execution order and the trajectory type.

[0022] The generation unit is configured to perform discretization processing based on chord height difference on the Cartesian space trajectory in the parameterized trajectory segment to generate a Cartesian space discrete point sequence; the discretization processing based on chord height difference uses a preset chord height difference threshold as an accuracy constraint, and iteratively adjusts the discretization step size to generate a Cartesian space discrete point sequence while ensuring that the discretization error does not exceed the preset chord height difference threshold.

[0023] The processing unit is configured to perform inverse kinematics processing on the Cartesian space discrete point sequence to obtain the joint space trajectory after the discretization process.

[0024] The planning unit is configured to segment the discretized joint space trajectory based on sharp points in the discretized joint space trajectory, and perform trajectory planning on each segment to generate a target trajectory for controlling the movement of the industrial robot; the sharp points are determined based on the velocity changes and spatial angles of the discretized joint space trajectory.

[0025] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the hybrid trajectory planning method described in the first aspect.

[0026] Fourthly, this application provides an industrial robot, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the hybrid trajectory planning method described in the first aspect.

[0027] Based on the above technical solution, this application provides a hybrid trajectory planning method. First, the hybrid trajectories included in the current task of the industrial robot are analyzed to obtain a set of original tool trajectories composed of multiple parameterized trajectory segments. The original tool trajectory set is a set of trajectories that divides the hybrid trajectory into multiple parameterized trajectory segments according to the trajectory execution order and trajectory type. By analyzing and reconstructing the hybrid trajectory into the original tool trajectory set, a method is proposed to transform heterogeneous hybrid instructions into a unified geometric representation, solving the problems of discontinuous trajectory connections and complex data processing logic caused by spatial type switching in traditional methods. On this basis, for the Cartesian space trajectories in the parameterized trajectory segments, discretization processing based on chord height difference is performed to generate a Cartesian space discrete point sequence. Here, the discretization processing based on chord height difference uses a preset chord height difference threshold as an accuracy constraint. While ensuring that the discretization error does not exceed the preset chord height difference threshold, the discrete step size is iteratively adjusted to generate the Cartesian space discrete point sequence. By introducing adaptive discretization processing with chord height difference as the accuracy constraint into the Cartesian space trajectory, the discretization step size is dynamically adjusted, avoiding the shortcomings of insufficient accuracy in curved regions and computational redundancy in straight regions of the traditional fixed step size method, and significantly improving the overall computational efficiency of the discretization process. Inverse kinematics processing is performed on the discrete point sequence in Cartesian space to obtain the discretized joint space trajectory. Finally, based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, and trajectory planning is performed on each segment to generate the target trajectory for controlling the motion of the industrial robot. The sharp points are determined based on the velocity changes and spatial angles of the discretized joint space trajectory. Finally, considering the abrupt velocity changes and significant changes in spatial angles in the joint space, trajectory segmentation is performed based on the sharp points in the discretized joint space trajectory, thereby avoiding motion discontinuities. Attached Figure Description

[0028] Figure 1 A flowchart illustrating a hybrid trajectory planning method provided in an embodiment of this application;

[0029] Figure 2 A schematic diagram of a set of original tool trajectories provided for an embodiment of this application;

[0030] Figure 3 This application provides a schematic diagram of the chord height difference of a linear segment parameter trajectory.

[0031] Figure 4 A schematic diagram of the chord height difference of a circular arc segment parametric trajectory provided in this application embodiment;

[0032] Figure 5 A schematic diagram of the kinematics of a SCARA robot provided for an embodiment of this application;

[0033] Figure 6 This application provides a schematic diagram comparing the trajectory before and after smoothing.

[0034] Figure 7 This is a schematic diagram of a hybrid trajectory planning device provided in an embodiment of this application. Detailed Implementation

[0035] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.

[0036] As mentioned in the background, industrial robots are crucial tools for achieving high-precision machining and automated operation in modern manufacturing. With the rapid development of intelligent manufacturing, digital factories, and the increasing demand for high-precision machining, industrial robots are finding increasingly widespread applications in fields such as automotive manufacturing, aerospace, mold making, and precision assembly. Robot trajectory planning is one of the core technologies of industrial robot motion control. Its main task is to ensure that the robot's end effector moves precisely along a predetermined trajectory while meeting requirements for machining accuracy, speed, and energy optimization. The quality of trajectory planning directly determines the accuracy, smoothness, and efficiency of robot machining, making it a key step in achieving high-performance industrial robot machining.

[0037] In related technologies, industrial robot trajectories can generally be divided into two categories: joint space trajectories and Cartesian space trajectories. Joint space trajectories are mainly based on point-to-point (PTP) motion of each joint. By planning the motion time and velocity of each joint, the robot joints can reach the target point synchronously within a specified time, thereby ensuring that the end effector moves along the predetermined trajectory. Cartesian space trajectories, on the other hand, are described in the form of straight lines, circular arcs, or complex free curves, and are suitable for machining complex curved surfaces and high-precision trajectory control.

[0038] Robot motion trajectories are often complex trajectories that blend joint space and Cartesian space. For example, in the localization phase, where speed planning is more important, a joint space PTP trajectory is used. However, in the machining phase, where continuous and precise control of trajectory accuracy is required, a Cartesian space trajectory may be used.

[0039] Traditional methods have significant shortcomings when handling mixed trajectories: First, discretization of continuous trajectories in Cartesian space often ignores the geometric characteristics of the trajectory, leading to large errors between discrete points, especially in high curvature or sharp turning regions, where trajectory accuracy is easily reduced. Second, when mapping Cartesian space trajectories to joint space, inverse kinematics solutions are inefficient, and traditional methods are prone to over-discretion or under-discretion, failing to meet trajectory accuracy requirements while ensuring computational efficiency. Furthermore, joint synchronization and velocity smoothness in mixed trajectories are difficult to guarantee, easily leading to velocity fluctuations, trajectory oscillations, and increased machining contour errors, thus affecting machining quality and execution stability. Regarding the discretization of continuous trajectories, related techniques often employ fixed step sizes or equidistant sampling methods. These methods cannot adaptively adjust for trajectory curvature or local geometric features, easily leading to two types of problems: one, excessively large step sizes increase errors between discrete points, causing the trajectory to deviate from the theoretical trajectory and affecting machining accuracy; two, excessively small step sizes result in an excessive number of discrete points, significantly increasing computational load and reducing trajectory planning efficiency. For complex free-form curves and high-degree-of-freedom robots, this fixed-step discretization method is particularly unsuitable because the local geometric characteristics of the trajectory vary significantly. It requires adaptive adjustment of the discrete point spacing based on chord height difference, curvature, and trajectory cusps to ensure trajectory accuracy and execution smoothness. Furthermore, the inverse kinematics solution suffers from multiple solutions, singularities, joint constraints, and pose redundancy during the mapping of the Cartesian space trajectory to joint space. Related methods typically employ point-by-point solutions, failing to fully utilize trajectory continuity and geometric feature information, resulting in a complex solution process and low computational efficiency. In high-speed machining or multi-axis robot scenarios, inefficient inverse kinematics solutions not only increase the computational burden but may also cause trajectory execution delays, affecting the real-time performance and stability of the machining process.

[0040] For example, a related technology (CN115122329A) discloses a method for joint space trajectory planning of industrial robots, but it is positioned as a processing strategy based on joint space trajectory planning. This application, while retaining the technical framework of this robotics field, proposes improvements and optimizations for processing hybrid trajectory planning across the entire process.

[0041] To address the problems of poor accuracy, information loss, and difficulty in connecting joint space trajectories caused by the separate processing of joint space trajectories and Cartesian space trajectories in traditional trajectory planning methods, this application proposes a hybrid trajectory planning method. This method can be applied to hybrid trajectory planning systems in fields such as automotive manufacturing, aerospace, mold processing, and precision assembly, or integrated into industrial robots. During runtime, it can execute any of the hybrid trajectory planning methods mentioned below. Figure 1 As shown, the method includes:

[0042] S101 analyzes the mixed trajectories contained in the current task of the industrial robot to obtain the original tool trajectory set composed of multiple parameterized trajectory segments.

[0043] In S101, a hybrid trajectory refers to the task trajectory corresponding to the current task, which includes both Cartesian space and joint space trajectories. In practical applications, a user-issued task can be decomposed into multiple sub-task instructions. Some sub-task instructions belong to Cartesian space trajectories, while others belong to joint space trajectories. For example, a user task like "Get me the cup on the table" can be decomposed into sub-task instruction 1: walk to the table; sub-task instruction 2: control the robotic arm to lift the cup; and sub-task instruction 3: return to the user's position. Sub-task instructions 1 and 3 are simple displacement movements, which can be handled using a PTP (point-to-point) joint space trajectory that emphasizes speed. Sub-task instruction 2, however, requires more precise control and can therefore use a Cartesian space trajectory. The above example is only for illustration of different trajectories. In the field of industrial robots, hybrid trajectories often refer to motion trajectories based on cutting tools, and the specific sub-task division is often more complex.

[0044] Building upon this foundation, the concept of trajectory types is introduced, serving as the basis for subsequently establishing the original tool trajectory set. Trajectory types include linear segments and circular segments. For example, subtask instruction 2 controls the robotic arm to lift a cup, which can be further decomposed into more subtask instructions, such as lifting the arm (linear segment AB), precisely extending and picking up the cup (circular segment BC, linear segment CD), and returning to the user. Since AB, BC, and CD all belong to subtask instruction 2, in this embodiment they are all linear segments or circular segments of a Cartesian space trajectory. However, in other embodiments, they may be Cartesian space trajectories or joint space trajectories.

[0045] The original toolpath set is a set of trajectories that divides the hybrid trajectory into multiple parameterized trajectory segments according to the trajectory execution order and trajectory type. In this embodiment, the hybrid trajectory is uniformly converted into the original toolpath set for processing, thereby avoiding the problems of poor accuracy, information loss, and difficulty in connection during trajectory fusion caused by processing Cartesian space trajectory and joint space trajectory separately in related technologies.

[0046] S102, for the Cartesian space trajectory in the parameterized trajectory segment, perform discretization processing based on chord height difference to generate a sequence of discrete points in Cartesian space.

[0047] In S101, the original tool trajectory set is obtained, which consists of multiple parameterized trajectory segments after parameterization. Further, S102 employs discretization processing based on chord height difference, using a preset chord height difference threshold as an accuracy constraint. While ensuring the discretization error does not exceed the preset chord height difference threshold, the offset length is iteratively adjusted to generate a sequence of discrete points in Cartesian space. The offset length is used to determine the sampling interval in the trajectory parameter domain. By adjusting the offset length, the number and spatial distribution of the generated Cartesian space discrete points can be controlled, thereby affecting the approximation accuracy of the discrete polyline to the original trajectory. In this embodiment, the offset length is adaptively and dynamically adjusted, rather than using a fixed offset length as in related technologies, thus improving the accuracy of trajectory processing.

[0048] S103 performs inverse kinematics processing on the discrete point sequence in Cartesian space to obtain the discretized joint space trajectory.

[0049] It should be noted that although S102 only processes the Cartesian space trajectory in the parameterized trajectory segment, the input of S102 is the entire original tool trajectory set. Therefore, the discretized joint space trajectory obtained in S103 refers to the joint space trajectory corresponding to the discretized set of the entire original tool trajectory.

[0050] S104, based on the sharp points in the discretized joint space trajectory, segments the discretized joint space trajectory and performs trajectory planning on each segment to generate a target trajectory for controlling the movement of the industrial robot.

[0051] Sharp points refer to locations where the direction of motion changes abruptly or where joint velocities may experience discontinuous abrupt changes. These points are determined based on the velocity changes and spatial angles of the discretized joint spatial trajectory. Sharp points can easily introduce significant errors after trajectory smoothing. Therefore, identifying sharp points in the trajectory and segmenting the trajectory accordingly, then performing trajectory planning for each segment to generate a target trajectory for controlling the industrial robot's motion, improves the accuracy of trajectory planning. Trajectory planning specifically includes trajectory smoothing and velocity planning; details can be found in related technologies and are not the focus of this embodiment.

[0052] In this embodiment, the hybrid trajectory included in the current task of the industrial robot is first analyzed to obtain a set of original tool trajectories composed of multiple parameterized trajectory segments. This set of original tool trajectories is a set of trajectories into multiple parameterized trajectory segments according to the trajectory execution order and trajectory type. For the Cartesian space trajectory in the parameterized trajectory segments, discretization based on chord height difference is performed to generate a sequence of Cartesian space discrete points. Here, the discretization based on chord height difference uses a preset chord height difference threshold as an accuracy constraint. While ensuring that the discretization error does not exceed the preset chord height difference threshold, the discretization step size is iteratively adjusted to generate the Cartesian space discrete point sequence. Inverse kinematics processing is performed on the Cartesian space discrete point sequence to obtain the discretized joint space trajectory. Finally, based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, and trajectory planning is performed on each segment to generate a target trajectory for controlling the motion of the industrial robot. The sharp points are determined based on the velocity changes and spatial angles of the discretized joint space trajectory. Compared with related technologies, this paper proposes a method to transform heterogeneous hybrid commands into a unified geometric representation by parsing and reconstructing the hybrid trajectory into a set of original tool trajectories. This solves the problems of discontinuous trajectory connections and complex data processing logic caused by spatial type switching in traditional methods. Based on this, an adaptive discretization process with chord height difference as the accuracy constraint is introduced into the Cartesian space trajectory. The discretization step size is dynamically adjusted to avoid the shortcomings of traditional fixed step size methods, such as insufficient accuracy in curved regions and computational redundancy in straight regions. This also significantly improves the overall computational efficiency of the discretization process. Finally, considering the abrupt changes in velocity and significant changes in spatial angles in joint space, trajectory segmentation is performed based on sharp points in the discretized joint space trajectory, thereby avoiding motion discontinuities.

[0053] Specifically, in traditional methods, joint space data (joint angles) and Cartesian space data (end-effector pose) are two completely different data structures. The controller needs to design two sets of processing logic, leading to system complexity and potential pauses during type switching. This embodiment unifies both at the algorithm entry point into a single mathematical language—parameterized continuous geometric segments. Regardless of whether the original instruction is "rapid joint movement" or "end-effector arc drawing," internally it is represented as a continuous curve represented by multiple parameterized trajectory segments in the original toolpath set. This provides a single, clean, and high-quality input for all subsequent steps, fundamentally eliminating the processing gap caused by mixed data types.

[0054] Secondly, traditional methods using fixed-step discretization indiscriminately process the original dense point set, failing to utilize the geometric patterns of the trajectory. In contrast, this embodiment actively identifies trajectory types when constructing the original tool trajectory set and merges continuous, similar instruction segments. For example, multiple consecutive straight-line instructions are merged into a longer straight-line segment. This solves the problems of information loss and discontinuous trajectory connections in related technologies.

[0055] On the other hand, it enables subsequent adaptive discretization algorithms to run on long segments of the same type and geometric continuity. The algorithm can intelligently allocate discrete points based on the overall geometric characteristics of the segment, thereby achieving the optimal balance between accuracy and efficiency on a global scale.

[0056] Optionally, the task includes at least two sub-task instructions; the mixed trajectory contained in the current task of the industrial robot is parsed to obtain an original tool trajectory set composed of multiple parameterized trajectory segments, including: parsing each sub-task instruction in the mixed trajectory, identifying the trajectory type and motion parameters corresponding to each sub-task instruction; the trajectory type includes at least linear segments and circular arc segments; based on the trajectory type and motion parameters of two adjacent sub-task instructions, constructing a basic parameterized trajectory segment connecting the corresponding spatial points of the two sub-task instructions; traversing each basic parameterized trajectory segment according to the trajectory execution order, merging basic parameterized trajectory segments with the same trajectory type and adjacent to each other into one parameterized trajectory segment to obtain the original tool trajectory set.

[0057] In this embodiment, the process of constructing the original tool trajectory set is described. As mentioned in the above embodiment, the user task includes multiple sub-task instructions. Different sub-task instructions may be divided into linear segments or trajectory segments. The motion parameters specifically include instruction keywords, position data, velocity data, acceleration data, and smoothing values, etc. Among them, the smoothing values ​​are used in the subsequent segmentation processing of the discretized joint space trajectory.

[0058] For example, the task of a joint space is:

[0059] MJ(29.974,-85.419,-50.000,55.445,0.000,0.000,0.000,0.000,0.000,50,50,100,01,00). Here, the keyword MJ represents the PTP trajectory in joint space. The joint data is (29.974, -85.419,-50.000,55.445), containing joint coordinates, a velocity value of 50, an acceleration value of 50, and a smoothing value of 100. Through the trajectory type and motion parameters, the state of multiple spatial points on the mixed trajectory can be known, such as which trajectory a spatial point is on, what task it is performing, its position, velocity, and other information. This allows for the unified processing of multiple spatial points of different spaces and trajectory types, i.e., the construction of connections between two points.

[0060] Based on the trajectory type and motion parameters of two adjacent sub-task instructions, a basic parameterized trajectory segment is constructed to connect the corresponding spatial points of the two sub-task instructions. This involves connecting these spatial points through unified parameterization and merging them according to their trajectory types to obtain one parameterized trajectory segment. For example, before constructing the original toolpath set, multiple sub-task instructions are AB, linear segment, BC circular arc segment, CD linear segment, DE linear segment, EF linear segment, and FG circular arc segment, and the motion parameters of the spatial points formed after each segment decomposition are known. Then, AB, BC, CD, ..., FG are all converted into basic parameterized trajectory segments and merged to obtain four parameterized trajectory segments: AB (linear), BC (circular arc), CF (linear), and FG (circular arc). Therefore, this embodiment proposes a method to transform heterogeneous hybrid instructions into a unified geometric representation by parsing and reconstructing the hybrid trajectory into the original toolpath set, solving the problems of discontinuous trajectory connections and complex data processing logic caused by spatial type switching in traditional methods.

[0061] Optionally, for the Cartesian space trajectory in the parameterized trajectory segment, discretization processing based on chord height difference is performed to generate a Cartesian space discrete point sequence, including: taking the starting point of the first parameterized trajectory segment as the current point and the initial discrete step length as the current discrete step length, calculating the actual chord height difference between the current point and the next parameter point; if the actual chord height difference does not meet the preset chord height difference threshold requirement, adjusting the current discrete step length and recalculating the actual chord height difference between the current point and the next parameter point; if the actual chord height difference meets the preset chord height difference threshold requirement, taking the space point corresponding to the next parameter point as the valid discrete point of the Cartesian space discrete point sequence and using it as the new current point, continuing to calculate the next parameter point, until all parameterized trajectory segments have completed the discretization processing to obtain the Cartesian space discrete point sequence.

[0062] In this embodiment, unlike the traditional method of discretization using a fixed step size, this embodiment employs a dynamically adaptive step size for discretization. Under the condition of meeting the preset chord height difference threshold, the next parameter point is used as a valid discrete point in the Cartesian space discrete point sequence until all parameterized trajectory segments have been discretized, resulting in a Cartesian space discrete point sequence. It should be noted that the starting point of the first parameterized trajectory segment is also within the Cartesian space discrete point sequence.

[0063] By using dynamic adaptive step size, the distribution quality of discrete points is improved, ultimately enhancing the accuracy and efficiency of trajectory planning. Specifically, on straight segments, due to their simple geometry, the curvature is zero everywhere. Using a fixed step size would uniformly generate a large number of discrete points, but these points would result in significant computational redundancy when approximating the straight line. Many points are unnecessary for maintaining accuracy, yet consume substantial computational resources for subsequent steps such as inverse kinematics solving and trajectory planning. For circular arc segments, a fixed step size would cause a sharp increase in the chord height difference (approximation error) between adjacent discrete points in areas of significant trajectory curvature, leading to a severe deviation of the generated polygonal segment from the original smooth curve, resulting in a geometric error of "approximating curves with straight lines." In this embodiment, adaptive step size minimizes computational load on straight segments while maintaining accuracy. For circular arc segments, the step size can be continuously adjusted based on the angle and chord height difference threshold, making the discrete points more accurate and closely aligned with the actual motion path.

[0064] Specifically, the actual chord height difference is determined by both the position chord height difference and the attitude chord height difference.

[0065] Calculating the actual chord height difference from the current point to the next parameter point includes: determining the trajectory type of the current parameterized trajectory segment; if the trajectory type is a linear parameterized trajectory, projecting the midpoint of the current parameterized trajectory segment onto the straight line determined between the current point and the next parameter point to obtain the projection point; calculating the Euclidean distance between the midpoint and the projection point to obtain the position chord height difference; and calculating the quaternion angle between the attitude of the midpoint and the attitude of the projection point to obtain the attitude chord height difference.

[0066] Furthermore, calculating the actual chord height difference from the current point to the next parameter point also includes: when the trajectory type is a circular arc parameter trajectory, performing dense sampling based on the parameter interval from the current point to the next parameter point to obtain a set of sampling points; calculating the distance between the intermediate point and all sampling points in the set of sampling points, and taking the minimum distance as the position chord height difference; and calculating the quaternion angle between the attitude of the intermediate point and the attitude of the sampling point corresponding to the minimum distance as the attitude chord height difference.

[0067] In this embodiment, different methods are used to calculate the actual chord height difference for linear segments and circular arc segments. For linear parametric trajectories, the position chord height difference and attitude chord height difference are calculated by projecting the center point onto the theoretical straight line. For circular arc parametric trajectories, dense sampling is performed within the parameter interval to find the minimum position chord height difference and attitude chord height difference between the center point and the set of sampling points, thereby satisfying the requirements of high-precision machining scenarios where both end-position and attitude accuracy are required.

[0068] Optionally, the current distance step length can be adjusted, including: calculating a scaling factor based on the actual chord height difference; and adjusting the current distance step length based on the scaling factor.

[0069] In this embodiment, a smooth and rapid adaptive discretization step size is achieved. This ensures that the adjustment avoids oscillations while maintaining a fast convergence rate, thus guaranteeing the numerical stability and efficiency of the discretization iteration process. The specific adjustment formula will be explained in subsequent detailed embodiments.

[0070] Optionally, based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, including: obtaining the positions of all sharp points in the discretized joint space trajectory; and truncating the continuous joint space trajectory into multiple independent sub-trajectory segments at all sharp points to complete the segmentation process.

[0071] The determination of sharp points includes: identifying and traversing each joint space point in the discretized joint space trajectory to obtain the smoothing value of each joint space point; calculating the velocity change between the previous segment of the trajectory and the next segment of the trajectory passing through the current joint space point; calculating the spatial angle between the vector of the previous segment of the trajectory and the vector of the next segment of the trajectory; and determining the current joint space point as a sharp point if the velocity change exceeds a preset velocity threshold, or the spatial angle is less than a preset angle threshold, or the smoothing value indicates a non-smooth state.

[0072] In this embodiment, a sharp point refers to a location where the direction of motion changes abruptly or where joint velocity may undergo discontinuous abrupt changes. Specifically, it can be quantified as follows: if the change in joint velocity between adjacent path points exceeds a preset value, or if the spatial angle between the lines connecting the two points is less than a preset angle, then the point is identified as a sharp point. By segmenting the joint spatial trajectory based on sharp points, it is beneficial to improve the smoothness of subsequent trajectory and the effectiveness of velocity planning. For example, the parameterized transition curve inserted at the sharp point ensures that the segmented trajectory is not only positionally continuous at the sharp point, but also that its velocity and even acceleration achieve a smooth transition, thereby fundamentally eliminating mechanical vibration and manufacturing errors caused by abrupt changes in trajectory direction or velocity steps.

[0073] The following describes the implementation steps of the hybrid trajectory planning method using a specific embodiment, including:

[0074] S201, analyze the hybrid trajectory and construct the original tool trajectory set.

[0075] S201 aims to parse hybrid trajectories into internal motion commands, and then construct the original toolpath set through parameterized trajectories. .

[0076] Where M is the total number of trajectory segments, j is the current trajectory segment number, and u is the unified parameter for unified parameterization.

[0077] Specifically, S201 also includes:

[0078] S2011, Analyze the mixed trajectory.

[0079] Taking the TURIN robot's program as an example, the following basic data for the mixed trajectory is obtained:

[0080] Joint space:

[0081] MJ(29.974,-85.419,-50.000,55.445,0.000,0.000,0.000,0.000,0.000,50,50,100,01,00). Here, the keyword MJ represents the PTP trajectory in joint space. The joint data is (29.974,−85.419,−50.000,55.445), containing joint coordinates, a velocity value of 50, an acceleration value of 50, and a smoothness value of 100.

[0082] Cartesian space:

[0083] ML(423.000,−69.000,60.000,0.000,0.000,90.000,0.000,0.000,0.000,20,20,100,01,01).

[0084] The keyword ML represents a linear segment in Cartesian space. The pose data is (423.000,−69.000,60.000,0.000,0.000,90.000), which includes position and attitude data. The position coordinates are (423.000,−69.000,60.000), and the attitude coordinates are (0.000,0.000,90.000). The velocity data is 50, the acceleration data is 50, and the smoothness value is 100.

[0085] MC(303.858,74.142,60.000,0.000,0.000,-135.000,0.000,0.000,0.000,20,20,100,01,01).

[0086] The keyword is MC, which represents a circular arc segment in Cartesian space. The pose point data is (303.858,74.142,60.000,0.000,0.000,-135.000), which includes position and attitude data. The position coordinates are (303.858,74.142,60.000), and the attitude coordinates are (0.000,0.000,−135.000). The velocity value is 50, the acceleration value is 50, and the smoothing coefficient is 100.

[0087] By parsing and recognizing S2011, the mixed trajectory can be broken down into the concept of "points", and the motion parameters of these points and the trajectory type corresponding to the sub-task instructions can be known, which is beneficial for the subsequent generation of the original tool trajectory set.

[0088] S2012, Parametric toolpath.

[0089] The tool path is parametrically modeled based on key spatial points and motion parameters. For example... Figure 2 As shown, the linear segment in joint space can be represented as: .

[0090] in, linear segment The starting point The endpoint.

[0091] An arc segment in Cartesian space is represented as:

[0092]

[0093] in For the arc segment The center of the circle, Starting from, As the endpoint, Let be the central angle of the arc segment.

[0094] A linear segment in Cartesian space can be represented as:

[0095]

[0096] in, Starting from, Let L be the endpoint and L be the linear segment between the two points.

[0097] When the acquired motion parameter keywords change, the parameterization process of the tool path may require the introduction of forward / inverse kinematics solutions. If the previous motion parameter keyword was MJ, and the current motion parameter keyword is ML, then a linear tool path needs to be constructed in Cartesian space. Simultaneously, it is necessary to solve for the joint space data corresponding to the previous motion parameters (keyword: MJ) through forward kinematics, converting them into pose points in Cartesian space. For linear segments, the parameterized trajectory... Defined as:

[0098]

[0099] in Starting from, The endpoint is u, which is a uniform parameter.

[0100] For a circular arc segment, its parametric trajectory Defined as:

[0101]

[0102] in With the center point, Starting from, The endpoint is N, and the normal vector is N.

[0103] In S2012, parameterization facilitates the subsequent construction of the original toolpath set and discretization.

[0104] S2013, construct the original toolpath set.

[0105] Based on the parameterized toolpath type in S2012, this step will construct the original toolpath set and define N segments of the path. , Let i be the i-th segment of the tool path, which is also the basic parameterized path segment. The trajectory type is defined as , The value can be a linear segment or a circular arc segment, and the output is the original toolpath set. .

[0106] The specific process includes: initializing the first toolpath segment. and its types Then define two empty sets of trajectories. and Then iterate through all the remaining... For all trajectory segments outside of i=1, process each trajectory segment sequentially. , until i = NN-1. For each trajectory segment Compare the type of the current trajectory segment with the type of the previous trajectory segment. i-1 .if This indicates that the current trajectory segment belongs to the same type of trajectory as the previous trajectory segment, and the current trajectory segment will be... Add to ,Right now Continue traversing the next segment of the trajectory. .

[0107] like This indicates that the trajectory type has changed. At this point, Inserting the middle trajectory segment set into In, that is And ordered Then continue traversing the next segment of the trajectory. After traversal, the final result is a set of original toolpaths consisting of multiple path segments. Its form is:

[0108]

[0109] in Indicates the first Each trajectory segment contains a series of sequentially divided parameterized trajectory segments, each corresponding to a different trajectory type.

[0110] S202, discretizes and performs inverse kinematics processing on CP.

[0111] S202 aims to discretize the continuous CP trajectory points in the original toolpath set and solve its inverse kinematics. Input: Original toolpath set It outputs multiple parameterized trajectory sequences in joint space, where the parameterized PTP trajectory sequence in joint space is the same as the discrete point sequence in joint space corresponding to the discrete point sequence in Cartesian space.

[0112] Furthermore, the Cartesian space point Inverse solution to points in joint space Defined as IK, i.e. Correspondingly, joint space points The correct solution to the Cartesian space point It can be defined as FK, and has .

[0113] S2021, Discretize CP.

[0114] Before discretization, the relevant parameters are initialized:

[0115]

[0116] in The initial value of the trajectory curve parameters (the aforementioned original tool trajectory set has been standardized) is used to mark the current discrete position; This is the initial step size for the current attempt, i.e., the initial step size. and The minimum and maximum ranges of the discrete step size are defined respectively to ensure both discretization accuracy and computational efficiency; Used to record the number of iterations for adaptive step size adjustment.

[0117] The initial discrete point It is added to the set of discrete points as the initial point for trajectory discretization. ,have:

[0118]

[0119] in This represents the final set of discrete points after discretization of a linear or curvilinear parametric trajectory, i.e., the effective discrete points of the Cartesian space sequence of discrete points to be output. For linear parametric trajectories, we have:

[0120]

[0121] For the curve parameter trajectory, we have:

[0122] =0.1

[0123] in, and These are the maximum values ​​of the linear parameter trajectory and the curvilinear parameter trajectory in the parameter domain, respectively. In this embodiment, 1 and 0.1 are taken as the maximum values, but they can be set by the user.

[0124] The PTP trajectory, consisting of the initial discrete point and the next discrete point, is mapped to the joint space using inverse kinematics, and the chord height difference is calculated by comparing it with the corresponding parameter segment of the curve parametric trajectory. Subsequently, the parameter interval and the final discrete point are calculated iteratively, with the iteration mainly involving the following steps:

[0125] 1) Calculate the next discrete point

[0126]

[0127] Among them, it is necessary to meet the following requirements. ≤1.

[0128] 2) Calculate the midpoint ,like Figure 3 and Figure 4 The diagram shows the midpoints of the linear segment and the circular arc segment, respectively. Based on the inverse kinematics method, the starting point can be calculated. and the finish line Corresponding joint values ​​in joint space Then, the midpoint in the joint space is obtained.

[0129] 3) Calculate the chord height difference δ and σ.

[0130] like Figure 3 and Figure 4 This demonstrates the ideal trajectory in Cartesian space and the trajectory formed after mapping the PTP trajectory from joint space to Cartesian space using forward kinematics. Different algorithms exist for calculating the position chord difference δ and attitude chord difference σ for linear and curvilinear parameterized trajectories.

[0131] (a) For a linear parametric trajectory, first set the intermediate points Projected onto the straight line trajectory L Ps,Pe Above, the projection point is obtained. The chord difference corresponding to this point is: calculate the chord difference error between the midpoint and the track trajectory and projection point, that is:

[0132]

[0133] Position() represents the position coordinates of a point, which can be substituted into the coordinates in the motion parameters.

[0134] The attitude chord height difference is calculated using a quaternion algorithm. Let... For point The quaternion is a point Quaternions, where For point In the straight trajectory L Ps,Pe The projection points on the surface are:

[0135]

[0136]

[0137] Here, Posture() represents the pose coordinates of a point, which can be determined based on motion parameters.

[0138] (b) For the parametric trajectory of the curve, calculate the chord height difference between the midpoint and the parametric trajectory of the curve. Based on the parameter interval... (Initial parameter intervals can be defined by the user) Calculate sampling parameter points The number of sampling points M:

[0139]

[0140] Then, calculate the dense sampling points:

[0141]

[0142] Where C represents the sampling curve. The range of the calculated parameters is:

[0143]

[0144] The interval [a, b] satisfies the following for any j (b ≥ j ≥ a): The sampling points are calculated based on the parameter range:

[0145]

[0146] Then, calculate the midpoint of the curve. With sampling points The chord height difference between points is defined as follows for a segment of a curved trajectory:

[0147]

[0148] And obtain based on the index j of the minimum value obtained. .

[0149] The attitude chord height difference is calculated using a quaternion algorithm. Let... for Quaternions, for The quaternions are:

[0150]

[0151]

[0152] 4) Based on the maximum chord height difference and Set error tolerance .

[0153] For a linear parametric trajectory, we have , For the trajectory of the curve parameters, we have , .

[0154] If the conditions are met Simultaneously established, or and If both conditions are met, then insert the current discrete point. If the above conditions are not met, proceed to step 5) to adjust the parameter range for the next iteration.

[0155] In this embodiment, the constraint condition for the preset chord height difference threshold is the interpolation of the maximum chord height difference threshold and the error tolerance. It should be noted that, in addition to setting the error tolerance, other methods can also be used, such as taking a certain proportion of the maximum chord height difference as the preset condition for the preset chord height difference threshold and comparing it with the actual chord height difference, which can also establish the constraint condition.

[0156] 5) Calculate the scaling factor k and correct the initial parameter range. If Simultaneously established or If this holds true, then the scaling factor k is calculated as follows:

[0157]

[0158] like and If both conditions are met, then the scaling factor k is calculated as follows:

[0159]

[0160] Then adjust the deviation step size according to the scaling factor k:

[0161]

[0162] in, For the discrete step size after iteration, the following conditions must be met: Then return to step 1) to recalculate the discrete points and chord height difference. This step will be repeated several times until the chord height difference meets the design requirements or the maximum number of iterations is reached.

[0163] S2022, solves the inverse kinematics for each discrete point in the discretized Cartesian space.

[0164] Because different types of industrial robots differ in their structural forms and kinematic parameters, it is necessary to establish corresponding inverse kinematics (DH) solution methods for specific mechanisms. This embodiment provides an inverse kinematics solution process for a SCARA robot; other robots can use other inverse kinematics solution methods. The corresponding DH parameters are shown in Table 1, where the link parameters and variables of each joint are defined according to the standard DH modeling method.

[0165] Table 1

[0166]

[0167] Based on the above parameters, a homogeneous transformation matrix between adjacent link coordinate systems can be constructed. Its general form is:

[0168]

[0169] In Cartesian space, a pose point Corresponding to joint variables in joint space When the pose point P is expressed using joint variables, its homogeneous pose matrix can be obtained through successive multiplication:

[0170]

[0171] in,

[0172]

[0173]

[0174] like Figure 5 As shown, in the kinematics of the SCARA robot, its second joint angle can be obtained by the cosine theorem, that is:

[0175]

[0176]

[0177] make ,make We can obtain:

[0178]

[0179]

[0180]

[0181] Then order ,make Based on geometric relationships, it can be written as:

[0182]

[0183]

[0184]

[0185] For joint angle ,make , ,but:

[0186]

[0187]

[0188] Therefore, we can obtain:

[0189]

[0190] In summary, the inverse kinematics solution IK for a SCARA robot can be summarized as follows:

[0191]

[0192] For six-axis robots and other equipment with higher degrees of freedom, the inverse kinematics solution can follow a similar modeling approach as for SCARA robots. However, due to the increased degrees of freedom, more factors need to be considered. For example, the existence of multiple solutions makes the selection of pose redundancy a necessary step; at the same time, it is also necessary to handle complex situations such as avoidance of singular poses, joint reachability constraints, and workspace boundaries. Therefore, in practical engineering applications, this embodiment can be extended with reference to the SCARA modeling method, or mature third-party kinematics solution libraries (such as RobWorks) can be directly used to implement the inverse kinematics calculation of high-degree-of-freedom robots.

[0193] Using the above method, the discrete point sequence in Cartesian space obtained in S2021 is... By inversely solving each joint space, we obtain... ,Right now:

[0194]

[0195] S2023, construct the joint space discrete point sequence corresponding to the Cartesian space discrete point sequence.

[0196] Construct the PTP trajectory in joint space using a sequence of discrete points in joint space. The input is a sequence of discrete points in joint space. The output is the PTP trajectory in joint space. .

[0197] A sequence of discrete points traversing the joint space Starting from i=0, continue until i=N-2. For each pair of adjacent points... and Calculate the corresponding PTP trajectory segment using linear interpolation. :

[0198]

[0199] in These are the interpolation parameters on the trajectory segment. After traversing all discrete points, the PTP trajectory sequence in joint space is obtained, which is the discretized joint space trajectory:

[0200]

[0201] The sequence consists of multiple linear interpolated trajectory segments, ensuring a smooth transition in the motion trajectory between any two adjacent points, thereby avoiding the problems of information loss and difficulty in connecting subsequent trajectories that exist in related technologies.

[0202] S301, trajectory planning in joint space.

[0203] The aim is to divide the PTP toolpath into multiple parameterizable PTP toolpath units. Within joint space, the path can be segmented according to preset path planning criteria (such as joint velocity variations and spatial angles), outputting multiple parameterized toolpaths after path planning. .

[0204] In practical implementation, the main considerations are abrupt changes in joint velocity and significant variations in spatial angle. The initial toolpath may contain sharp points, which can easily introduce large errors after trajectory smoothing. Therefore, this step truncates the trajectory at sharp point locations, thus dividing the initial trajectory into multiple independent PTP trajectory segments. The determination of sharp points is primarily based on the magnitude of velocity changes and variations in spatial angle. For points... First, calculate the trajectory of the two segments before and after the point. and Parameter speed threshold and ,have:

[0205]

[0206]

[0207] Then the trajectory was calculated. End joint velocity and trajectory Starting joint velocity ,have:

[0208]

[0209]

[0210] Therefore, the change in velocity is:

[0211]

[0212] Among them, the velocity change threshold Through weighting coefficients With acceleration threshold Configure settings:

[0213]

[0214] Next, calculate the linear segment. With linear segment The spatial angle between them is:

[0215]

[0216] For a given set of toolpaths, parameterize the toolpath. Iterate through the parameterized toolpaths and set the path planning set as... Starting from j=0, we iterate until j=M-1. The process of each iteration is as follows:

[0217] First initialize That is, the j-th group of tool trajectories The first segment defines the end point E=0 of the previous trajectory and the tool trajectory. Then, iterate from i=1 to i=N-1. For each segment... Calculate speed change Spatial angle And the smoothing value (which can be obtained from the initial input blended trajectory or customized). If , If the three conditions of smooth=0 are not met, continue processing the next trajectory segment. Otherwise, merge all trajectory segments between E and i-1 into... ,Right now:

[0218]

[0219] Then set E=i and continue processing the next trajectory segment until i=N-1. Finally, Merging into the trajectory planning set, i.e. Then begin iterating through j+1. Continue this process until all... Multiple PTP tool trajectories are obtained after trajectory planning. Based on this, further trajectory smoothing and velocity planning are performed on the segmented joint spatial trajectory to achieve coordinated movement and stable control of each joint.

[0220] Finally, a feasible implementation method for trajectory smoothness and velocity planning is presented.

[0221] Trajectory planning is performed on each segment to generate target trajectories for controlling the movement of the industrial robot. This includes: iterating the smoothness parameters of the smooth transition process with the goal of simultaneously satisfying preset kinematic constraints and geometric accuracy error conditions to complete the smooth transition process of the joint space trajectory; and performing velocity planning based on the smooth transition joint space trajectory to generate control commands.

[0222] Specifically, with the goal of simultaneously satisfying preset kinematic constraints and geometric accuracy error conditions, the smoothness parameters of the smooth transition process are iterated to complete the smooth transition processing of the joint space trajectory. This includes: initializing a set of smoothness coefficients for the smoothness parameters based on preset geometric accuracy error thresholds and kinematic constraint thresholds; calculating the transition segment trajectory curve based on the current smoothness coefficients; calculating the acceleration and jerk of the transition segment trajectory curve and determining whether the acceleration and jerk meet the kinematic constraint thresholds; calculating the geometric error between the transition segment trajectory curve and the discrete points in the joint space and determining whether the geometric error meets the geometric accuracy error threshold; updating the smoothness coefficients if any of the acceleration, jerk, or geometric error does not meet the corresponding threshold requirements, until the acceleration, jerk, and geometric error calculated by the current smoothness coefficients all meet the corresponding threshold requirements; and completing the smooth transition processing of the joint space trajectory based on the smoothness coefficients that meet the threshold requirements.

[0223] Furthermore, with the goal of simultaneously satisfying preset kinematic constraints and geometric accuracy error conditions, the smoothness parameters of the smooth transition process are iterated to complete the smooth transition processing of the joint space trajectory. This includes: initializing a set of smoothness coefficients for the smoothness parameters based on preset geometric accuracy error thresholds and kinematic constraint thresholds; calculating the transition segment trajectory curve based on the current smoothness coefficients; calculating the acceleration and jerk of the transition segment trajectory curve and determining whether the acceleration and jerk meet the kinematic constraint thresholds; calculating the geometric error between the transition segment trajectory curve and the discrete points in the joint space and determining whether the geometric error meets the geometric accuracy error threshold; updating the smoothness coefficients if any of the acceleration, jerk, or geometric error does not meet the corresponding threshold requirements, until the acceleration, jerk, and geometric error calculated by the current smoothness coefficients all meet the corresponding threshold requirements; and completing the smooth transition processing of the joint space trajectory based on the smoothness coefficients that meet the threshold requirements.

[0224] Velocity planning includes: planning a velocity curve with continuous acceleration for the linear segment in the joint space trajectory, planning uniform parametric motion for the transition segment in the joint space trajectory, and using a bidirectional scanning algorithm to determine the velocity connection relationship between the linear segment and the transition segment.

[0225] Specifically, velocity planning is performed based on the joint space trajectory after a smooth transition, including: generating a continuously accelerating feed velocity curve for linear segments in the joint space trajectory using S-shaped or polynomial velocity planning methods; performing velocity planning for transition segments in the joint space trajectory based on parametric uniform motion; determining the endpoint velocity of each linear segment under acceleration constraints in the forward scan and the starting velocity of each linear segment under deceleration constraints in the reverse scan using a bidirectional scanning algorithm; and adjusting the velocity between the linear segments and the transition segments based on the endpoint velocity and the starting velocity.

[0226] Furthermore, for the linear segments in the joint space trajectory, an S-shaped or polynomial velocity planning method is used to generate a feed velocity curve with continuous acceleration; for the transition segments in the joint space trajectory, velocity planning is performed based on parametric uniform motion; through a bidirectional scanning algorithm, the endpoint velocity of each linear segment under acceleration constraints is determined in the forward scan, and the starting velocity of each linear segment under deceleration constraints is determined in the reverse scan; based on the endpoint velocity and the starting velocity, the velocity between the linear segments and the transition segments is adjusted.

[0227] In the trajectory smoothing and velocity planning method provided in this embodiment, geometric accuracy constraints and kinematic constraints are simultaneously used as iterative conditions for the smooth transition process, thereby improving machining accuracy. Furthermore, in the velocity planning process, differentiated velocity planning and coordination methods are applied to the linear segment and the transition segment respectively, thereby eliminating the problem of abrupt acceleration changes.

[0228] Furthermore, as Figures 1 to 6 The specific implementation of the method shown in this embodiment provides a hybrid trajectory planning device, such as... Figure 7 As shown, the device includes:

[0229] The parsing unit 701 is configured to parse the mixed trajectory contained in the current task of the industrial robot to obtain an original tool trajectory set consisting of multiple parameterized trajectory segments; wherein, the original tool trajectory set is a trajectory set in which the mixed trajectory is divided into multiple parameterized trajectory segments according to the trajectory execution order and the trajectory type.

[0230] The generation unit 702 is configured to perform discretization processing based on chord height difference on the Cartesian space trajectory in the parameterized trajectory segment to generate a Cartesian space discrete point sequence; the discretization processing based on chord height difference uses a preset chord height difference threshold as an accuracy constraint, and iteratively adjusts the discretization step size to generate a Cartesian space discrete point sequence while ensuring that the discretization error does not exceed the preset chord height difference threshold.

[0231] Processing unit 703 is configured to perform inverse kinematics processing on the Cartesian space discrete point sequence to obtain the joint space trajectory after the discretization processing;

[0232] Planning unit 704 is configured to segment the discretized joint space trajectory based on sharp points in the discretized joint space trajectory, and perform trajectory planning on each segment to generate a target trajectory for controlling the movement of the industrial robot; the sharp points are determined based on the velocity changes and spatial angles of the discretized joint space trajectory.

[0233] In specific application scenarios, the parsing unit 701 is further configured to parse each sub-task instruction in the hybrid trajectory, identify the trajectory type and motion parameters corresponding to each sub-task instruction; the trajectory type includes at least linear segments and circular arc segments; based on the trajectory type and motion parameters of two adjacent sub-task instructions, a basic parameterized trajectory segment connecting the corresponding spatial points of the two sub-task instructions is constructed; each basic parameterized trajectory segment is traversed according to the trajectory execution order, and basic parameterized trajectory segments with the same trajectory type and adjacent to each other are merged into one parameterized trajectory segment to obtain the original tool trajectory set.

[0234] In a specific application scenario, the generation unit 702 is further configured to take the starting point of the first parameterized trajectory segment as the current point and the initial deviation length as the current deviation length, and calculate the actual chord height difference between the current point and the next parameter point; if the actual chord height difference does not meet the preset chord height difference threshold requirement, adjust the current deviation length and recalculate the actual chord height difference between the current point and the next parameter point; if the actual chord height difference meets the preset chord height difference threshold requirement, take the spatial point corresponding to the next parameter point as the valid discrete point of the Cartesian space discrete point sequence, and take it as the new current point, and continue to calculate the next parameter point until all parameterized trajectory segments have been discretized to obtain the Cartesian space discrete point sequence.

[0235] In specific application scenarios, the generation unit 702 is further configured to determine the trajectory type of the current parameterized trajectory segment; if the trajectory type is a linear parameterized trajectory, the midpoint of the current parameterized trajectory segment is projected onto a straight line determined between the current point and the next parameter point to obtain a projection point; the Euclidean distance between the midpoint and the projection point is calculated to obtain the position chord height difference; and the quaternion angle between the attitude of the midpoint and the attitude of the projection point is calculated to obtain the attitude chord height difference.

[0236] In a specific application scenario, the generation unit 702 is further configured to perform dense sampling based on the parameter interval from the current point to the next parameter point when the trajectory type is a circular arc parameter trajectory, to obtain a set of sampling points; calculate the distance between the intermediate point and all sampling points in the set of sampling points, and take the minimum distance as the position chord height difference; calculate the quaternion angle between the attitude of the intermediate point and the attitude of the sampling point corresponding to the minimum distance as the attitude chord height difference.

[0237] In a specific application scenario, the generation unit 702 is further configured to calculate a scaling factor based on the actual chord height difference; and to adjust the current deviation length based on the scaling factor.

[0238] In a specific application scenario, the planning unit 704 is further configured to obtain the positions of all sharp points in the discretized joint space trajectory; truncate the continuous joint space trajectory into multiple independent sub-trajectory segments at all sharp points to complete the segmentation process; wherein, the determination of the sharp points includes: identifying and traversing each joint space point in the discretized joint space trajectory to obtain the smoothing value of each joint space point; calculating the velocity change between the previous trajectory segment and the next trajectory segment passing through the current joint space point; calculating the spatial angle between the previous trajectory vector and the next trajectory vector; and determining the current joint space point as a sharp point when the velocity change exceeds a preset velocity threshold, or the spatial angle is less than a preset angle threshold, or the smoothing value indicates a non-smooth state.

[0239] It should be noted that other corresponding descriptions of the functional units involved in the hybrid trajectory planning device provided in this embodiment can be found in [reference]. Figures 1 to 6 The corresponding descriptions in [the document] will not be repeated here.

[0240] Based on the above, Figures 1 to 6 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figures 1 to 6 The method shown.

[0241] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.

[0242] Based on the above, Figures 1 to 6 The method shown, and Figure 7 To achieve the above objectives, this application also provides an industrial robot, which includes a storage medium and a processor; the storage medium stores a computer program; and the processor executes the computer program to achieve the above-described objectives. Figures 1 to 6 The method shown.

[0243] Optionally, the aforementioned industrial robot may also include a user interface, network interface, camera, radio frequency (RF) circuitry, sensors, audio circuitry, Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0244] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0245] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By applying the solution of this embodiment, compared with related technologies, by parsing and reconstructing the hybrid trajectory into the original tool trajectory set, a method is proposed to transform heterogeneous hybrid instructions into a unified geometric representation, solving the problems of discontinuous trajectory connection and complex data processing logic caused by space type switching in traditional methods. On this basis, by introducing adaptive discretization processing with chord height difference as accuracy constraint for the Cartesian space trajectory, the discretization step size is dynamically adjusted, avoiding the defects of insufficient accuracy in curved areas and computational redundancy in straight areas of the traditional fixed step size method, and significantly improving the overall computational efficiency of the discretization process. Finally, considering the sudden changes in velocity and significant changes in spatial angle in the joint space, the trajectory is segmented based on the sharp points in the discretized joint space trajectory, thereby avoiding motion discontinuity.

[0246] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0247] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0248] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A hybrid trajectory planning method, characterized in that, include: The mixed trajectories contained in the current task of the industrial robot are analyzed to obtain the original tool trajectory set consisting of multiple parameterized trajectory segments; wherein, the original tool trajectory set is a trajectory set in which the mixed trajectory is divided into multiple parameterized trajectory segments according to the trajectory execution order and the trajectory type. For the Cartesian space trajectory in the parameterized trajectory segment, a discretization process based on chord height difference is performed to generate a Cartesian space discrete point sequence. The discretization process based on chord height difference uses a preset chord height difference threshold as an accuracy constraint. Under the condition that the discretization error does not exceed the preset chord height difference threshold, the discretization step size is iteratively adjusted to generate a Cartesian space discrete point sequence. Perform inverse kinematics processing on the discrete point sequence in Cartesian space to obtain the joint space trajectory after discretization. Based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, and trajectory planning is performed on each segment to generate a target trajectory for controlling the movement of the industrial robot; the sharp points are determined according to the velocity changes and spatial angles of the discretized joint space trajectory. The task includes at least two sub-task instructions; The process involves analyzing the mixed trajectories contained in the current task of the industrial robot to obtain a set of original tool trajectories composed of multiple parameterized trajectory segments, including: Each sub-task instruction in the hybrid trajectory is analyzed to identify the trajectory type and motion parameters corresponding to each sub-task instruction; the trajectory type includes at least linear segments and circular arc segments; Based on the trajectory type and motion parameters of two adjacent subtask instructions, construct a basic parameterized trajectory segment connecting the corresponding spatial points of the two subtask instructions; Traverse each basic parameterized trajectory segment in the order of trajectory execution, and merge the basic parameterized trajectory segments with the same trajectory type and adjacent to each other into one parameterized trajectory segment to obtain the original tool trajectory set; Specifically, for the Cartesian space trajectory in the parameterized trajectory segment, discretization based on chord height difference is performed to generate a sequence of discrete points in Cartesian space, including: Using the starting point of the first parameterized trajectory segment as the current point and the initial deviation step length as the current deviation step length, calculate the actual chord height difference between the current point and the next parameter point; If the actual chord height difference does not meet the preset chord height difference threshold requirement, the current deviation step length is adjusted, and the actual chord height difference between the current point and the next parameter point is recalculated. If the actual chord height difference meets the preset chord height difference threshold requirement, the spatial point corresponding to the next parameter point is taken as the effective discrete point of the Cartesian space discrete point sequence and used as the new current point to continue calculating the next parameter point until all parameterized trajectory segments have been discretized to obtain the Cartesian space discrete point sequence.

2. The method according to claim 1, characterized in that, The actual chord height difference is determined by both the position chord height difference and the attitude chord height difference. Calculate the actual chord height difference from the current point to the next parameter point, including: Determine the trajectory type of the current parameterized trajectory segment; When the trajectory type is a linear parametric trajectory, the midpoint of the current parametric trajectory segment is projected onto the straight line determined between the current point and the next parameter point to obtain the projection point; Calculate the Euclidean distance between the intermediate point and the projection point to obtain the position chord height difference; Calculate the quaternion angle between the attitude of the intermediate point and the attitude of the projection point to obtain the attitude chord height difference.

3. The method according to claim 2, characterized in that, Calculating the actual chord height difference from the current point to the next parameter point also includes: When the trajectory type is a circular arc parametric trajectory, dense sampling is performed based on the parameter interval from the current point to the next parameter point to obtain a set of sampling points; Calculate the distance between the intermediate point and all sampling points in the sampling point set, and take the minimum distance as the position chord height difference; The quaternion angle between the attitude of the intermediate point and the attitude of the sampling point corresponding to the minimum distance is calculated as the attitude chord height difference.

4. The method according to claim 1, characterized in that, Adjusting the current distance step length includes: Calculate the scaling factor based on the actual chord height difference; Based on the aforementioned scaling factor, the current distance step length is adjusted.

5. The method according to claim 1, characterized in that, Based on the sharp points in the discretized joint space trajectory, the discretized joint space trajectory is segmented, including: Obtain the positions of all sharp points in the joint space trajectory after the discretization process; At all sharp points, the continuous joint space trajectory is truncated into multiple independent sub-trajectory segments to complete the segmentation process; The determination of the sharp point includes: Identify and traverse each joint space point in the discretized joint space trajectory to obtain the smoothing value of each joint space point. Calculate the change in velocity between the previous segment of the trajectory and the next segment of the trajectory passing through the current joint space point; Calculate the spatial angle between the trajectory vector of the first segment and the trajectory vector of the second segment; If the change in speed exceeds a preset speed threshold, or the spatial angle is less than a preset angle threshold, or the smoothness value indicates a non-smooth state, the current joint spatial point is determined to be a sharp point.

6. A hybrid trajectory planning device, characterized in that, include: The parsing unit is configured to parse the mixed trajectory contained in the current task of the industrial robot to obtain an original tool trajectory set consisting of multiple parameterized trajectory segments; wherein, the original tool trajectory set is a trajectory set in which the mixed trajectory is divided into multiple parameterized trajectory segments according to the trajectory execution order and the trajectory type. The generation unit is configured to perform discretization processing based on chord height difference on the Cartesian space trajectory in the parameterized trajectory segment to generate a Cartesian space discrete point sequence; the discretization processing based on chord height difference uses a preset chord height difference threshold as an accuracy constraint, and iteratively adjusts the discretization step size to generate a Cartesian space discrete point sequence while ensuring that the discretization error does not exceed the preset chord height difference threshold. The processing unit is configured to perform inverse kinematics processing on the Cartesian space discrete point sequence to obtain the joint space trajectory after the discretization process. The planning unit is configured to segment the discretized joint space trajectory based on sharp points in the discretized joint space trajectory, and perform trajectory planning on each segment to generate a target trajectory for controlling the movement of the industrial robot; the sharp points are determined based on the velocity changes and spatial angles of the discretized joint space trajectory. The task includes at least two sub-task instructions; The process involves analyzing the mixed trajectories contained in the current task of the industrial robot to obtain a set of original tool trajectories composed of multiple parameterized trajectory segments, including: Each sub-task instruction in the hybrid trajectory is analyzed to identify the trajectory type and motion parameters corresponding to each sub-task instruction; the trajectory type includes at least linear segments and circular arc segments; Based on the trajectory type and motion parameters of two adjacent subtask instructions, construct a basic parameterized trajectory segment connecting the corresponding spatial points of the two subtask instructions; Traverse each basic parameterized trajectory segment in the order of trajectory execution, and merge the basic parameterized trajectory segments with the same trajectory type and adjacent to each other into one parameterized trajectory segment to obtain the original tool trajectory set; Specifically, for the Cartesian space trajectory in the parameterized trajectory segment, discretization based on chord height difference is performed to generate a sequence of discrete points in Cartesian space, including: Using the starting point of the first parameterized trajectory segment as the current point and the initial deviation step length as the current deviation step length, calculate the actual chord height difference between the current point and the next parameter point; If the actual chord height difference does not meet the preset chord height difference threshold requirement, the current deviation step length is adjusted, and the actual chord height difference between the current point and the next parameter point is recalculated. If the actual chord height difference meets the preset chord height difference threshold requirement, the spatial point corresponding to the next parameter point is taken as the effective discrete point of the Cartesian space discrete point sequence and used as the new current point to continue calculating the next parameter point until all parameterized trajectory segments have been discretized to obtain the Cartesian space discrete point sequence.

7. An industrial robot, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Convenient industrial robot joint space trajectory planning method

    CN115122329A

  • NSGA-II algorithm-based multi-objective optimization method for mechanical arm in redundant space

    CN105676636A

  • Trajectory planning for path-based applications

    US20210339390A1