A robot motion limiting method based on virtual-real linkage early warning triggering

CN122463177BActive Publication Date: 2026-09-25STATE GRID SHANXI MARKETING SERVICE CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610925552.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-09-25
Estimated Expiration
2046-06-25

AI Technical Summary

Technical Problem

[0005]为此,本发明所要解决的技术问题在于克服现有技术中预警信号发出后无法有效转化为对实体机器人关节运动范围和加速度的精确限制、且缺乏对限制参数的虚拟验证导致碰撞依然发生的缺陷,提供一种基于虚实联动预警触发的机器人运动限制方法,能够将预警信号转化为经过虚拟验证的关节范围与加速度双重限制,使机器人在碰撞时间窗内平滑减速并避开障碍物

Benefits of technology

本发明所述的基于虚实联动预警触发的机器人运动限制方法,通过虚实联动预警机制,在电表箱等狭小复杂空间内,能够及时响应潜在碰撞预警。通过获取实体机器人的当前运动参数和预测碰撞参数,并结合预训练模型生成优化限制参数,实现了对机器人关节运动范围和加速度的精确、动态调整。在虚拟环境中进行模拟验证,确保了限制参数的有效性,从而将优化限制参数转化为底层驱动指令,有效控制实体机器人进行平稳减速和运动范围限制,显著降低了在电表箱内作业时的碰撞风险,提升了机器人操作的安全性与精准性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122463177B_ABST
    Figure CN122463177B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot motion control, and discloses a robot motion limiting method based on virtual-real linkage early warning triggering, which comprises the following steps: in response to a collision early warning signal in a virtual environment, current motion parameters of a physical robot and predicted collision parameters containing an estimated collision time window and an affected joint are acquired; according to the estimated collision time window and the affected joint, a high-risk motion parameter set containing an allowed motion range upper limit value and an allowed acceleration upper limit value is determined; the set and the current motion parameters are input into a pre-trained motion limiting model to obtain a corrected motion range upper limit value and a corrected acceleration decay curve; optimized parameters are simulated in the virtual environment and are converted into bottom-layer driving instructions; and the corresponding joint is controlled to execute the driving instructions before the start of the collision time window. The application can convert the early warning signal into double limiting of the joint range and acceleration verified by the virtual environment, so that the robot can smoothly decelerate and reliably avoid obstacles within the collision time window.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot motion control technology, and in particular to a method for limiting robot motion based on virtual-real linkage early warning triggering. Background Technology

[0002] In the construction of smart grids, robots are gradually being introduced into the automated operation of meter boxes. The interior space of a meter box is confined, filled with wiring terminals, metal rails, and communication harnesses, placing extremely high demands on the precision and safety of robot motion control. Virtual-real linkage technology, which monitors the physical robot in real time through a virtual environment and issues warnings before collisions occur, is considered a key means to solve the problem of safe robot operation within meter boxes.

[0003] Currently, most methods for robot collision warning rely on preset rules or simple distance detection. This approach often fails to adapt to complex dynamic environments, especially in scenarios involving multi-robot collaboration or human-robot interaction, where the accuracy and timeliness of warnings are difficult to guarantee. Existing solutions often fall short in the face of sudden changes due to a lack of in-depth intervention in the robot's motion state. As a result, while warning signals can be issued, they cannot be effectively translated into actual restrictions on the physical robot, leaving safety hazards unresolved.

[0004] A deeper challenge lies in seamlessly integrating early warning information from the virtual environment with the motion control of the physical robot. Potential collision locations calculated in the virtual environment need to be translated into control parameters executable by the physical robot. This process involves precisely limiting the range of motion of the robot's joints, and this limitation must be achieved without affecting the robot's normal operation. If this translation is not handled properly, the robot may maintain its original speed and path even when approaching a danger zone, thus increasing the risk of collision. Furthermore, this translation also involves the dynamic adjustment of the robot's acceleration. Improper adjustment can lead to stiff or sluggish robot movements, affecting the smoothness of task execution. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the defects in the prior art that the warning signal cannot be effectively converted into a precise limitation on the joint range of motion and acceleration of the physical robot after it is issued, and the lack of virtual verification of the limitation parameters leads to the collision still occurring. The present invention provides a robot motion limitation method based on virtual and real linkage warning trigger, which can convert the warning signal into a dual limitation of joint range and acceleration after virtual verification, so that the robot can smoothly decelerate and avoid obstacles within the collision time window.

[0006] To address the aforementioned technical problems, this invention provides a robot motion restriction method based on virtual-real linkage early warning triggering, comprising the following steps: In response to collision warning signals generated in the virtual environment for the physical robot, the current motion parameters and predicted collision parameters of the physical robot are obtained. The predicted collision parameters include the estimated collision time window and the estimated impact joints of the collision. Based on the estimated collision time window and the estimated impact joints, a set of high-risk motion parameters is determined. The set of high-risk motion parameters includes the upper limit of the allowable range of motion and the upper limit of the allowable acceleration of the joints affected by the estimated collision. The high-risk motion parameter set and the current motion parameters of the physical robot are input into the pre-trained motion constraint model to obtain optimized constraint parameters. The optimized constraint parameters include: the upper limit of the range of motion of the joints and the modified acceleration decay curve for the joints affected by the estimated collision. The optimized constraint parameters are simulated in a virtual environment to obtain the simulated motion trajectory; Determine whether the simulated motion trajectory collides with obstacles in the virtual environment. If it is determined that no collision occurs, convert the optimized constraint parameters into the underlying drive instructions of the physical robot. Based on the underlying drive instructions, the corresponding joints of the physical robot are controlled to decelerate according to the corrected acceleration decay curve before reaching the start time of the estimated collision time window, and the range of motion of the joints is limited to the upper limit of the corrected range of motion.

[0007] In one embodiment of the present invention, the estimated collision time window is calculated through the following steps: Obtain the current Euclidean distance d between the robot end effector and the nearest obstacle in the virtual environment, and the relative velocity v of the robot end effector in the current direction of motion; According to the formula Δt c =d / v calculates the nominal collision time; Obtain the time step Δt of a single sampling in the virtual simulation system s According to the formula N=floor(Δt) c / Δt s Calculate the remaining number of steps, where floor represents the floor function; Obtain the system delay step D required from the issuance of the virtual warning to the start of the physical robot's response, where D takes a value of 2 to 3; Set the start time T of the time window s =(ND)×Δt s The end time T of the time window e =N×Δt s When T s If it is less than or equal to zero, set it to zero; The estimated collision time window is from T s To T e The time interval.

[0008] In one embodiment of the present invention, the estimated impact joint is determined through the following steps: In the virtual environment, each joint is traversed sequentially from the robot base towards the end effector. For the i-th joint being traversed, the rotation axis direction vector of the joint in the current pose and the direction vector from the joint's centroid to the nearest obstacle are obtained, and the angle θ between the two is calculated. i ; If θ i If the angle is less than 90 degrees and the current angular velocity of the joint is pointing towards the obstacle, the joint is marked as a potentially impactful joint. Among all potentially affected joints, the joint closest to the obstacle is selected as the primary affected joint. The primary affected joint and all its downstream joints along the kinetic chain toward the end are included in the estimated impact joints.

[0009] In one embodiment of the present invention, the upper limit of the permissible range of motion is determined in the following manner: For each joint in the predicted collision impact joints, obtain the actual angle value q of the joint in the current pose. a And the critical angle value q when a joint comes into contact with the nearest obstacle in a virtual environment. c ; Set a safety margin Δq, where the safety margin is the critical angle value q. c Compared with the actual angle value q a The difference is 20%, but not exceeding 5°; If the critical angle value q c Compared with the actual angle value q a If the absolute value of the difference is less than 1°, then the upper limit of the allowed range of motion is set to the current actual angle value q. a ; Otherwise, if the critical angle value q c Greater than the actual angle value q a Then the upper limit of the allowed range of motion is set to the critical angle value q. c Subtract the safety margin Δq; if the critical angle value q c Less than the actual angle value q a Then the upper limit of the allowed range of motion is set to the critical angle value q. c Add Δq.

[0010] In one embodiment of the present invention, the upper limit of the allowable acceleration is determined in the following manner: Obtain the length of the estimated collision time window and the angular velocity of the corresponding joint of the robot at the current moment; The desired angular velocity at the point of stopping is set to zero. Based on the estimated length of the collision time window and the current angular velocity, the theoretical deceleration value required for the joint to stop just at the end of the time window is calculated in reverse. Obtain the absolute value of the maximum braking deceleration allowed by the robot actuator itself, and take the smaller of the theoretical deceleration value and the maximum braking deceleration value as the first candidate value; Obtain the upper limit of the comfortable deceleration that will not trigger a vibration alarm during normal operation of the robot. Take the smaller of the first candidate value and the upper limit of the comfortable deceleration as the upper limit of the allowable acceleration. A negative upper limit of the allowable acceleration indicates that the direction of acceleration is opposite to the direction of motion.

[0011] In one embodiment of the present invention, the pre-trained motion constraint model is obtained in advance through the following steps: Collect recorded data before and after multiple collision warnings during the robot's historical movement. Each record includes: joint angle vector, joint angular velocity vector at the moment of collision warning, estimated collision time window, joint identifier of estimated collision impact, and label of whether the collision actually occurred. For each record that did not collide, the upper limit values ​​of the joint angles and the upper limit values ​​of the acceleration in the record are marked as positive samples in the optimized output. For each record where a collision occurs, adjust the upper limit values ​​of the joint angle and acceleration before the collision until no more collisions occur in the virtual simulation, and mark the adjusted values ​​as the corrected output of the negative sample. Using joint angle vectors, joint angular velocity vectors, estimated collision time windows, and estimated collision impact joint labels as inputs, and joint angle upper limits and acceleration upper limits as outputs, a multi-layer fully connected neural network is used for regression training. The training loss function is the mean square error between the predicted value and the labeled output value. After training, a pre-trained motion constraint model is obtained.

[0012] In one embodiment of the present invention, the corrected acceleration decay curve is a piecewise linear curve with time as the independent variable and acceleration as the dependent variable, generated through the following steps: Obtain the upper limit of allowable acceleration as the starting acceleration value of the curve, and set the deceleration target value to zero acceleration as the ending acceleration value of the curve; The estimated collision time window is evenly divided into K time intervals, where K is an integer between 3 and 10. At the end of each subsequent time interval, the acceleration value is reduced by a fixed ratio relative to the acceleration value at the end of the previous time interval, so that the acceleration decays to zero at the end of the last time interval. By connecting the acceleration values ​​between two adjacent time points using linear interpolation, a complete piecewise linear curve is obtained.

[0013] In one embodiment of the present invention, simulating the execution of optimization constraint parameters in a virtual environment specifically includes: Apply the modified upper limit of the range of motion to the affected joints of the virtual robot, temporarily limiting the range of motion of the joints to within the modified upper limit. The corrected acceleration decay curve is used as the driving input for the virtual robot, and the corresponding joint movement of the virtual robot is driven in a time-step manner starting from the current moment. At each time step, the joint angular velocity of the virtual robot is updated based on the acceleration value corresponding to the current acceleration decay curve, and then the joint angle value is updated based on the updated angular velocity. Repeat the above time stepping until the end of the estimated collision time window is reached or the virtual robot stops moving. Record the sequence of changes in the joint angle values ​​of the virtual robot over time as a simulated motion trajectory.

[0014] In one embodiment of the present invention, determining whether the simulated motion trajectory collides with an obstacle in the virtual environment includes: In the virtual environment, the optimization constraint parameters are executed step by step at the simulation time step, and the minimum distance between all links of the robot and all obstacles in the virtual environment is calculated after each step. If the minimum distance between a link and an obstacle is less than zero, it is determined that a penetration collision has occurred, and the collision determination result is output directly. If all minimum distances are greater than or equal to zero, but there is a minimum distance that is less than the preset safety gap threshold, then it is determined to be an approach collision, and the collision determination result is also output. If all minimum distances are greater than or equal to the safety gap threshold, then a collision is determined not to have occurred.

[0015] In one embodiment of the present invention, after determining whether the simulated motion trajectory collides with an obstacle in the virtual environment, if a collision is determined to have occurred, the following rollback steps are executed: The collision determination result is fed back to the pre-trained motion constraint model, triggering the model to regenerate a new set of optimized constraint parameters. In the new optimized constraint parameters, the upper limit of the corrected motion range is shrunk by an additional 5% on the original value, and the new corrected acceleration decay curve reduces the acceleration target value at the end of each time interval by an additional 10% on the original curve. The new optimization constraint parameters are simulated again in the virtual environment and it is determined whether a collision occurs. This process is repeated until the simulation determines that no collision occurs, or the number of repetitions reaches the preset upper limit. If a collision-free simulation result is not obtained after reaching the maximum number of attempts, an emergency stop command is issued to the physical robot to prevent it from continuing to move in the warning direction.

[0016] The technical solution of the present invention has the following advantages compared with the prior art: The robot motion restriction method based on virtual-real linkage early warning triggering described in this invention can respond promptly to potential collision warnings in confined and complex spaces such as meter boxes through a virtual-real linkage early warning mechanism. By acquiring the current motion parameters and predicted collision parameters of the physical robot and combining them with a pre-trained model to generate optimized restriction parameters, precise and dynamic adjustment of the robot's joint range of motion and acceleration is achieved. Simulation verification in a virtual environment ensures the effectiveness of the restriction parameters, thereby translating the optimized restriction parameters into low-level drive commands, effectively controlling the physical robot to perform smooth deceleration and limit its range of motion, significantly reducing the collision risk when working inside meter boxes, and improving the safety and accuracy of robot operation. Attached Figure Description

[0017] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of the steps of the robot motion restriction method based on virtual-real linkage early warning triggering of the present invention; Figure 2 This is a flowchart of the steps for calculating the estimated collision time window in this invention; Figure 3 This is a flowchart of the steps in this invention to determine the estimated impact of a collision on the joint; Figure 4 This is a flowchart of the steps in this invention to determine the upper limit of the allowable range of motion; Figure 5 This is a flowchart of the steps in this invention to determine the upper limit of allowable acceleration; Figure 6 This is a flowchart illustrating the steps involved in constructing a pre-trained motion-constrained model according to the present invention. Figure 7 This is a flowchart of the steps in determining the corrected acceleration decay curve according to the present invention; Figure 8 This is a flowchart illustrating the steps of simulating the execution of optimization constraint parameters in a virtual environment according to the present invention; Figure 9 This is a flowchart illustrating the steps of the present invention to determine whether a simulated motion trajectory collides with an obstacle in a virtual environment. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0019] Reference Figure 1As shown, this application proposes a robot motion constraint method based on virtual-real linkage early warning triggering. Through a closed-loop process with virtual verification steps, the early warning information in the virtual space is transformed layer by layer into safe and smooth motion constraints that can be executed by the physical robot.

[0020] First, when the virtual environment detects a potential collision and issues a warning signal, it does not immediately intervene in the robot. Instead, it performs a crucial preprocessing step: in response to the warning signal, it acquires the current motion parameters of the physical robot and predicted collision parameters. These predicted collision parameters specifically include the estimated collision time window and the estimated joints affected by the collision. The technical significance of this step lies in breaking down the vague information of an impending collision, as presented in traditional solutions, into two quantifiable physical quantities: how much time is left before a collision (time window), and which joint(s) or joints are causing the collision risk (list of affected joints). Taking operation inside an electrical meter box as an example, when the robot's gripper approaches the wiring terminal, this method can identify that the risk mainly stems from wrist joint rotation rather than upper arm translation. This lays the foundation for subsequent fine-grained constraints, avoiding the stiff movements caused by applying a one-size-fits-all limitation to all joints.

[0021] Next, based on the estimated collision time window and the list of affected joints, the set of high-risk motion parameters is further determined, and the upper limits of the allowable range of motion and allowable acceleration of the affected joints are clearly given. This step essentially transforms the warning information into two hard physical boundaries. In traditional solutions, after a warning, the system often doesn't know how much deceleration is safe. However, this step, through the time window and affected joints, can dynamically calculate the maximum acceleration that each risky joint should not exceed in the current state, as well as the safe upper limit of the joint angle. For example, if the time window is very short (imminent collision), the allowable acceleration upper limit will be set very low, forcing the robot to stop with a gentler deceleration; if the time window is long, a higher acceleration upper limit can be maintained to avoid unnecessary excessive deceleration affecting operational efficiency. This fundamentally solves the contradiction of slow response or insufficient deceleration caused by improper transformation.

[0022] Then, the method inputs the set of high-risk motion parameters and the current motion parameters into a pre-trained motion constraint model. The model outputs an optimized upper limit of the corrected motion range and a corrected acceleration decay curve. Unlike existing technologies that use fixed deceleration curves or simple distance-velocity linear mappings, the pre-trained model can learn the optimal trade-offs under different working conditions. For example, at a narrow corner inside an electrical meter box, the model may output an asymmetric acceleration decay curve that is gentler at the beginning and steeper at the end, allowing the robot to smoothly enter the danger zone and then quickly stop, ensuring both smoothness and safety. This step directly addresses the lack of deep intervention in the robot's motion state, upgrading the early warning process from open-loop rule judgment to closed-loop optimization decision-making.

[0023] After the optimized parameters are generated, they are not sent directly to the physical robot. Instead, the optimized constraint parameters are simulated in a virtual environment, and the system determines whether the simulated motion trajectory collides with obstacles. This is equivalent to a risk-free rehearsal before the physical action occurs. If the simulation shows that the robot still rubs against adjacent wiring harnesses or terminals even when operating according to the corrected acceleration curve and joint range, the system will not send out the parameters. This avoids the situation in traditional solutions where a warning is issued, a deceleration command is executed, and a collision still occurs. This step transforms the open-loop intervention of existing technology into closed-loop verification, which is the core safety barrier to ensure that the warning is effectively translated into actual constraints.

[0024] Only when the simulation determines there is no collision risk does the method convert the optimized constraint parameters into low-level drive commands for the physical robot. This ultimately controls the corresponding joints to smoothly decelerate according to the corrected acceleration decay curve before the estimated collision time window begins, while strictly limiting the joint's range of motion within the corrected upper limit. This time constraint before the start of the time window is particularly crucial, ensuring that the deceleration action is not hastily completed in the instant before collision, but rather has sufficient time leeway. Combined with the successful results of previous virtual verification, this step ensures that every warning response from the physical robot is a pre-confirmed, sufficiently smooth, and safe action that will not cause secondary risks due to joint overstepping.

[0025] In summary, the technical solution of this application achieves the following beneficial effects through a series of process steps: structured decomposition of early warning information, dynamic calculation of security boundaries, model optimization to generate correction parameters, closed-loop verification in a virtual environment, and time-constrained low-level execution: First, by precisely locking down the joints that affect the robot and optimizing their range of motion individually, the robot avoids stiff movements caused by global amplitude limiting, and can maintain dexterity close to that of human operation in confined spaces such as meter boxes. Second, by using the optimized acceleration decay curve output by the model, instead of a fixed or linear deceleration, the deceleration process is both smooth (avoiding vibration that could cause adjacent terminals to loosen) and efficient (avoiding excessive deceleration that would waste time). Third, the introduction of the virtual verification process elevates the intervention after the warning from an open-loop instruction to a closed-loop guarantee, ensuring that every issued restriction parameter has undergone collision-free confirmation, thereby truly realizing the leap from simply issuing alarms to ensuring safety through virtual-real linkage.

[0026] In practical applications, the accuracy and timeliness of the estimated collision time window in the collision prediction parameters are crucial to the effectiveness of the entire motion restriction strategy. If the estimated collision time window is not calculated accurately enough or fails to fully account for the system response delay, it may result in an early warning that affects the robot's normal operating efficiency, or an early warning that fails to provide the robot with sufficient reaction time to avoid a collision, thereby affecting the reliability of motion restriction.

[0027] Reference Figure 2 As shown, this application further proposes a method for calculating the estimated collision time window, which specifically includes the following steps: First, the current Euclidean distance *d* between the robot's end effector and the nearest obstacle in the virtual environment, and the relative velocity *v* of the robot's end effector in the current direction of motion, are obtained. The current Euclidean distance *d* refers to the straight-line distance between the geometric center point or its envelope of the robot's end effector and the nearest obstacle in the virtual simulation environment. This distance can be calculated in real-time using the geometric model of the virtual environment and a collision detection algorithm, and is used to quantify the spatial proximity between the robot and the obstacle. The relative velocity *v* refers to the approach speed of the robot's end effector relative to the nearest obstacle in the current direction of motion. This velocity can be calculated using the robot's kinematic model combined with the obstacle state in the virtual environment, and is used to quantify the rate at which the robot approaches the obstacle.

[0028] Secondly, according to the formula Δt c =d / v to calculate the nominal collision time. The nominal collision time Δt c This represents the theoretical time required for the robot's end effector to come into contact with an obstacle, given the current speed and distance, assuming the robot maintains its current state of motion. This calculation provides a preliminary, idealized estimate of the collision time.

[0029] Next, the time step Δt of a single sampling in the virtual simulation system is obtained. s And according to the formula N=floor(Δt) c / Δt s Calculate the remaining number of steps, where floor represents the floor function. The time step Δt for a single sample in the virtual simulation system. s The time interval required for a single state update in the virtual environment determines the discreteness of the simulation process. This is expressed as the nominal collision time Δt. c Divide by the time step Δt s By rounding down, we can obtain the discrete simulation steps N required for the robot to reach the nominal collision point at the current simulation step size.

[0030] Next, the system delay step number D required from the issuance of the virtual warning to the start of the physical robot's response is obtained, with D ranging from 2 to 3. The system delay step number D takes into account the inherent time delay in the actual system between the detection of a potential collision and the issuance of a warning signal in the virtual environment and the receipt of the instruction by the physical robot and the commencement of its response action. This delay includes communication latency, computational processing latency, and the response time of the robot's actuators. Setting D to 2 to 3 simulation steps is based on experience or actual testing to ensure the practicality of the warning.

[0031] Finally, set the start time T of the time window. s =(ND)×Δt s The end time T of the time window e =N×Δt s When T s If the value is less than or equal to zero, it is set to zero. The estimated collision time window is from T... s To T e The time interval. The start time T of the time window. s By subtracting the system delay steps D from the total remaining steps N, and then multiplying by the time step Δt s This ensures that the warning is issued before the physical robot can begin responding. The time window ends at time T. e This corresponds to the nominal collision time. If the calculated T... s If the value is less than or equal to zero, it is set to zero to ensure that the start time of the time window is always valid and not negative. This avoids the situation where the start time is calculated as negative due to the introduction of the delay step number D when the robot is already very close to the obstacle, thus ensuring the rationality of the time window.

[0032] In robot motion constraint methods based on virtual-real linkage early warning triggers, accurately identifying which joints may cause collisions is crucial. Failure to accurately determine the joints that are expected to be affected by collisions may result in an overly conservative motion constraint strategy, unnecessarily restricting the movement of multiple robot joints and thus reducing operational efficiency; or, failure to identify all critical collision-affected joints may lead to insufficient constraint, failing to effectively prevent actual collisions from occurring.

[0033] Reference Figure 3 As shown, this application further proposes a method for determining the joints affected by collisions, specifically including: in a virtual environment, traversing each joint sequentially from the robot base towards the end effector; for the i-th joint currently traversed, obtaining the rotation axis direction vector of the joint in the current pose and the direction vector from the joint's centroid to the nearest obstacle, and calculating the angle θ between the two. i If θ iIf the angle is less than 90 degrees and the current angular velocity direction of the joint is pointing towards the obstacle, the joint is marked as a potential impact joint. Among all potential impact joints, the joint closest to the obstacle is selected as the primary impact joint, and the primary impact joint and all its downstream joints along the kinematic chain toward the end are included in the estimated impact joints.

[0034] To systematically assess the probability of collisions between each joint of the robot and obstacles, this application examines each joint one by one in a virtual environment, starting from the robot base and proceeding along the robot's kinematic chain. This traversal method ensures that all joints that may affect collisions are considered, avoiding the omission of critical joints and providing a comprehensive foundation for subsequent collision risk assessment. When traversing to the i-th joint, the system first obtains the precise pose information of that joint at the current moment and determines the direction vector of its rotation axis based on this. Simultaneously, to assess the relative positional relationship between the joint and obstacles, the system also obtains the direction vector from the joint's centroid to the nearest obstacle in the virtual environment. The angle θ between these two direction vectors is then calculated. i This allows for the quantification of the correlation between the joint's motion tendency and the obstacle's direction. For example, a smaller included angle θ... i This indicates that the joint's rotation axis is closer to the obstacle's direction, making its movement more likely to result in contact with the obstacle. When the calculated angle θ... iWhen the angle is less than 90 degrees, it indicates that the rotation axis of the joint has a certain directional relationship with the obstacle. Based on this, it is further determined whether the current angular velocity direction of the joint points towards the obstacle. If both conditions are met simultaneously—that is, both the joint's tendency and actual direction of motion are towards the obstacle—then the joint is initially identified as a potentially impactful joint. This judgment logic effectively filters out joints that do indeed pose a collision risk in their current motion state, avoiding misclassifying joints unrelated to the obstacle's direction of motion as high-risk joints. After identifying all potentially impactful joints, to prioritize the most pressing collision risks, this application further selects the joint with the smallest Euclidean distance to the nearest obstacle in the virtual environment from among these potentially impactful joints, identifying it as the primary impactful joint. This aims to focus on the joints most directly and most likely to cause collisions, thereby making subsequent motion restriction strategies more targeted. Because the motion of robot joints is interconnected, the motion of an upstream joint directly affects the pose of all its downstream joints. Therefore, to ensure the comprehensiveness of collision warning and the effectiveness of motion restriction, once the major affected joints are identified, this application not only includes them in the estimated collision-affected joints but also includes all downstream joints along the robot's kinematic chain towards the end effector. This approach ensures that when motion restriction is applied to the major affected joints, the linked motion of their downstream joints is also fully considered and restricted, thereby avoiding accidental collisions caused by the inertia or linkage effects of downstream joints.

[0035] In some of the above implementations, it is necessary to determine a set of high-risk motion parameters, including an upper limit of the allowable range of motion, based on the estimated collision time window and the estimated impact joints on the collision. However, if the method for determining the upper limit of the allowable range of motion is not precise enough or lacks adaptability, it may result in overly conservative robot motion restrictions, affecting operational efficiency, or insufficient restrictions, failing to effectively avoid potential collisions, thereby affecting the safety and reliability of robot operations. (Refer to...) Figure 4 As shown, this application further proposes that the upper limit of the permissible range of motion be determined in the following manner: First, for each joint in the predicted collision impact joints, obtain the actual angle value q of the joint in the current pose. a And the critical angle value q when a joint comes into contact with the nearest obstacle in a virtual environment. c Among them, the actual angle value q a This refers to the actual angular position of a robot joint at a given moment, typically acquired in real-time via the robot's encoder or position sensors, reflecting the joint's instantaneous motion state. The critical angle value q... cThis is a key parameter obtained through precise collision detection in a virtual simulation environment. It represents the joint angle value in the virtual environment when the joint is about to make physical contact with or has just made contact with the nearest obstacle. (Obtaining the critical angle value q) c Typically, it is necessary to use geometric models and collision detection algorithms in a virtual environment to calculate the joint angle boundaries that cause collisions through methods such as inverse kinematics or iterative search.

[0036] Secondly, a safety margin Δq is set, and the value of the safety margin is the critical angle value q. c Compared with the actual angle value q a The difference must be 20%, but not exceeding 5°. The safety margin Δq is introduced to provide an additional buffer zone for robot motion, to cope with factors such as model uncertainties, sensor measurement errors, system response delays, and dynamic environmental changes that may exist in actual operation. The safety margin Δq is set as the critical angle value q. c Compared with the actual angle value q a The 20% difference means that the safety margin is dynamically adjusted, and its size is related to the distance between the robot and the collision. The farther the distance, the larger the safety margin may be, and vice versa. At the same time, setting an upper limit of no more than 5° is to avoid excessive safety margin in some cases, which would lead to excessive restriction on the robot's movement. This ensures that the robot's operational efficiency and flexibility are maintained as much as possible while ensuring safety.

[0037] Secondly, based on the actual angle value q a and critical angle value q c The relationship between these factors determines the upper limit of the permissible range of motion. Specifically, the critical angle value q is determined first. c Compared with the actual angle value q a Check if the absolute value of the difference is less than 1°. If the absolute value of the difference is less than 1°, it means that the robot joint's current position almost coincides with the collision threshold, and it is already in an emergency state at the edge of collision. In this case, directly set the upper limit of the allowed range of motion to the current actual angle value q. a This means forcing the joint to stop at its current angle, prohibiting it from moving in any direction to avoid a collision. This priority mechanism ensures that the most conservative safety strategy is adopted in the most dangerous situation.

[0038] After ruling out the aforementioned emergency situations, the critical angle value q was further determined. c Compared with the actual angle value q a The magnitude relationship. If the critical angle value q c Greater than the actual angle value q aThis indicates that the joint is currently positioned before the collision threshold and still has room to move in the positive direction; the collision point is directly in front of the current position. At this point, the upper limit of the allowed range of motion is set to the critical angle value q. c Subtract the safety margin Δq to ensure the joint has sufficient deceleration space before reaching the actual collision threshold. Conversely, if the critical angle value q... c Less than the actual angle value q a This indicates that the joint is currently behind the collision critical point (i.e., has already passed the collision critical direction), and the collision point is located on the negative side of the current position. At this point, the upper limit of the allowed range of motion is set to the critical angle value q. c Including the safety margin Δq, a safe distance is also reserved for the joint to avoid entering the collision zone.

[0039] In some of the above implementations, to effectively avoid collisions between the robot and obstacles, it is necessary to determine a set of high-risk motion parameters based on early warning information, including an upper limit for allowable acceleration. However, accurately and safely determining this upper limit for allowable acceleration, ensuring that the robot decelerates and stops in time within the estimated collision time window while avoiding exceeding the robot's physical limits or triggering unnecessary vibration alarms, is a key challenge in achieving efficient and reliable motion control. An improperly set upper limit for acceleration may lead to insufficient deceleration resulting in a collision, or excessive deceleration damaging the robot or affecting its stability.

[0040] Reference Figure 5 As shown, this application further proposes a method for determining the upper limit of allowable acceleration, specifically including: First, obtaining the length of the estimated collision time window and the angular velocity of the corresponding joint of the robot at the current moment. The length of the estimated collision time window is the time margin by which the robot must complete deceleration; it directly determines the required deceleration magnitude and is typically provided by the collision prediction module in the virtual environment, representing the time interval from the current moment to the expected collision. The angular velocity of the corresponding joint of the robot at the current moment is the initial motion state of the joint when deceleration begins. These two parameters are the basis for calculating the required deceleration because the physical model of the deceleration process requires a defined initial velocity and available time.

[0041] Subsequently, the expected stopping angular velocity is set to zero. Setting the expected stopping angular velocity to zero clarifies that the ultimate goal of deceleration is to completely stop the affected joints, thereby eliminating the risk of collision. This is the most conservative and safest approach, ensuring that the relevant joints no longer move towards the obstacle at the end of the estimated collision time window.

[0042] Based on this, the theoretical deceleration required for the joint to stop precisely at the end of the estimated collision time window is calculated backwards, using the estimated collision time window length and the current angular velocity. This step utilizes fundamental kinematic principles, such as the formulas for uniformly accelerated linear motion, where the final angular velocity is zero, the initial angular velocity is the current angular velocity, and the time is the estimated collision time window length. By calculating backwards, the minimum (theoretical) deceleration required to reduce the joint from the current angular velocity to zero within a given time can be obtained. This theoretical value represents the minimum requirement to ensure collision avoidance.

[0043] Furthermore, the absolute value of the maximum braking deceleration allowed by the robot actuator itself is obtained, and the smaller of the theoretical deceleration value and the maximum braking deceleration value is selected as the first candidate value. The absolute value of the maximum braking deceleration allowed by the robot actuator itself represents the physical limit of deceleration that the robot hardware (such as motors, reducers, brakes, etc.) can withstand and achieve. Any deceleration command exceeding this value cannot be executed and may even damage the hardware. Therefore, comparing the theoretical deceleration value with the physical limit and selecting the smaller one ensures that the determined deceleration is practically feasible and avoids issuing commands beyond the robot's capabilities.

[0044] Finally, the upper limit of comfortable deceleration that will not trigger vibration alarms during normal robot operation is obtained. The smaller of the first candidate value and the upper limit of comfortable deceleration is taken as the upper limit of allowable acceleration. The upper limit of allowable acceleration is negative, indicating that the direction of acceleration is opposite to the direction of motion. The upper limit of comfortable deceleration is an empirical value or a value determined through experiments. It takes into account the requirements that the robot will not generate excessive impact, trigger internal sensor alarms, cause structural resonance, or affect the stability of the end effector during deceleration. Even if physically feasible, excessive deceleration may lead to robot instability or unnecessary malfunctions. Therefore, based on ensuring physical feasibility, comfort or stability requirements are further considered, and the smaller of the first candidate value and the upper limit of comfortable deceleration is selected as the final upper limit of allowable acceleration. This value is usually negative to clearly indicate that it is acceleration in the direction of deceleration.

[0045] In some of the embodiments described above in this application, a robot motion constraint method based on virtual-real linkage early warning triggering is proposed. Its core lies in generating optimized constraint parameters through a pre-trained motion constraint model to effectively avoid collisions between the physical robot and obstacles. However, constructing a motion constraint model that can accurately predict collision risks and provide appropriate constraints while also considering robot operating efficiency is a key technical challenge. Improper model training may lead to overly conservative constraints, reducing robot operating efficiency, or insufficient constraints, failing to effectively avoid collision risks.

[0046] Reference Figure 6As shown, this application further proposes that a pre-trained motion constraint model be obtained in advance through the following steps: First, data is collected from multiple collision warnings issued to and from the robot during its historical motion. Each record includes: joint angle vectors, joint angular velocity vectors, estimated collision time windows, joint identifiers indicating the estimated impact of the collision, and a label indicating whether the collision actually occurred. This step aims to provide a rich and representative dataset for training the motion constraint model. By continuously monitoring and recording key state information of the robot before and after receiving a collision warning signal during actual or simulated operation, various scenarios when the robot faces potential collision risks can be captured. The joint angle vectors and joint angular velocity vectors at the moment of the collision warning describe the robot's immediate motion state; the estimated collision time window and joint identifiers indicating the estimated impact quantify the urgency and affected parts of the collision; and the label indicating whether the collision actually occurred is crucial for supervised learning, distinguishing between successful and unsuccessful collision avoidance. This data collectively forms the foundation for model learning, enabling it to understand the correlation between the robot's state and the collision outcome under different warning scenarios. Data collection can be accomplished by integrating a data recording module into the robot control system or by conducting large-scale simulation experiments in a virtual simulation environment.

[0047] Secondly, for each record where no collision occurred, the upper limits of joint angles and acceleration in the record are marked as positive sample optimization outputs. This step is used to construct the model's "positive sample" data. When historical records show that the robot did not actually collide after receiving a collision warning, it indicates that the motion restrictions implemented at that time (or natural avoidance without restrictions) were effective. Therefore, the corresponding upper limits of joint angles and acceleration in that record are directly used as the model's optimization output targets. These positive samples represent the ideal state under specific warning situations, ensuring safety without overly restricting the robot's movement.

[0048] Secondly, for each collision record, the upper limits of joint angles and acceleration are adjusted before the collision until no further collisions occur in the virtual simulation. These adjusted values ​​are then marked as the corrected output of the negative sample. This step is crucial for generating the model's "negative samples," aiming to learn how to correct from failure cases. For historical records where actual collisions still occurred after receiving collision warnings, directly using the motion parameters at that time as output is not advisable. Instead, this method leverages the advantages of the virtual simulation environment to iteratively adjust the original motion parameters that led to the collisions. Specifically, in the virtual environment, based on collision records, the upper limits of joint angles and acceleration are systematically modified, and virtual simulations are repeatedly performed until a new set of limiting parameters is found that prevents the virtual robot from colliding with obstacles under the same warning conditions. These adjusted parameters, validated by virtual simulation and capable of successfully avoiding collisions, are marked as the corrected output of the negative sample. This method effectively transforms negative experiences from actual collisions into positive corrective guidance for the model to learn from.

[0049] Finally, using joint angle vectors, joint angular velocity vectors, estimated collision time windows, and estimated collision impact joint labels as inputs, and joint angle upper limits and acceleration upper limits as outputs, a multi-layer fully connected neural network is used for regression training. The training loss function is the mean squared error between the predicted values ​​and the labeled output values. After training, a pre-trained motion constraint model is obtained. This step details the specific training process of the motion constraint model. A multi-layer fully connected neural network was chosen as the model architecture because of its excellent performance in handling complex nonlinear mappings and regression tasks. The model input consists of parameters describing the robot's current state and collision risk, including joint angle vectors, joint angular velocity vectors, estimated collision time windows, and estimated collision impact joint labels. The model output consists of the joint angle upper limits and acceleration upper limits that should be generated for these input scenarios. By minimizing the mean squared error (MSE) between the predicted values ​​and the labeled output values ​​as the training loss function, the neural network can learn the mapping relationship between input features and expected outputs. The MSE loss function encourages the model's predicted values ​​to be as close as possible to the true labeled values, thereby ensuring that the model's output constraint parameters can effectively avoid collisions. After sufficient training, the neural network becomes a pre-trained motion constraint model capable of generating optimized constraint parameters based on real-time early warning information.

[0050] In some embodiments described above in this application, to avoid collisions between the robot and obstacles, it is necessary to control the corresponding joints of the robot to decelerate according to the modified acceleration decay curve in the optimized constraint parameters. However, generating an acceleration decay curve that effectively avoids collisions, ensures smooth robot motion, and allows for flexible adjustment of the deceleration process is crucial for achieving precise motion constraints. Using only a simple constant deceleration may result in an abrupt deceleration process, affecting the smoothness of the robot's motion, or in some cases, insufficient deceleration, failing to effectively avoid collisions.

[0051] Reference Figure 7 As shown, this application further proposes a method for generating a modified acceleration decay curve, which is designed as a piecewise linear curve with time as the independent variable and acceleration as the dependent variable. This piecewise linear design allows for fine-grained control of acceleration changes over time, rather than a simple single function or constant, thus providing greater flexibility and controllability for the deceleration process of robot joints.

[0052] Specifically, when generating the corrected acceleration decay curve, the upper limit of allowable acceleration is first obtained as the starting acceleration value of the curve. This upper limit of allowable acceleration is calculated based on factors such as the length of the estimated collision time window and the angular velocity of the corresponding joint of the robot at the current moment. This ensures that the initial intensity of the deceleration process does not exceed the physical limits of the robot actuator while meeting the initial deceleration requirements. Simultaneously, the deceleration target value is set to zero acceleration as the ending acceleration value of the curve. This means that at the end of the estimated collision time window, the angular velocity of the robot joint will approach zero, thereby achieving complete stopping or significant deceleration and effectively avoiding collisions. This clear setting of the starting and ending points provides clear boundary conditions for the entire deceleration process.

[0053] To achieve refined, staged acceleration control, the estimated collision time window is evenly divided into K time intervals, where K is an integer ranging from 3 to 10. This division allows for different deceleration strategies to be adopted for different time intervals throughout the deceleration process. The choice of K value provides flexibility; a larger K value enables more precise acceleration control but increases computational complexity; a smaller K value, while maintaining efficiency, still provides better control than a single deceleration method.

[0054] Based on this, at the end of each subsequent time interval, the acceleration value is set to decay by a fixed proportion relative to the acceleration value at the end of the previous time interval. This fixed-proportion decay strategy results in a smooth and efficient decrease in acceleration, rather than a simple linear decrease. By precisely adjusting the decay ratio, it can be ensured that the acceleration decays to zero exactly at the end of the last time interval, thereby guaranteeing that the robot joint reaches the desired stopping state within the predetermined time and effectively avoiding collisions. This decay method helps avoid abrupt changes during deceleration and improves the smoothness of motion.

[0055] Finally, the acceleration values ​​between two adjacent time points are connected using linear interpolation to obtain a complete piecewise linear curve. Linear interpolation is a simple and effective connection method that ensures that the acceleration changes linearly within each time interval, resulting in quadratic changes in angular velocity and cubic changes in angle. This helps maintain the smoothness of motion and avoids abrupt changes in acceleration. This method simplifies the curve generation process while ensuring the continuity and controllability of the curve, providing clear and easily executable instructions for subsequent robot actuation.

[0056] In some embodiments described above in this application, optimized constraint parameters are obtained through a pre-trained motion constraint model, and their effectiveness is verified by simulation in a virtual environment. However, accurately and reliably simulating these optimized constraint parameters in a virtual environment to ensure the accuracy of the simulation results and effectively evaluate whether the generated constraint parameters can truly avoid collisions is a challenge. If the simulation process is not refined enough or cannot accurately reflect the actual physical constraints, it may lead to misjudgments, thereby affecting the safe operation or constraint effect of the physical robot.

[0057] Reference Figure 8 As shown, this application further proposes a specific method for simulating the execution of optimized constraint parameters in a virtual environment, including: applying a modified upper limit value of the motion range to the affected joints of the virtual robot, temporarily limiting the motion range of the joints to within the modified upper limit value; using the modified acceleration decay curve as the driving input of the virtual robot, driving the corresponding joints of the virtual robot to move in a time-step manner starting from the current moment; in each time step, updating the joint angular velocity of the virtual robot according to the acceleration value corresponding to the modified acceleration decay curve at the current moment, and then updating the joint angle value according to the updated angular velocity; repeating the above time step until the end of the estimated collision time window is reached or the virtual robot stops moving, and recording the sequence of changes in the joint angle value of the virtual robot with time throughout the process as a simulated motion trajectory.

[0058] Specifically, the upper limit of the range of motion is a range of motion restriction for specific joints output by the motion constraint model based on the estimated collision risk. Applying this restriction to the affected joints of the virtual robot means that, in the virtual simulation environment, the motion angles of these joints will be forcibly constrained within this upper limit. This temporary constraint ensures that the virtual robot does not exceed the safe range during the simulation, thus simulating the behavior of a real robot after applying this constraint, providing accurate input for subsequent collision assessment. In terms of implementation, this can be achieved in the virtual simulation software by modifying the kinematic parameters of the joints or adding soft constraint limits.

[0059] Meanwhile, the modified acceleration decay curve is a dynamic acceleration planning mechanism generated by the motion constraint model to guide the deceleration of affected joints. Using it as the driving input for the virtual robot means that during virtual simulation, the robot's motion is no longer simply position or velocity control, but rather precise dynamic driving based on a preset acceleration curve. This driving method can more realistically simulate the dynamic response of a physical robot during deceleration, especially near the end of the collision warning time window, ensuring smooth and safe deceleration by precisely controlling acceleration decay. In terms of implementation, virtual simulation environments typically provide a dynamics engine that allows users to input acceleration commands for joints at each time step, thereby updating the joint's velocity and position.

[0060] In a virtual simulation environment, time steps are discrete. At the beginning of each time step, the system retrieves the corresponding acceleration value from the corrected acceleration decay curve based on the current simulation moment. Then, using this acceleration value and the current joint angular velocity, the joint angular velocity at the end of the next time step is calculated through numerical integration (e.g., the Euler method or the Runge-Kutta method). Next, using the updated joint angular velocity, the joint angle value at the end of the next time step is calculated through a similar numerical integration method. This process simulates the kinematic and dynamic behavior of the robot joints over continuous time, ensuring the smoothness and accuracy of the simulated trajectory.

[0061] The virtual simulation process iteratively executes the aforementioned time steps until a preset termination condition is met. Termination conditions include reaching the end of the estimated collision time window, meaning the simulation covers the entire potential collision risk period; or the virtual robot coming to a complete stop due to deceleration, indicating it has successfully avoided a collision. Throughout the simulation, the virtual robot's joint angle values ​​continuously change over time, and these continuous sequences of joint angle values ​​are fully recorded, forming the simulated motion trajectory. This trajectory is a crucial basis for evaluating the effectiveness of the optimized constraint parameters; it visually demonstrates whether the robot can safely avoid obstacles after applying the constraint parameters.

[0062] In practical applications, accurately and reliably determining whether the simulated motion trajectory truly avoids collisions with obstacles in the virtual environment, and distinguishing between different levels of collision risk, is crucial to ensuring the safe operation of robots.

[0063] Reference Figure 9 As shown, this application proposes a method for determining whether a simulated motion trajectory collides with an obstacle in a virtual environment, specifically including: In the virtual environment, optimization constraints are applied step-by-step according to the simulation time step. After each step, the minimum distance between all links of the robot and all obstacles in the virtual environment is calculated. This step aims to monitor the motion state of the virtual robot in real time after the application of optimization constraints through a refined simulation process. The virtual environment progresses discretely according to the preset simulation time step. Within each time step, the virtual robot updates its motion state, such as joint angles and angular velocities, based on the optimization constraints (including correcting the upper limit of the motion range and the acceleration decay curve). After each time step, the system executes a collision detection algorithm to calculate the minimum geometric distance between all links of the virtual robot model and all modeled obstacles in the virtual environment. This calculation typically involves complex geometric intersection or distance calculation algorithms, such as methods based on bounding box hierarchies or distance fields, to improve computational efficiency and accuracy.

[0064] Furthermore, if the minimum distance between a link and an obstacle is less than zero, a penetration collision is determined, and the collision determination result is output directly. When the calculated minimum distance is less than zero, geometrically, this means that a link of the virtual robot has geometrically overlapped or penetrated an obstacle in the virtual environment. This state indicates a serious collision that must be avoided. Therefore, once a minimum distance of less than zero is detected, the system immediately determines that a penetration collision has occurred and directly outputs the collision determination result without further distance judgment, ensuring a timely response.

[0065] Furthermore, if all minimum distances are greater than or equal to zero, but one minimum distance is less than a preset safety gap threshold, it is considered an approach collision, and a collision determination result is output. When the minimum distances between all links and obstacles are greater than or equal to zero (i.e., no penetration collision occurs), but one of the minimum distances is less than the preset safety gap threshold, this indicates that although the virtual robot has not yet achieved actual geometric overlap, it is very close to the obstacle, posing a high risk of collision. The preset safety gap threshold is a configurable parameter, the value of which depends on factors such as the robot's movement speed, accuracy requirements, and safety level. Determining this situation as an approach collision and outputting a collision determination result aims to provide an early warning mechanism so that further restrictions or adjustments can be taken before an actual collision occurs.

[0066] Finally, if all minimum distances are greater than or equal to the safety clearance threshold, a collision is determined not to have occurred. When the minimum distance between all links of the virtual robot and all obstacles in the virtual environment is greater than or equal to the preset safety clearance threshold, this indicates that the virtual robot maintains a sufficient safe distance from obstacles in its current motion state, and there is no risk of collision. In this case, the system determines that a collision has not occurred and allows the continuation of subsequent control processes, such as converting optimized constraint parameters into low-level drive commands for the physical robot.

[0067] In practical applications, if a collision is determined to have occurred, the following rollback steps are executed: After the above method simulates and optimizes the constraint parameters in a virtual environment, if a collision is detected between the simulated motion trajectory and an obstacle in the virtual environment, the system does not immediately abandon the simulation. Instead, it feeds this collision detection result back to the pre-trained motion constraint model. Upon receiving the collision feedback, the model is triggered to perform an iterative optimization process, the goal of which is to recalculate and generate a new set of optimized constraint parameters based on the current collision information. This feedback mechanism allows the system to learn from failed simulations and adjust its decision-making strategy in order to find a safer motion constraint scheme.

[0068] When generating new optimization constraints, the model adopts stricter limitations to address collisions detected in the simulation. Specifically, the upper limit of the corrected range of motion in the new optimization constraints is further reduced by 5% from the original value. This means that the maximum range of angles that the robot's joints are allowed to reach during movement will be smaller, thereby increasing the safe distance from obstacles. Simultaneously, the new corrected acceleration decay curve further reduces the target acceleration value at the end of each time interval by 10% compared to the original curve. This means that the robot will reduce its speed at a faster rate during deceleration, thereby reaching a safe speed in a shorter time or with a smaller displacement, effectively avoiding collisions.

[0069] After generating new optimized constraint parameters, the system does not immediately apply them to the physical robot. Instead, it simulates the process again in the virtual environment and determines whether a collision occurs. This process is iterative, repeating until the simulation determines that no collision occurs, or the number of repetitions reaches a preset upper limit. Setting an upper limit is to prevent infinite loops, ensure that the system makes a decision within a certain time, and provide multiple attempts to find the best safety solution.

[0070] If, after multiple iterations of optimization and virtual simulation, the system still cannot find a set of optimized limiting parameters that can completely avoid collisions in the virtual environment, and the preset upper limit is reached, this means that the current collision risk is extremely high, and fine-tuning the limiting parameters is no longer effective. In this extreme case, to ensure the safety of the physical robot to the greatest extent possible, the system will decisively issue an emergency stop command to the physical robot, prohibiting it from continuing to move in the warning direction, thereby avoiding an actual collision.

[0071] Through the above technical solution, this application provides a robust collision risk handling mechanism. When the initially generated motion constraint parameters still cannot avoid collisions in virtual simulation, the system can intelligently optimize and correct the upper limit of the motion range and the acceleration decay curve through iterative feedback and parameter adjustment, enabling the robot to constrain motion in a safer and more conservative manner. This iterative optimization process significantly improves the reliability and safety of the motion constraint strategy, avoiding the risks of directly applying unverified constraint parameters to a physical robot. Even in extreme cases where a collision-free solution cannot be found after multiple optimizations, the system can promptly issue an emergency stop command, providing final safety assurance for the physical robot, thereby effectively reducing the probability of collisions between the robot and the environment or people, and improving the overall safety performance of the robot system.

[0072] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for limiting robot motion based on virtual-real linkage early warning triggering, characterized in that, Includes the following steps: In response to a collision warning signal generated in the virtual environment for the physical robot, the current motion parameters and predicted collision parameters of the physical robot are obtained. The predicted collision parameters include the estimated collision time window and the estimated impact joints. The estimated collision time window is calculated through the following steps: obtaining the current Euclidean distance d between the robot's end effector and the nearest obstacle in the virtual environment, and the relative velocity v of the robot's end effector in the current motion direction; according to the formula Δt... c =d / v calculates the nominal collision time; obtains the time step Δt of a single sampling in the virtual simulation system. s According to the formula N=floor(Δt) c / Δt s Calculate the remaining steps, where floor represents the floor function; obtain the system delay steps D required from the issuance of the virtual warning to the start of the physical robot's response, where D takes a value of 2 to 3; set the start time T of the time window. s =(ND)×Δt s The end time T of the time window e =N×Δt s When T s When it is less than or equal to zero, it is set to zero; the estimated collision time window is from T s To T e The time interval for predicting collision impact on joints is determined through the following steps: In the virtual environment, each joint is traversed sequentially from the robot base towards the end effector. For the i-th joint currently being traversed, the rotation axis direction vector of the joint in its current pose and the direction vector from the joint's centroid to the nearest obstacle are obtained, and the angle θ between the two is calculated. i If θ i If the angle is less than 90 degrees and the current angular velocity direction of the joint is pointing towards the obstacle, the joint is marked as a potential impact joint. Among all potential impact joints, the joint closest to the obstacle is selected as the primary impact joint, and the primary impact joint and all its downstream joints along the kinematic chain toward the end are included in the estimated collision impact joints. Based on the estimated collision time window and the estimated impact joints, a set of high-risk motion parameters is determined. The set of high-risk motion parameters includes the upper limit of the allowable range of motion and the upper limit of the allowable acceleration of the joints affected by the estimated collision. The high-risk motion parameter set and the current motion parameters of the physical robot are input into a pre-trained motion constraint model to obtain optimized constraint parameters. These optimized constraint parameters include: a revised upper limit of the range of motion for joints affected by the predicted collision and a revised acceleration decay curve. The pre-trained motion constraint model is obtained in advance through the following steps: collecting recorded data from multiple collision warnings before and after the robot's historical motion. Each record includes: the joint angle vector at the moment of the collision warning, the joint angular velocity vector, the predicted collision time window, the joint identifier for the predicted collision impact, and a label indicating whether a collision actually occurred. For each record where no collision occurred... The upper limits of joint angles and accelerations in the records are marked as optimized outputs of positive samples. For each record where a collision occurs, the upper limits of joint angles and accelerations are adjusted before the collision until no more collisions occur in the virtual simulation. The adjusted values ​​are marked as corrected outputs of negative samples. The joint angle vector, joint angular velocity vector, estimated collision time window, and estimated collision impact joint labels are used as inputs, and the upper limits of joint angles and accelerations are used as outputs. A multi-layer fully connected neural network is used for regression training. The training loss function is the mean square error between the predicted value and the marked output value. After training, a pre-trained motion constraint model is obtained. The optimized constraint parameters are simulated in a virtual environment to obtain the simulated motion trajectory; Determine whether the simulated motion trajectory collides with obstacles in the virtual environment. If it is determined that no collision occurs, convert the optimized constraint parameters into the underlying drive instructions of the physical robot. Based on the underlying drive instructions, the corresponding joints of the physical robot are controlled to decelerate according to the corrected acceleration decay curve before reaching the start time of the estimated collision time window, and the range of motion of the joints is limited to the upper limit of the corrected range of motion.

2. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: The upper limit of the permissible range of motion is determined as follows: For each joint in the predicted collision impact joints, obtain the actual angle value q of the joint in the current pose. a And the critical angle value q when a joint comes into contact with the nearest obstacle in a virtual environment. c ; Set a safety margin Δq, where the safety margin is the critical angle value q. c Compared with the actual angle value q a The difference is 20%, but not exceeding 5°; If the critical angle value q c Compared with the actual angle value q a If the absolute value of the difference is less than 1°, then the upper limit of the allowed range of motion is set to the current actual angle value q. a ; otherwise If the critical angle value q c Greater than the actual angle value q a Then the upper limit of the allowed range of motion is set to the critical angle value q. c Subtract the safety margin Δq; if the critical angle value q c Less than the actual angle value q a Then the upper limit of the allowed range of motion is set to the critical angle value q. c Add Δq.

3. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: The permissible upper limit of acceleration is determined as follows: Obtain the length of the estimated collision time window and the angular velocity of the corresponding joint of the robot at the current moment; The desired angular velocity at the point of stopping is set to zero. Based on the estimated length of the collision time window and the current angular velocity, the theoretical deceleration value required for the joint to stop just at the end of the time window is calculated in reverse. Obtain the absolute value of the maximum braking deceleration allowed by the robot actuator itself, and take the smaller of the theoretical deceleration value and the maximum braking deceleration value as the first candidate value; Obtain the upper limit of the comfortable deceleration that will not trigger a vibration alarm during normal operation of the robot. Take the smaller of the first candidate value and the upper limit of the comfortable deceleration as the upper limit of the allowable acceleration. A negative upper limit of the allowable acceleration indicates that the direction of acceleration is opposite to the direction of motion.

4. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: The corrected acceleration decay curve is a piecewise linear curve with time as the independent variable and acceleration as the dependent variable, generated through the following steps: Obtain the upper limit of allowable acceleration as the starting acceleration value of the curve, and set the deceleration target value to zero acceleration as the ending acceleration value of the curve; The estimated collision time window is evenly divided into K time intervals, where K is an integer between 3 and 10. At the end of each subsequent time interval, the acceleration value is reduced by a fixed ratio relative to the acceleration value at the end of the previous time interval, so that the acceleration decays to zero at the end of the last time interval. By connecting the acceleration values ​​between two adjacent time points using linear interpolation, a complete piecewise linear curve is obtained.

5. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: Simulate the execution of optimization constraint parameters in a virtual environment, specifically including: Apply the modified upper limit of the range of motion to the affected joints of the virtual robot, temporarily limiting the range of motion of the joints to within the modified upper limit. The corrected acceleration decay curve is used as the driving input for the virtual robot, and the corresponding joint movement of the virtual robot is driven in a time-step manner starting from the current moment. At each time step, the joint angular velocity of the virtual robot is updated based on the acceleration value corresponding to the current acceleration decay curve, and then the joint angle value is updated based on the updated angular velocity. Repeat the above time stepping until the end of the estimated collision time window is reached or the virtual robot stops moving. Record the sequence of changes in the joint angle values ​​of the virtual robot over time as a simulated motion trajectory.

6. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: Determining whether the simulated motion trajectory collides with obstacles in the virtual environment includes: In the virtual environment, the optimization constraint parameters are executed step by step at the simulation time step, and the minimum distance between all links of the robot and all obstacles in the virtual environment is calculated after each step. If the minimum distance between a link and an obstacle is less than zero, it is determined that a penetration collision has occurred, and the collision determination result is output directly. If all minimum distances are greater than or equal to zero, but there is a minimum distance that is less than the preset safety gap threshold, then it is determined to be an approach collision, and the collision determination result is also output. If all minimum distances are greater than or equal to the safety gap threshold, then a collision is determined not to have occurred.

7. The robot motion restriction method based on virtual-real linkage early warning triggering according to claim 1, characterized in that: After determining whether the simulated motion trajectory has collided with obstacles in the virtual environment, if a collision is determined to have occurred, the following rollback steps are executed: The collision determination result is fed back to the pre-trained motion constraint model, triggering the model to regenerate a new set of optimized constraint parameters. In the new optimized constraint parameters, the upper limit of the corrected motion range is shrunk by an additional 5% on the original value, and the new corrected acceleration decay curve reduces the acceleration target value at the end of each time interval by an additional 10% on the original curve. The new optimization constraint parameters are simulated again in the virtual environment and it is determined whether a collision occurs. This process is repeated until the simulation determines that no collision occurs, or the number of repetitions reaches the preset upper limit. If a collision-free simulation result is not obtained after reaching the maximum number of attempts, an emergency stop command is issued to the physical robot to prevent it from continuing to move in the warning direction.

Citation Information

Patent Citations

  • Collision detection method and module, robot and related device

    CN120886254A

  • Collision early warning method and device in robot teleoperation

    CN121979184A