Robot centroid adjustment method and device, computer device, and storage medium
By acquiring information on joint torques, foot force, displacement, and posture angles during robot movement, and combining multiple models to calculate the center of mass offset, the robot's foot force is adjusted, thus solving the problem of inaccurate calculation of the robot's center of mass offset and achieving precise center of mass adjustment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2023-01-18
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the calculation of the center of mass offset is inaccurate due to the body undulation and swaying when the robot is moving, which affects the accuracy of the center of mass adjustment.
By acquiring the robot's joint torque, foot force, displacement information, pitch angle, and roll angle, and utilizing various center of mass offset models and force control models, the robot's foot force is comprehensively calculated and adjusted, thereby precisely adjusting the center of mass position.
This improves the accuracy of robot center of mass adjustment, ensuring a more precise center of mass position during robot movement.
Smart Images

Figure CN118357909B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method, apparatus, computer device, and storage medium for adjusting the center of mass of a robot. Background Technology
[0002] With the development of robotics technology, the safety, ease of operation, and flexibility of robots have been continuously improved, and their advantages have been fully utilized. They have been applied in more and more fields, including welding, unmanned retail, assembly, logistics, medical care, and education.
[0003] During movement, robots are prone to center-of-gravity shift. Currently, existing technology calculates the robot's center-of-gravity shift by balancing the robot's overall torque, and then adjusts the center-of-gravity position based on this shift.
[0004] However, when the robot is in motion, the undulation and sway of the robot body cause the center of gravity offset calculated by the overall torque balance of the robot to be inaccurate, thus making the adjustment of the robot's center of gravity inaccurate. Summary of the Invention
[0005] Based on this, the purpose of this application is to provide a method, apparatus, computer device, and storage medium for adjusting the center of mass of a robot, which can improve the accuracy of robot center of mass adjustment.
[0006] According to a first aspect of the embodiments of this application, a method for adjusting the center of mass of a robot is provided, comprising the following steps:
[0007] Acquire the robot's joint torques, foot forces, displacement information, pitch angle, and roll angle;
[0008] The first center of mass offset is obtained based on the joint torque, the force on the foot end, and the first center of mass offset model.
[0009] The second centroid offset is obtained based on the force on the foot, the displacement information, and the second centroid offset model.
[0010] The third center of mass offset is obtained based on the pitch angle, the roll angle, and the third center of mass offset model;
[0011] A fourth centroid offset is obtained based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight.
[0012] Based on the fourth centroid offset and the force control model, the force on the robot's feet is adjusted, and based on the adjusted force on the feet, the position of the robot's centroid is adjusted.
[0013] According to a second aspect of the embodiments of this application, a robot center of mass adjustment device is provided, comprising:
[0014] The joint torque acquisition module is used to acquire the robot's joint torque, foot force, displacement information, pitch angle, and roll angle.
[0015] The first center of mass offset acquisition module is used to obtain the first center of mass offset based on the joint torque, the force on the foot end, and the first center of mass offset model.
[0016] The second centroid offset acquisition module is used to obtain the second centroid offset based on the foot force, the displacement information, and the second centroid offset model.
[0017] The third center of mass offset acquisition module is used to obtain the third center of mass offset based on the pitch angle, the roll angle and the third center of mass offset model;
[0018] The fourth centroid offset acquisition module is used to obtain the fourth centroid offset based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight.
[0019] The center of mass position adjustment module is used to adjust the force on the robot's feet according to the fourth center of mass offset and the force control model, and to adjust the center of mass position of the robot according to the adjusted force on the feet.
[0020] According to a third aspect of the embodiments of this application, a computer device is provided, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any of the preceding embodiments.
[0021] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the robot center of mass adjustment method as described in any of the preceding claims.
[0022] This application embodiment obtains the robot's joint torque, foot force, displacement information, pitch angle, and roll angle;
[0023] A first center of gravity offset is obtained based on the joint torque, the foot force, and a first center of gravity offset model; a second center of gravity offset is obtained based on the foot force, the displacement information, and a second center of gravity offset model; a third center of gravity offset is obtained based on the pitch angle, the roll angle, and a third center of gravity offset model; a fourth center of gravity offset is obtained based on the first, second, and third center of gravity offsets and a preset offset weight; the foot force of the robot is adjusted based on the fourth center of gravity offset and the force control model; and the center of gravity position of the robot is adjusted based on the adjusted foot force, thereby improving the accuracy of the robot's center of gravity adjustment.
[0024] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application.
[0025] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating a robot center of mass adjustment method provided in one embodiment of this application.
[0027] Figure 2 This is a structural block diagram of a robot center of gravity adjustment device provided in one embodiment of this application;
[0028] Figure 3 This is a schematic block diagram of the structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0030] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0031] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0032] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0033] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0034] To better understand the technical solution of this application, we will first briefly introduce some robots in the technology.
[0035] A robot comprises a robot chassis, a robot base, and a robotic arm. The robot chassis can dock or move within the working environment. The robot base is mounted on the robot chassis, and the robotic arm is mounted on the robot base. The robotic arm includes multiple joints, which are devices that connect two components. This connection is not fixed but allows for finite relative movement. Optionally, the movement can include rotation and translation. The robotic arm achieves its own movement by controlling the movement of its joints. The end effector of the robotic arm, i.e., the distal joint, is used to interact with the environment, for example, wiping or spraying the workpiece.
[0036] The robot also includes one or more processors; the processors can be used to control the end effector of the robotic arm to move towards the work object along a preset work path according to robot control signals. Optionally, the processor can execute the collision detection method of this application, and then control the robot chassis to move around obstacles during the operation based on the obstacle detection results.
[0037] Optionally, the processor can be built into the robot as a whole; alternatively, the processor can be externally placed inside the robot to independently control its movement. Alternatively, the processor can also simply execute the robot's center of gravity adjustment method. That is, the robot center of gravity adjustment method of this application can also be executed by other processing centers connected to the processor. These other processing centers transmit the obtained robot center of gravity adjustment method to the processor, which then further executes the control to adjust the robot's center of gravity.
[0038] Example 1
[0039] Please see Figure 1 This is a flowchart illustrating a robot center of gravity adjustment method provided in one embodiment of this application. The robot center of gravity adjustment method provided in this embodiment includes the following steps:
[0040] S10: Acquire the robot's joint torque, foot force, displacement information, pitch angle, and roll angle.
[0041] Among them, joint torque is used to drive the movement of each joint of the robot, foot force is the driving force on each leg of the robot, displacement information is the change of position coordinates of the robot during movement, pitch angle is the angle of rotation of the robot body around the x-axis of the reference coordinate system, and roll angle is the angle of rotation of the robot body around the z-axis of the reference coordinate system. The reference coordinate system is a stationary coordinate system in three-dimensional space.
[0042] In this embodiment of the application, the robot's joint torque, foot force, displacement information, pitch angle and roll angle are obtained from the robot's joint encoder, inertial measurement unit (IMU) and foot odometry, respectively.
[0043] S20: Obtain the first center of mass offset based on the joint torque, foot force, and first center of mass offset model.
[0044] In this embodiment, the first center of mass offset model is a dynamic-center of mass model. Specifically, during robot movement, the forces acting on the robot's feet can effectively reflect the shift in the center of mass position. Based on the changes in the forces acting on the robot's feet, a dynamic-center of mass model can be established. By inputting the joint torques and the forces acting on the feet into the first center of mass offset model, the first center of mass offset can be obtained.
[0045] S30: Obtain the second centroid offset based on the foot force and displacement information and the second centroid offset model.
[0046] In this embodiment, the second centroid offset model is a velocity-force-centroid model. Specifically, during robot movement, tracking errors in velocity and foot force can cause a deviation between the desired and actual centroid positions. Therefore, a velocity-force-centroid model can be established based on the tracking errors in velocity and foot force. By inputting the foot force and displacement information into the second centroid offset model, the second centroid offset can be obtained.
[0047] S40: Obtain the third centroid offset based on the pitch angle, roll angle, and third centroid offset model.
[0048] In this embodiment, the third center of mass offset model is an attitude-center of mass model. Specifically, during robot movement, changes in attitude can effectively reflect the shift in the center of mass position. Based on the changes in the robot's pitch and roll angles, an attitude-center of mass model can be established. By inputting the pitch and roll angles into the third center of mass offset model, the third center of mass offset can be obtained.
[0049] S50: Obtain the fourth centroid offset based on the first centroid offset, the second centroid offset, the third centroid offset, and the preset offset weight.
[0050] In this embodiment, a fourth centroid offset can be obtained by fusing the first centroid offset, the second centroid offset, and the third centroid offset. Specifically, different offset weights are applied to the first centroid offset, the second centroid offset, and the third centroid offset to obtain the fourth centroid offset.
[0051] S60: Based on the fourth centroid offset and the force control model, adjust the force on the robot's feet, and adjust the position of the robot's centroid based on the adjusted force on the feet.
[0052] In this embodiment, the force control model is used to calculate the forces acting on the robot's feet. By inputting the fourth center of mass offset into the force control model, the forces acting on the robot's feet can be adjusted. Under the adjusted forces acting on the feet, the robot's motion state changes, thereby adjusting the position of the robot's center of mass.
[0053] By applying the embodiments of this application, the robot's joint torque, foot force, displacement information, pitch angle, and roll angle are obtained; a first center of mass offset is obtained based on the joint torque, foot force, and a first center of mass offset model; a second center of mass offset is obtained based on the foot force, displacement information, and a second center of mass offset model; a third center of mass offset is obtained based on the pitch angle, roll angle, and a third center of mass offset model; a fourth center of mass offset is obtained based on the first, second, and third center of mass offsets and a preset offset weight; the foot force of the robot is adjusted based on the fourth center of mass offset and the force control model; and the center of mass position of the robot is adjusted based on the adjusted foot force, thereby improving the accuracy of the robot's center of mass adjustment.
[0054] In an optional embodiment, step S20 includes steps S21-S22, as follows:
[0055] S21: Multiply the transpose of the robot's Jacobian matrix by the forces on the feet, sum the product with the joint torques, subtract the sum from the sum of the products of the generalized mass matrix and the generalized Coriolis force matrix multiplied by the angular velocity, and use the ratio of the subtracted result to the angular acceleration as the robot's mass matrix.
[0056] S22: Obtain the first centroid offset based on the mass matrix and the robot's mass.
[0057] In this embodiment of the application, the first centroid offset model can be expressed as:
[0058]
[0059]
[0060] in, For the quality matrix, Angular acceleration, For the generalized Coriolis force matrix, For the generalized mass matrix, For joint torque, This is the transpose of the Jacobian matrix. For the foot to bear the force, ω is the angular velocity.
[0061] The mass matrix can be represented as:
[0062]
[0063]
[0064] in, Indicates the position of the center of mass. Indicates the quality of the robot. This represents the robot's body inertia matrix.
[0065] The first centroid offset can be expressed as:
[0066]
[0067] in, This represents the robot's first centroid offset in the x-direction. This represents the first centroid offset of the robot in the y-direction. This represents the first centroid offset of the robot in the z-direction.
[0068] By inputting the joint torque and the force on the foot end into the first center of mass offset model, the robot's first center of mass offset can be obtained automatically and quickly.
[0069] In an optional embodiment, the force on the foot end includes the force on the front support leg foot end and the force on the rear support leg foot end of the robot. Step S30 includes steps S31 to S34, as follows:
[0070] S31: Obtain the robot's velocity and acceleration based on the displacement information;
[0071] S32: Calculate the velocity difference between the speed and the preset desired speed, the acceleration difference between the acceleration and the preset desired acceleration, the first force difference between the force on the foot of the front support leg and the force on the foot of the rear support leg, the second force difference between the force on the foot of the front support leg at two adjacent moments in the interval sampling time, and the third force difference between the force on the foot of the rear support leg at two adjacent moments in the interval sampling time.
[0072] S33: Multiply the first force difference by the first error gain to obtain the first product result; subtract the second force difference from the third force difference, and multiply the subtraction result by the second error gain to obtain the second product result; sum the first product result, the second product result, and the second centroid offset in the x direction at the current moment to obtain the second centroid offset in the x direction at the next moment.
[0073] S34: Multiply the velocity difference by the third error gain to obtain the third product result; multiply the acceleration difference by the fourth error gain to obtain the fourth product result; sum the third product result, the fourth product result, and the second centroid offset in the y direction at the current moment to obtain the second centroid offset in the y direction at the next moment.
[0074] In this embodiment, the displacement information is differentiated by first and second order to obtain the robot's velocity and acceleration, respectively.
[0075] The second centroid offset model can be expressed as:
[0076]
[0077] in, and This represents the second centroid offset of the robot in the x and y directions at time k; , , and These represent the first error gain, the second error gain, the third error gain, and the fourth error gain, respectively. and These represent the robot's velocity and acceleration in the y-direction during its movement, respectively. and Let represent the expected velocity and expected acceleration in the y-direction during the robot's motion; and These represent the forces acting on the foot of the front supporting leg and the forces acting on the rear supporting leg, respectively. This represents the difference in the second force at the foot of the front supporting leg between time k and time k+1. This represents the difference in the third force at the foot of the rear supporting leg between time k and time k+1.
[0078] By inputting the force and displacement information at the foot end into the second center of mass offset model, the robot's second center of mass offset can be obtained automatically and quickly.
[0079] In an optional embodiment, step S40 includes steps S41 to S44, as follows:
[0080] S41: Calculate the angle difference between the preset desired pitch angle and the pitch angle;
[0081] S42: Multiply the negative of the pitch angle by the fifth error gain to obtain the fifth product result; sum the fifth product result with the third centroid offset in the x direction at the current time to obtain the third centroid offset in the x direction at the next time.
[0082] S43: Multiply the negative of the roll angle by the sixth error gain to obtain the sixth product result; sum the sixth product result with the third centroid offset in the y direction at the current moment to obtain the third centroid offset in the y direction at the next moment.
[0083] S44: Multiply the angle difference by the seventh error gain to obtain the seventh product result; sum the negative of the seventh product result with the third centroid offset in the z direction at the current time to obtain the third centroid offset in the z direction at the next time.
[0084] In this embodiment of the application, the third centroid offset model can be expressed as:
[0085]
[0086] in, , and These represent the offsets of the robot's third centroid in the x, y, and z directions at time k, respectively. , and These represent the fifth error gain, the sixth error gain, and the seventh error gain, respectively. and These represent the robot's pitch and roll angles, respectively. This indicates the desired pitch angle.
[0087] By inputting the pitch and roll angles into the third center of mass offset model, the robot's third center of mass offset can be obtained automatically and quickly.
[0088] In an optional embodiment, step S50 includes steps S51 to S52, as follows:
[0089] S51: Calculate the first ratio of the first centroid offset to the preset first offset adjustment limit value, the second ratio of the second centroid offset to the preset second offset adjustment limit value, and the third ratio of the third centroid offset to the preset third offset adjustment limit value;
[0090] S52: Sum the product of the first ratio and the first weight, the product of the second ratio and the second weight, and the product of the third ratio and the third weight, and use the summation result as the robot's fourth centroid offset.
[0091] In this embodiment, the formula for calculating the fourth centroid offset is as follows:
[0092]
[0093] in, This indicates the offset of the fourth centroid; This indicates the preset first offset adjustment limit value, and This indicates the preset second offset adjustment limit value. This indicates the preset third offset adjustment limit value; This represents the first centroid offset. This represents the offset of the second centroid. This indicates the offset of the third centroid; Indicates the first weight. Indicates the second weight. This indicates the third weight.
[0094] In an optional embodiment, the robot centroid adjustment method includes step S53, as follows:
[0095] S53: Determine the first weight, the second weight, and the third weight based on the ratio of the first centroid offset, the second centroid offset, and the third centroid offset.
[0096] In this embodiment of the application, the formulas for determining the first weight, the second weight, and the third weight are as follows:
[0097]
[0098] By using the ratio of the first centroid offset, the second centroid offset, and the third centroid offset as the ratio of the first weight, the second weight, and the third weight, and the sum of the first weight, the second weight, and the third weight is 1, the values of the first weight, the second weight, and the third weight can be determined automatically and quickly.
[0099] In an optional embodiment, step S60 includes steps S61 to S64, as follows:
[0100] S61: Obtain the distance from the robot's foot to its center of mass;
[0101] S62: Calculate the distance difference between the distance to the target and the offset of the fourth centroid;
[0102] S63: Concatenate the distance difference with the identity matrix to form the first matrix; concatenate the product of the robot's mass and the sum of its body acceleration and gravitational acceleration with the product of its body inertia matrix and its body angular acceleration to form the second matrix;
[0103] S64: The product of the inverse of the first matrix and the second matrix is used as the adjusted force on the robot's foot. Based on the adjusted force on the foot, the position of the robot's center of mass is adjusted.
[0104] In this embodiment of the application, the force control model can be represented as:
[0105]
[0106] in, Represents a 3x3 identity matrix. , , and These represent the distances from the four feet to the robot's center of mass; This indicates the robot's body acceleration; This indicates the angular acceleration of the fuselage; It represents the acceleration due to gravity.
[0107] By inputting the fourth centroid offset into the force control model, the force on the robot's feet can be adjusted automatically and quickly, and the position of the robot's centroid can be adjusted according to the adjusted foot force.
[0108] Example 2
[0109] The following are embodiments of the apparatus of this application, which can be used to execute the method described in Embodiment 1 of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method described in Embodiment 1 of this application.
[0110] Please see Figure 2 This document illustrates a schematic diagram of the robot center of gravity adjustment device provided in an embodiment of this application. The robot center of gravity adjustment device 7 provided in this embodiment includes:
[0111] The joint torque acquisition module 71 is used to acquire the robot's joint torque, foot force, displacement information, pitch angle and roll angle;
[0112] The first center of mass offset acquisition module 72 is used to obtain the first center of mass offset based on the joint torque, the force on the foot end and the first center of mass offset model.
[0113] The second centroid offset acquisition module 73 is used to obtain the second centroid offset based on the foot force and displacement information and the second centroid offset model.
[0114] The third center of mass offset acquisition module 74 is used to obtain the third center of mass offset based on the pitch angle, roll angle and the third center of mass offset model;
[0115] The fourth centroid offset acquisition module 75 is used to obtain the fourth centroid offset based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight.
[0116] The center of mass position adjustment module 76 is used to adjust the force on the robot's feet based on the fourth center of mass offset and the force control model, and to adjust the robot's center of mass position based on the adjusted force on the feet.
[0117] Optionally, the first centroid offset acquisition module includes:
[0118] The mass matrix acquisition unit is used to multiply the transpose of the robot's Jacobian matrix by the forces at the foot end, sum the product with the joint torque, subtract the sum from the sum of the products of the generalized mass matrix and the generalized Coriolis force matrix multiplied by the angular velocity, and use the ratio of the subtracted result to the angular acceleration as the robot's mass matrix.
[0119] The first centroid offset acquisition unit is used to obtain the first centroid offset based on the mass matrix and the mass of the robot.
[0120] Optionally, the second centroid offset acquisition module includes:
[0121] The velocity acquisition unit is used to obtain the robot's velocity and acceleration based on displacement information;
[0122] The velocity difference calculation unit is used to calculate the velocity difference between the velocity and the preset desired velocity, the acceleration difference between the acceleration and the preset desired acceleration, the first force difference between the force on the foot end of the front support leg and the force on the foot end of the rear support leg, the second force difference between the force on the foot end of the front support leg at two adjacent moments in the interval sampling time, and the third force difference between the force on the foot end of the rear support leg at two adjacent moments in the interval sampling time.
[0123] The first unit for obtaining the second centroid offset is used to multiply the first force difference by the first error gain to obtain the first product result; subtract the second force difference from the third force difference, and multiply the subtraction result by the second error gain to obtain the second product result; sum the first product result, the second product result, and the second centroid offset in the x direction at the current time to obtain the second centroid offset in the x direction at the next time.
[0124] The second centroid offset second acquisition unit is used to multiply the velocity difference by the third error gain to obtain the third product result; multiply the acceleration difference by the fourth error gain to obtain the fourth product result; and sum the third product result, the fourth product result, and the second centroid offset in the y direction at the current moment to obtain the second centroid offset in the y direction at the next moment.
[0125] Optionally, the third centroid offset acquisition module includes:
[0126] Angle difference calculation unit, used to calculate the angle difference between the preset desired pitch angle and the pitch angle;
[0127] The first unit for obtaining the third centroid offset is used to multiply the inverse of the pitch angle by the fifth error gain to obtain the fifth product result; the fifth product result is summed with the third centroid offset in the x direction at the current time to obtain the third centroid offset in the x direction at the next time.
[0128] The third centroid offset second acquisition unit is used to multiply the inverse of the roll angle by the sixth error gain to obtain the sixth product result; and to sum the sixth product result with the third centroid offset in the y direction at the current time to obtain the third centroid offset in the y direction at the next time.
[0129] The third centroid offset third acquisition unit is used to multiply the angle difference with the error gain of the i-th period to obtain the product result of the i-th period; the negative of the seventh product result is summed with the third centroid offset in the z-direction at the current time to obtain the third centroid offset in the z-direction at the next time.
[0130] Optionally, a fourth centroid offset acquisition module includes:
[0131] The first ratio calculation unit is used to calculate the first ratio of the first centroid offset to the preset first offset adjustment limit value, the second ratio of the second centroid offset to the preset second offset adjustment limit value, and the third ratio of the third centroid offset to the preset third offset adjustment limit value.
[0132] The fourth centroid offset acquisition unit is used to sum the product of the first ratio and the first weight, the product of the second ratio and the second weight, and the product of the third ratio and the third weight, and use the summation result as the fourth centroid offset of the robot.
[0133] Optional, the robot's center of gravity adjustment device includes:
[0134] The weight determination module is used to determine the first weight, the second weight, and the third weight based on the ratio of the first centroid offset, the second centroid offset, and the third centroid offset.
[0135] Optional, the centroid position adjustment module includes:
[0136] The distance acquisition unit is used to acquire the distance from the robot's foot to its center of mass.
[0137] The distance difference calculation unit is used to calculate the distance difference between the distance and the offset of the fourth centroid;
[0138] The matrix splicing unit is used to splice the distance difference with the identity matrix to form the first matrix; and to splice the product of the robot's mass and the sum of its body acceleration and gravitational acceleration with the product of its body inertia matrix and its body angular acceleration to form the second matrix.
[0139] The center of mass position adjustment unit is used to take the product of the inverse matrix of the first matrix and the second matrix as the adjusted force on the robot's foot end, and adjust the center of mass position of the robot according to the adjusted force on the foot end.
[0140] By applying the embodiments of this application, the robot's joint torque, foot force, displacement information, pitch angle, and roll angle are obtained; a first center of mass offset is obtained based on the joint torque, foot force, and a first center of mass offset model; a second center of mass offset is obtained based on the foot force, displacement information, and a second center of mass offset model; a third center of mass offset is obtained based on the pitch angle, roll angle, and a third center of mass offset model; a fourth center of mass offset is obtained based on the first, second, and third center of mass offsets and a preset offset weight; the foot force of the robot is adjusted based on the fourth center of mass offset and the force control model; and the center of mass position of the robot is adjusted based on the adjusted foot force, thereby improving the accuracy of the robot's center of mass adjustment.
[0141] Example 3
[0142] The following are embodiments of the device described in this application, which can be used to execute the method described in Embodiment 1 of this application. For details not disclosed in the embodiments of the device described in this application, please refer to the method described in Embodiment 1 of this application.
[0143] Please see Figure 3This application also provides an electronic device 300, which may specifically be a computer, mobile phone, tablet computer, etc. In an exemplary embodiment of this application, the electronic device 300 is a computer, which may include: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, user interface 304, and at least one communication bus 305.
[0144] The user interface 304 is primarily used to provide an input interface for the user and to acquire user input data. Optionally, the user interface may also include a standard wired interface or a wireless interface.
[0145] The network interface 303 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0146] The communication bus 305 is used to enable communication between these components.
[0147] The processor 301 may include one or more processing cores. The processor connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory. Optionally, the processor may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0148] The memory 302 may include random access memory (RAM) or read-only memory. Optionally, the memory may include a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor. As a computer storage medium, the memory may include an operating system, a network communication module, a user interface module, and operating applications.
[0149] The processor can be used to call the application program of the robot center of mass adjustment method stored in the memory, and specifically execute the method steps of Embodiment 1 shown above. For the specific execution process, please refer to the detailed description shown in Embodiment 1, which will not be repeated here.
[0150] Example 4
[0151] This application also provides a computer-readable storage medium storing a computer program thereon, the instructions of which are adapted to be loaded by a processor and executed by the method steps of Embodiment 1 shown above. The specific execution process can be found in the detailed description shown in the embodiments, and will not be repeated here. The device containing the storage medium can be an electronic device such as a personal computer, laptop computer, smartphone, or tablet computer.
[0152] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the components described as separate parts may or may not be physically separate, and the 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 the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function selected in one or more boxes.
[0155] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function selected in one or more boxes.
[0156] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0157] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0158] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0159] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0160] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for adjusting the center of mass of a robot, characterized in that, The method includes the following steps: Acquire the robot's joint torques, foot forces, displacement information, pitch angle, and roll angle; The first center of mass offset is obtained based on the joint torque, the foot end force, and the first center of mass offset model. The first center of mass offset model is a dynamic-center of mass model used to calculate the robot mass matrix and derive the center of mass offset based on the joint torque and the foot end force. The second centroid offset is obtained based on the foot force, the displacement information, and the second centroid offset model. The second centroid offset model is a velocity-force-centroid model established based on the tracking error of the robot's velocity and foot force. The third center of mass offset is obtained based on the pitch angle, the roll angle, and the third center of mass offset model. The third center of mass offset model is an attitude-center of mass model used to calculate the robot's attitude change and derive the center of mass offset based on the pitch angle and the roll angle. A fourth centroid offset is obtained based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight. Based on the fourth centroid offset and the force control model, the force on the robot's feet is adjusted, and based on the adjusted force on the feet, the position of the robot's centroid is adjusted.
2. The robot center of mass adjustment method according to claim 1, characterized in that: The step of obtaining the first center of gravity offset based on the joint torque, the force on the foot end, and the first center of gravity offset model includes: Multiply the transpose of the robot's Jacobian matrix by the force on the foot, sum the product with the joint torque, subtract the sum from the sum of the products of the generalized mass matrix and the generalized Coriolis force matrix multiplied by the angular velocity, and use the ratio of the subtracted result to the angular acceleration as the robot's mass matrix. The first centroid offset is obtained based on the mass matrix and the mass of the robot.
3. The robot center of mass adjustment method according to claim 1, characterized in that: The force on the foot end includes the force on the foot end of the robot's front supporting leg and the force on the foot end of the rear supporting leg; The step of obtaining the second centroid offset based on the foot force, the displacement information, and the second centroid offset model includes: Based on the displacement information, the robot's velocity and acceleration are obtained; Calculate the velocity difference between the velocity and the preset desired velocity, the acceleration difference between the acceleration and the preset desired acceleration, the first force difference between the force on the foot end of the front support leg and the force on the foot end of the rear support leg, the second force difference between the force on the foot end of the front support leg at two adjacent moments in the interval sampling time, and the third force difference between the force on the foot end of the rear support leg at two adjacent moments in the interval sampling time. Multiply the first force difference by the first error gain to obtain the first product result; subtract the second force difference from the third force difference, and multiply the subtraction result by the second error gain to obtain the second product result; sum the first product result, the second product result, and the second centroid offset in the x direction at the current moment to obtain the second centroid offset in the x direction at the next moment. Multiply the velocity difference by the third error gain to obtain the third product result; multiply the acceleration difference by the fourth error gain to obtain the fourth product result; sum the third product result, the fourth product result, and the second centroid offset in the y direction at the current moment to obtain the second centroid offset in the y direction at the next moment.
4. The robot center of mass adjustment method according to claim 1, characterized in that: The step of obtaining the third centroid offset based on the pitch angle, the roll angle, and the third centroid offset model includes: Calculate the angle difference between the preset desired pitch angle and the pitch angle; Multiply the opposite of the pitch angle by the fifth error gain to obtain the fifth product result; sum the fifth product result with the third centroid offset in the x direction at the current moment to obtain the third centroid offset in the x direction at the next moment. Multiply the negative of the roll angle by the sixth error gain to obtain the sixth product result; sum the sixth product result with the third centroid offset in the y direction at the current moment to obtain the third centroid offset in the y direction at the next moment. Multiply the angle difference by the seventh error gain to obtain the seventh product result; sum the negative of the seventh product result with the third centroid offset in the z direction at the current time to obtain the third centroid offset in the z direction at the next time.
5. The robot center of mass adjustment method according to claim 1, characterized in that: The preset offset weights include a first weight, a second weight, and a third weight; The step of obtaining the fourth centroid offset based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight includes: Calculate the first ratio of the first centroid offset to the preset first offset adjustment limit value, the second ratio of the second centroid offset to the preset second offset adjustment limit value, and the third ratio of the third centroid offset to the preset third offset adjustment limit value; The product of the first ratio and the first weight, the product of the second ratio and the second weight, and the product of the third ratio and the third weight are summed, and the summation result is used as the fourth centroid offset of the robot.
6. The robot center of mass adjustment method according to claim 5, characterized in that, Also includes: The first weight, the second weight, and the third weight are determined based on the ratio of the first centroid offset, the second centroid offset, and the third centroid offset.
7. The robot center of mass adjustment method according to claim 1, characterized in that: The step of adjusting the force on the robot's feet based on the fourth centroid offset and the force control model, and adjusting the robot's centroid position based on the adjusted foot force, includes: Obtain the distance from the robot's foot tip to its center of mass; Calculate the distance difference between the distance and the offset of the fourth centroid; The distance difference is concatenated with the identity matrix to form the first matrix; the product of the robot's mass and the sum of its body acceleration and gravitational acceleration is concatenated with the product of its body inertia matrix and its body angular acceleration to form the second matrix. The product of the inverse of the first matrix and the second matrix is used as the adjusted force on the robot's foot. Based on the adjusted force on the foot, the position of the robot's center of mass is adjusted.
8. A robot center of mass adjustment device, characterized in that, include: The joint torque acquisition module is used to acquire the robot's joint torque, foot force, displacement information, pitch angle, and roll angle. The first center of mass offset acquisition module is used to obtain the first center of mass offset based on the joint torque, the foot end force and the first center of mass offset model, wherein the first center of mass offset model is a dynamic-center of mass model used to calculate the robot mass matrix and derive the center of mass offset based on the joint torque and the foot end force. The second centroid offset acquisition module is used to obtain the second centroid offset based on the foot force, the displacement information and the second centroid offset model, wherein the second centroid offset model is a velocity-force-centroid model established based on the tracking error of the robot's velocity and foot force. The third center of mass offset acquisition module is used to obtain the third center of mass offset based on the pitch angle, the roll angle and the third center of mass offset model, wherein the third center of mass offset model is an attitude-center of mass model used to calculate the robot's attitude change and derive the center of mass offset based on the pitch angle and the roll angle. The fourth centroid offset acquisition module is used to obtain the fourth centroid offset based on the first centroid offset, the second centroid offset, the third centroid offset, and a preset offset weight. The center of mass position adjustment module is used to adjust the force on the robot's feet according to the fourth center of mass offset and the force control model, and to adjust the center of mass position of the robot according to the adjusted force on the feet.
9. A computer device, comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Movement control method for mobile robot
CN104842360A
Robot balance control method and device, readable storage medium and robot
CN111098300A