Robot trajectory planning method and device, electronic equipment and storage medium

By acquiring the robot's real-time status and multi-dimensional safety verification rules, the error and safety issues in robot trajectory planning are resolved, realizing an efficient and safe trajectory planning method and reducing development and porting costs.

CN123169062APending Publication Date: 2026-11-27SUZHOU ELITE ROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611334463.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing robot trajectory planning methods suffer from large trajectory errors and insufficient safety, especially in collaborative robot applications where it is difficult to guarantee the safety and consistency of the movement process.

Method used

By acquiring the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, the reference endpoint state is obtained, and trajectory planning is performed based on state continuity constraints and safety verification rules, including multi-dimensional safety verification and correction, thereby reducing the development threshold for users and the cost of cross-platform porting.

Benefits of technology

It improves the accuracy and safety of robot trajectory planning, reduces debugging and porting costs, and achieves smoothness and safety in robot trajectory control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123169062A_ABST
    Figure CN123169062A_ABST
Patent Text Reader

Abstract

A trajectory planning method, device, electronic equipment and storage medium of a robot. The application discloses a trajectory planning method of a robot, and relates to the fields of robot control technology and trajectory planning. The method comprises the following steps: acquiring a reference endpoint state according to a real-time joint pose of the robot, a target joint position, a state preview time and a tracking feedback gain; acquiring a candidate motion trajectory within a preset trajectory time according to a state continuous constraint, the reference endpoint state and the real-time joint pose; and performing safety checking on the candidate motion trajectory through multidimensional safety checking rules, and correcting the candidate motion trajectory when it is determined that the candidate motion trajectory does not pass the safety checking. The technical scheme of the embodiment of the application configures the trajectory planning of the robot to be executed by a controller, reduces the development threshold of a user-side program and the cross-platform transplantation cost, and improves the accuracy and safety of the trajectory planning result of the robot based on the double-layer online trajectory generation of the state preview time and the tracking feedback gain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When collaborative robots are used in scenarios such as visual servoing, external trajectory tracking, and force control following, they usually need external devices (e.g., host computers) to continuously send the target joint positions in order to complete the robot's movement control, which places higher demands on the robot's trajectory planning.

[0003] In existing technologies, robot trajectory planning is usually completed by the user's upper-level program (e.g., host computer program). This requires the host computer program to ensure the constraints of speed, acceleration, and jump, or to push functions such as speed limiting and retiming down to the servo driver side. This results in a high development threshold for the user-side program and a high cost of cross-platform portability. At the same time, it is difficult to ensure that the final issued instructions are always consistent with the current safety policy when the safety mode changes during runtime.

[0004] Furthermore, existing trajectory planning methods typically generate a movement trajectory directly from the target joint position through a single trajectory planning process. However, such trajectory generation methods not only produce large trajectory errors but also pose certain safety risks, failing to ensure the safety of the robot's movement process. Summary of the Invention

[0005] This invention provides a robot trajectory planning method, device, electronic device, storage medium, and computer program product to solve the problem of large errors in robot trajectory planning results.

[0006] According to another aspect of the present invention, a trajectory planning method for a robot is provided, comprising: The reference endpoint state is obtained based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain. Based on the state continuity constraint, the reference endpoint state, and the real-time joint pose, obtain the candidate motion trajectory within a preset trajectory time. The candidate motion trajectory is subjected to security verification through multi-dimensional security verification rules, and the candidate motion trajectory is corrected when it is determined that the candidate motion trajectory fails the security verification.

[0007] The trajectory planning method for the robot further includes: acquiring control commands through a non-real-time thread and writing the control commands into a target cache area; wherein the control commands include target joint positions; and acquiring the robot's real-time joint poses, target joint positions, state preview times, and tracking feedback gains through a real-time thread based on a preset control cycle.

[0008] The method of acquiring the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain through a real-time thread based on a preset control cycle further includes: if the control command interval is determined to be less than or equal to the preset control cycle, the most recent command in the time series of the target buffer region is taken as the target control command, and the target joint position is obtained through the target control command; if the control command interval is determined to be greater than the preset control cycle, a predicted motion trajectory is obtained based on historical trajectory parameters or real-time joint pose, and the target joint position is obtained based on the predicted motion trajectory.

[0009] Before obtaining the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, the method further includes: obtaining the matching state preview time and tracking feedback gain based on the overshoot and settling time of the robot's operating state parameters.

[0010] After correcting the candidate motion trajectory, the method further includes: storing the parameter under-arrival error within the current preset trajectory time into a preset cache area, so as to obtain the reference endpoint state in the next preset trajectory time based on the robot's real-time joint pose, target joint position, state preview time, tracking feedback gain and the parameter under-arrival error; wherein the parameter under-arrival error includes at least one of position error, velocity error, acceleration error and jerk error.

[0011] The trajectory planning method for the robot further includes: in response to detecting an abnormal operating state of the robot, performing control rollback processing; wherein the abnormal operating state includes at least one of control command timing abnormality, host computer communication abnormality, thread calculation timeout abnormality, candidate motion trajectory solving abnormality, safety mode switching abnormality, and servo driver feedback abnormality; the control rollback processing includes at least one of maintaining the validity of historical control commands, reducing position tracking gain, deleting parameter under-delivery errors, reducing operating state parameters, and reporting alarm information.

[0012] According to another aspect of the present invention, a trajectory planning device for a robot is provided, comprising: The reference endpoint acquisition module is used to acquire the reference endpoint status based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain. The candidate trajectory acquisition module is used to acquire candidate motion trajectories within a preset trajectory time based on state continuity constraints, the reference endpoint state, and the real-time joint pose; wherein the preset trajectory time is less than the state preview time. The trajectory correction execution module is used to perform security verification on the candidate motion trajectory through multi-dimensional security verification rules, and to correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the trajectory planning method for a robot according to any embodiment of the present invention.

[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the trajectory planning method of a robot according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the trajectory planning method for a robot as described in any embodiment of the present invention.

[0016] The technical solution of this invention obtains the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain; it obtains candidate motion trajectories within a preset trajectory time based on state continuity constraints, the reference endpoint state, and real-time joint pose; it performs security verification on the candidate motion trajectories through multi-dimensional security verification rules, and corrects the candidate motion trajectories when they fail the security verification. This configures the robot's trajectory planning to be executed by the controller, reducing the development threshold of user-side programs and the cost of cross-platform porting. Simultaneously, through macro-planning of the reference endpoint state and periodic trajectory interpolation, it achieves two-layer online trajectory generation. This allows for not only robot trajectory control through state preview time and tracking feedback gain, but also decouples target following anti-jitter, state look-ahead feedback functions from multi-order smooth trajectory interpolation functions, greatly improving the accuracy and safety of the robot trajectory planning results and reducing the debugging and porting costs of robot movement trajectories.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart of a robot trajectory planning method according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of another robot trajectory planning method provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart of another robot trajectory planning method provided according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of a robot trajectory planning device according to Embodiment 4 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the trajectory planning method for a robot according to an embodiment of the present invention. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0022] Example 1 Figure 1This is a flowchart of a robot trajectory planning method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where robot trajectory planning is completed through a two-layer online trajectory generation method. This method can be executed by a robot trajectory planning device, which can be implemented in hardware and / or software. The robot trajectory planning device can be configured in the robot's controller, which can exist as an independent electronic device or be configured in existing electronic devices within the robot. Figure 1 As shown, the method includes: S101. Obtain the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain.

[0023] Real-time joint pose refers to the actual motion state of the robot joints acquired by the controller in the current control cycle, including the position (i.e., angle), velocity, and acceleration of each joint, which serves as the starting point for trajectory planning. The target joint position refers to the specified movement position in the robot control command issued by the host computer or other external systems, which serves as the endpoint for trajectory planning. Feedback adjustment is performed based on the deviation between the target joint position and the actual position to enable the robot to move quickly and smoothly toward the target joint position.

[0024] State preview time refers to the projection of the robot's current motion state onto a future time period. The controller predicts the robot's future motion posture after this time period based on real-time joint pose information. By predicting the motion trend in advance, it suppresses speed and acceleration spikes caused by target jumps and communication jitter, thus achieving state look-ahead prediction. Position tracking gain is used to generate a response adjustment amount that approaches the target joint position based on the position error between the target joint position and the real-time joint pose. Its function is equivalent to a proportional feedback term, reflecting the robot's response speed. The larger the position tracking gain, the faster the robot converges to the target joint position.

[0025] The reference endpoint refers to the trajectory endpoint after the state preview time. The reference endpoint state can include the position, velocity, and acceleration of the reference endpoint. The velocity and acceleration of the reference endpoint refer to both the velocity and acceleration at the trajectory endpoint and the velocity (i.e., maximum value) and acceleration boundaries of the entire motion trajectory during the state preview time. Based on the robot's real-time joint pose and the kinematic feedforward prediction performed during the state preview time, the robot's future predicted pose can be obtained. Then, combining the PD feedback of the tracking feedback gain and the velocity feedforward, the position error adjustment and velocity error adjustment are calculated to correct the original target joint position. Finally, based on the single-cycle velocity and acceleration change amplitude-limiting smoothing curve, jitter spikes are filtered out, thus outputting the reference endpoint state.

[0026] Specifically, firstly, according to the robot joint in the... Real-time joint pose per control cycle and status preview time The predicted joint position after the state preview time is obtained by calculating the following second-order kinematic equation. and predicting joint velocity : ; ; in, These represent the robot joints at the [number]th ... The system monitors the real-time position, velocity, and acceleration of each control cycle. This allows for the prediction of robot lag, eliminating the following error of pure feedback control and achieving state look-ahead prediction. Specifically, when the robot joint velocity and acceleration are unavailable (e.g., not detected), the predicted joint position can be calculated based on the first-order kinematic equations using differential filtering. .

[0027] Secondly, based on the target joint position With predicting joint position Position error and tracking feedback gain The response adjustment is generated by the following equation. : ; in, This represents a saturation or limiting function; These represent the minimum and maximum response adjustments, respectively, which are used as response adjustments. Given the constraints, the aforementioned response adjustment amount is actually the output adjustment amount based on PD feedback control.

[0028] Finally, the target joint position is corrected based on the state look-ahead prediction and response adjustment. At the same time, single-cycle velocity change limit and acceleration change limit are added, and first-order smoothing filter and minimum jerk constraint are performed to ensure that the output result (i.e. the reference endpoint state) does not exceed the limit. The reference endpoint state is used as the macroscopic boundary of the entire motion trajectory within the state preview time. Based on this, the first layer of online trajectory generation (On-Line TrajectoryGeneration 1, OTG1) is completed.

[0029] S102. Based on the state continuity constraint, the reference endpoint state, and the real-time joint pose, obtain the candidate motion trajectory within the preset trajectory time.

[0030] The preset trajectory time includes one or more control cycles, which reflects the motion trajectory within a short time window. The preset trajectory time can be less than the state preview time. In particular, the state preview time can actually include multiple preset trajectory times. For example, the state preview time can be 40 milliseconds (ms), the control cycle is 1 ms, and the preset trajectory time can be 1 ms to 20 ms. Taking the preset trajectory time equal to the control cycle as an example, OTG1 reflects the robot's predicted posture after 40 ms, while the second-layer online trajectory generation (On-Line TrajectoryGeneration2, OTG2) corresponding to the current step reflects the motion trajectory (i.e., candidate motion trajectory) within the current 1 ms.

[0031] State continuity constraints refer to the continuity of position, velocity, and acceleration of adjacent points in the motion trajectory. Specifically, within the current preset trajectory time, the position, velocity, and acceleration of adjacent points in the motion trajectory must satisfy a third-order continuity condition, or each of position, velocity, and acceleration must individually satisfy a continuity condition. Based on the state continuity constraints, the reference endpoint state, and the real-time joint pose, candidate motion trajectories within the preset trajectory time can be calculated using fifth-order polynomial interpolation, symmetric S-curve interpolation, a Jerk-constrained online trajectory generator, or other equivalent modules. Accordingly, OTG1 and OTG2 are repeatedly executed within each preset trajectory time, continuously refreshing the motion trajectory within the preset trajectory time, thus scrolling forward to complete all motion.

[0032] S103. Perform security verification on the candidate motion trajectory using multi-dimensional security verification rules, and correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

[0033] The multi-dimensional safety verification rules include joint space motion parameter verification, Cartesian space motion parameter verification, workspace boundary verification, load verification, mechanical elbow limit verification, and safety mode dynamic constraint verification. Joint space motion parameter verification determines whether the velocity, acceleration, and jerk (i.e., jerk) at the end of the current candidate motion trajectory exceed the maximum velocity, maximum acceleration, and maximum jerk of that joint. Cartesian space motion parameter verification calculates the candidate motion trajectory forward to the robot's end effector and verifies whether the linear velocity, acceleration, and jerk of the end effector exceed the maximum permissible velocity, maximum acceleration, and maximum jerk.

[0034] Workspace boundary verification refers to checking whether the robot's end effector enters prohibited areas or exceeds soft limit boundaries to prevent the robot from colliding with the frame and peripheral equipment. Load verification involves verifying the intensity of movement based on estimated torque, rated load, and tool weight; under heavy load conditions, speed, acceleration, and jump thresholds should be reduced. Mechanical elbow limit verification addresses the singular elbow configuration and hard / soft limits of elbow angles in multi-joint robotic arms to prevent reverse bending of the elbow, which could lead to mechanical jamming. Safety mode dynamic constraint verification distinguishes between different operating modes, such as automatic high-speed mode, human-robot collaborative speed-limited mode, manual drag mode, and protective stop mode, each corresponding to different speed, acceleration, and jump thresholds.

[0035] If any of the above safety checks fails, the candidate motion trajectory needs to be corrected. First, calculate the over-limit coefficients for each dimension, take the maximum scaling ratio, and proportionally reduce the speed, acceleration, and jump of the candidate motion trajectory so that the shape and start and end points of the candidate motion trajectory remain unchanged, but the overall motion is slowed down to achieve continuous motion without impact. Second, if there are still local instantaneous over-limit phenomena after the above global proportional deceleration and scaling, the equivalent motion duration of the current preset trajectory time is amplified to spread the motion evenly. In this way, the rate of change of motion per unit time is reduced by retiming processing, and the peak moments of speed, acceleration, or jump are eliminated.

[0036] Specifically, when the robot experiences multiple simultaneous exceedances, overload, or forced low-speed operation in safety mode, the robot's global speed, acceleration, and jump are significantly reduced based on preset thresholds to ensure operational safety through continuous low-speed operation throughout the entire cycle. Conversely, when the robot is detected approaching spatial boundaries, elbow limits, critical overload, or collision risks, the robot can stop its current trajectory, maintain its current joint position, and refrain from moving towards dangerous areas, maximizing operational safety.

[0037] The technical solution of this invention obtains the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain; it obtains candidate motion trajectories within a preset trajectory time based on state continuity constraints, the reference endpoint state, and real-time joint pose; it performs security verification on the candidate motion trajectories through multi-dimensional security verification rules, and corrects the candidate motion trajectories when they fail the security verification. This configures the robot's trajectory planning to be executed by the controller, reducing the development threshold of user-side programs and the cost of cross-platform porting. Simultaneously, through macro-planning of the reference endpoint state and periodic trajectory interpolation, it achieves two-layer online trajectory generation. This allows for not only robot trajectory control through state preview time and tracking feedback gain, but also decouples target following anti-jitter, state look-ahead feedback functions from multi-order smooth trajectory interpolation functions, greatly improving the accuracy and safety of the robot trajectory planning results and reducing the debugging and porting costs of robot movement trajectories.

[0038] Example 2 Figure 2 This is a flowchart of a robot trajectory planning method provided in Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that the controller receives instructions through a non-real-time thread and then sends instructions through a real-time thread, such as... Figure 2 As shown, the method specifically includes: S201. Obtain control instructions through a non-real-time thread and write the control instructions into the target cache area; wherein, the control instructions include the target joint position.

[0039] The non-real-time thread is responsible for the interaction between the controller and the host computer and other external systems. The control commands sent by the host computer to the controller can include not only the target joint position, but also one or more of the following: runtime, status preview time, position tracking gain, target speed, target acceleration, target jump, and smoothing coefficient. After receiving the control commands, the controller stores the control commands in the target buffer area to avoid the host computer sending commands too frequently and too quickly, which would interfere with the real-time control of the motor.

[0040] S202. Based on a preset control cycle, the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain are obtained through a real-time thread.

[0041] The real-time thread is responsible for the interaction between the controller and the motor, and is also the core thread of motor control. It has a high priority to avoid lag. In each control cycle, the controller reads the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain through the real-time thread. Based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, it obtains the reference endpoint state. At the same time, within each preset trajectory time, it obtains candidate motion trajectories based on state continuity constraints, reference endpoint states, and real-time joint poses. In this way, the real-time thread ensures the timeliness of obtaining the reference endpoint set and candidate motion trajectories.

[0042] S203. Obtain the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain.

[0043] S204. Based on the state continuity constraint, the reference endpoint state, and the real-time joint pose, obtain the candidate motion trajectory within the preset trajectory time.

[0044] S205. Perform security verification on the candidate motion trajectory using multi-dimensional security verification rules, and correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

[0045] Optionally, in this embodiment of the invention, the step of acquiring the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain through a real-time thread based on a preset control cycle further includes: if it is determined that the control command interval is less than or equal to the preset control cycle, taking the most recent command in the time series of the target buffer region as the target control command, and acquiring the target joint position through the target control command; if it is determined that the control command interval is greater than the preset control cycle, acquiring a predicted motion trajectory based on historical trajectory parameters or real-time joint pose, and acquiring the target joint position based on the predicted motion trajectory.

[0046] Specifically, when the interval between control commands is less than or equal to the preset control cycle, that is, when the interval between two consecutive control commands is less than or equal to the controller's control cycle, multiple control commands will accumulate in the target buffer. The command closest to the current time in the time sequence can be selected as the target control command based on the timestamps of each command in the target buffer. Alternatively, each control command can be managed using a last-in-first-out (LIFO) queue in the target buffer, with the most recent command extracted from the LIFO queue serving as the target control command. Furthermore, each command entering the target buffer can be assigned an incrementing sequence number, with the command with the largest sequence number serving as the target control command. Based on this, the target joint position in the target control command can be extracted, avoiding abrupt changes in the robot's motion caused by a large accumulation of commands while ensuring accurate guidance of the target joint position.

[0047] When the interval between control commands exceeds the preset control cycle, that is, when the interval between two consecutive control commands exceeds the controller's control cycle, the controller will not wait for the host computer to issue new commands. Instead, it will obtain a predicted motion trajectory based on historical motion parameters reflecting historical motion patterns, or based on the current motion trend reflected by real-time joint poses. Then, it will obtain the target joint position based on the predicted motion trajectory, thus avoiding robot stuttering. Historical motion parameters can refer to the target joint position in the previous control command, which is used to interpolate, filter, and smooth the current motion trajectory by reusing the control command. Alternatively, they can refer to historical motion trends, which are used to obtain a predicted motion trajectory. The target joint position is then obtained based on the predicted motion trajectory. This avoids sudden acceleration / deceleration and shock / vibration of the motors due to the uncertainty of commands issued by the host computer, greatly improving the smoothness of the robot's movement and protecting the robot's mechanical structure.

[0048] The technical solution of this invention acquires control commands through a non-real-time thread and writes them into the target cache area, thereby avoiding excessively frequent and rapid command transmission from the host computer, which could interfere with the real-time control of the motor. Based on a preset control cycle, a real-time thread acquires the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, ensuring the timeliness of acquiring the reference endpoint set and candidate motion trajectories. Furthermore, it avoids sudden acceleration / deceleration and shock / jitter phenomena in the motor caused by the uncertainty of commands issued by the host computer, significantly improving the smoothness of the robot's movement and protecting the robot's mechanical structure.

[0049] Example 3 Figure 3 This is a flowchart of a robot trajectory planning method provided in Embodiment 3 of the present invention. The relationship between this embodiment and the above embodiments is that, based on the parameter underachievement error, error compensation is performed through multiple control cycles, such as... Figure 3 As shown, the method specifically includes: S301. Obtain the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain.

[0050] S302. Based on the state continuity constraint, the reference endpoint state, and the real-time joint pose, obtain the candidate motion trajectory within the preset trajectory time.

[0051] S303. Perform security verification on the candidate motion trajectory using multi-dimensional security verification rules, and correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

[0052] S304. Store the parameter under-arrival error within the current preset trajectory time into a preset cache area, so that in the next preset trajectory time, the reference endpoint state can be obtained based on the robot's real-time joint pose, target joint position, state preview time, tracking feedback gain, and the parameter under-arrival error; wherein, the parameter under-arrival error includes at least one of position error, velocity error, acceleration error, and jerk error.

[0053] After performing deceleration, scaling, and segmented retiming corrections on the candidate motion trajectory, the robot joints cannot reach the reference endpoint position within the state preview time due to speed limiting. This results in parameter under-arrival errors, including one or more of position, velocity, acceleration, and jerk errors. In this embodiment, the parameter under-arrival errors within the current preset trajectory time are stored in a preset buffer area. When the next preset trajectory time starts, the controller, in addition to reading the real-time joint pose, target joint position, state preview time, and tracking feedback gain, also reads the parameter under-arrival errors from the previous preset trajectory time and adds them to the feedforward and PD feedback calculations of OTG1. This regenerates a reference endpoint position that more closely matches the actual target joint position. This distributes the position error across multiple control cycles for gradual correction, avoiding sudden acceleration corrections and effectively suppressing mechanical vibration and overshoot.

[0054] Optionally, in this embodiment of the invention, before obtaining the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, the method further includes: obtaining a matching state preview time and tracking feedback gain based on the overshoot and settling time of the robot's running state parameters.

[0055] Specifically, overshoot refers to the difference between the highest historical value reached by the operating state parameter and the target value as the parameter approaches the target value; settling time refers to the time it takes for the operating state parameter to remain near the target value. Taking operating state parameters including speed as an example, when the speed reaches the target speed of 10 from 0, it will gradually rise from 0 to 10, and may even exceed 10 to reach a maximum of 15. Then, it will gradually decrease from 15 back to 10, and remain within the floating range of 10. The difference between the highest value of 15 and the target value of 10 is the overshoot, and the time it takes for the speed to remain stably within the floating range of 10 from 0 is the settling time.

[0056] Based on overshoot, settling time, or other operating states and performance indicators, the state preview time and position tracking gain can be determined through model calculation, experimental calibration, table lookup, segmentation rules, or optimization methods. Specifically, in some business scenarios, state preview time and position tracking gain may directly affect overshoot; that is, extending the state preview time will reduce overshoot, and increasing the position tracking gain will also reduce overshoot. Simultaneously, in this type of business scenario, position tracking gain also affects settling time; that is, increasing the position tracking gain will shorten the settling time. Therefore, based on the overshoot and settling time of the operating state parameters, the state preview time and position tracking gain can be solved in conjunction with matching calculation rules or numerical mapping tables. This ensures that the calculated state preview time and position tracking gain effectively reduce overshoot and guarantee a settling time of appropriate duration, avoiding both excessively fast settling times that could cause sudden shocks to the robot and excessively slow settling times that could reduce the robot's control efficiency.

[0057] Optionally, in this embodiment of the invention, the trajectory planning method for the robot further includes: in response to detecting an abnormal operating state of the robot, performing control rollback processing; wherein the abnormal operating state includes at least one of control command timing abnormality, host computer communication abnormality, thread calculation timeout abnormality, candidate motion trajectory solving abnormality, safety mode switching abnormality, and servo driver feedback abnormality; the control rollback processing includes at least one of maintaining the validity of historical control commands, reducing position tracking gain, deleting parameter under-delivery errors, reducing operating state parameters, and reporting alarm information.

[0058] Specifically, while planning the robot's movement trajectory, the system simultaneously monitors various operational states of the robot for any abnormalities. These include: control command timing anomalies (timestamps of control commands issued by the host computer being abnormal; since the timestamps of these commands are arranged in ascending order, if the timestamp of the current command is earlier than previously executed commands, there is clearly a timing anomaly); host computer communication anomalies (communication timeouts or disconnections between the controller and the host computer; these prevent the controller from timely acquiring the target joint positions issued by the host computer); thread calculation timeout anomalies (the controller cannot complete the calculation of candidate motion trajectories within the preset trajectory time when calculating the trajectory using real-time threads); candidate motion trajectory solving anomalies (no solution for candidate motion trajectories in the OTG2 stage, meaning no smooth trajectory satisfying the constraints exists); safety mode switching anomalies (the robot is suddenly switched from working mode to safety mode); and servo driver feedback anomalies (the servo driver reports a fault alarm).

[0059] For abnormal robot operation states, one or more of the above methods (i.e., combined use) can be used for control rollback. Specifically, maintaining the validity of historical control commands means pausing the acceptance of new control commands, keeping the control commands from the previous control cycle valid, and continuously outputting the previous compliant and smooth trajectory to prevent shocks caused by sudden motion changes; reducing position tracking gain means reducing the correction force, making the robot's movement smoother and significantly reducing the impact force on the robot body; deleting parameter under-delay errors means deleting the parameter under-delay errors used as compensation to avoid excessive deviations causing jitter after fault recovery; reducing operating state parameters means tightening the acceleration and jump limits to generate a smooth deceleration trajectory, ensuring a gentle stop and avoiding sudden braking impacts; and reporting alarm information means uploading the fault type, abnormal time, and trigger channel to the host computer's program interface for subsequent maintenance and troubleshooting. Therefore, the control rollback processing based on the detection and execution of abnormal robot operation states allows for flexible degradation actions to protect the robot structure and avoid sudden braking impacts when sudden failures occur in communication, computing, or hardware.

[0060] The technical solution of this invention, after correcting the candidate motion trajectory, stores the parameter under-reach error within the current preset trajectory time in a preset cache area, so that in the next preset trajectory time, the reference endpoint state can be obtained based on the robot's real-time joint pose, target joint position, state preview time, tracking feedback gain, and parameter under-reach error; thereby, the position error is distributed over multiple control cycles for slow correction, avoiding sudden acceleration correction and effectively suppressing mechanical vibration and overshoot.

[0061] Example 4 Figure 4 This is a structural block diagram of a robot trajectory planning device provided in Embodiment 4 of the present invention. The device specifically includes: The reference endpoint acquisition module 401 is used to acquire the reference endpoint status based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain. The candidate trajectory acquisition module 402 is used to acquire candidate motion trajectories within a preset trajectory time according to the state continuity constraint, the reference endpoint state and the real-time joint pose. The trajectory correction execution module 403 is used to perform security verification on the candidate motion trajectory through multi-dimensional security verification rules, and to correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

[0062] The technical solution of this invention obtains the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain; it obtains candidate motion trajectories within a preset trajectory time based on state continuity constraints, the reference endpoint state, and real-time joint pose; it performs security verification on the candidate motion trajectories through multi-dimensional security verification rules, and corrects the candidate motion trajectories when they fail the security verification. This configures the robot's trajectory planning to be executed by the controller, reducing the development threshold of user-side programs and the cost of cross-platform porting. Simultaneously, through macro-planning of the reference endpoint state and periodic trajectory interpolation, it achieves two-layer online trajectory generation. This allows for not only robot trajectory control through state preview time and tracking feedback gain, but also decouples target following anti-jitter, state look-ahead feedback functions from multi-order smooth trajectory interpolation functions, greatly improving the accuracy and safety of the robot trajectory planning results and reducing the debugging and porting costs of robot movement trajectories.

[0063] Optionally, the robot's trajectory planning device is further configured to acquire control commands through a non-real-time thread and write the control commands into a target cache area; wherein the control commands include target joint positions; and acquire the robot's real-time joint poses, target joint positions, state preview times, and tracking feedback gains through a real-time thread based on a preset control cycle.

[0064] Optionally, the robot's trajectory planning device is further configured to, if the control command interval is determined to be less than or equal to the preset control period, take the most recent command in the time sequence of the target buffer area as the target control command and obtain the target joint position through the target control command; if the control command interval is determined to be greater than the preset control period, obtain a predicted motion trajectory based on historical trajectory parameters or real-time joint pose, and obtain the target joint position based on the predicted motion trajectory.

[0065] Optionally, the robot's trajectory planning device is also used to obtain a matching state preview time and tracking feedback gain based on the overshoot and settling time of the robot's operating state parameters.

[0066] Optionally, the robot's trajectory planning device is further configured to store the parameter under-arrival error within the current preset trajectory time into a preset cache area, so as to obtain the reference endpoint state in the next preset trajectory time based on the robot's real-time joint pose, target joint position, state preview time, tracking feedback gain, and the parameter under-arrival error; wherein the parameter under-arrival error includes at least one of position error, velocity error, acceleration error, and jerk error.

[0067] Optionally, the robot's trajectory planning device is further configured to perform control rollback processing in response to detecting an abnormal operating state of the robot; wherein the abnormal operating state includes at least one of control command timing abnormality, host computer communication abnormality, thread calculation timeout abnormality, candidate motion trajectory solving abnormality, safety mode switching abnormality, and servo driver feedback abnormality; the control rollback processing includes at least one of maintaining the validity of historical control commands, reducing position tracking gain, deleting parameter under-delivery errors, reducing operating state parameters, and reporting alarm information.

[0068] The above-described apparatus can execute the robot trajectory planning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the robot trajectory planning method provided in any embodiment of the present invention.

[0069] Example 5 Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0070] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0071] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0072] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as trajectory planning methods for robots.

[0073] In some embodiments, the robot trajectory planning method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed on a heterogeneous hardware accelerator via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the robot trajectory planning method described above can be performed. Alternatively, in other embodiments, the processor can be configured to execute the robot trajectory planning method by any other suitable means (e.g., by means of firmware).

[0074] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0075] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0076] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0077] To provide user interaction, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the heterogeneous hardware accelerator. Other types of devices can also be used to provide user interaction; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback); and input from the user can be received in any form (including sound input, voice input, or haptic input).

[0078] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0079] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0080] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0081] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A trajectory planning method for a robot, characterized in that, Configured on the controller, including: The reference endpoint state is obtained based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain. Based on the state continuity constraint, the reference endpoint state, and the real-time joint pose, obtain the candidate motion trajectory within a preset trajectory time. The candidate motion trajectory is subjected to security verification through multi-dimensional security verification rules, and the candidate motion trajectory is corrected when it is determined that the candidate motion trajectory fails the security verification.

2. The trajectory planning method for a robot according to claim 1, characterized in that, The trajectory planning method for the robot also includes: Control commands are acquired via a non-real-time thread and written to a target cache area; wherein, the control commands include target joint positions; Based on a preset control cycle, the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain are acquired through a real-time thread.

3. The trajectory planning method for a robot according to claim 2, characterized in that, The method of acquiring the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain through a real-time thread based on a preset control cycle also includes: If the control command interval is determined to be less than or equal to the preset control period, the command with the latest time sequence in the target buffer area is taken as the target control command, and the target joint position is obtained through the target control command. If the control command interval is determined to be greater than the preset control cycle, a predicted motion trajectory is obtained based on historical trajectory parameters or real-time joint pose, and the target joint position is obtained based on the predicted motion trajectory.

4. The trajectory planning method for a robot according to claim 1, characterized in that, Before obtaining the reference endpoint state based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain, the following steps are also included: Based on the overshoot and settling time of the robot's operating state parameters, obtain the matching state preview time and tracking feedback gain.

5. The trajectory planning method for a robot according to claim 1, characterized in that, After correcting the candidate motion trajectory, the process also includes: The parameter underachievement error within the current preset trajectory time is stored in a preset cache area so that, in the next preset trajectory time, the reference endpoint state can be obtained based on the robot's real-time joint pose, target joint position, state preview time, tracking feedback gain, and the parameter underachievement error; wherein, the parameter underachievement error includes at least one of position error, velocity error, acceleration error, and jerk error.

6. The trajectory planning method for a robot according to claim 1, characterized in that, The trajectory planning method for the robot also includes: In response to the detection of an abnormal operating state of the robot, a control rollback process is executed; wherein, the abnormal operating state includes at least one of the following: control command timing abnormality, host computer communication abnormality, thread calculation timeout abnormality, candidate motion trajectory solving abnormality, safety mode switching abnormality, and servo driver feedback abnormality; the control rollback process includes at least one of the following: keeping historical control commands valid, reducing position tracking gain, deleting parameter under-delivery error, reducing operating state parameters, and reporting alarm information.

7. A trajectory planning device for a robot, characterized in that, include: The reference endpoint acquisition module is used to acquire the reference endpoint status based on the robot's real-time joint pose, target joint position, state preview time, and tracking feedback gain. The candidate trajectory acquisition module is used to acquire candidate motion trajectories within a preset trajectory time based on the state continuity constraint, the reference endpoint state, and the real-time joint pose. The trajectory correction execution module is used to perform security verification on the candidate motion trajectory through multi-dimensional security verification rules, and to correct the candidate motion trajectory when it is determined that the candidate motion trajectory has failed the security verification.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that is executed by the at least one processor, such that the at least one processor is able to perform the trajectory planning method for the robot according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the trajectory planning method of the robot according to any one of claims 1-6.

10. A computer program product comprising a computer program that, when executed by a processor, implements the trajectory planning method for the robot according to any one of claims 1-6.