A collision detection method, device, computer-readable storage medium and robot

By combining a perturbation observer based on generalized momentum and a long-short-term memory network, the joint external moments of the robot are calculated, which solves the problem of low collision detection accuracy in the existing technology and achieves more accurate collision detection.

CN114211491BActive Publication Date: 2024-09-17UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111561944.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2024-09-17
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Existing robot collision detection methods have low accuracy and are difficult to accurately determine the contact moment between the robot and the external environment, resulting in false detection and reduced collision detection accuracy.

Method used

A disturbance observer based on generalized momentum is used to calculate the robot's external joint torque, and combined with long short-term memory network learning to predict unmodeled errors and parameter identification errors, the robot's third joint external torque is calculated to determine whether a collision occurs.

Benefits of technology

The accuracy of robot collision detection is improved, false detections are reduced, and the safe operation function of the robot is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114211491B
    Figure CN114211491B
Patent Text Reader

Abstract

The present application belongs to the field of robot technology, and in particular, relates to a collision detection method, device, computer-readable storage medium and robot. The method comprises: calculating the first joint external torque of the robot according to a preset disturbance observer based on generalized momentum; calculating the second joint external torque of the robot according to a preset long short-term memory network; calculating the third joint external torque of the robot according to the first joint external torque and the second joint external torque; judging whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold. In the present application, a disturbance observer based on generalized momentum is used to calculate the real-time joint external torque, and a long short-term memory network is used to learn and predict the unmodeled error and parameter identification error of the robot. The combination of the two eliminates the model error component in the joint external torque calculated by the disturbance observer, obtains accurate contact torque, and improves the collision detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of robotics technology, and in particular, relates to a collision detection method, device, computer-readable storage medium, and robot. Background Art

[0002] With the popularization of collaborative robots in various production and life scenarios, the possibility of robots interacting with people and the environment has greatly increased. Therefore, the force perception of robots interacting with the external environment is particularly important, which is the basic link for realizing the safe operation of robot force control. At present, for the collision detection when the robot interacts with the external environment, on the one hand, a threshold is set for the output torque of the joint motor or the rate of change of the output torque to determine whether a collision occurs. This method is not accurate and often requires a large contact force to be detected. On the other hand, the dynamic model of the robot is established and the joint torque prediction of the robot motion process is realized through parameter identification. This is the current mainstream technical solution, but it is difficult to establish an accurate joint friction model, and there are still errors in parameter identification. In addition, when calculating the joint torque through the dynamic model, the joint acceleration of the robot is required. Often, the acceleration information cannot be directly obtained. The indirect method of velocity differentiation will introduce data noise. Combining the above factors, the joint external torque calculated by this scheme has a large error, that is, even if the robot does not collide with the outside world, the estimated joint external torque still has a large value. This requires setting a large judgment threshold to avoid false detection of collisions, and an excessively large threshold reduces the accuracy of collision detection, which poses a challenge to improving the safe operation function of the robot. Summary of the invention

[0003] In view of this, embodiments of the present application provide a collision detection method, device, computer-readable storage medium, and robot to solve the problem of low accuracy of existing collision detection methods.

[0004] A first aspect of an embodiment of the present application provides a collision detection method, which may include:

[0005] Calculating the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer;

[0006] Collecting a joint state time series of the robot during the motion process; wherein the joint state time series is a sequence composed of several groups of joint states at different times arranged in chronological order, and each group of joint states includes a joint position, a joint speed, and a temperature of a joint motor; inputting the joint state time series into a preset long short-term memory network for processing, and using the output of the long short-term memory network as the second joint external torque of the robot;

[0007] Calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque;

[0008] Whether the robot collides with the external environment is determined according to the third joint external torque and a preset collision threshold.

[0009] In a specific implementation of the first aspect, calculating the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer may include:

[0010] calculating a generalized momentum residual of the robot according to the disturbance observer;

[0011] The first joint external torque is calculated according to the generalized momentum residual.

[0012] In a specific implementation of the first aspect, the expression of the disturbance observer is:

[0013]

[0014] Where p is the generalized momentum of the robot, is the estimated value of p, τ m is the joint torque of the robot, τ f is the joint friction torque of the robot, is τ f The estimated value of , q is the joint position of the robot, is the joint velocity of the robot, g(q) is the gravity vector of the robot, is the Coriolis force and centrifugal force matrix of the robot, for The transposed matrix of for The estimated value of K O is the gain matrix of the disturbance observer, and r is the generalized momentum residual.

[0015] In a specific implementation of the first aspect, calculating the generalized momentum residual of the robot according to the disturbance observer may include:

[0016] The generalized momentum residual is calculated according to the following formula:

[0017]

[0018] Among them, 0 is the preset initial moment, p(0) is the generalized momentum of the robot at the initial moment, t is the time variable, and p(t) is the generalized momentum of the robot at time t.

[0019] In a specific implementation of the first aspect, calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque may include:

[0020] Calculating a torque difference between the first joint external torque and the second joint external torque;

[0021] The torque difference is determined as the third joint external torque.

[0022] In a specific implementation of the first aspect, judging whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold may include:

[0023] If the third joint external torque is greater than the collision threshold, it is determined that the robot collides with the external environment;

[0024] If the third joint external torque is less than or equal to the collision threshold, it is determined that the robot has not collided with the external environment.

[0025] A second aspect of an embodiment of the present application provides a collision detection device, which may include:

[0026] A first joint external torque calculation module, used for calculating the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer;

[0027] A second joint external torque calculation module is used to collect a joint state time series of the robot during movement; wherein the joint state time series is a sequence composed of several groups of joint states at different times arranged in chronological order, and each group of joint states includes a joint position, a joint speed, and a temperature of a joint motor; the joint state time series is input into a preset long short-term memory network for processing, and the output of the long short-term memory network is used as the second joint external torque of the robot;

[0028] a third joint external torque calculation module, used for calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque;

[0029] The collision detection module is used to determine whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold.

[0030] In a specific implementation of the second aspect, the first joint external torque calculation module may specifically include:

[0031] A generalized momentum residual calculation unit, used for calculating the generalized momentum residual of the robot according to the disturbance observer;

[0032] The first joint external torque calculation unit is used to calculate the first joint external torque according to the generalized momentum residual.

[0033] In a specific implementation of the second aspect, the expression of the disturbance observer is:

[0034]

[0035] Where p is the generalized momentum of the robot, is the estimated value of p, τ m is the joint torque of the robot, τ f is the joint friction torque of the robot, is τ f The estimated value of , q is the joint position of the robot, is the joint velocity of the robot, g(q) is the gravity vector of the robot, is the Coriolis force and centrifugal force matrix of the robot, for The transposed matrix of for The estimated value of K O is the gain matrix of the disturbance observer, and r is the generalized momentum residual.

[0036] In a specific implementation of the second aspect, the generalized momentum residual calculation unit is specifically used to calculate the generalized momentum residual according to the following formula:

[0037]

[0038] Among them, 0 is the preset initial moment, p(0) is the generalized momentum of the robot at the initial moment, t is the time variable, and p(t) is the generalized momentum of the robot at time t.

[0039] In a specific implementation of the second aspect, the third joint external torque calculation module can be specifically used to: calculate the torque difference between the first joint external torque and the second joint external torque; and determine the torque difference as the third joint external torque.

[0040] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned collision detection methods are implemented.

[0041] A fourth aspect of an embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned collision detection methods when executing the computer program.

[0042] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a robot, the robot executes the steps of any one of the above-mentioned collision detection methods.

[0043] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application calculate the first joint external torque of the robot according to a preset disturbance observer based on generalized momentum; calculate the second joint external torque of the robot according to a preset long short-term memory network; calculate the third joint external torque of the robot according to the first joint external torque and the second joint external torque; and determine whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold. In the embodiments of the present application, a disturbance observer based on generalized momentum is used to calculate the real-time joint external torque, and a long short-term memory network is used to learn and predict the unmodeled error and parameter identification error of the robot. The combination of the two eliminates the model error component in the joint external torque calculated by the disturbance observer, and obtains an accurate contact torque between the robot and the external environment, thereby improving the collision detection accuracy of the robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 This is a flow chart of an embodiment of a collision detection method in an embodiment of the present application;

[0046] Figure 2 This is a structural diagram of an embodiment of a collision detection device in an embodiment of the present application;

[0047] Figure 3 This is a schematic block diagram of a robot in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0050] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0051] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0052] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0053] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0054] See also Figure 1 , an embodiment of a collision detection method in an embodiment of the present application may include:

[0055] Step S101 : calculating a first joint external torque of the robot according to a preset generalized momentum-based disturbance observer.

[0056] In the presence of external forces, the rigid body dynamics equation of the robot can be expressed as:

[0057]

[0058] Where q∈R n are the joint positions of the robot, is the joint velocity of the robot, is the joint acceleration of the robot, M(q)∈R n×n is the symmetric positive definite inertia matrix of the robot, is the Coriolis force and centrifugal force matrix of the robot, g(q)∈R n is the gravity vector of the robot, τ f ∈R n is the joint friction torque of the robot, τ m ∈R n is the joint torque of the robot, τ ext ∈R n is the external joint torque of the robot, and n is the degree of freedom of the robot.

[0059] According to the basic characteristics of the rigid body dynamics equation, it can be deduced that:

[0060]

[0061] in, is the transposed matrix of C(q,q), is the first-order derivative of M(q).

[0062] The generalized momentum of the robot can be calculated by the following formula:

[0063]

[0064] Wherein, p is the generalized momentum.

[0065] Taking the time derivative of both sides of equation (3), we can obtain:

[0066]

[0067] in, is the first-order derivative of p.

[0068] Substituting equation (1) and equation (2) into equation (4), we can obtain:

[0069]

[0070] Therefore, the disturbance observer based on generalized momentum can be defined as follows:

[0071]

[0072] in, is the estimated value of p, is the estimated value of M(q), for The first derivative of is τ f The estimated value of for The estimated value of K O is the gain matrix of the disturbance observer, r is the generalized momentum residual, is the first-order derivative of r.

[0073] Integrating both sides of the second equation of equation (6) yields:

[0074]

[0075] Among them, 0 is the preset initial moment, p(0) is the generalized momentum of the robot at the initial moment, t is the time variable, and p(t) is the generalized momentum of the robot at time t.

[0076] In an ideal situation, Then the joint external torque τ ext The relationship between the generalized momentum residual r is as follows:

[0077]

[0078] By performing Laplace transform on equation (8), we can obtain:

[0079]

[0080] Where r(s) is the Laplace transform of r, τ ext (s) is τ ext The Laplace transform of O =1 / K O , in the limit case, the following results can be derived:

[0081]

[0082] Therefore, the generalized momentum residual r is the joint external torque τ ext In the embodiment of the present application, the generalized momentum residual r can be calculated in real time by equation (7), and it can be approximately equivalent to the joint external torque τ ext , for the sake of distinction, this equivalent quantity is recorded as the external torque of the first joint.

[0083] From equation (7), it can be seen that the use of generalized momentum disturbance observer to calculate joint external torque does not require joint acceleration information, and each joint external force is completely decoupled from the robot configuration. However, in actual situations, there are inevitable errors in identifying the robot dynamics model, that is, At the same time, it is impossible to establish a friction model that fully reflects the actual working conditions, and there will always be factors that are not considered to affect the friction torque. Combining these two reasons, even if the robot does not collide, the generalized momentum residual r will still have a large value, and often a larger collision threshold is set to avoid false detection during movement. This process reduces the sensitivity of collision detection. In order to solve this problem, in the embodiment of the present application, it is proposed to use a long short-term memory (LSTM) network to learn unmodeled errors and model identification errors, so as to compensate for these errors to achieve the purpose of lowering the collision threshold and improving the accuracy of collision detection.

[0084] Step S102: Calculate the second joint external torque of the robot according to a preset long short-term memory network.

[0085] During the collection of the training data set, motion target points can be randomly generated in the robot workspace, and the trajectory can be planned to control the robot's motion, ensuring that the robot has no contact with the external environment during the motion. The joint positions, joint velocities, joint motor temperatures, and generalized momentum residuals output by the disturbance observer during the robot's motion are collected and stored in time series as subsequent training data sets. It should be noted that in the absence of collisions, the generalized momentum residual output by the disturbance observer is the unknown torque caused by the unmodeled error and the model identification error, that is: in, It is the unknown torque caused by the unmodeled error and the model identification error. For the sake of distinction, it is recorded as the external torque of the second joint.

[0086] After completing the collection of the training data set, you can build an LSTM network for learning. LSTM is a special form of recursive neural network. After being expanded in time series, it is a common three-layer neural network (input layer, hidden layer and output layer).

[0087] The relationship between the second joint external torque and the input joint state time series can be expressed as follows:

[0088]

[0089] Where f(·) is the mapping from input data to the output residual of the disturbance observer, x err is the input joint state time series, x err=[x(k-m+1),...,x(k-1),x(k)], m is the length of the joint state time series, k is the sequence number of different moments, x(k) is the joint state at moment k, q(k) is the joint position at time k, is the joint speed at time k, and T(k) is the temperature of the joint motor at time k.

[0090] Therefore, training the LSTM network f θ To learn the mapping f(·), and choose the training input x LSTM =x err , through the learning of a large amount of data, a model of the robot state and the second joint torque is constructed, namely:

[0091] τ LSTM =f θ (x LSTM ) Formula (12)

[0092] After the training of the LSTM network is completed, the joint state time series of the robot during the movement can be collected, the joint state time series can be input into the LSTM network for processing, and the output of the LSTM network can be used as the second joint external torque, that is:

[0093] Step S103: Calculate a third joint external torque of the robot according to the first joint external torque and the second joint external torque.

[0094] Specifically, the torque difference between the first joint external torque and the second joint external torque may be calculated according to the following formula:

[0095]

[0096] in, This is the torque difference, that is, the external joint torque after the error is eliminated. For the sake of distinction, it is recorded as the third joint external torque here.

[0097] Step S104: determining whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold.

[0098] Specifically, the third joint external torque can be compared with the collision threshold. If the third joint external torque is greater than the collision threshold, it is determined that the robot collides with the external environment; if the third joint external torque is less than or equal to the collision threshold, it is determined that the robot does not collide with the external environment. The specific value of the collision threshold can be set according to actual conditions, and the embodiments of the present application do not specifically limit this.

[0099] In summary, the embodiment of the present application calculates the first joint external torque of the robot according to a preset disturbance observer based on generalized momentum; calculates the second joint external torque of the robot according to a preset long short-term memory network; calculates the third joint external torque of the robot according to the first joint external torque and the second joint external torque; and determines whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold. In the embodiment of the present application, a disturbance observer based on generalized momentum is used to calculate the real-time joint external torque, and a long short-term memory network is used to learn and predict the unmodeled error and parameter identification error of the robot. The combination of the two eliminates the model error component in the joint external torque calculated by the disturbance observer, and obtains an accurate contact torque between the robot and the external environment, thereby improving the collision detection accuracy of the robot.

[0100] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0101] Corresponding to a collision detection method described in the above embodiment, Figure 2 A structural diagram of an embodiment of a collision detection device provided in an embodiment of the present application is shown.

[0102] In this embodiment, a collision detection device may include:

[0103] A first joint external torque calculation module 201 is used to calculate the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer;

[0104] A second joint external torque calculation module 202, used for calculating the second joint external torque of the robot according to a preset long short-term memory network;

[0105] A third joint external torque calculation module 203, used for calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque;

[0106] The collision detection module 204 is used to determine whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold.

[0107] In a specific implementation of the embodiment of the present application, the first joint external torque calculation module may specifically include:

[0108] A generalized momentum residual calculation unit, used for calculating the generalized momentum residual of the robot according to the disturbance observer;

[0109] The first joint external torque calculation unit is used to calculate the first joint external torque according to the generalized momentum residual.

[0110] In a specific implementation of the embodiment of the present application, the expression of the disturbance observer is:

[0111]

[0112] Where p is the generalized momentum of the robot, is the estimated value of p, τ m is the joint torque of the robot, τ f is the joint friction torque of the robot, is τ f The estimated value of , q is the joint position of the robot, is the joint velocity of the robot, g(q) is the gravity vector of the robot, is the Coriolis force and centrifugal force matrix of the robot, for The transposed matrix of for The estimated value of K O is the gain matrix of the disturbance observer, and r is the generalized momentum residual.

[0113] In a specific implementation of the embodiment of the present application, the generalized momentum residual calculation unit is specifically used to calculate the generalized momentum residual according to the following formula:

[0114]

[0115] Among them, 0 is the preset initial moment, p(0) is the generalized momentum of the robot at the initial moment, t is the time variable, and p(t) is the generalized momentum of the robot at time t.

[0116] In a specific implementation of an embodiment of the present application, the second joint external torque calculation module can be specifically used to: collect the joint state time series of the robot during the movement; wherein the joint state time series is a sequence composed of several groups of joint states at different times arranged in chronological order, and each group of joint states includes joint position, joint speed and temperature of the joint motor; the joint state time series is input into the long short-term memory network for processing, and the output of the long short-term memory network is used as the second joint external torque.

[0117] In a specific implementation of the embodiment of the present application, the third joint external torque calculation module can be specifically used to: calculate the torque difference between the first joint external torque and the second joint external torque; and determine the torque difference as the third joint external torque.

[0118] In a specific implementation method of an embodiment of the present application, the collision detection module can be specifically used to: if the external torque of the third joint is greater than the collision threshold, it is determined that the robot has collided with the external environment; if the external torque of the third joint is less than or equal to the collision threshold, it is determined that the robot has not collided with the external environment.

[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] Figure 3 A schematic block diagram of a robot provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0122] like Figure 3 As shown, the robot 3 of this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30. When the processor 30 executes the computer program 32, the steps in the above-mentioned collision detection method embodiments are implemented, for example Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 2 The functions of modules 201 to 204 are shown.

[0123] Exemplarily, the computer program 32 may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 32 in the robot 3.

[0124] Those skilled in the art will understand that Figure 3It is only an example of the robot 3 and does not constitute a limitation of the robot 3. The robot 3 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot 3 may also include input and output devices, network access devices, buses, etc.

[0125] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0126] The memory 31 may be an internal storage unit of the robot 3, such as a hard disk or memory of the robot 3. The memory 31 may also be an external storage device of the robot 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the robot 3. The memory 31 is used to store the computer program and other programs and data required by the robot 3. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0127] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0128] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0129] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0130] In the embodiments provided in the present application, it should be understood that the disclosed devices / robots and methods can be implemented in other ways. For example, the device / robot embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0133] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.

[0134] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A collision detection method, characterized in that: include: Calculating the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer; Collecting a joint state time series of the robot during the motion process; wherein the joint state time series is a sequence composed of several groups of joint states at different times arranged in chronological order, and each group of joint states includes a joint position, a joint speed, and a temperature of a joint motor; inputting the joint state time series into a preset long short-term memory network for processing, and using the output of the long short-term memory network as the second joint external torque of the robot; Calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque; Whether the robot collides with the external environment is determined according to the third joint external torque and a preset collision threshold.

2. The collision detection method according to claim 1, characterized in that: The calculating of the first joint external torque of the robot according to a preset disturbance observer based on generalized momentum includes: calculating a generalized momentum residual of the robot according to the disturbance observer; The first joint external torque is calculated according to the generalized momentum residual.

3. The collision detection method according to claim 2, characterized in that: The expression of the disturbance observer is: Where p is the generalized momentum of the robot, is the estimated value of p, τ m is the joint torque of the robot, τ f is the joint friction torque of the robot, is τ f The estimated value of , q is the joint position of the robot, is the joint velocity of the robot, g(q) is the gravity vector of the robot, is the Coriolis force and centrifugal force matrix of the robot, for The transposed matrix of for The estimated value of K O is the gain matrix of the disturbance observer, and r is the generalized momentum residual.

4. The collision detection method according to claim 3, characterized in that: The calculating the generalized momentum residual of the robot according to the disturbance observer comprises: The generalized momentum residual is calculated according to the following formula: Among them, 0 is the preset initial moment, p(0) is the generalized momentum of the robot at the initial moment, t is the time variable, and p(t) is the generalized momentum of the robot at time t.

5. The collision detection method according to claim 1, characterized in that: The calculating the third joint external torque of the robot according to the first joint external torque and the second joint external torque comprises: Calculating a torque difference between the first joint external torque and the second joint external torque; The torque difference is determined as the third joint external torque.

6. The collision detection method according to any one of claims 1 to 5, characterized in that: The determining whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold comprises: If the third joint external torque is greater than the collision threshold, it is determined that the robot collides with the external environment; If the third joint external torque is less than or equal to the collision threshold, it is determined that the robot has not collided with the external environment.

7. A collision detection device, characterized in that: include: A first joint external torque calculation module, used for calculating the first joint external torque of the robot according to a preset generalized momentum-based disturbance observer; A second joint external torque calculation module is used to collect a joint state time series of the robot during movement; wherein the joint state time series is a sequence composed of several groups of joint states at different times arranged in chronological order, and each group of joint states includes a joint position, a joint speed, and a temperature of a joint motor; the joint state time series is input into a preset long short-term memory network for processing, and the output of the long short-term memory network is used as the second joint external torque of the robot; a third joint external torque calculation module, used for calculating a third joint external torque of the robot according to the first joint external torque and the second joint external torque; The collision detection module is used to determine whether the robot collides with the external environment according to the third joint external torque and a preset collision threshold.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the collision detection method according to any one of claims 1 to 6 are implemented.

9. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the collision detection method according to any one of claims 1 to 6 are implemented.