Motion control method and system for robot, and electronic device and storage medium
By acquiring dimensional management information and reconstructing optimization problems, the high computational complexity of robot motion control was solved, achieving more efficient motion control.
Patent Information
- Application Number
- PCT/CN2024/119369
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-06
- Filing Date
- 2024-09-18
- Publication Date
- 2025-12-11
AI Technical Summary
Existing technologies for robot motion control suffer from high computational complexity and low computational efficiency, making it difficult to effectively handle optimization problems involving multiple contact sequences.
By acquiring dimension management information, we can determine indicator vectors to mask or retain motion dimensions, reconstruct the optimization problem, and use the indicator vectors to adjust the optimization problem, thereby reducing the amount of computation and improving computational efficiency.
This reduces the computational complexity of robot motion control, improves computational efficiency, and enables more efficient motion control.
Smart Images

Figure CN2024119369_11122025_PF_FP_ABST
Abstract
Description
Motion control method and system of robot, electronic device and storage medium
[0001] The present application claims priority to the Chinese patent application No. 202410726980.7, filed on June 6, 2024, and entitled "Motion control method and system of robot, electronic device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of robot control, and in particular to a motion control method and system of robot, an electronic device and a storage medium. BACKGROUND
[0003] Robots with motion execution mechanisms can realize motions such as carrying and walking, and have been widely applied in industries, logistics and other fields. In the related art, the motion control of the robot is usually realized by solving an optimization problem. The above method needs to include all possible contact states in the optimization problem and set corresponding dimension decision variables, which has high computational complexity and low computational efficiency.
[0004] SUMMARY
[0005] The present application aims to provide a motion control method and system of robot, an electronic device and a storage medium, which can adaptively adjust the dimension number of the optimization problem and improve the computational efficiency of the motion control of the robot.
[0006] To solve the above technical problems, the present application provides a motion control method of robot, comprising:
[0007] obtaining dimension management information and determining an indication vector corresponding to the robot according to the dimension management information; wherein the robot is a robot that realizes motion by using a motion execution mechanism, the dimension management information is information for indicating that the motion dimension of the motion execution mechanism needs to be shielded or retained, the dimension of the indication vector corresponds to each motion dimension of the motion execution mechanism, the dimension of the indication vector includes a first type of dimension and a second type of dimension, the first type of dimension corresponds to the motion dimension that needs to be shielded, the second type of dimension corresponds to the motion dimension that needs to be retained, and the values of the first type of dimension and the second type of dimension are different;
[0008] reconfiguring an optimization problem by using the indication vector; wherein the first type of dimension is not included in the reconfigured optimization problem, and the optimization problem is a trajectory tracking optimization problem corresponding to the execution of the current task by the robot;
[0009] controlling the motion execution mechanism according to the reconfigured optimization problem.
[0010] Optionally, the dimension management information comprises user configuration information and / or robot contact sequence.
[0011] The user configuration information comprises dimension masking information and / or dimension reservation information input by the user, and the robot contact sequence is a contact sequence when the robot performs the current task, which is used to describe whether there is external environmental reaction force in each motion dimension of the motion execution mechanism. In the robot contact sequence, the motion dimension without external environmental reaction force is the motion dimension that needs to be masked, and the motion dimension with external environmental reaction force is the motion dimension that needs to be reserved.
[0012] Optionally, if the dimension management information comprises the user configuration information and the robot contact sequence, the indication vector corresponding to the robot is determined according to the dimension management information, comprising:
[0013] An alternative vector is set according to the robot contact sequence, wherein the dimension of the alternative vector corresponds to each motion dimension of the motion execution mechanism;
[0014] A dimension constraint condition conforming to the user configuration information is generated, wherein the dimension constraint condition is used to constrain the value of any one or several dimensions in the indication vector;
[0015] The indication vector corresponding to the robot is determined according to the alternative vector and the dimension constraint condition.
[0016] Optionally, if the dimension management information comprises the robot contact sequence, after the motion execution mechanism is controlled according to the reconstructed optimization problem, the method further comprises:
[0017] An interaction event between the motion execution mechanism and the external environment is recorded, and a new robot contact sequence is generated according to the interaction event;
[0018] It is judged whether the user configuration information is received;
[0019] If yes, the indication vector is updated according to the user configuration information received last time and the new robot contact sequence;
[0020] If no, the indication vector is updated according to the new robot contact sequence.
[0021] Optionally, the optimization problem is reconstructed by using the indication vector, comprising:
[0022] A selection matrix is generated according to the arrangement order of the first type of dimension and the second type of dimension in the indication vector, wherein the selection matrix is a matrix used to mask the first type of dimension and reserve the second type of dimension;
[0023] reconstruct an optimization problem by using the selection matrix.
[0024] Optionally, the value of the first type of dimension is 0, and the value of the second type of dimension is 1.
[0025] Correspondingly, generating a selection matrix according to the arrangement order of the first type of dimension and the second type of dimension in the indication vector comprises:
[0026] constructing a square matrix according to the indication vector; wherein the number of rows and the number of columns of the square matrix are both the number of dimensions of the indication vector;
[0027] extracting the value of each dimension of the indication vector as the diagonal element of the square matrix in sequence, and setting the non-diagonal element of the square matrix to 0;
[0028] removing the column in which all elements in the square matrix are 0 to obtain the selection matrix.
[0029] Optionally, reconstructing an optimization problem by using the selection matrix comprises:
[0030] multiplying the selection matrix and the task matrix in the optimization problem to obtain a new task matrix;
[0031] multiplying the selection matrix and the constraint matrix in the optimization problem to obtain a new constraint matrix;
[0032] reconstructing an optimization problem based on the new task matrix and the new constraint matrix.
[0033] The application further provides a motion control system of a robot, which comprises:
[0034] a vector determination module configured to acquire dimension management information and determine an indication vector corresponding to the robot according to the dimension management information; wherein the robot is a robot that realizes motion by using a motion execution mechanism, the dimension management information is information for indicating that the motion dimension of the motion execution mechanism needs to be shielded or reserved, the dimension of the indication vector corresponds to each motion dimension of the motion execution mechanism, the dimension of the indication vector comprises a first type of dimension and a second type of dimension, the first type of dimension corresponds to a motion dimension that needs to be shielded, the second type of dimension corresponds to a motion dimension that needs to be reserved, and the value of the first type of dimension is different from the value of the second type of dimension;
[0035] a problem reconstruction module configured to reconstruct an optimization problem by using the indication vector; wherein the first type of dimension is not included in the reconstructed optimization problem, and the optimization problem is a trajectory tracking optimization problem corresponding to the current task executed by the robot;
[0036] A control module is configured to control the motion execution mechanism according to the reconstructed optimization problem.
[0037] The application further provides a storage medium having a computer program stored thereon, wherein the computer program is configured to implement the steps of the robot motion control method.
[0038] The application further provides an electronic device comprising a memory and a processor, wherein the memory has a computer program stored therein, and the processor is configured to implement the steps of the robot motion control method when the computer program in the memory is invoked.
[0039] The application provides a robot motion control method, which obtains dimension management information and determines an indication vector corresponding to the robot according to the dimension management information, wherein the dimensions of the indication vector correspond to each motion dimension of a motion execution mechanism; the dimension management information is information used for indicating motion dimensions of the motion execution mechanism that need to be shielded or reserved, so in the indication vector determined based on the dimension management information, a first type of dimension corresponds to a motion dimension that needs to be shielded, and a second type of dimension corresponds to a motion dimension that needs to be reserved; the application reconstructs an optimization problem by using the indication vector, so as to shield the first type of dimension and reserve the second type of dimension, and then controls the motion execution mechanism by using the reconstructed optimization problem. The application can adaptively adjust the number of dimensions in the optimization problem according to the dimension management information, reduces the amount of calculation for solving the optimization problem, and improves the calculation efficiency of robot motion control. The application further provides a robot motion control system, a storage medium and an electronic device, which have the above beneficial effects and will not be described herein. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative effort.
[0041] FIG. 1 is a flowchart of a robot motion control method provided by an embodiment of the application;
[0042] FIG. 2 is a flowchart of a high real-time full-body control algorithm for a multi-contact sequence of a legged robot provided by an embodiment of the application;
[0043] FIG. 3 is a structural schematic diagram of a robot motion control system provided by an embodiment of the application. DETAILED DESCRIPTION
[0044] In order to make the purposes, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort should fall within the protection scope of the present application.
[0045] Please refer to FIG. 1, which is a flowchart of a motion control method of a robot provided by an embodiment of the present application.
[0046] S101: Obtain dimension management information, and determine an indication vector corresponding to the robot according to the dimension management information.
[0047] The embodiment can be applied to a processor of a robot, and the robot is a robot that realizes motion by using a motion execution mechanism. Specifically, the robot can realize motion by using a motion execution mechanism including multiple joints. The processor can realize motion control of the robot by sending a control instruction to the motion execution mechanism.
[0048] The dimension management information is information for indicating that the motion dimensions of the motion execution mechanism need to be shielded or reserved. That is, the dimension management information specifies the motion dimensions that need to be shielded and the motion dimensions that need to be reserved.
[0049] After obtaining the dimension management information, the embodiment can determine an indication vector corresponding to the robot according to the dimension management information. The dimensions of the indication vector correspond to each motion dimension of the motion execution mechanism. As a feasible implementation manner, the total number of dimensions in the indication vector can be determined according to the structural parameters of the robot before this step. The indication vector can include a dimension corresponding to each motion dimension of the motion execution mechanism. As a feasible implementation manner, the motion execution mechanism of the robot includes a left lower limb, a right lower limb, a left upper limb, and a right upper limb. Each motion execution mechanism has at least one motion dimension.
[0050] Since the dimension management information is information for indicating that the motion dimensions of the motion execution mechanism need to be shielded or reserved, the dimensions of the indication vector determined according to the dimension management information can include a first type of dimension and a second type of dimension. The first type of dimension corresponds to the motion dimension that needs to be shielded, and the second type of dimension corresponds to the motion dimension that needs to be reserved. The values of the first type of dimension and the second type of dimension are different. The indication vector can include at least 0 first type of dimensions and at least 0 second type of dimensions.
[0051] S102: Reconstruct an optimization problem by using the indication vector.
[0052] Wherein, before the present step, there can be an operation of generating an optimization problem, and the present embodiment takes the trajectory tracking optimization problem corresponding to the current task as the above optimization problem. Specifically, the present embodiment can determine the control target and the constraint condition of the current task, and can generate the above trajectory tracking optimization problem according to the control target and the constraint condition. The present embodiment can process the current task by using a full-body control algorithm based on quadratic programming, and obtain the optimization problem. The decision variable of the optimization problem corresponds to the motion dimension of the motion execution mechanism of the robot.
[0053] The values of the first type of dimension and the second type of dimension in the indication vector are different, so the indication vector contains information about the motion dimension that needs to be shielded and / or the motion dimension that needs to be retained. The optimization problem is a trajectory tracking optimization problem corresponding to the execution of the current task by the robot, and reconstructing the optimization problem based on the indication vector can achieve shielding or retaining of any motion dimension. In the above manner, the first type of dimension is not included in the reconstructed optimization problem, and the second type of dimension can be included.
[0054] S103: Control the motion execution mechanism according to the reconstructed optimization problem.
[0055] Wherein, on the basis of obtaining the reconstructed optimization problem, the reconstructed optimization problem can be solved to determine the optimal solution of the reconstructed optimization problem, so as to determine the target torque of each motion execution mechanism according to the optimal solution, and control the motion execution mechanism according to the target torque, so as to complete the current task.
[0056] The present embodiment obtains dimension management information and determines an indication vector corresponding to the robot according to the dimension management information, the dimension of the indication vector corresponding to each motion dimension of the motion execution mechanism; the dimension management information is information for indicating that the motion dimension of the motion execution mechanism needs to be shielded or retained, so in the indication vector determined based on the dimension management information, the first type of dimension corresponds to the motion dimension that needs to be shielded, and the second type of dimension corresponds to the motion dimension that needs to be retained; the present embodiment reconstructs the optimization problem by using the above indication vector, so as to shield the first type of dimension and retain the second type of dimension, and thus controls the motion execution mechanism by using the reconstructed optimization problem. The present embodiment can adaptively adjust the number of dimensions in the optimization problem according to the dimension management information, thereby reducing the amount of calculation involved in solving the optimization problem and improving the calculation efficiency of the robot motion control.
[0057] As a further introduction to the embodiment corresponding to FIG. 1, the above dimension management information can contain user configuration information, can contain a robot contact sequence, or can contain both user configuration information and a robot contact sequence.
[0058] Specifically, the user configuration information is information about dimension configuration input by the user, which can include dimension shielding information input by the user, can include dimension reservation information input by the user, and can include both the dimension shielding information and the dimension reservation information. The dimension shielding information is used to describe the motion dimensions that need to be shielded, and the dimension reservation information is used to describe the motion dimensions reserved by the user. According to the dimension reservation information, the motion dimensions that need to be shielded can be determined, that is, the motion dimensions other than the motion dimensions corresponding to the dimension reservation information are regarded as the motion dimensions that need to be shielded.
[0059] Specifically, in a feasible implementation, it is assumed that the user selects some joints of the upper limb of the robot to be fixed so that the joints do not participate in the motion of the robot. In this case, the motion dimensions of the joints of the upper limb are the motion dimensions that need to be shielded. At this time, the joint fixing selection information of the user, that is, the user configuration information, inputs information about dimension configuration.
[0060] The robot contact sequence is a contact sequence of the robot when the robot performs a current task, and is used to describe whether there is an external environment reaction force on each motion dimension of the motion execution mechanism. In the robot contact sequence, the motion dimensions without the external environment reaction force are the motion dimensions that need to be shielded, and the motion dimensions with the external environment reaction force are the motion dimensions that need to be reserved. The external environment refers to all objects (such as the ground, goods, other robots, etc.) other than the robot itself.
[0061] Specifically, the embodiment can deploy sensors (such as force sensors, tactile sensors, etc.) on the motion execution mechanism of the robot, so as to perceive the reaction force of the external environment on the motion execution mechanism by using the sensors. The embodiment can also process the raw data collected by the sensors (such as filtering, threshold setting, and pattern recognition), so as to obtain the robot contact sequence. The robot contact sequence is a serialized data structure, and records whether there is an external environment reaction force on each motion dimension of the robot when the robot performs a current task. The robot contact sequence is presented in the form of a time sequence, and is used to describe whether there is contact on each motion dimension at each time point.
[0062] As a feasible implementation, if the dimension management information only includes the user configuration information, the indication vector can be determined by the following manner: generating a dimension constraint condition conforming to the user configuration information; and determining the indication vector corresponding to the robot based on the dimension constraint condition.
[0063] The dimension constraint condition is used to constrain the value of any dimension or any dimensions corresponding to the motion dimensions in the indication vector, so as to set the first type of dimensions and / or the second type of dimensions in the indication vector. Specifically, the value of the dimension corresponding to the motion dimension that needs to be shielded in the indication vector is 0, and the value of the other dimensions is 1.
[0064] As a feasible implementation, if the dimension management information only contains the robot contact sequence, the corresponding indication vector of the robot can be determined according to the robot contact sequence.
[0065] In the above manner, all dimensions in the indication vector can be divided into the first type of dimension and the second type of dimension according to whether there is an external environment reaction force in a certain motion dimension, that is, the first type of dimension corresponds to the motion dimension in which there is no external environment reaction force, and the second type of dimension corresponds to the motion dimension in which there is an external environment reaction force. Specifically, the corresponding dimension value of the motion dimension in which there is no external environment reaction force in the indication vector is 0, and the corresponding dimension value of the motion dimension in which there is an external environment reaction force is 1.
[0066] As a feasible implementation, if the dimension management information contains the user configuration information and the robot contact sequence, the process of determining the corresponding indication vector of the robot according to the dimension management information includes the following steps:
[0067] Step A1: setting an alternative vector according to the robot contact sequence.
[0068] wherein the dimensions of the alternative vector correspond to each motion dimension of the motion execution mechanism, and the values of the dimensions in the alternative vector are determined according to the robot contact sequence. Specifically, the corresponding dimension value of the motion dimension in which there is no external environment reaction force in the alternative vector is 0, and the corresponding dimension value of the motion dimension in which there is an external environment reaction force is 1.
[0069] Step A2: generating a dimension constraint condition conforming to the user configuration information.
[0070] wherein the dimension constraint condition is used to constrain the value of any one or several dimensions in the indication vector.
[0071] Step A3: determining the corresponding indication vector of the robot according to the alternative vector and the dimension constraint condition.
[0072] In actual implementation, it can be judged whether the alternative vector conforms to the dimension constraint condition; if yes, the alternative vector is set as the corresponding indication vector of the robot; if not, the alternative vector is modified according to the dimension constraint condition, and the modified alternative vector is set as the corresponding indication vector of the robot, and the modified alternative vector conforms to the dimension constraint condition.
[0073] Suppose the alternative vector set according to the robot contact sequence is [0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1], wherein the first dimension to the third dimension correspond to the motion dimensions of the left upper limb of the robot, the fourth dimension to the sixth dimension correspond to the motion dimensions of the right upper limb of the robot, the seventh dimension to the twelfth dimension correspond to the motion dimensions of the left lower limb of the robot, and the thirteenth dimension to the eighteenth dimension correspond to the motion dimensions of the right lower limb of the robot. If the user selects to fix all the joints of the left upper limb and the right upper limb of the robot, all the motion dimensions of the left upper limb and the right upper limb are the motion dimensions that need to be shielded, and at this time, the dimension constraint condition generated based on the user configuration information is that the values of the first dimension to the sixth dimension are 0. Based on the dimension constraint condition, the alternative vector is corrected, and the indication vector is determined as [0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1].
[0074] As a feasible implementation manner, if the dimension management information contains the robot contact sequence, after the motion execution mechanism is controlled according to the reconstructed optimization problem, the interaction event between the motion execution mechanism and the external environment can also be recorded; the interaction events are sorted in the order of events to obtain a new robot contact sequence, so as to reset the indication vector according to the new robot contact sequence. Specifically, the indication vector can be updated in the following manner: recording the interaction event between the motion execution mechanism and the external environment, and generating a new robot contact sequence according to the interaction event; judging whether the user configuration information is received; if yes, updating the indication vector according to the user configuration information received last time; if no, updating the indication vector according to the new robot contact sequence.
[0075] In the above manner, the indication vector can be dynamically updated according to the actual interaction between the robot and the external environment, and the calculation efficiency of the robot motion control is improved.
[0076] As a feasible implementation manner, after the motion execution mechanism is controlled according to the reconstructed optimization problem, if the user configuration information is received, the indication vector can be updated according to the user configuration information received last time. In the above manner, the corresponding motion dimension can be shielded according to the user demand, and the flexibility of the robot motion control is improved.
[0077] As a further introduction to the embodiment corresponding to FIG. 1, the optimization problem can be reconstructed in the following manner: generating a selection matrix according to the arrangement order of the first type of dimensions and the second type of dimensions in the indication vector; and reconstructing the optimization problem by using the selection matrix. The above selection matrix is a matrix for shielding the first type of dimensions and retaining the second type of dimensions.
[0078] Specifically, the embodiment can use the selection matrix to remove the part corresponding to the first type of dimension and retain the part corresponding to the second type of dimension in the optimization problem, to obtain a new optimization problem. The above process uses the selection matrix to reconstruct the optimization problem, to obtain a new optimization problem. Through the operation of the selection matrix, adaptive adjustment of the dimension of the optimization problem can be realized. The new optimization problem is not only smaller in scale, but also closer to the actual control requirements.
[0079] The embodiment can set the value of the first type of dimension to 0 and the value of the second type of dimension to 1. On this basis, the selection matrix can be generated in the following manner:
[0080] Step B1: Construct a square matrix according to the indication vector.
[0081] The number of rows and the number of columns of the square matrix are both the dimension number of the indication vector. The indication vector contains an element vector corresponding to each motion dimension of the motion execution mechanism. Each element value is 1 or 0, which respectively indicates that the corresponding dimension needs to be retained or needs to be shielded. The square matrix is a matrix with equal number of rows and columns, and the dimension number is consistent with the dimension number of the indication vector.
[0082] Step B2: Extract the value of each dimension of the indication vector as the diagonal element of the square matrix in sequence, and set the non-diagonal element of the square matrix to 0.
[0083] Through the above manner, the square matrix can become a diagonal matrix, and the elements on the diagonal line correspond one by one to the elements in the indication vector.
[0084] Step B3: Remove all columns of the square matrix whose elements are 0, to obtain the selection matrix.
[0085] Since the value of 0 in the indication vector indicates that the dimension needs to be shielded, and the value of 1 indicates that the dimension needs to be retained. By removing these all-zero columns, the selection matrix obtained is a screened matrix, and the selection matrix only retains the key dimensions that interact with the external environment, thereby realizing adaptive adjustment of the dimension of the optimization problem.
[0086] The above process can simplify the original optimization problem into a new optimization problem that only considers the key dimensions, thereby improving the calculation efficiency and control accuracy.
[0087] On the basis of the above-mentioned manner of constructing the selection matrix, before the optimization problem is reconstructed by using the selection matrix, the current task can be processed by using a whole body control (WBC) algorithm based on quadratic programming (QP) optimization to obtain the optimization problem. The optimization problem obtained in the above-mentioned manner includes the task matrix and the constraint matrix, and therefore the optimization problem can be reconstructed in the following manner: the selection matrix is multiplied by the task matrix in the optimization problem to obtain a new task matrix; the selection matrix is multiplied by the constraint matrix in the optimization problem to obtain a new constraint matrix; and the optimization problem is reconstructed based on the new task matrix and the new constraint matrix.
[0088] In the above-mentioned manner, the key motion dimension can be effectively screened out, the calculation complexity can be reduced, and the optimization efficiency can be improved. The new optimization problem obtained in the above-mentioned manner is closer to the actual situation, and the accuracy and stability of robot control can be improved.
[0089] The above-mentioned flow is described in the embodiments below.
[0090] There are generally two implementation manners of the whole body control (WBC) algorithm, one is a null space projection method, and the other is an optimization-based method. The null space projection method has strict task priorities, but such strict priorities can be too “hard” for a legged robot, especially a humanoid robot, because there is no need for such strict priorities among different tasks. The WBC based on optimization realizes task priorities by adjusting task weights, and is relatively a “soft” way to realize task priorities.
[0091] Currently, the whole body control algorithm based on quadratic programming (i.e., the whole body control algorithm based on quadratic programming optimization, QP-WBC) usually includes all possible contact states and sets the corresponding dimension decision variable when dealing with multi-contact sequences of a legged robot. The related art needs to consider all possible contact situations to construct a complete higher-dimensional optimization problem. In different contact sequences, the corresponding dimension decision variable is usually set to zero to achieve the normal working logic. Taking a humanoid robot as an example, the force wrench of the foot in contact with the ground is 6-dimensional, so the corresponding decision variable is 6-dimensional when single-foot supporting, and the force wrench is 12-dimensional when double-foot supporting. For single-foot supporting and other working states, there are some dimensions of the decision variable that do not work, but the related art usually sets them to zero, and the dimension of the decision variable of the whole optimization problem does not decrease, which means that the calculation time of the optimization problem does not decrease. In addition, when the robot is in a certain working state, it has additional physical contact with the environment, which also requires the force wrench at the contact to be newly added to the optimization problem. The whole body control algorithm based on quadratic programming currently cannot well cope with this demand. It can be seen that the whole body control algorithm based on quadratic programming in the related art lacks a mechanism for reducing and increasing the dimension of the decision variable on line to cope with multi-contact sequences of a legged robot.
[0092] In view of the technical problems in the above related art, the present application provides a high real-time whole body control scheme for coping with multi-contact sequences of a legged robot, which can greatly reduce the solving time of the optimization problem and ultimately improve the real-time performance of the quadratic programming whole body control algorithm.
[0093] In order to make the whole body control algorithm have better real-time performance, the embodiment adopts a whole body control method based on weighted quadratic programming. The following takes a legged robot as an example to introduce the whole body control algorithm based on quadratic programming, which serves as the technical basis of the present scheme.
[0094] The legged robot is a typical floating base system, and the configuration vector q of the legged robot is represented by the generalized coordinates , wherein T represents transposition; q b represents the position and direction coordinates of the floating base, n b represents the dimension, represents the domain; q j is the n j -dimensional joint coordinate description, n j represents the degrees of freedom of the floating base and the degrees of freedom of the joint, and the total dimension of the generalized coordinates n q = n b +n j . The generalized spatial velocity is defined as the first derivative of q b , the first derivative of q j , the second derivative of q b , the second derivative of q j . When the humanoid robot stands still and the upper limbs of the robot have direct physical contact with the environment, the whole-body dynamics of the humanoid robot can be fully described by the following dynamics equation:
[0095] where, is the generalized mass matrix, is the nonlinear term containing the Coriolis force, centripetal force and gravity, denotes the output torque of the driving joint; and are the reaction force wrenches of the ground on the robot's left lower limb and right lower limb foot bottom (usually containing three-dimensional force and three-dimensional torque, n lLeg denotes the dimension number of the left lower limb, n rLeg denotes the dimension number of the right lower limb, n lLeg =n rLeg =6), and are the contact Jacobian matrices of the robot's left lower limb and right lower limb. Similarly, and are the reaction force wrenches of the environment on the robot's left upper limb and right upper limb, n lArm denotes the dimension number of the left upper limb, n rArm denotes the dimension number of the right upper limb, and are the contact Jacobian matrices of the robot's left upper limb and right upper limb.
[0096] In order to complete the related task, the goal of the whole-body control algorithm is to make the robot track the desired task trajectory. It is usually more convenient to represent the desired trajectory in task (or operation) space than in joint space. The task space velocity and the generalized space velocity u follow the following relationship:
[0097] J t (q) denotes the Jacobian matrix, and the reference trajectory required to complete a specific task is defined as X ref , the desired acceleration
[0098] where the proportional gain Kp and differential gain K d This is the diagonal feedback matrix. For different task i, there are different task Jacobians. Different expected task trajectories are required, where X represents the actual trajectory. ref Indicates the reference trajectory. X represents ref The first derivative, X represents ref The second derivative, Let X represent the first derivative of X. The controller should complete each task as much as possible, that is, minimize the following formula:
[0099] This represents the actual acceleration corresponding to task i. This represents the expected acceleration corresponding to task i. This represents the proportional gain corresponding to the i-th task. This represents the differential gain corresponding to the i-th task. Let X represent the reference trajectory corresponding to the i-th task. i This represents the actual trajectory corresponding to the i-th task. express The first derivative, X represents i The first derivative, express The second derivative, Represents generalized spatial acceleration. This represents the Jacobian matrix corresponding to task i. express The first derivative.
[0100] As can be seen from equation (1), the ground reaction force on the lower limbs and the external environmental reaction force on the upper limbs will directly affect the generalized acceleration. Therefore, in addition to generalized spatial acceleration T represents the transpose, and the ground reaction force and the external environmental reaction force experienced by the robot are also included in the decision variable χ, that is:
[0101] Where R represents the range of values, and n is the dimension of the decision variables in the whole-body control algorithm. χ as follows:
[0102] n χ =n q +n lLeg +n rLeg +n lArm +n rArm Equation (6);
[0103] The above task trajectory tracking can be converted into an optimization problem, i.e., represented as:
[0104] where, is the task matrix of the ith task, is the task vector of the ith task, is the task weight matrix of the ith task. Where n ti is the task dimension of the ith task, n t is the number of tasks. is the constraint matrix, and are the upper and lower bounds of the constraints, where n cj is the constraint dimension of the jth constraint, n c is the number of constraints.
[0105] By solving the above quadratic programming problem, the optimal solution χ * (i.e., the solution that minimizes the cost function under the constraint conditions) can be obtained; combined with the whole body dynamics equation, the joint torque τ cmd required to complete the task can be calculated:
[0106] q fb and u fb are the generalized joint position and velocity feedback provided by the state estimation. M() represents the generalized mass matrix represents the contact Jacobian matrix of the left lower limb, represents the contact Jacobian matrix of the right lower limb, represents the contact Jacobian matrix of the left upper limb, represents the contact Jacobian matrix of the right upper limb, and h() represents the nonlinear terms including Coriolis force, centripetal force and gravity.
[0107] The above is the complete framework and process of the whole body control algorithm, all the tasks to be completed are represented in the form of D i χ-d i in the objective function, the relative priority of the task is realized by setting the appropriate task weight matrix W i ; and the physical constraints received by the robot are considered as much as possible during the completion of the task, the constraints received are represented in the form of lb j ≤C j χ≤ub j (if lb j = ub j , it is naturally represented as an equality constraint).
[0108] In practical applications, users can set corresponding tasks and constraints according to specific needs. Taking the scenario of a legged robot realizing the walking function on flat ground as an example, the tasks that can be selected from high to low priority are: non-slip foot task, body posture and height control task, robot overall angular momentum task, swing leg foot trajectory tracking task, minimizing foot force change task, etc.; the constraints can be set as: floating basis dynamics equality constraint, friction cone and foot force upper and lower limit constraint, joint speed saturation inequality constraint, and joint output torque saturation inequality constraint, etc.
[0109] As can be seen from equation (6), the previous whole-body control algorithm has a decision variable χ with dimension n. χ Typically, these forces are fixed and do not adaptively change with the robot's contact sequence. Taking a legged robot as an example, its feet alternately contact the ground, exhibiting states such as left foot supporting right foot swinging, right foot supporting left foot swinging, and both feet supporting simultaneously. When the left or right foot is in a swinging phase, there is no reaction force from the ground. Similarly, when the left and right upper limbs do not have direct physical contact with the environment, the corresponding environmental reaction force will also be absent. Existing whole-body control algorithms, for ease of processing, typically set the decision variables corresponding to non-existent reaction forces to zero, without removing them from the decision variables (in this case, the decision variables still maintain the same dimension, and the optimization problem will also maintain the same scale). This is because removing them from the decision variables changes the dimension of the decision variables, and the corresponding task matrix D... i and task vector d i Corresponding changes should also be made, along with the corresponding constraint matrix C. j The upper boundary of the constraint ub j and lower boundary lb j Corresponding changes should also be made. However, there is currently no effective mechanism to handle the above requirements. Therefore, the only option is to set the decision variables that do not exist in a physical sense to zero. Although this method works normally, the size of the optimization problem does not adaptively change with different robot contact sequences, thus wasting computational resources.
[0110] Please refer to Figure 2, which is a flowchart of a high real-time whole-body control algorithm for handling multi-contact sequences in legged robots provided in an embodiment of this application, including the following steps:
[0111] Step 1: Construct the indicator vector.
[0112] This embodiment can set the value of each dimension in the indicator vector based on the dimension masking information and the robot contact sequence judgment result.
[0113] The IndexVector is constructed as follows:
[0114] where a m is an indicator variable of the mth dimension of the decision variable x(m), m = 1, 2,..., n χ , a m = 1 indicates that the mth dimension of the decision variable x(m) will continue to be kept in the decision variable, a m = 0 indicates that the mth dimension of the decision variable x(m) will be removed from the decision variable.
[0115] The indicator variable can be determined according to the robot contact sequence (such as whether the four limbs are subjected to external environmental reaction force) or according to the user's selection of whether to shield some dimensions of the decision variable (for example, if some joints of the upper limbs need to be fixed, the value of the indicator vector of the corresponding dimension can be set to zero). Taking the robot walking as an example, the robot alternately collides (or contacts) with the ground with the left and right feet. From the time dimension, this alternating collision is the robot contact sequence.
[0116] Step 2: Generate the selection matrix.
[0117] After the indicator vector IndexVector is constructed, the selection matrix is generated by the following method: first, construct a square matrix whose diagonal is generated by the indicator vector IndexVector in order and all other non-diagonal elements are zero, that is, S temp = IndexVector.diagonal(), diagonal represents the diagonal, and then remove all columns with zero elements in S temp , that is, the selection matrix S is obtained. As can be seen from the above construction process, the number of columns of the selection matrix S is the number of all non-zero elements in the indicator vector, that is, the number of rows of the selection matrix S is n χ , that is,
[0118] Step 3: Reconstruct the optimization problem.
[0119] After the selection matrix S is generated, the optimization problem shown in formula (7) can be reconstructed according to the selection matrix S. The reconstructed task matrix is the reconstructed constraint matrix is and other task vectors, task weights, and upper and lower bound vectors of the constraints remain unchanged.
[0120] Step 4: Solve the optimization problem, control the robot motion according to the optimal solution, and then update the robot contact sequence.
[0121] The optimization problem reconstructed by the embodiment is as follows:
[0122] Dimension of the optimization problem For most scenarios, this can greatly reduce the dimension of decision variables, i.e. effectively reduce the solving computation of the optimization problem. denotes the reconstructed decision variable.
[0123] In practical applications, the embodiment can flexibly add or remove relevant decision variables in the optimization problem according to the robot contact sequence. The embodiment can add and remove decision variables online and reconstruct the optimization problem, so that the scale of the optimization problem can be adaptively changed according to different contact sequences, so as to remove the decision variables that do not work from the optimization problem, finally reduce the computation and improve the real-time performance of whole body control, and avoid waste of computing resources.
[0124] Please refer to FIG. 3, which is a structural schematic diagram of a motion control system of a robot provided by an embodiment of the present application. The system can include:
[0125] The vector determination module 301 is configured to obtain dimension management information and determine an indication vector corresponding to the robot according to the dimension management information. The robot is a robot that realizes motion by using a motion execution mechanism. The dimension management information is information used to indicate motion dimensions of the motion execution mechanism that need to be shielded or reserved. The dimensions of the indication vector correspond to each motion dimension of the motion execution mechanism. The dimensions of the indication vector include first type dimensions and second type dimensions. The first type dimensions correspond to motion dimensions that need to be shielded, and the second type dimensions correspond to motion dimensions that need to be reserved. The values of the first type dimensions and the second type dimensions are different.
[0126] The problem reconstruction module 302 is configured to reconstruct an optimization problem by using the indication vector. The reconstructed optimization problem does not include the first type dimensions. The optimization problem is a trajectory tracking optimization problem corresponding to the robot performing a current task.
[0127] The control module 303 is configured to control the motion execution mechanism according to the reconstructed optimization problem.
[0128] Further, the dimension management information includes user configuration information and / or a robot contact sequence.
[0129] The user configuration information includes dimension shielding information and / or dimension reservation information input by a user. The robot contact sequence is a contact sequence when the robot performs a current task, and is used to respectively describe whether there is an external environmental reaction force on each motion dimension of the motion execution mechanism. In the robot contact sequence, the motion dimension on which there is no external environmental reaction force is a motion dimension that needs to be shielded, and the motion dimension on which there is an external environmental reaction force is a motion dimension that needs to be reserved.
[0130] Further, if the dimension management information comprises the user configuration information and the robot contact sequence, the process of determining the indication vector corresponding to the robot by the vector determination module 301 according to the dimension management information comprises: setting an alternative vector according to the robot contact sequence; wherein the dimensions of the alternative vector correspond to each motion dimension of the motion execution mechanism; generating a dimension constraint condition conforming to the user configuration information; wherein the dimension constraint condition is used to constrain the value of any one or several dimensions in the indication vector; determining the indication vector corresponding to the robot according to the alternative vector and the dimension constraint condition.
[0131] Further, if the dimension management information comprises the robot contact sequence, the system can further comprise:
[0132] a vector updating module, configured to record the interaction event between the motion execution mechanism and the external environment after the motion execution mechanism is controlled according to the reconstructed optimization problem, and generate a new robot contact sequence according to the interaction event; and further configured to judge whether the user configuration information is received; if yes, update the indication vector according to the user configuration information received last time and the new robot contact sequence; if no, update the indication vector according to the new robot contact sequence.
[0133] Further, the process of reconstructing the optimization problem by the problem reconstruction module 302 using the indication vector comprises: generating a selection matrix according to the arrangement order of the first type of dimensions and the second type of dimensions in the indication vector; wherein the selection matrix is a matrix used to shield the first type of dimensions and retain the second type of dimensions; and reconstructing the optimization problem using the selection matrix.
[0134] Further, the value of the first type of dimensions is 0, and the value of the second type of dimensions is 1.
[0135] Correspondingly, the process of generating the selection matrix by the problem reconstruction module 302 according to the arrangement order of the first type of dimensions and the second type of dimensions in the indication vector comprises: constructing a square matrix according to the indication vector; wherein the number of rows and the number of columns of the square matrix are both the dimension number of the indication vector; extracting the value of each dimension of the indication vector as the diagonal element of the square matrix in sequence, and setting the non-diagonal element of the square matrix to 0; removing the columns in which all elements in the square matrix are 0 to obtain the selection matrix.
[0136] Further, the process of reconstructing the optimization problem by the problem reconstruction module 302 using the selection matrix comprises: multiplying the selection matrix with the task matrix in the optimization problem to obtain a new task matrix; multiplying the selection matrix with the constraint matrix in the optimization problem to obtain a new constraint matrix; and reconstructing the optimization problem based on the new task matrix and the new constraint matrix.
[0137] Since the embodiments of the system part correspond to the embodiments of the method part, the embodiments of the system part are described in the description of the embodiments of the method part, and are not described here.
[0138] The application further provides a storage medium, which has a computer program stored thereon, and the computer program can implement the steps provided by the above embodiments when executed. The storage medium can include a U disk, a mobile hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0139] The application further provides an electronic device, which can include a memory and a processor, the memory has a computer program stored therein, and the processor can implement the steps provided by the above embodiments when calling the computer program in the memory. Of course, the electronic device can further include various network interfaces, power supplies and other components.
[0140] The embodiments in the description are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the system disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts are described in the method part. It should be pointed out that, for those skilled in the art, without departing from the principles of the application, some improvements and modifications can be made to the application, and these improvements and modifications also fall within the protection scope of the application.
[0141] It should be further noted that, in the present description, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
Claims
1. A motion control method of a robot, characterized by, The method comprises the following steps: acquiring dimension management information, and determining an indication vector corresponding to a robot according to the dimension management information; the robot is a robot that realizes movement by using a movement execution mechanism, the dimension management information is information for indicating movement dimensions of the movement execution mechanism that need to be shielded or reserved, the dimensions of the indication vector correspond to each movement dimension of the movement execution mechanism, the dimensions of the indication vector include first-type dimensions and second-type dimensions, the first-type dimensions correspond to movement dimensions that need to be shielded, the second-type dimensions correspond to movement dimensions that need to be reserved, and the values of the first-type dimensions and the second-type dimensions are different; reconfiguring an optimization problem by using the indication vector; the reconfigured optimization problem does not include the first-type dimensions, and the optimization problem is a trajectory tracking optimization problem corresponding to a current task performed by the robot; controlling the movement execution mechanism according to the reconfigured optimization problem.
2. The motion control method of the robot according to claim 1, characterized in that, The dimension management information includes user configuration information and / or a robot contact sequence; the user configuration information includes dimension shielding information and / or dimension reservation information input by a user; and the robot contact sequence is a contact sequence when the robot performs the current task, and is used to respectively describe whether there is an external environment reaction force on each movement dimension of the movement execution mechanism; in the robot contact sequence, a movement dimension without an external environment reaction force is a movement dimension that needs to be shielded, and a movement dimension with an external environment reaction force is a movement dimension that needs to be reserved.
3. The motion control method of the robot according to claim 2, wherein If the dimension management information includes the user configuration information and the robot contact sequence, determining the indication vector corresponding to the robot according to the dimension management information comprises the following steps: setting an alternative vector according to the robot contact sequence; the dimensions of the alternative vector correspond to each movement dimension of the movement execution mechanism; generating a dimension constraint condition that conforms to the user configuration information; the dimension constraint condition is used to constrain the value of any one or several dimensions in the indication vector; determining the indication vector corresponding to the robot according to the alternative vector and the dimension constraint condition. If the dimension management information includes the robot contact sequence, after controlling the movement execution mechanism according to the reconfigured optimization problem, the method further comprises the following steps:
4. The motion control method of the robot according to claim 2, wherein recording an interaction event between the movement execution mechanism and an external environment, and generating a new robot contact sequence according to the interaction event; judging whether the user configuration information has been received; if yes, updating the indication vector according to the user configuration information received last time and the new robot contact sequence; if no, updating the indication vector according to the new robot contact sequence. Reconfiguring an optimization problem by using the indication vector comprises the following steps:
5. The motion control method of the robot according to any one of claims 1 to 4, characterized by, generating a selection matrix according to the arrangement order of the first-type dimensions and the second-type dimensions in the indication vector; the selection matrix is a matrix for shielding the first-type dimensions and reserving the second-type dimensions; reconfiguring an optimization problem by using the selection matrix. 6. The motion control method of the robot according to claim 5, wherein The value of the first type of dimension is 0, and the value of the second type of dimension is 1; Accordingly, a selection matrix is generated according to the arrangement order of the first type of dimension and the second type of dimension in the indication vector, including: A block matrix is constructed according to the indication vector; wherein the number of rows and columns of the block matrix is the dimension number of the indication vector; The value of each dimension of the indication vector is extracted in sequence as the diagonal element of the block matrix, and the non-diagonal element of the block matrix is set to 0; All columns in the block matrix whose elements are 0 are removed to obtain the selection matrix.
7. The motion control method of the robot according to claim 6, wherein The optimization problem is reconstructed using the selection matrix, including: The selection matrix is multiplied by the task matrix in the optimization problem to obtain a new task matrix; The selection matrix is multiplied by the constraint matrix in the optimization problem to obtain a new constraint matrix; The optimization problem is reconstructed based on the new task matrix and the new constraint matrix.
8. A motion control system of a robot characterized by comprising: Including: A vector determination module is configured to obtain dimension management information and determine an indication vector corresponding to a robot according to the dimension management information; wherein the robot is a robot that realizes movement by using a movement execution mechanism, the dimension management information is information for indicating movement dimensions of the movement execution mechanism that need to be shielded or retained, the dimensions of the indication vector correspond to each movement dimension of the movement execution mechanism, the dimensions of the indication vector include a first type of dimension and a second type of dimension, the first type of dimension corresponds to a movement dimension that needs to be shielded, the second type of dimension corresponds to a movement dimension that needs to be retained, and the values of the first type of dimension and the second type of dimension are different; A problem reconstruction module is configured to reconstruct an optimization problem using the indication vector; wherein the first type of dimension is not included in the reconstructed optimization problem, and the optimization problem is a trajectory tracking optimization problem corresponding to a current task performed by the robot; A control module is configured to control the movement execution mechanism according to the reconstructed optimization problem.
9. An electronic device, comprising: A memory and a processor are included, the memory stores a computer program, and the processor calls the computer program in the memory to realize the steps of the robot motion control method according to any one of claims 1 to 7.
10. A storage medium, characterized by The storage medium stores computer executable instructions, and the computer executable instructions are loaded and executed by the processor to realize the steps of the robot motion control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Motion recognition method based on segmented mannequin model applied in human-machine cooperation
CN109086706A
Motion control method and device, robot control equipment and readable storage medium
CN113070880A
Motion control method, motion control device and robot
CN114347020A
Robot motion control method and device, robot control equipment and storage medium
CN116372923A
Robot motion control method and system, electronic equipment and storage medium
CN118288297A