Robot control method, device and storage medium

By obtaining the robot's entire body angular momentum matrix and constructing an inverse function, including the joint velocity cost function, the non-smoothness problem when inverting the Jacobian matrix is ​​solved, and the flexibility and robustness of the robot control are achieved.

CN115229801BActive Publication Date: 2025-09-16LEJU (SHENZHEN) ROBOTICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211067157.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2025-09-16
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

In existing robot control methods, the inverse kinematics calculation based on the Jacobian matrix has the problem of non-smooth trajectory, resulting in insufficient control flexibility.

Method used

By obtaining the robot's whole-body angular momentum matrix, constructing the robot's inverse solution function, including the joint velocity cost function, calculating the generalized position and generalized velocity, and performing motion control to avoid the generalized velocity infinity phenomenon and improve robustness.

Benefits of technology

The flexibility and robustness of robot control are achieved, the phenomenon of generalized velocity infinity is avoided, and the range of solvable motion is expanded.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115229801B_ABST
    Figure CN115229801B_ABST
Patent Text Reader

Abstract

The present application provides a robot control method, device, and storage medium, relating to the field of robotics. The method comprises: obtaining the whole-body angular momentum matrix of the robot at the current moment; constructing a robot inverse solution function based on the whole-body angular momentum matrix of the robot at the current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at the current moment is less than a joint velocity threshold; calculating and obtaining the generalized position and generalized velocity of the robot at the current moment based on the inverse solution function; and performing motion control on the robot based on the generalized position and generalized velocity of the robot at the current moment. By applying the embodiments of the present application, the joint velocity cost function can be used to avoid the phenomenon of the robot's generalized velocity being infinite at any time, thereby improving the robustness of the robot control method and achieving compliant control of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a robot control method, device, and storage medium. Background Art

[0002] Inverse kinematics of robots is a study that solves the angles of each joint based on the posture of the robot's torso and feet.

[0003] Existing inverse solution methods mainly perform inverse kinematics calculations based on the Jacobian matrix. The Jacobian matrix can be used to solve the Cartesian space velocity and angular velocity of the end effector using the robot joint angular velocity. In addition, when the Jacobian matrix is ​​not invertible, the pseudo-inverse matrix is ​​calculated.

[0004] However, the Jacobian matrix inversion or pseudo-inverse algorithm has the problem of non-smooth trajectory. Therefore, the existing robot control method has the problem of insufficient control flexibility. Summary of the Invention

[0005] The purpose of this application is to provide a robot control method, device and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the related problems in the above-mentioned prior art.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:

[0007] In a first aspect, the present invention provides a robot control method, comprising:

[0008] Get the robot's whole body angular momentum matrix at the current moment;

[0009] constructing a robot inverse solution function according to the whole-body angular momentum matrix of the robot at the current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at the current moment is less than a joint velocity threshold;

[0010] Calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse function;

[0011] The robot is motion-controlled according to the generalized position and generalized velocity of the robot at the current moment.

[0012] In an optional embodiment, the inverse solution function further includes: a joint position cost function, which is used to indicate that the difference between the generalized position of the robot at the current moment and the generalized position of the robot at the previous moment is less than a first preset threshold.

[0013] In an optional embodiment, the inverse solution function further includes: a robot center of mass angular momentum cost function, which is used to indicate that the difference between the robot's center of mass angular momentum at the current moment and the robot's expected angular momentum at the current moment is less than a second preset threshold.

[0014] In an optional embodiment, the calculating and obtaining the generalized position and generalized velocity of the robot at the current moment according to the inverse function includes:

[0015] Calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse function and preset constraints, wherein the preset constraints include: a center of mass position constraint, a preset contact point position constraint of the robot's sole, and a generalized position constraint of the robot;

[0016] The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position;

[0017] The robot sole preset contact point position constraint condition is used to indicate that the robot sole preset contact point position at the current moment is constrained by the preset contact point calculation function and the expected contact point position;

[0018] The robot generalized position constraint condition is used to indicate that the generalized position of the robot at a current moment is calculated based on the generalized position of the robot at a previous moment and the generalized speed of the robot at the current moment.

[0019] In an optional embodiment, the calculating and obtaining the generalized position and generalized velocity of the robot at the current moment according to the inverse function and preset constraints includes:

[0020] When it is determined that the function value of the inverse function is minimum and satisfies the preset constraint conditions, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment.

[0021] In an optional embodiment, the method further comprises:

[0022] respectively obtaining the mass of each link in the robot and the generalized velocity of the robot;

[0023] The center of mass angular momentum of the robot at the current moment is calculated based on the mass of each link in the robot, the generalized velocity of the robot at the current moment, and the Jacobian matrix corresponding to each link at the current moment.

[0024] In an optional embodiment, obtaining the whole-body angular momentum matrix of the robot at the current moment includes:

[0025] Obtaining the mass of each connecting rod in the robot;

[0026] The whole-body angular momentum matrix of the robot at the current moment is calculated according to the mass of each link in the robot and the Jacobian matrix corresponding to each link at the current moment.

[0027] In a second aspect, the present invention provides a robot control device, comprising:

[0028] The acquisition module is used to obtain the robot's whole body angular momentum matrix at the current moment;

[0029] A construction module is used to construct a robot inverse solution function according to the whole body angular momentum matrix of the robot at a current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at a current moment is less than a joint velocity threshold;

[0030] A calculation module, configured to calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse solution function;

[0031] The control module is used to control the motion of the robot according to the generalized position and generalized speed of the robot at a current moment.

[0032] In an optional embodiment, the inverse solution function further includes: a joint position cost function, which is used to indicate that the difference between the generalized position of the robot at the current moment and the generalized position of the robot at the previous moment is less than a first preset threshold.

[0033] In an optional embodiment, the inverse solution function further includes: a robot center of mass angular momentum cost function, which is used to indicate that the difference between the robot's center of mass angular momentum at the current moment and the robot's expected angular momentum at the current moment is less than a second preset threshold.

[0034] In an optional embodiment, the calculation module is specifically configured to calculate and obtain the generalized position and generalized velocity of the robot at the current moment based on the inverse function and preset constraints, wherein the preset constraints include: a center of mass position constraint, a preset contact point position constraint of the robot's sole, and a generalized position constraint of the robot;

[0035] The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position;

[0036] The robot sole preset contact point position constraint condition is used to indicate that the robot sole preset contact point position at the current moment is constrained by the preset contact point calculation function and the expected contact point position;

[0037] The robot generalized position constraint condition is used to indicate that the generalized position of the robot at a current moment is calculated based on the generalized position of the robot at a previous moment and the generalized speed of the robot at the current moment.

[0038] In an optional embodiment, the calculation module is specifically used to determine that when the function value of the inverse function is minimum and satisfies the preset constraints, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment.

[0039] In an optional embodiment, the calculation module is further configured to respectively obtain the mass of each link in the robot and the generalized velocity of the robot;

[0040] The center of mass angular momentum of the robot at the current moment is calculated based on the mass of each link in the robot, the generalized velocity of the robot at the current moment, and the Jacobian matrix corresponding to each link at the current moment.

[0041] In an optional embodiment, the acquisition module is specifically used to obtain the mass of each connecting rod in the robot;

[0042] The whole-body angular momentum matrix of the robot at the current moment is calculated according to the mass of each link in the robot and the Jacobian matrix corresponding to each link at the current moment.

[0043] In a third aspect, the present invention provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the robot control method as described in any of the aforementioned embodiments.

[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the robot control method as described in any of the aforementioned embodiments are executed.

[0045] The beneficial effects of this application are:

[0046] In the robot control method, device and storage medium provided in the embodiments of the present application, the whole-body angular momentum matrix of the robot at the current moment is obtained; based on the whole-body angular momentum matrix of the robot at the current moment, a robot inverse solution function is constructed, and the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at the current moment is less than the joint velocity threshold; according to the inverse solution function, the generalized position and generalized velocity of the robot at the current moment are calculated and obtained; according to the generalized position and generalized velocity of the robot at the current moment, the robot is motion-controlled. By applying the embodiments of the present application, the joint velocity cost function can be used to avoid the phenomenon that the generalized velocity of the robot at any moment is infinite. Therefore, the robustness of the robot control method can be improved, and the flexible control of the robot can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 A schematic flow chart of a robot control method provided in an embodiment of the present application;

[0049] Figure 2 A schematic flow chart of another robot control method provided in an embodiment of the present application;

[0050] Figure 3 A schematic flow chart of another robot control method provided in an embodiment of the present application;

[0051] Figure 4 A schematic flow chart of another robot control method provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of the functional modules of a robot control device provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0055] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0057] In the prior art, when controlling a robot based on inverse kinematics, the inverse kinematics calculation is generally performed based on the Jacobian matrix. However, when the Jacobian matrix is ​​not invertible, a pseudo-inverse matrix is ​​calculated. Therefore, the solution often results in a robot control method that is not flexible enough.

[0058] In view of this, an embodiment of the present application provides a robot control method, by applying this method, compliant control of the robot can be achieved.

[0059] Figure 1 This is a flow chart of a robot control method provided in an embodiment of the present application. The execution subject of the method may be a robot, specifically a processor in the robot. Optionally, the robot may be a legged robot, a jumping robot, or other robot including at least one joint, which is not limited here. Figure 1 As shown, the method may include:

[0060] S101. Obtain the whole body angular momentum matrix of the robot at the current moment.

[0061] The robot's whole-body angular momentum matrix represents the relationship between the robot's generalized velocity and center-of-mass angular momentum at the current moment. This matrix can be calculated by calculating the ratio of the robot's center-of-mass angular momentum to the robot's generalized velocity at the current moment. The robot's center-of-mass angular momentum at the current moment represents the intensity of the robot's equivalent rigid body rotation about the fixed axis of the coordinate system at the center of mass.

[0062] S102. Construct a robot inverse solution function based on the robot's whole body angular momentum matrix at the current moment.

[0063] The robot inverse solution function includes a joint speed cost function, and the joint speed cost function is used to indicate that the generalized speed of the robot at the current moment is less than the joint speed threshold.

[0064] Optionally, the joint velocity threshold can be 0, or a value close to 0. That is, the joint velocity cost function can be used to make the robot's generalized velocity at the current moment as close to 0 as possible. This solves the problem of unstable solution in the prior art algorithm for finding the pseudo-inverse of the Jacobian matrix, avoids the phenomenon of the robot's generalized velocity being infinite at any time, improves the robustness of the robot control method, expands the range of solvable motion, and thus achieves compliant control of the robot.

[0065] In some embodiments, during specific construction, the robot inverse solution function can be constructed based on the whole body angular momentum matrix of the robot at the current moment, the expected center of mass position of the robot at the current moment, the generalized position of the robot at the previous moment, and preset coefficients.

[0066] S103. Calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse function.

[0067] Before explaining the generalized position and generalized velocity of the robot at the current moment, the generalized coordinates are first explained. The generalized coordinates are the independent parameters that can uniquely determine the possible positions of the robot's particle system; the generalized position is the position parameter of the robot's position at the current moment in the generalized coordinates; the generalized velocity is the derivative of the generalized position with respect to time.

[0068] In some embodiments, the generalized position of the robot can be determined based on a series of independent coordinates. Optionally, the generalized position of the robot can be described according to three rectangular coordinate systems, or alternatively, it can be described by three spherical coordinate systems, which are not limited here.

[0069] Optionally, under the setting of the inverse solution function, based on the expected planning parameters of the robot, the generalized position and generalized velocity of the robot can be calculated.

[0070] S104: Control the robot's motion according to the generalized position and generalized velocity of the robot at the current moment.

[0071] After obtaining the generalized position and generalized velocity of the robot at the current moment, the robot can be motion controlled accordingly. By applying the embodiments of the present application, the phenomenon of infinite generalized velocity of the robot at any moment can be avoided. Therefore, the robustness of the robot control method can be improved, and flexible control of the robot can be achieved.

[0072] In summary, the robot control method provided in the embodiment of the present application includes: obtaining the whole-body angular momentum matrix of the robot at the current moment; constructing a robot inverse solution function based on the whole-body angular momentum matrix of the robot at the current moment, the robot inverse solution function including a joint velocity cost function, the joint velocity cost function being used to indicate that the generalized velocity of the robot at the current moment is less than the joint velocity threshold; calculating and obtaining the generalized position and generalized velocity of the robot at the current moment according to the inverse solution function; performing motion control on the robot according to the generalized position and generalized velocity of the robot at the current moment. By applying the embodiment of the present application, the joint velocity cost function can be used to avoid the phenomenon that the generalized velocity of the robot at any moment is infinite. Therefore, the robustness of the robot control method can be improved, and compliant control of the robot can be achieved.

[0073] Optionally, the inverse solution function further includes a joint position cost function, which indicates that the difference between the generalized position of the robot at the current moment and the generalized position of the robot at the previous moment is less than a first preset threshold. In other words, the generalized position of the robot at the current moment should be as close as possible to the generalized position of the robot at the previous moment.

[0074] Optionally, the inverse solution function further includes a robot center of mass angular momentum cost function, which is used to indicate that the difference between the robot's current center of mass angular momentum and the robot's expected angular momentum at that moment is less than a second preset threshold. In other words, the robot's current center of mass angular momentum should be as close as possible to the robot's expected angular momentum at that moment.

[0075] By applying the embodiments of the present application, inverse solution functions can be constructed from multiple perspectives, which can ensure that when the robot is controlled according to the generalized position and generalized velocity of the robot obtained at any time, flexible control of the robot can be achieved.

[0076] Figure 2 A flow chart of another robot control method provided in an embodiment of the present application. Figure 2 As shown above, according to the inverse function, the generalized position and generalized velocity of the robot at the current moment are calculated, including:

[0077] S201. Calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse function and preset constraints.

[0078] The preset constraints include: center of mass position constraints, robot foot preset contact point position constraints, and robot generalized position constraints. Of course, it should be noted that other constraints may also be included depending on the actual application scenario, and the number of constraints is not limited here.

[0079] The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position. Optionally, the center of mass calculation function can be obtained through a forward kinematics model.

[0080] The robot's foot's preset contact point position constraint conditions are used to indicate that the robot's foot's preset contact point positions at the current moment are constrained by a preset contact point calculation function and an expected contact point position. Optionally, the robot's foot's preset contact point positions can be vertices of the robot's foot, or alternatively, points within the foot's preset positions, without limitation. For example, if the bottom of the robot's foot is rectangular, the robot's foot's preset contact point positions can be the four vertices of the foot. Of course, the specific determination method is not limited to this. In some embodiments, the preset contact point calculation function can be derived from a forward kinematics model.

[0081] The robot's generalized position constraint specifies that the robot's current generalized position is calculated based on the robot's generalized position at the previous moment and its generalized velocity at the current moment. Specifically, the current generalized position can be calculated by taking the time difference between the current moment and the previous moment, and then using this time difference, the robot's generalized position at the previous moment, and the robot's generalized velocity at the current moment.

[0082] Based on the above description, when solving the problem, the generalized position and generalized velocity of the robot at the current moment when the inverse function satisfies the preset conditions can be solved under the setting of the inverse function and the constraints of the preset constraints.

[0083] Optionally, the above calculation of the robot's generalized position and generalized velocity at the current moment based on the inverse function and preset constraints includes:

[0084] When it is determined that the function value of the inverse solution function is the minimum and satisfies the preset constraints, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment.

[0085] The inverse solution function can be found in the following formula:

[0086]

[0087] in, Indicates the preset coefficient corresponding to the robot's center of mass angular momentum, Indicates the preset coefficient corresponding to the generalized velocity of the robot, Indicates the preset coefficient corresponding to the generalized position of the robot, represents the expected center of mass angular momentum of the robot at the current moment, represents the robot's whole body angular momentum matrix, represents the generalized position of the robot at the current moment, represents the generalized velocity of the robot at the current moment. It should be noted that in this formula 、 as well as The value of can be flexibly set according to the actual application scenario, and the specific value is not limited here.

[0088] The constraint formulas corresponding to the robot's generalized position constraint, center of mass position constraint, and robot's foot preset contact point position constraint in the preset constraint conditions can be referred to in the following formulas in sequence:

[0089]

[0090]

[0091]

[0092] in, represents the generalized position of the robot at the last moment, represents the generalized position of the robot at the current moment, represents the generalized velocity of the robot at the current moment, Indicates the time difference between the current moment and the previous moment. represents the expected center of mass position of the robot at the current moment, represents the centroid calculation function, Indicates the expected contact point position of the robot at the current moment, Represents the preset contact point calculation function.

[0093] It can be seen from the above formula that, when the preset constraints are met, when the function value of the inverse function is minimum, the generalized position obtained can be used as the generalized position of the robot at the current moment, and the generalized velocity obtained can be used as the generalized velocity of the robot at the current moment.

[0094] Figure 3 A flowchart of another robot control method provided in an embodiment of the present application. Figure 3 As shown, the above method also includes:

[0095] S401: Obtain the mass of each link in the robot and the generalized velocity of the robot at the current moment.

[0096] S402: Calculate the center of mass angular momentum of the robot at the current moment based on the mass of each link in the robot, the generalized velocity of the robot at the current moment, and the Jacobian matrix corresponding to each link at the current moment.

[0097] It should be noted that this application does not limit the number of connecting rods in the robot, which may vary depending on the actual application scenario. Optionally, the instructions for each connecting rod can be obtained by reading the attribute parameters of the robot, or by querying other devices, and the specific query method is not limited here.

[0098] Among them, the Jacobian matrix corresponding to each link at the current moment can represent the generalized transmission ratio or mapping relationship from the robot joint velocity at the current moment to the end point velocity of the robot (operation space). Optionally, during the specific calculation, the product of the mass of each link and the Jacobian matrix corresponding to each link at the current moment can be calculated, and the products can be summed to obtain a first calculation parameter; the product between the first calculation parameter and the generalized velocity of the robot at the current moment can be calculated to obtain a second calculation parameter; the mass of each link is summed to obtain a third calculation parameter; the ratio between the second calculation parameter and the third calculation parameter is calculated, and the ratio is used as the center of mass angular momentum of the robot at the current moment. Among them, the specific calculation process can be calculated by referring to the following calculation formula:

[0099]

[0100] in, represents the angular momentum of the robot’s center of mass at the current moment, represents the mass of the i-th connecting rod, represents the Jacobian matrix corresponding to the i-th link at the current moment, Indicates the generalized velocity of the robot at the current moment.

[0101] Figure 4 A flowchart of another robot control method provided in an embodiment of the present application. Figure 4 As shown, the above method of obtaining the robot's whole body angular momentum matrix at the current moment includes:

[0102] S501. Obtain the mass of each connecting rod in the robot.

[0103] The mass of each connecting rod in the robot can be found in the above-mentioned related content and will not be repeated here.

[0104] S502: Calculate the whole-body angular momentum matrix of the robot at the current moment according to the mass of each link in the robot and the Jacobian matrix corresponding to each link at the current moment.

[0105] Optionally, during the specific calculation, the product of the mass of each link and the Jacobian matrix corresponding to each link at the current moment can be calculated, and the products can be summed to obtain a fourth calculation parameter; the masses of each link can be summed to obtain a fifth calculation parameter; the ratio between the fourth calculation parameter and the fifth calculation parameter can be calculated, and the ratio can be used as the whole-body angular momentum matrix of the robot at the current moment. The specific calculation process can be obtained by referring to the following calculation formula:

[0106]

[0107] Where n is the number of links in the robot, represents the mass of the i-th connecting rod, represents the Jacobian matrix corresponding to the i-th link at the current moment, Represents the robot's full body angular momentum matrix at the current moment.

[0108] It is worth noting that based on the above formula, it can also be seen that , that is, the whole-body angular momentum matrix of the robot at the current moment can represent the relationship between the generalized velocity and center-of-mass angular momentum of the robot at the current moment. In other words, the whole-body angular momentum matrix of the robot at the current moment can be calculated based on the center-of-mass angular momentum and generalized velocity of the robot at the current moment.

[0109] Figure 5 This is a functional module diagram of a robot control device provided in an embodiment of the present application. The basic principle and technical effects of the device are the same as those of the corresponding method embodiment described above. For the sake of simplicity, the parts not mentioned in this embodiment can be referred to the corresponding contents in the method embodiment. Figure 5 As shown, the robot control device 100 includes:

[0110] An acquisition module 110 is used to obtain the whole body angular momentum matrix of the robot at the current moment;

[0111] A construction module 120 is configured to construct a robot inverse solution function based on the whole-body angular momentum matrix of the robot at a current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is configured to indicate that the generalized velocity of the robot at a current moment is less than a joint velocity threshold;

[0112] A calculation module 130 is configured to calculate and obtain the generalized position and generalized velocity of the robot at a current moment according to the inverse function;

[0113] The control module 140 is configured to control the motion of the robot according to the generalized position and generalized velocity of the robot at a current moment.

[0114] In an optional embodiment, the inverse solution function further includes: a joint position cost function, which is used to indicate that the difference between the generalized position of the robot at the current moment and the generalized position of the robot at the previous moment is less than a first preset threshold.

[0115] In an optional embodiment, the inverse solution function further includes: a robot center of mass angular momentum cost function, which is used to indicate that the difference between the robot's center of mass angular momentum at the current moment and the robot's expected angular momentum at the current moment is less than a second preset threshold.

[0116] In an optional embodiment, the calculation module 130 is specifically configured to calculate and obtain the generalized position and generalized velocity of the robot at the current moment based on the inverse solution function and preset constraints, wherein the preset constraints include: a center of mass position constraint, a preset contact point position constraint of the robot's sole, and a generalized position constraint of the robot;

[0117] The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position;

[0118] The robot sole preset contact point position constraint condition is used to indicate that the robot sole preset contact point position at the current moment is constrained by the preset contact point calculation function and the expected contact point position;

[0119] The robot generalized position constraint condition is used to indicate that the generalized position of the robot at a current moment is calculated based on the generalized position of the robot at a previous moment and the generalized speed of the robot at the current moment.

[0120] In an optional embodiment, the calculation module 130 is specifically used to determine that when the function value of the inverse function is minimum and satisfies the preset constraints, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment.

[0121] In an optional embodiment, the calculation module 130 is further configured to respectively obtain the mass of each link in the robot and the generalized velocity of the robot;

[0122] The center of mass angular momentum of the robot at the current moment is calculated based on the mass of each link in the robot, the generalized velocity of the robot at the current moment, and the Jacobian matrix corresponding to each link at the current moment.

[0123] In an optional embodiment, the acquisition module 110 is specifically used to obtain the mass of each connecting rod in the robot;

[0124] The whole-body angular momentum matrix of the robot at the current moment is calculated according to the mass of each link in the robot and the Jacobian matrix corresponding to each link at the current moment.

[0125] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0126] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0127] Figure 6 The present application provides a schematic diagram of an electronic device structure, which can be integrated into the processing unit of a robot. Figure 6 As shown, the electronic device may include: a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 and the storage medium 220 communicate via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above-mentioned method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.

[0128] Optionally, the present application further provides a storage medium storing a computer program, which, when executed by a processor, executes the steps of the above method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, 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.

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

[0131] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0132] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: USB flash drives, mobile hard drives, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), magnetic disks or optical disks, and other media that can store program code.

[0133] 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 entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.

[0134] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A robot control method, characterized in that: include: Get the robot's whole body angular momentum matrix at the current moment; constructing a robot inverse solution function according to the whole-body angular momentum matrix of the robot at the current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at the current moment is less than a joint velocity threshold; Calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse function; Controlling the motion of the robot according to the generalized position and generalized velocity of the robot at a current moment; The constructing of the robot inverse solution function according to the whole-body angular momentum matrix of the robot at the current moment includes: constructing the robot inverse solution function based on the whole-body angular momentum matrix of the robot at the current moment, the expected center of mass position of the robot at the current moment, the generalized position of the robot at the previous moment, and preset coefficients; The step of calculating and obtaining the generalized position and generalized velocity of the robot at the current moment according to the inverse function includes: When it is determined that the function value of the inverse function is minimum and satisfies preset constraints, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment, wherein the preset constraints include: a center of mass position constraint, a preset contact point position constraint of the robot's sole, and a generalized position constraint of the robot; The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position; The robot sole preset contact point position constraint condition is used to indicate that the robot sole preset contact point position at the current moment is constrained by the preset contact point calculation function and the expected contact point position; The robot generalized position constraint is used to indicate that the generalized position of the robot at the current moment is calculated based on the generalized position of the robot at the previous moment and the generalized velocity of the robot at the current moment; The inverse solution function is expressed as: in, Indicates the preset coefficient corresponding to the robot's center of mass angular momentum, Indicates the preset coefficient corresponding to the generalized velocity of the robot, Indicates the preset coefficient corresponding to the generalized position of the robot, represents the expected center of mass angular momentum of the robot at the current moment, represents the robot's whole body angular momentum matrix, represents the generalized position of the robot at the current moment, represents the generalized velocity of the robot at the current moment, Represents the generalized position of the robot at the previous moment.

2. The method according to claim 1, characterized in that The inverse solution function further includes: a joint position cost function, which is used to indicate that the difference between the generalized position of the robot at the current moment and the generalized position of the robot at the previous moment is less than a first preset threshold.

3. The method according to claim 1, characterized in that The inverse solution function also includes: a robot center of mass angular momentum cost function, which is used to indicate that the difference between the robot's center of mass angular momentum at the current moment and the robot's expected angular momentum at the current moment is less than a second preset threshold.

4. The method according to claim 3, characterized in that The method further comprises: respectively obtaining the mass of each link in the robot and the generalized velocity of the robot at the current moment; The center of mass angular momentum of the robot at the current moment is calculated based on the mass of each link in the robot, the generalized velocity of the robot at the current moment, and the Jacobian matrix corresponding to each link at the current moment.

5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the whole body angular momentum matrix of the robot at the current moment includes: Obtaining the mass of each connecting rod in the robot; The whole-body angular momentum matrix of the robot at the current moment is calculated according to the mass of each link in the robot and the Jacobian matrix corresponding to each link at the current moment.

6. A robot control device, characterized in that: include: The acquisition module is used to obtain the robot's whole body angular momentum matrix at the current moment; A construction module is used to construct a robot inverse solution function according to the whole body angular momentum matrix of the robot at a current moment, wherein the robot inverse solution function includes a joint velocity cost function, and the joint velocity cost function is used to indicate that the generalized velocity of the robot at a current moment is less than a joint velocity threshold; A calculation module, configured to calculate and obtain the generalized position and generalized velocity of the robot at the current moment according to the inverse solution function; A control module, configured to control the motion of the robot according to the generalized position and generalized velocity of the robot at a current moment; The construction module is specifically used to construct a robot inverse solution function based on the whole body angular momentum matrix of the robot at the current moment, the expected center of mass position of the robot at the current moment, the generalized position of the robot at the previous moment, and preset coefficients; The calculation module is configured to determine that when the function value of the inverse function is minimum and preset constraints are satisfied, the generalized position and generalized velocity of the robot are respectively used as the generalized position and generalized velocity of the robot at the current moment, wherein the preset constraints include: a center of mass position constraint, a preset contact point position constraint of the robot's sole, and a generalized position constraint of the robot; The center of mass position constraint condition is used to indicate that the center of mass position of the robot at the current moment is constrained by the center of mass calculation function and the expected center of mass position; The robot sole preset contact point position constraint condition is used to indicate that the robot sole preset contact point position at the current moment is constrained by the preset contact point calculation function and the expected contact point position; The robot generalized position constraint is used to indicate that the generalized position of the robot at the current moment is calculated based on the generalized position of the robot at the previous moment and the generalized velocity of the robot at the current moment; The inverse solution function is expressed as: in, Indicates the preset coefficient corresponding to the robot's center of mass angular momentum, Indicates the preset coefficient corresponding to the generalized velocity of the robot, Indicates the preset coefficient corresponding to the generalized position of the robot, represents the expected center of mass angular momentum of the robot at the current moment, represents the robot's whole body angular momentum matrix, represents the generalized position of the robot at the current moment, represents the generalized velocity of the robot at the current moment, Represents the generalized position of the robot at the previous moment.

7. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the robot control method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the robot control method according to any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • Robot action simulation method, device and equipment and storage medium

    CN112276947A

  • Trajectory planning system and method for robot

    CN112720462A