Robot control method and device, electronic equipment and storage medium

By selecting the desired joint angle and calculating the impedance torque after a robot collision, the robot's motion is controlled, solving the problem of motor damage caused by high-speed collisions and achieving flexible control and smooth motion.

CN121848384APending Publication Date: 2026-04-14HANGZHOU HIKROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

When a robot collides during high-speed movement, directly instructing motion information can cause a sudden change in motor acceleration, resulting in damage. Existing technologies are insufficient to effectively protect the robot.

Method used

By selecting the desired joint angle from the joint angles at multiple historical moments, and based on the deviation between the current desired joint angle and the actual joint angle, as well as the speed, the robot's impedance torque is determined, and the output torque is calculated to control the robot's movement, avoiding rigid impacts and achieving flexible control.

Benefits of technology

It reduces the probability of motor damage, improves the smoothness of robot movement, avoids sudden changes in motor acceleration, and effectively protects the robot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121848384A_ABST
    Figure CN121848384A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a robot control method and device, electronic equipment and a storage medium, and relates to the technical field of robots. The robot control method comprises the steps that in response to collision of a robot, an expected joint angle is selected from joint angles of all joints of the robot at multiple historical moments, based on the current expected joint angle, according to a first determination mode, the impedance torque of the robot is determined, and according to the impedance torque of the robot, the robot is controlled. And calculating the output torque of the robot, controlling the robot to move according to the output torque of the robot, and returning to the step of selecting the expected joint angle from the joint angles of the joints of the robot at the plurality of historical moments. Therefore, according to the scheme, the robot can be effectively protected after collision happens to the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] If the robot collides with other objects during the robot control process, it is easy to damage the robot and make it unable to continue working.

[0003] In related technologies, if a robot collides, motion information (such as position, speed, acceleration, etc.) is directly indicated to the robot, so that the robot can bounce back after the collision, reducing the damage caused by the collision.

[0004] However, when a collision occurs during high-speed robot movement, directly instructing the robot with motion information will result in the speed and acceleration being opposite in direction to the robot's actual speed and acceleration before the collision. This will cause a sudden change in the acceleration of the robot's motors (both the magnitude and direction of the motor's acceleration will change abruptly), thereby damaging the robot's motors and making it difficult to effectively protect the robot after a collision. Summary of the Invention

[0005] The purpose of this application is to provide a robot control method, device, electronic device, and storage medium to effectively protect the robot after a collision. The specific technical solution is as follows:

[0006] In a first aspect, embodiments of this application provide a robot control method, including:

[0007] In response to a collision, a desired joint angle is selected from the joint angles of each joint of the robot at multiple historical moments; wherein, the multiple historical moments are a series of consecutive moments including the moment preceding the collision; and the desired joint angle is: the joint angle of each joint at the historical moment closest to the collision, among the joint angles that have not been selected.

[0008] Based on the current desired joint angle, the impedance torque of the robot is determined according to a first determination method; wherein, the first determination method is: a method of determining the impedance torque based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot.

[0009] Based on the robot's impedance torque, calculate the robot's output torque, control the robot to move according to the robot's output torque, and return to the step of selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments.

[0010] Secondly, embodiments of this application provide a robot control device, including:

[0011] A selection module is used to select a desired joint angle from the joint angles of the robot's joints at multiple historical moments in response to a collision; wherein the multiple historical moments are a series of consecutive moments including the moment preceding the collision; and the desired joint angle is the joint angle of each joint at the historical moment closest to the collision, among the joint angles that have not been selected.

[0012] The first determining module is used to determine the impedance torque of the robot based on the current desired joint angle and according to the first determining method; wherein, the first determining method is: the impedance torque is determined based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot.

[0013] The first calculation module is used to calculate the output torque of the robot based on the robot's impedance torque, control the robot to move according to the robot's output torque, and return to the step of selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments.

[0014] Thirdly, embodiments of this application provide an electronic device, including:

[0015] Memory, used to store computer programs;

[0016] The processor, when executing the program stored in the memory, implements any of the above-mentioned robot control methods.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the robot control methods described above.

[0018] Beneficial effects of the embodiments in this application:

[0019] The robot control method provided in this application can, in response to a robot collision, select a desired joint angle from the joint angles of each joint of the robot at multiple historical moments. Based on the current desired joint angle, the robot's impedance torque can be determined according to a first determination method. The robot's output torque is then calculated based on the impedance torque, and the robot is controlled to move according to the output torque. The method also returns to the step of selecting the desired joint angle from the joint angles of each joint of the robot at multiple historical moments. It is evident that after a robot collision, this application does not directly instruct the robot to bounce back, but rather controls the robot to move according to its output torque. During the robot's movement, desired joint angles (joint angles of each joint at the historical moment closest to the collision time from unselected joint angles) can be continuously selected. Correspondingly, the robot's output torque is also continuously adjusted, thereby avoiding rigid impacts and achieving flexible control, reducing the probability of motor damage, and effectively protecting the robot after a collision. Furthermore, in determining the robot's impedance torque, considering the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, as well as the current actual speed of each joint of the robot, the determined impedance torque of the robot not only provides a matching torque guarantee for the movement of each joint of the robot towards the current desired joint angle, but also suppresses the impact and oscillation caused by excessive speed, improving the robot's motion stability. This ensures that the acceleration of the motor will not change abruptly after a collision during high-speed movement of the robot, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0020] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0022] Figure 1 A flowchart illustrating a robot control method provided in an embodiment of this application;

[0023] Figure 2 A flowchart illustrating another robot control method provided in an embodiment of this application;

[0024] Figure 3A flowchart illustrating yet another robot control method provided in an embodiment of this application;

[0025] Figure 4 A schematic diagram of a joint angle storage process provided in an embodiment of this application;

[0026] Figure 5 A schematic diagram illustrating the principle of calculating the output torque of a robot, provided in an embodiment of this application;

[0027] Figure 6 This is a schematic diagram of the structure of a robot control device provided in an embodiment of this application;

[0028] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0030] First, some technical terms in the embodiments of this application will be introduced:

[0031] Collision detection: The ability of a robot to detect a collision and take appropriate action when a collision occurs.

[0032] Collision rebound: When a robot collides with another robot, the control strategy causes the robot to rebound a certain distance and then stop moving.

[0033] Torque: The force that causes an object to rotate (or tend to rotate) about a fixed axis or fulcrum.

[0034] Contact stress: The stress generated in and around the contact area when two objects are pressed against each other.

[0035] Impedance control: an active control strategy that combines the relationship between force and motion. Its core purpose is to make the controlled object (such as a robot end effector or robotic arm) exhibit a preset "impedance characteristic" (i.e., the dynamic relationship between force and displacement / velocity), rather than simply controlling position or force, so that the controlled object can both respond to commands and gently bear / apply force.

[0036] Secondly, to better understand this solution, the robot control methods in related technologies will be introduced:

[0037] In related technology 1, the torque loss during the robot's forward movement and at rest can be pre-calculated to determine the robot's protection threshold. Subsequently, by comparing the robot's torque with the protection threshold, when the robot's torque exceeds the threshold, power-down protection is activated to protect the robot's joints. This robot control method can also be called a "detection-stop" mode. However, the robot generates inertia during movement. When power-down protection is activated, the robot will lock up and stop moving. At this time, the inertia generated by the robot's movement exerts enormous contact stress on the robot, which may cause damage.

[0038] In related technology 2, by saving the robot's motion trajectory to an extended RAM (Random Access Memory) module, after a collision, the trajectory stored in the RAM module can be read, and motion information can be sent to the robot to enable it to rebound. However, when a collision occurs while the robot is moving at high speed, directly sending motion information to the robot will result in the velocity and acceleration being in the opposite direction to the robot's actual speed and acceleration before the collision. This will cause a sudden change in the acceleration of the robot's motors, thereby damaging the robot's motors.

[0039] Based on the problems described above, embodiments of this application provide a robot control method, apparatus, electronic device, and storage medium.

[0040] Furthermore, a robot control method provided in the embodiments of this application will be described below.

[0041] The robot control method provided in this application can be applied to the control terminal of a robot, which can control the robot to move. The robot can be a jointed robot, such as a humanoid robot, a robot dog, a robotic arm, etc. In one implementation, the robot control method provided in this application can also be applied to the robot itself; this application does not specifically limit this application.

[0042] Furthermore, the robot control method provided in this application embodiment can be applied to scenarios where robots perform various tasks. For example, the robot control method can be applied to scenarios where robots are used to pick up goods in unmanned warehouses and collisions occur; the robot control method can also be applied to scenarios where robots are used to serve food in restaurants and collisions occur.

[0043] One robot control method includes:

[0044] In response to a robot collision, a desired joint angle is selected from the joint angles of each joint of the robot at multiple historical moments. The multiple historical moments are a series of consecutive moments including the moment preceding the collision. The desired joint angle is the joint angle of each joint at the historical moment closest to the collision, which is among the joint angles that have not been selected.

[0045] Based on the current desired joint angle, the impedance torque of the robot is determined according to the first determination method; wherein, the first determination method is: the impedance torque is determined based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot.

[0046] Based on the robot's impedance torque, calculate the robot's output torque, control the robot's movement according to the robot's output torque, and return to the steps of selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments.

[0047] The robot control method provided in this application can, in response to a robot collision, select a desired joint angle from the joint angles of each joint of the robot at multiple historical moments. Based on the current desired joint angle, the robot's impedance torque can be determined according to a first determination method. The robot's output torque is then calculated based on the impedance torque, and the robot is controlled to move according to the output torque. The method also returns to the step of selecting the desired joint angle from the joint angles of each joint of the robot at multiple historical moments. It is evident that after a robot collision, this application does not directly instruct the robot to bounce back, but rather controls the robot to move according to its output torque. During the robot's movement, desired joint angles (joint angles of each joint at the historical moment closest to the collision time from unselected joint angles) can be continuously selected. Correspondingly, the robot's output torque is also continuously adjusted, thereby avoiding rigid impacts and achieving flexible control, reducing the probability of motor damage, and effectively protecting the robot after a collision. Furthermore, in determining the robot's impedance torque, considering the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, as well as the current actual speed of each joint of the robot, the determined impedance torque of the robot not only provides a matching torque guarantee for the movement of each joint of the robot towards the current desired joint angle, but also suppresses the impact and oscillation caused by excessive speed, improving the robot's motion stability. This ensures that the acceleration of the motor will not change abruptly after a collision during high-speed movement of the robot, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0048] The following describes a robot control method provided by an embodiment of this application, with reference to the accompanying drawings.

[0049] like Figure 1 As shown in the embodiment of this application, a robot control method is provided, the method comprising:

[0050] S101, in response to a collision with the robot, select the desired joint angle from the joint angles of each joint of the robot at multiple historical moments;

[0051] Among them, multiple historical moments are a series of consecutive moments including the moment before the collision occurred; the expected joint angles are the joint angles of each joint at the historical moment closest to the collision occurred, which are the joint angles that have not been selected.

[0052] Understandably, during robot movement, joint angles can be recorded by the robot itself at multiple moments, or by the robot's control unit. These recorded joint angles can be stored in the robot's local storage or external storage. Therefore, in response to a collision, the desired joint angle (the joint angles of the joints at the most recent historical moment before the collision) can be selected from the recorded joint angles at multiple historical moments (including consecutive moments preceding the collision). For example, if the collision occurs at the 1000th ms of the robot's movement, and the robot records its joint angles every 1 ms after starting movement, the joint angles at the 999th ms moment can be selected as the desired joint angles. Furthermore, after a collision, it is expected that the robot can reverse its trajectory as before the collision to achieve a rebound. During this process, after each selection of a desired joint angle, the robot's output torque can be determined based on the selected desired joint angle (the current desired joint angle), and the robot's movement can be controlled according to the robot's output torque. The desired joint angle can then be reselected to achieve flexible control of the robot.

[0053] S102, based on the current desired joint angle, determine the robot's impedance torque according to the first determination method;

[0054] Understandably, after obtaining the current desired joint angle, the robot's impedance torque can be determined based on the deviation between the current desired joint angle and the actual current joint angles of each joint, as well as the actual current speed of each joint. This impedance torque is used for impedance control of the robot, enabling it to respond to motion commands while gently bearing forces, achieving flexible and safe interactive control. Furthermore, in determining the robot's impedance torque, considering the deviation between the current desired joint angle and the actual current joint angles of each joint, as well as the actual current speed of each joint, the determined impedance torque provides a matching torque guarantee for the robot's joints to move towards the current desired joint angle, while also suppressing shocks and oscillations caused by excessive speed, thus improving the robot's motion stability. For clarity, the determination of the robot's impedance torque based on the current desired joint angle, according to the first determination method, will be described in other embodiments and will not be elaborated upon here.

[0055] S103: Calculate the robot's output torque based on the robot's impedance torque, and control the robot's movement according to the robot's output torque.

[0056] Understandably, based on the robot's impedance torque and feedforward torque, the robot's output torque can be calculated. Subsequently, the robot's movement can be controlled according to its output torque, and the process of selecting the desired joint angle from the joint angles of the robot at multiple historical moments can be repeated, thus achieving continuous control of the robot. For clarity, the calculation of the robot's output torque based on its impedance torque will be described in other embodiments and will not be elaborated upon here.

[0057] In one implementation, the robot has multiple joints, and the robot's output torque is a torque matrix for the multiple joints of the robot, with the number of columns in the torque matrix being the same as the number of joints.

[0058] Controlling the robot's movement according to its output torque includes:

[0059] According to the torque matrix, the movement of multiple joints of the robot is controlled separately.

[0060] In this torque matrix, each column represents the torque applied to a joint. According to the torque matrix, multiple joints of the robot can be controlled to move sequentially or simultaneously. This application does not specifically limit this.

[0061] The robot control method provided in this application can, in response to a robot collision, select a desired joint angle from the joint angles of each joint of the robot at multiple historical moments. Based on the current desired joint angle, the robot's impedance torque can be determined according to a first determination method. The robot's output torque is then calculated based on the impedance torque, and the robot is controlled to move according to the output torque. The method also returns to the step of selecting the desired joint angle from the joint angles of each joint of the robot at multiple historical moments. It is evident that after a robot collision, this application does not directly instruct the robot to bounce back, but rather controls the robot to move according to its output torque. During the robot's movement, desired joint angles (joint angles of each joint at the historical moment closest to the collision time from unselected joint angles) can be continuously selected. Correspondingly, the robot's output torque is also continuously adjusted, thereby avoiding rigid impacts and achieving flexible control, reducing the probability of motor damage, and effectively protecting the robot after a collision. Furthermore, in determining the robot's impedance torque, considering the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, as well as the current actual speed of each joint of the robot, the determined impedance torque of the robot not only provides a matching torque guarantee for the movement of each joint of the robot towards the current desired joint angle, but also suppresses the impact and oscillation caused by excessive speed, improving the robot's motion stability. This ensures that the acceleration of the motor will not change abruptly after a collision during high-speed movement of the robot, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0062] Alternatively, in another embodiment, such as Figure 2 As shown in the embodiments of this application, another robot control method is also provided.

[0063] S101, in response to a collision with the robot, select the desired joint angle from the joint angles of each joint of the robot at multiple historical moments;

[0064] It is understood that steps S101-S103 in this embodiment are the same as those in the above embodiments, so they will not be described in detail here.

[0065] S201, Calculate the spatial position of the robot after it moves based on the current desired joint angle, and obtain the desired spatial position;

[0066] It is understood that after selecting the desired joint angle, the robot's spatial position after moving based on the current desired joint angle can be calculated using the robot's forward kinematics and the current desired joint angle, thus obtaining the desired spatial position. The desired spatial position can be in the form of three-dimensional coordinates, or it can be considered as three-dimensional coordinates in Cartesian space. For example, after selecting the desired joint angle, coordinate system transformation can be used to calculate the robot's pose relative to the base coordinate system after moving based on the current desired joint angle, thereby determining the desired spatial position. Furthermore, when the robot is a robotic arm, the robot's spatial position can be the spatial position of the robot's end effector (e.g., a gripper); when the robot is not a robotic arm, the robot's spatial position can be the spatial position of the robot body itself. This application does not specifically limit this.

[0067] S202, calculate the distance between the desired spatial position and the spatial position of the robot at the time of the collision, and obtain the current rebound distance;

[0068] It is understandable that after obtaining the desired spatial position, the robot's position at the time of the collision can be used as the initial position. The distance between the desired spatial position and the initial position is calculated to obtain the current rebound distance. The current rebound distance can be considered as the distance the robot moves (rebound distance) after the collision, according to the current desired joint angle. Furthermore, there are various ways to calculate the current rebound distance after obtaining the desired spatial position and the robot's position at the time of the collision; this application embodiment does not specifically limit this method. For example, if the coordinates of the desired spatial position are (20mm, 10mm, 10mm) and the coordinates of the robot's position at the time of the collision are (10mm, 10mm, 10mm), then the current rebound distance can be considered to be 10mm.

[0069] Furthermore, after calculating the current rebound distance, it can be checked whether the current rebound distance is not greater than the preset rebound distance allowed after a robot collision; wherein, the preset rebound distance allowed after a robot collision is: the maximum rebound distance allowed after a robot collision. It should be emphasized that, in response to the current rebound distance not being greater than the preset rebound distance allowed after a robot collision, step S102 is triggered, that is, the step of determining the robot's impedance torque based on the current desired joint angle according to the first determination method is triggered.

[0070] In one implementation, after calculating the distance between the desired spatial position and the robot's spatial position at the time of the collision, and obtaining the current rebound distance, steps A1-A4 are also included:

[0071] Step A1: In response to the current rebound distance being greater than the preset rebound distance, determine the target joint angle. The target joint angle is the most recent expected joint angle among the expected joint angles selected before the current expected joint angle.

[0072] Step A2: Based on the target joint angle, determine the robot's impedance torque according to the second determination method, calculate the robot's output torque according to the determined impedance torque, and control the robot to move according to the calculated output torque; wherein, the second determination method is: the impedance torque is determined based on the deviation between the target joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot.

[0073] Step A3: In response to the failure to meet the power-down condition, return to the step of determining the robot's impedance torque based on the target joint angle and according to the second determination method;

[0074] Step A4: In response to the power-down condition being met, control the robot to perform a power-down process.

[0075] Regarding step A1, the current rebound distance is greater than the preset rebound distance, that is, the current rebound distance is greater than the maximum rebound distance allowed after the robot collides. In this case, the target joint angle can be determined. The target joint angle is the most recent expected joint angle among the expected joint angles selected before the current expected joint angle. It should be emphasized that the distance between the spatial position of the robot after moving based on the expected joint angle corresponding to the target joint angle and the spatial position of the robot at the time of the collision is not greater than the preset rebound distance.

[0076] Step A2 is similar to steps S102-S103 above. The only difference is that step S102 determines the robot's impedance torque based on the current desired joint angle using the first determination method, while step A2 determines the robot's impedance torque based on the target joint angle using the second determination method. The first and second determination methods are similar, with the only difference being that the first method determines the impedance torque based on the deviation between the current desired joint angle and the current actual joint angle of each joint, while the second method determines the impedance torque based on the deviation between the target joint angle and the current actual joint angle of each joint. The subsequent process of controlling the robot to move is also similar, so it will not be elaborated on here.

[0077] Regarding step A3, after controlling the robot to move according to the calculated output torque, it can be checked whether the power-off condition is met. If it is not met, it is considered that the robot cannot be powered off at present. Then, return to step A2 above and determine the robot's impedance torque based on the target joint angle according to the second determination method.

[0078] In one implementation, the power-down conditions include:

[0079] The time elapsed between the current time and the moment the collision occurred exceeds the predetermined timing duration;

[0080] It is understandable that the power-off condition can be considered as a condition set for the duration of motion. Specifically, if the time between the current time and the moment of collision does not exceed the predetermined timing duration, the power-off condition is considered not met. Conversely, if the time between the current time and the moment of collision exceeds the predetermined timing duration, the power-off condition is considered met. For example, if the predetermined timing duration is 500ms and the time between the current time and the moment of collision is 501ms, then the power-off condition is considered met.

[0081] In another implementation, satisfying the power-down condition may further include: the number of times the robot moves after the collision reaches a target number, where the target number is the number of historical moments; that is, when the joint angles at multiple historical moments have all been selected as the desired joint angles, the power-down condition can be considered satisfied. Of course, the target number can also be a pre-set maximum number of movements allowed, and this application embodiment does not specifically limit this. For example, if the number of times the robot moves after the collision is 10 and the target number is 20, the power-down condition can be considered not satisfied.

[0082] As can be seen, once the power-down conditions are met, the robot can be controlled to perform the power-down process, ensuring that the robot's resources are not wasted and improving the stability of robot protection.

[0083] Regarding step A4, in response to the power-down condition being met, the robot can be controlled to perform a power-down process. After the power-down process, the robot will no longer move. The robot can only resume movement after the staff restarts it. This application embodiment does not specifically limit this.

[0084] S102, based on the current desired joint angle, determine the robot's impedance torque according to the first determination method;

[0085] S103: Calculate the robot's output torque based on the robot's impedance torque, and control the robot's movement according to the robot's output torque.

[0086] As can be seen, the embodiments of this application can calculate the spatial position of the robot after it moves based on the current desired joint angle, obtain the desired spatial position, and calculate the distance between the desired spatial position and the spatial position of the robot at the time of the collision, to obtain the current rebound distance. When the current rebound distance is not greater than the preset rebound distance allowed after the robot collides, the step of determining the robot's impedance torque based on the current desired joint angle and according to the first determination method is triggered. This ensures that the robot's rebound distance will not exceed the preset rebound distance allowed, thus limiting the robot's rebound distance and reducing the probability of motor damage, thereby effectively protecting the robot after a collision.

[0087] Alternatively, in another embodiment, such as Figure 3 As shown, this application provides yet another robot control method.

[0088] S301, the robotic arm is operating normally;

[0089] It is understood that in this embodiment, the robot can be in the form of a robotic arm; when the robotic arm is running normally, it can be considered to be in motor position mode, and motion information can be given to the robotic arm to control its movement.

[0090] S302, detect whether the robotic arm has collided;

[0091] If yes, proceed to step S303; otherwise, return to step S301.

[0092] S303, Select the desired joint angle, determine the desired spatial position, and calculate the distance between the desired spatial position and the spatial position of the robotic arm when the collision occurs, to obtain the current rebound distance;

[0093] It is understandable that determining the desired spatial position of the robotic arm can be considered similar to step S201 above; calculating the distance between the desired spatial position of the robotic arm and its current spatial position at the time of collision to obtain the current rebound distance is similar to step S202 above, and will not be elaborated further here. Additionally, step S303 above can also be considered as outputting the robotic arm's trajectory in reverse to determine its current rebound distance; this embodiment does not specifically limit this aspect.

[0094] S304, Detect whether the current rebound distance is less than the preset rebound distance;

[0095] If yes, then proceed to step S305; otherwise, proceed to step S307. It is understood that in this embodiment, when the current rebound distance is detected to be greater than the preset rebound distance, the robotic arm can be directly controlled to power down.

[0096] S305 performs impedance backtracking control on each joint of the robotic arm;

[0097] It is understandable that step S305 can be considered a summary of steps S102-S103, and specifically may include: determining the resistive torque of the robotic arm based on the current desired joint angle and according to the first determination method; calculating the output torque of the robotic arm based on the resistive torque; and controlling the robotic arm to move according to the output torque. Furthermore, in step S305, the robotic arm can be considered to be in motor torque mode, and torque can be indicated to the robotic arm to control its movement.

[0098] S306, check if the power-down conditions are met;

[0099] If yes, proceed to step S307; otherwise, return to step S303.

[0100] S307 controls the robotic arm to power down.

[0101] As can be seen, after a collision, this application does not directly instruct the robot to bounce back, but controls the robot to move according to the robot's output torque. During the process of controlling the robot to move, the desired joint angle can be continuously selected, and the robot's output torque is also continuously adjusted accordingly, thereby avoiding rigid impact and achieving flexible control, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0102] Optionally, in another embodiment, based on the current desired joint angle, the impedance torque of the robot is determined according to a first determination method, including steps B1-B3:

[0103] Step B1: Calculate the first torque based on the current desired joint angle, the deviation of the current actual joint angle of each joint of the robot, and the stiffness matrix; where the stiffness matrix represents the conversion matrix between deviation and torque, and the first torque is: the torque required for each joint to move from the current actual joint angle to the current desired joint angle.

[0104] Step B2: Calculate the second torque based on the current actual speed of each joint and the damping matrix; where the damping matrix represents the transformation matrix between the robot's speed and torque, and the second torque is the torque used to reduce the current actual speed of each joint;

[0105] Step B3: Calculate the sum of the first torque and the second torque to obtain the robot's impedance torque.

[0106] Step B1 describes the process of calculating the first torque. Specifically, the current desired joint angle and the deviation of the current actual joint angles of each joint of the robot are first determined. Then, based on the determined deviations and the stiffness matrix, the first torque is calculated. The first torque is used to move each joint from its current actual joint angle to its current desired joint angle. The stiffness matrix represents the conversion matrix between the deviation and the torque. Furthermore, the larger the deviation between the current desired joint angle and the current actual joint angles of each joint of the robot, the larger the calculated first torque.

[0107] Step B2 describes the process of calculating the second torque. Specifically, the second torque can be calculated based on the current actual velocity of each joint and the damping matrix. The second torque is used to reduce the current actual velocity of each joint, and the damping matrix represents the transformation matrix between the robot's velocity and torque. It is important to emphasize that since the second torque is used to reduce the current actual velocity of each joint, its direction is opposite to that of the first torque; and the greater the current actual velocity of each joint, the greater the calculated second torque.

[0108] Step B3 describes the process of calculating the robot's impedance torque, which involves calculating the sum of the first torque and the second torque to obtain the robot's impedance torque.

[0109] To better understand the process of calculating the impedance torque of a robot, the following explanation uses formulas as examples:

[0110] ;

[0111] in, For the robot's impedance torque, Here is the stiffness matrix. For the current desired joint angle, The current actual joint angles of each joint. For the first torque, Here is the damping matrix. The current actual speed of each joint, This is the second torque.

[0112] It is evident that, in determining the robot's impedance torque, considering the deviation between the current desired joint angle and the current actual joint angle of each joint, as well as the current actual speed of each joint, the determined impedance torque not only provides a matching torque guarantee for the robot's joints to move towards the current desired joint angle, but also suppresses the impact and oscillation caused by excessive speed, improving the robot's motion stability. This ensures that the motor acceleration will not change abruptly after a collision during high-speed movement, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0113] Optionally, in another embodiment, before selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments in response to a robot collision, the method further includes steps C1-C5:

[0114] Step C1: During the robot's movement, in response to the robot's movement at any given moment, the joint angle of the robot at that moment is stored in the storage location pointed to by the index value of the target index in the target queue; wherein, the target index is an index used to point to the storage location of the joint angle to be written in the target queue.

[0115] Step C2: Increment the index value of the target index by 1 to obtain the updated index value of the target index;

[0116] Step C3: Determine whether the updated target index value exceeds the predetermined index threshold;

[0117] Step C4: Determine the initial index value as the index value of the target index, and return the step of storing the robot's joint angle at any given moment into the storage location pointed to by the index value of the target index in the target queue in response to the robot's movement at any given moment.

[0118] Step C5: Return to the step of storing the robot's joint angle at any given moment in response to the robot's movement, and storing it in the target queue at the storage location pointed to by the index value of the target index.

[0119] Accordingly, from the joint angles of the robot at multiple historical moments, the desired joint angle is selected, including steps D1-D2:

[0120] Step D1: Given that the target index is the initial index value, select the joint angle at the last storage position in the target queue to obtain the desired joint angle.

[0121] Step D2: If the target index value is not the initial index value, select the joint angle of the target storage location in the target queue to obtain the desired joint angle; wherein, the target storage location is the storage location indicated by the index value obtained after subtracting 1 from the target index value.

[0122] The method also includes step E1:

[0123] In step E1, in response to obtaining the desired joint angle, the index value used to point to the currently selected desired joint angle is used as the index value of the target index.

[0124] Regarding step C1, during robot movement, the joint angles of the robot at various moments can be stored in a target queue. The target queue can be located inside or outside the robot; this embodiment does not specifically limit its location. Furthermore, the target queue has a target index, and the joint angles of the robot at any given moment can be stored at the storage location pointed to by the index value of the target index. The target index is used to point to the storage location of the joint angle to be written in the target queue. For example, if data 'a' is the joint angle to be written, and the index value of the target index in the target queue is 1, then data 'a' can be stored at the storage location pointed to by index value 1.

[0125] Regarding step C2, after storing the robot's joint angles at that moment into the target queue, the target index value can be updated by incrementing it by 1, resulting in the updated target index value. When storing the next joint angle, the next joint angle can be stored at the storage location pointed to by the updated target index value. For example, if the target index value of the target queue is 1, after data a is stored in the target queue, the target index value can be updated to 2.

[0126] Regarding step C3, after obtaining the updated target index value, it can be determined whether the updated target index value exceeds a predetermined index threshold; where the index threshold can be considered as the maximum index value allowed by the target queue, or as the index value of the last storage position in the target queue.

[0127] For step C4, where the updated target index value exceeds a predetermined index threshold, meaning the updated target index value exceeds the maximum allowed index value of the target queue (i.e., the storage location of the joint angle previously stored in the target queue is the last storage location in the target queue), the target index value can be updated and initialized. That is, the initial index value is determined as the target index value, and the process returns to step C1. This overwrites the storage location pointed to by the initial index value in the target queue, without occupying excessive storage space, thus improving the utilization rate of storage space.

[0128] For step C5, which is when the updated target index value does not exceed the predetermined index threshold, meaning the updated target index value does not exceed the maximum index value allowed by the target queue, that is, the storage position of the joint angle previously stored in the target queue is not the last storage position in the target queue; then, we can directly return to step C1 to store the joint angle at the next moment.

[0129] It is understandable that steps D1-D2 are the process of selecting the desired joint angle. Step D1 is for the case where the target index value is the initial index value. It can be assumed that the storage position of the previously stored joint angle in the target queue is the last storage position in the target queue, and the joint angle at the last storage position in the target queue is selected as the desired joint angle. Step D2 is for the case where the target index value is not the initial index value. It can be assumed that the storage position of the previously stored joint angle in the target queue is not the last storage position in the target queue, and the joint angle at the target storage position (the storage position indicated by the index value obtained by subtracting 1 from the target index value) in the target queue can be selected as the desired joint angle.

[0130] In step E1, in response to obtaining the desired joint angle, the index value used to point to the currently selected desired joint angle can be determined as the index value of the target index. Of course, in one implementation, the index value of the target index can also be updated by reducing the index value of the target index by 1, which is used as the updated index value of the target index. This application embodiment does not specifically limit this.

[0131] To better understand the above content regarding target queues, the following explanation is provided in conjunction with the accompanying diagram, such as... Figure 4 As shown:

[0132] S401, in response to the robot's movement, store the robot's joint angle at that moment in the storage location pointed to by the index value of the target index in the target queue;

[0133] The index value of the target index can also be called an index;

[0134] S402, increment the index value of the target index by 1 to obtain the updated index value of the target index;

[0135] S403, determine whether the index value of the updated target index exceeds the predetermined index threshold;

[0136] If yes, proceed to step S404; otherwise, return to step S401.

[0137] S404, set the initial index value 0 as the index value of the target index;

[0138] And, return to step S401.

[0139] As can be seen, in response to the robot's movement at any given moment, the steps of storing the robot's joint angle at that moment in the target queue at the storage location pointed to by the target index value, updating the target index value, and determining the initial index value as the target index value if the updated target index value exceeds a predetermined index threshold, and returning to the storage location pointed to by the target index value in the target queue, thus avoiding excessive storage space occupation and improving storage space utilization, thereby balancing the storage of robot joint angles at various moments with storage space utilization.

[0140] Optionally, in another embodiment, the output torque of the robot is calculated based on the robot's impedance torque, including step F1:

[0141] Step F1: Calculate the sum of the robot's impedance torque and the robot's feedforward torque to obtain the robot's output torque;

[0142] The methods for determining the robot's feedforward torque include:

[0143] After the robot moves at the current desired joint angle, the velocity and acceleration of each joint are estimated, and the target velocity and target acceleration of each joint are obtained.

[0144] The robot's inertial torque is determined based on the target acceleration of each joint;

[0145] Based on the target velocities of each joint of the robot and the current desired joint angles, the third torque of the robot is determined; wherein, the third torque is the torque characterizing the rotation of each joint, and / or the coupling torque generated by the rotation of any joint on other joints;

[0146] The robot's feedforward torque is obtained by calculating the sum of its inertial torque, third torque, and body weight torque.

[0147] It is understandable that feedforward torque, calculated and applied in advance through robot dynamics, is the theoretical torque required to actively compensate for known disturbances or changes in setpoints, thereby improving the robot's dynamic response performance. Furthermore, the aforementioned target velocity and target acceleration can also be referred to as the robot's target state information. The robot's output torque can be obtained by calculating the sum of the robot's impedance torque and its feedforward torque. The formula in robot dynamics can be:

[0148] ;

[0149] in, For the quality of the robot, For the joint angles of the robot's joints, For the speed of the robot's joints, For the acceleration of the robot's joints, For the robot's inertial torque, Characterizing the rotational torque of a joint, the rotational torque includes: the torque generated by joint rotation, and / or, the coupling torque generated by any joint on other joints when it rotates. For the robot's own weight torque, The torque applied to the robot.

[0150] It is understood that, based on the above formulas for robot dynamics, when calculating the robot's feedforward torque, it is necessary to determine at least the robot's inertial torque, the joint rotational torque, and the robot's own weight torque. After selecting the desired joint angle, the velocity and acceleration of each joint can be simulated after the robot moves according to the current desired joint angle, thereby obtaining the target velocity and target acceleration of each joint. Furthermore, the method for predicting the velocity and acceleration of each joint after the robot moves according to the current desired joint angle can be obtained by simulating the scene in which the robot is located, or it can be calculated based on the robot's spatial position and the current desired joint angle. This application does not specifically limit this aspect.

[0151] Furthermore, based on the target acceleration of each joint, the robot's inertial torque can be determined; based on the target velocity of each joint and the current desired joint angle, combined with the robot's own weight, length, and other parameters, the robot's third torque (the torque generated by the rotation of each joint, and / or the coupling torque generated by any joint on other joints when it rotates) is determined; the sum of the robot's inertial torque, the third torque, and the robot's own weight torque is calculated to obtain the robot's feedforward torque. Of course, the method for determining the feedforward torque described above is only an illustrative example, and this application does not specifically limit it.

[0152] To better understand the output torque of the robot described above, the following explanation is provided in conjunction with the formulas and accompanying diagrams:

[0153] ;

[0154] ;

[0155] in, For the robot's output torque, For the robot's feedforward torque, It can be considered as described above. That is, the robot's resistive torque, the definition of which has been introduced in the aforementioned formula and will not be repeated here; For the current desired joint angle, For the target speed, Accelerate towards the target For the robot's inertial torque, For the robot's third torque, This is the robot's own weight torque.

[0156] like Figure 5 As shown, the impedance controller is a virtual controller used to calculate the impedance torque. After the robot moves, the actual speed of each joint of the robot can be collected. ,right By performing integration, the current actual joint angles of each joint of the robot can be determined. ,Will Compared with the current expected joint angle By inputting the stiffness matrix K, the first torque can be calculated, and the target velocity can be determined. and By inputting the damping matrix B, the second torque can be calculated. The sum of the first and second torques can then be used to obtain the robot's impedance torque. Subsequent calculation of impedance torque With feedforward torque The sum of these can be used to obtain the robot's output torque. .

[0157] As can be seen, the embodiments of this application can calculate the sum of the robot's impedance torque and the robot's feedforward torque to obtain the robot's output torque. Subsequently, the robot's movement can be controlled according to the robot's output torque. The robot's output torque is also continuously adjusted, thereby avoiding rigid impacts and achieving flexible control, reducing the probability of motor damage, and thus effectively protecting the robot after a collision.

[0158] Based on the above method embodiments, such as Figure 6 As shown in the illustration, this application also provides a robot control device, including:

[0159] The selection module 610 is used to select a desired joint angle from the joint angles of the robot's joints at multiple historical moments in response to a collision; wherein the multiple historical moments are a series of consecutive moments including the moment preceding the collision; and the desired joint angle is the joint angle of each joint at the historical moment closest to the collision, which is among the joint angles that have not been selected.

[0160] The first determining module 620 is used to determine the impedance torque of the robot based on the current desired joint angle and according to a first determining method; wherein, the first determining method is: a method of determining the impedance torque based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot.

[0161] The first calculation module 630 is used to calculate the output torque of the robot based on the impedance torque of the robot, control the robot to move according to the output torque of the robot, and return to the step of selecting the desired joint angle from the joint angles of each joint of the robot at multiple historical moments.

[0162] Optionally, the device further includes:

[0163] The second calculation module is used to calculate the spatial position of the robot after it moves based on the current desired joint angle, before determining the robot's impedance torque according to the first determination method, based on the current desired joint angle, and to obtain the desired spatial position.

[0164] The third calculation module is used to calculate the distance between the desired spatial position and the spatial position of the robot at the time of the collision, and to obtain the current rebound distance;

[0165] The first triggering module is used to trigger the step of determining the robot's impedance torque based on the current expected joint angle and according to the first determination method in response to the current rebound distance not being greater than the preset rebound distance allowed after the robot collides.

[0166] Optionally, the device further includes:

[0167] The second determining module is used to calculate the distance between the desired spatial position and the spatial position of the robot when the collision occurs. After obtaining the current rebound distance, in response to the current rebound distance being greater than the preset rebound distance, the target joint angle is determined. The target joint angle is the most recent desired joint angle among the desired joint angles selected before the current desired joint angle.

[0168] The third determining module is used to determine the impedance torque of the robot based on the target joint angle and according to the second determining method, and to calculate the output torque of the robot according to the determined impedance torque, and to control the robot to move according to the calculated output torque; wherein, the second determining method is: a method of determining the impedance torque based on the deviation between the target joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot;

[0169] The control module is configured to control the robot to perform a power-down process in response to the power-down condition being met; and to return to the step of determining the robot's impedance torque based on the target joint angle and according to the second determination method if the power-down condition is not met.

[0170] Optionally, the power-down condition includes:

[0171] The time elapsed between the current time and the moment the collision occurred exceeds the predetermined timing duration.

[0172] Optionally, the first determining module is specifically used for:

[0173] Based on the current desired joint angle, the deviation of the current actual joint angle of each joint of the robot, and the stiffness matrix, a first torque is calculated; wherein, the stiffness matrix represents the conversion matrix between the deviation and the torque, and the first torque is: the torque required for each joint to move from the current actual joint angle to the current desired joint angle.

[0174] The second torque is calculated based on the current actual speed of each joint and the damping matrix; wherein the damping matrix represents the conversion matrix between the speed and torque of the robot, and the second torque is the torque used to reduce the current actual speed of each joint;

[0175] The impedance torque of the robot is obtained by calculating the sum of the first torque and the second torque.

[0176] Optionally, the device further includes:

[0177] A storage module is used to, in response to a collision with the robot, select a desired joint angle from the joint angles of each joint of the robot at multiple historical moments, and during the movement of the robot, in response to the robot moving at any moment, store the joint angle of the robot at that moment in the storage location pointed to by the index value of the target index in the target queue; wherein, the target index is an index used to point to the storage location of the joint angle to be written in the target queue;

[0178] An addition module is used to increment the index value of the target index by 1 to obtain the updated index value of the target index;

[0179] The judgment module is used to determine whether the index value of the updated target index exceeds the predetermined index threshold;

[0180] The fourth determining module is used to determine the initial index value as the index value of the target index, and return the step of responding to the robot moving at any time and storing the joint angle of the robot at that time in the target queue at the storage location pointed to by the index value of the target index; otherwise, return the step of responding to the robot moving at any time and storing the joint angle of the robot at that time in the target queue at the storage location pointed to by the index value of the target index.

[0181] Accordingly, select the module, specifically for:

[0182] With the target index value being the initial index value, the joint angle at the last storage position in the target queue is selected to obtain the desired joint angle;

[0183] If the target index value is not the initial index value, select the joint angle at the target storage location in the target queue to obtain the desired joint angle; wherein, the target storage location is the storage location indicated by the index value obtained by subtracting 1 from the target index value;

[0184] The selection module is also used for:

[0185] In response to obtaining the desired joint angle, the index value used to point to the currently selected desired joint angle is used as the index value of the target index.

[0186] Optionally, the first computing module is specifically used for:

[0187] The robot's output torque is obtained by calculating the sum of its impedance torque and its feedforward torque.

[0188] The method for determining the robot's feedforward torque includes:

[0189] After the robot moves at the current desired joint angle, the velocity and acceleration of each joint are estimated, and the target velocity and target acceleration of each joint are obtained.

[0190] The inertial torque of the robot is determined based on the target acceleration of each joint;

[0191] Based on the target velocities of each joint of the robot and the current desired joint angles, the third torque of the robot is determined; wherein, the third torque is the torque characterizing the rotation of each joint, and / or the coupling torque generated by any joint on other joints when any joint rotates;

[0192] The feedforward torque of the robot is obtained by calculating the sum of the robot's inertial torque, third torque, and body weight torque.

[0193] In the technical solution of this application, the operations of obtaining, storing, using, processing, transmitting, providing and disclosing user personal information are all carried out with the user's authorization.

[0194] This application also provides an electronic device, such as... Figure 7 As shown, it includes:

[0195] Memory 701 is used to store computer programs;

[0196] The processor 702 is used to execute the program stored in the memory 701 to implement any of the above-mentioned robot control methods.

[0197] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 702, the communication interface, and the memory 701 communicating with each other via the communication bus.

[0198] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0199] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0200] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0201] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0202] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the robot control methods described above.

[0203] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the robot control methods described above.

[0204] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0205] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0206] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0207] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A robot control method, characterized in that, include: In response to a collision, a desired joint angle is selected from the joint angles of each joint of the robot at multiple historical moments; wherein, the multiple historical moments are a series of consecutive moments including the moment preceding the collision; and the desired joint angle is: the joint angle of each joint at the historical moment closest to the collision, among the joint angles that have not been selected. Based on the current desired joint angle, the impedance torque of the robot is determined according to a first determination method; wherein, the first determination method is: a method of determining the impedance torque based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot. Based on the robot's impedance torque, calculate the robot's output torque, control the robot to move according to the robot's output torque, and return to the step of selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments.

2. The method according to claim 1, characterized in that, Before determining the robot's impedance torque based on the current desired joint angle according to the first determination method, the method further includes: The desired spatial position is obtained by calculating the robot's spatial position after it moves based on the current desired joint angle. Calculate the distance between the desired spatial position and the robot's spatial position at the time of the collision to obtain the current rebound distance; In response to the current rebound distance not being greater than the preset rebound distance allowed after the robot collides, the step of determining the robot's impedance torque based on the current desired joint angle and in accordance with the first determination method is triggered.

3. The method according to claim 2, characterized in that, After calculating the distance between the desired spatial position and the robot's spatial position at the time of the collision to obtain the current rebound distance, the method further includes: In response to the current rebound distance being greater than the preset rebound distance, a target joint angle is determined, wherein the target joint angle is the most recent expected joint angle among the expected joint angles selected before the current expected joint angle; Based on the target joint angle, the impedance torque of the robot is determined according to the second determination method, and the output torque of the robot is calculated according to the determined impedance torque. The robot is then controlled to move according to the calculated output torque. The second determination method is a method of determining the impedance torque based on the deviation between the target joint angle and the current actual joint angle of each joint of the robot, as well as the current actual speed of each joint of the robot. In response to the failure to meet the power-down condition, the process returns to the step of determining the robot's impedance torque based on the target joint angle according to the second determination method; and, In response to the fulfillment of the power-down condition, the robot is controlled to perform a power-down process.

4. The method according to claim 3, characterized in that, The conditions for satisfying the power-down condition include: The time elapsed between the current time and the moment the collision occurred exceeds the predetermined timing duration.

5. The method according to any one of claims 1-4, characterized in that, The determination of the robot's impedance torque based on the current desired joint angle, according to a first determination method, includes: Based on the current desired joint angle, the deviation of the current actual joint angle of each joint of the robot, and the stiffness matrix, a first torque is calculated; wherein, the stiffness matrix represents the conversion matrix between the deviation and the torque, and the first torque is: the torque required for each joint to move from the current actual joint angle to the current desired joint angle. The second torque is calculated based on the current actual speed of each joint and the damping matrix; wherein the damping matrix represents the conversion matrix between the speed and torque of the robot, and the second torque is the torque used to reduce the current actual speed of each joint; The impedance torque of the robot is obtained by calculating the sum of the first torque and the second torque.

6. The method according to any one of claims 1-4, characterized in that, Before selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments in response to a robot collision, the method further includes: During the robot's movement, in response to the robot's movement at any given moment, the joint angle of the robot at that moment is stored in the storage location pointed to by the index value of the target index in the target queue; wherein, the target index is an index used to point to the storage location of the joint angle to be written in the target queue; Increment the index value of the target index by 1 to obtain the updated index value of the target index; Determine whether the updated target index value exceeds the predetermined index threshold; If so, determine the initial index value as the index value of the target index, and return the step of responding to the robot's movement at any time and storing the robot's joint angle at that time in the target queue at the storage location pointed to by the index value of the target index; Otherwise, return to the step of responding to the robot's movement at any given moment and storing the robot's joint angle at that moment in the storage location pointed to by the index value of the target index in the target queue; Accordingly, selecting the desired joint angle from the joint angles of the robot at multiple historical moments includes: With the target index value being the initial index value, the joint angle at the last storage position in the target queue is selected to obtain the desired joint angle; If the target index value is not the initial index value, select the joint angle at the target storage location in the target queue to obtain the desired joint angle; wherein, the target storage location is the storage location indicated by the index value obtained by subtracting 1 from the target index value; The method further includes: In response to obtaining the desired joint angle, the index value used to point to the currently selected desired joint angle is used as the index value of the target index.

7. The method according to any one of claims 1-4, characterized in that, The step of calculating the robot's output torque based on the robot's impedance torque includes: The robot's output torque is obtained by calculating the sum of its impedance torque and its feedforward torque. The method for determining the robot's feedforward torque includes: After the robot moves at the current desired joint angle, the velocity and acceleration of each joint are estimated, and the target velocity and target acceleration of each joint are obtained. The inertial torque of the robot is determined based on the target acceleration of each joint; Based on the target velocities of each joint of the robot and the current desired joint angles, the third torque of the robot is determined; wherein, the third torque is the torque characterizing the rotation of each joint, and / or the coupling torque generated by any joint on other joints when any joint rotates; The feedforward torque of the robot is obtained by calculating the sum of the robot's inertial torque, third torque, and body weight torque.

8. A robot control device, characterized in that, include: A selection module is used to select a desired joint angle from the joint angles of the robot's joints at multiple historical moments in response to a collision; wherein the multiple historical moments are a series of consecutive moments including the moment preceding the collision; and the desired joint angle is the joint angle of each joint at the historical moment closest to the collision, among the joint angles that have not been selected. The first determining module is used to determine the impedance torque of the robot based on the current desired joint angle and according to the first determining method; wherein, the first determining method is: the impedance torque is determined based on the deviation between the current desired joint angle and the current actual joint angle of each joint of the robot, and the current actual speed of each joint of the robot. The first calculation module is used to calculate the output torque of the robot based on the robot's impedance torque, control the robot to move according to the robot's output torque, and return to the step of selecting the desired joint angle from the joint angles of the robot's joints at multiple historical moments.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.