Robot motion control method, device and equipment and storage medium
By constructing a nonlinear optimization model and solving it, the accuracy and stability of foot robot motion control is solved, and efficient motion control is achieved in complex terrain.
Patent Information
- Application Number
- CN202310782171.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2043-06-28
AI Technical Summary
The motion control of foot robots is difficult to achieve accuracy and stability, and the prior art has failed to effectively solve the motion control problem of robots in complex terrain.
By building a nonlinear optimization model, the current state vector of the target robot is obtained and the solution is based on this model, the predictive control vector and predictive state vector are obtained, which are used to perform motion control of the robot, and combined with state planning and motion control as overall optimization problems deal with.
Accurate motion control of the robot is achieved, the motion control effect is improved, and the stable motion of the robot is ensured in complex terrain.
Smart Images

Figure CN119292250A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot motion control method, device, equipment and storage medium. Background Art
[0002] Ground mobile robots can be divided into tracked, wheeled, legged and composite types according to their structure and movement. Compared with wheeled robots, legged robots have the advantages of strong terrain adaptability and high flexibility, and are widely used in many fields to replace humans to complete various complex tasks.
[0003] During the walking process of a legged robot, how to control the motion of the legged robot has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a robot motion control method, device, equipment and storage medium to solve the motion control problem of a legged robot.
[0005] In a first aspect, a robot motion control method is provided, comprising:
[0006] Acquire a current state vector of the target robot, where the current state vector is used to represent a current body state and joint positions of the target robot;
[0007] Constructing a nonlinear optimization model of the target robot within a prediction time period, wherein the prediction time period includes at least one prediction moment, and the at least one prediction moment includes a current moment, wherein the nonlinear optimization model takes a state vector and a control vector of the target robot within the prediction time period as optimization targets, and the control vector is used to characterize a plantar contact force and a joint angular velocity of a leg of the target robot;
[0008] Solving the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period;
[0009] The target robot is motion controlled according to the predicted state vector and the predicted control vector.
[0010] In this technical solution, the current state vector of the target robot is first obtained and a nonlinear optimization model of the target robot within a prediction time period is constructed. Then, based on the current state vector of the target robot, the nonlinear optimization model is solved to obtain a prediction control vector and a prediction state vector of the target robot within the prediction time period. Finally, according to the prediction control vector and the prediction state vector of the target robot within the prediction time period, the target robot is motion controlled, thereby realizing motion control of the robot. In addition, by constructing a nonlinear optimization model and solving the predicted state vector and the predicted control vector, the robot is motion controlled. The state planning and motion control are jointly solved as an overall optimization problem, which can accurately perform motion control and improve the motion control effect.
[0011] In conjunction with the first aspect, in a possible implementation, the nonlinear optimization model includes an optimization objective function, and the optimization objective function is used to constrain the error between the predicted data and the expected data of the target robot within the prediction time period. By constraining the error between the predicted data and the expected data in the nonlinear optimization model, the predicted control vector and the predicted state vector finally solved can meet expectations.
[0012] In combination with the first aspect, in a possible implementation, the optimization objective function includes a first constraint function and a second constraint function, wherein the first constraint function is used to constrain the error between the predicted control vector and the expected control vector of the target robot within the prediction time period, and the second constraint function is used to constrain the error between the predicted state vector and the expected state vector of the target robot within the prediction time period.
[0013] In conjunction with the first aspect, in a possible implementation, the optimization objective function is also used to constrain the plantar contact force of the legs of the target robot. By constraining the plantar contact force of the target robot in the nonlinear optimization model, the target robot can move stably.
[0014] In combination with the first aspect, in a possible implementation manner, the optimization objective function includes a third constraint function, and the third constraint function is obtained based on a transformation of a friction cone constraint inequality.
[0015] In conjunction with the first aspect, in a possible implementation, the optimization objective function is also used to constrain the range of the motion control variables of the target robot. By constraining the range of the motion control variables of the target robot in the nonlinear optimization model, the hardware setting of the target robot can be met.
[0016] In conjunction with the first aspect, in a possible implementation, the nonlinear optimization model further includes a first set of constraint equations, which is used to define the relationship between the state vector at the next moment and the state vector and control vector at the previous moment. By limiting the state vectors and control vectors at adjacent moments in the nonlinear optimization model, the motion of the target robot can be made to conform to the laws of dynamics.
[0017] In combination with the first aspect, in a possible implementation, the first set of constraint equations includes a plurality of discrete dynamic equations, and the discrete dynamic equations are obtained by discretizing a continuous form of dynamic equations.
[0018] In combination with the first aspect, in a possible implementation, the nonlinear optimization model further includes a second set of constraint equations, and the second set of constraint equations is used to limit the speed of the leg ends of the target robot. By limiting the speed of the leg ends of the target robot in the nonlinear optimization model, the movement of the target robot can be made to conform to the gait cycle of the robot.
[0019] In combination with the first aspect, in a possible implementation method, the nonlinear optimization model is solved based on the current state vector to obtain the predicted control vector and predicted state vector of the target robot at each prediction moment within the prediction time period, including: substituting the current state vector into the nonlinear optimization model to obtain a target model, wherein the target model uses the control vector at each prediction moment within the prediction time period as an independent variable; solving the optimal independent variable of the target model to obtain the predicted control vector; and determining the predicted state vector based on the current state vector, the predicted control vector, and the relationship between the state vector and the control vector.
[0020] In combination with the first aspect, in a possible implementation method, the motion control of the target robot is performed according to the predicted state vector and the predicted control vector, including: obtaining a predicted control vector of the target robot at a first prediction moment from the predicted control vector, and obtaining a joint angle position vector of the target robot at a second prediction moment from the predicted state vector, the first prediction moment being any prediction moment within the prediction time period, and the second prediction moment being the next prediction moment of the first prediction moment within the prediction time period; motion control of the target robot is performed according to the predicted control vector of the target robot at the first prediction moment and the joint angle position vector of the target robot at the second prediction moment.
[0021] In a second aspect, a robot motion control device is provided, comprising:
[0022] A vector acquisition module, used to acquire a current state vector of the target robot, wherein the current state vector is used to represent the current body state and joint positions of the target robot;
[0023] an optimization model building module, used to build a nonlinear optimization model of the target robot within a prediction time period, the prediction time period includes at least one prediction moment, the at least one prediction moment includes a current moment, the nonlinear optimization model takes the state vector and control vector of the target robot within the prediction time period as optimization targets, the control vector is used to characterize the plantar contact force and joint angular velocity of the leg of the target robot;
[0024] A model solving module, used for solving the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period;
[0025] A motion control module is used to perform motion control on the target robot according to the predicted state vector and the predicted control vector.
[0026] In a third aspect, a computer device is provided, comprising a memory and one or more processors, wherein the memory is connected to the one or more processors, and the one or more processors are used to execute one or more computer programs stored in the memory, and when the one or more processors execute the one or more computer programs, the computer device implements the robot motion control method of the first aspect.
[0027] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the robot motion control method of the first aspect.
[0028] The present application can achieve the following technical effects: the motion control of the robot is realized; in addition, the motion of the robot is controlled by constructing a nonlinear optimization model and solving it to obtain the predicted state vector and the predicted control vector, and the state planning and motion control are combined as an overall optimization problem to be solved, which can accurately control the motion and improve the motion control effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of a flow chart of a robot motion control method provided in an embodiment of the present application;
[0030] Figure 2 is a schematic structural diagram of a robot motion control device provided in an embodiment of the present application;
[0031] Figure 3 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0033] The technical solution of the present application is applicable to the motion planning scenario of the robot, wherein the technical solution of the present application is used to control the motion of a multi-legged robot. In the present application, a multi-legged robot refers to a robot with multiple legs, and the multi-legged robot can specifically be a bipedal robot, a quadrupedal robot, a hexapod robot, etc.
[0034] The technical solution of the present application can be applied to computer equipment. The computer equipment can be a multi-legged robot or a device connected to a multi-legged robot. The device connected to the multi-legged robot can be a background system supporting the multi-legged robot, a cloud server in a cloud platform corresponding to the multi-legged robot, and so on, not limited to the examples given here.
[0035] The technical solution of this application is described in detail below.
[0036] See also Figure 1 , Figure 1 A schematic diagram of a robot motion control method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0037] S101, obtaining the current state vector of the target robot.
[0038] Here, the current state vector of the target robot is used to represent the current body state and joint positions of the target robot. In a feasible implementation, the current state vector of the target robot can be expressed as x i =[p i ,θ i , v i ,ω i ,q i ]; where i represents the sequence number of the current moment, p i represents the position of the target robot in the world coordinate system at the current moment, p i is a 3D vector; θ i represents the posture of the target robot at the current moment, θ i It is presented in the form of Euler angles, which is a 3D vector; v i Indicates the linear velocity of the target robot in the world coordinate system at the current moment, v i is a 3D vector; ω i represents the angular velocity of the target robot in the world coordinate system at the current moment, ωi is a 3-dimensional vector; q i represents the joint angle position of the target robot, q i The dimension of depends on the structure of the target robot. For example, if the target robot is a quadruped robot with 12 joint motors, then q i is a 12-dimensional vector.
[0039] In the specific implementation, the current state vector of the target robot can be obtained by collecting the current actual joint position, joint speed, and joint torque value of the joint motor of the target robot and calculating the body posture, body position, body speed, body acceleration, etc. of the target robot.
[0040] S102, constructing a nonlinear optimization model of the target robot within the prediction time period.
[0041] Here, the prediction time period refers to the prediction time period including the current moment, and the prediction time period includes at least one prediction moment. If the prediction time period includes one prediction moment, the prediction moment in the prediction time period is the current moment; if the prediction time period includes multiple prediction moments, the prediction moment in the prediction time period includes the current moment and at least one moment after the current moment. Each prediction moment in the prediction time period can be expressed as {t i , t i+1 , t i+2 ,…t i+N-1}, N is the total number of prediction moments in the prediction time period.
[0042] Among them, the nonlinear optimization model takes the state vector and control vector of the target robot in the prediction time period as the optimization target, that is, the role of the nonlinear optimization model is to determine the state vector and control vector applicable to the target robot to move in the prediction time period. The state vector and control vector applicable to the target robot to move in the prediction time period can be called the predicted state vector and predicted control vector. The predicted state vector of the target robot in the prediction time period is used to characterize the body state and joint position of the target robot in the prediction time period. The predicted state vector of the target robot in the prediction time period can be expressed as x i+k , k = {0, 1, 2, ..., N-1}, the state vector of the target robot in the prediction time period is expressed in the same form as the current state vector in the aforementioned step S101, that is, x i+k =[p i+k ,θ i+k , v i+k ,ω i+k ,q i+kThe predicted control vector of the target robot in the prediction time period is used to characterize the plantar contact force and joint angular velocity of the target robot's legs in the prediction time period. The predicted control vector of the target robot in the prediction time period can be expressed as u i+k , k = {0, 1, 2, ..., N-1}, f i+k represents the contact force of the target robot’s leg at the (i+k)th moment, f i+k is a 3*n dimensional vector, where n is the number of legs of the target robot; represents the joint angular velocity of the target robot, The dimension of depends on the structure of the target robot. For example, if the target robot is a quadruped robot with 12 joint motors, then is a 12-dimensional vector. In the nonlinear optimization model, the predicted state vector x i+k and the predictive control vector u i+k is the unknown quantity to be solved.
[0043] The nonlinear optimization model may include an optimization objective function, and the optimization objective of the nonlinear optimization model is to minimize the function value of the optimization objective function. The optimization objective function is used to constrain the error between the predicted data and the expected data of the target robot within the prediction time period. The smaller the error between the predicted data and the expected data of the target robot within the prediction time period, the more accurate the predicted data obtained by optimization. Therefore, the constructed nonlinear optimization model includes: L k (x i+k ,u i+k ) is the function value of the optimized objective function.
[0044] Since the nonlinear optimization model takes the state vector and control vector in the prediction time period as the optimization target, the prediction data of the target robot in the prediction time period includes the predicted state vector and the predicted control vector, and the predicted state vector and the predicted control vector are the aforementioned x i+k and u i+k ; The expected data of the target robot in the prediction time period includes the expected state vector and the expected control vector. The expected state vector and the expected control vector can be expressed as and Expected state expected vector and the predicted state vector x i+k The expected control vector is the same as With the predictive control vector u i+k The expected state vector and the expected control vector is a known quantity, and the expected state vector The desired control vector can be determined based on the user's speed command. In The component is 0, and the component f is obtained by averaging the body weight and the number of supporting legs of the target robot.
[0045] The optimization objective function may specifically include a first constraint function and a second constraint function, wherein the first constraint function is used to constrain the error between the predicted control vector and the expected control vector of the target robot within the prediction time period, and the second constraint function is used to constrain the error between the predicted state vector and the expected state vector of the target robot within the prediction time period. The function value of the optimization objective function is obtained based on the function value of the first constraint function and the function value of the second constraint function.
[0046] In a feasible implementation, the error between the predicted data and the expected data can be measured based on the vector binorm, and the first constraint function can be expressed as Then the second constraint function can be Optionally, the error between the predicted data and the expected data may also be measured by other parameters.
[0047] When the optimization objective function includes the first constraint function and the second constraint function, the optimization objective function can be expressed as: By constraining the error between the predicted data and the expected data in the nonlinear optimization model, the predicted control vector and the predicted state vector finally solved can meet the expectations.
[0048] Optionally, the optimization objective function can also be used to constrain the plantar contact force of the target robot's legs. During the movement of the target robot, the plantar contact force affects the stability of the target robot's movement. The optimization objective function is used to make the plantar contact force of the target robot conform to the friction cone constraint, thereby improving the stability of the target robot's movement.
[0049] The optimization objective function may further include a third constraint function, which is obtained based on the transformation of the friction cone constraint inequality.
[0050] In a feasible implementation, the friction cone constraint inequality may be:
[0051]
[0052] μ is the friction coefficient, represents the component of the plantar contact force of the jth leg of the target robot in the z direction, represents the component of the plantar contact force of the jth leg of the target robot in the x direction, represents the component of the plantar contact force of the jth leg of the target robot in the y direction, composition is the contact force of the sole of the jth leg of the target robot. The third constraint function can be obtained by transforming the friction cone constraint inequality based on the interior point method, exterior point method or augmented Lagrangian method. For example, the friction cone constraint inequality is transformed based on the exterior point method, and the obtained third constraint function can be expressed as:
[0053]
[0054] ρ is the penalty factor introduced based on the exterior point method.
[0055] Alternatively, the friction cone constraint inequality can also be:
[0056]
[0057] ε is the adjustment parameter.
[0058] Accordingly, the friction cone constraint inequality is transformed based on the exterior point method, and the obtained third constraint function can be expressed as:
[0059]
[0060] When the objective optimization function also includes a third constraint function, the optimization objective function can be expressed as
[0061] Optionally, the optimization objective function can also be used to constrain the range of the motion control variables of the target robot. The motion control variables of the target robot include the joint angle positions, joint angle velocities and plantar contact forces of the target robot. The optimization objective function is used to limit the motion control variables of the target robot to a preset range.
[0062] The optimization objective function may further include a fourth constraint function, which is obtained based on the transformation of the motion variable inequality. The motion variable inequality is as follows:
[0063] q min ≤q i+k ≤q max
[0064] f min ≤f i+k ≤f max
[0065]
[0066] Among them, q min and q max Respectively represent the maximum and minimum values of the joint angle position of the target robot, f min and fmax They represent the maximum and minimum contact forces of the target robot’s foot, and Represent the maximum and minimum values of the joint angular velocity of the target robot respectively.
[0067] Similarly, the fourth constraint function can be obtained by transforming the motion variable inequality based on the interior point method, exterior point method, augmented Lagrangian method and other transformation methods. The fourth constraint function can be expressed as
[0068] When the target optimization function also includes a fourth constraint function, the optimization target function can be expressed as:
[0069]
[0070] By constraining the value range of the motion control variables of the target robot in the nonlinear optimization model, the hardware settings of the target robot can be met.
[0071] Optionally, the nonlinear optimization model may further include a first set of constraint equations, which is used to define the relationship between the state vector at the next moment and the state vector and control vector at the previous moment. The state vector of the target robot at the next moment is obtained based on the state vector and control vector at the previous moment. The first set of constraint equations can be expressed as x i+k+1 =F k (x i+k ,u i+k ), k = 0, 1, 2, ..., N-1, F k It represents the relationship between the state vector at the next moment and the state vector and control vector at the previous moment.
[0072] The first set of constraint equations may include N discrete dynamic equations, which can be obtained by discretizing the continuous form of the dynamic equation, that is, F k It is obtained by discretizing the continuous form of the dynamic equation.
[0073] Taking the target robot as a quadruped robot as an example, the continuous form of the dynamic equation is discretized to obtain F k The process is as follows:
[0074] First, obtain the continuous form of the full dynamics equation of the quadruped robot, which is:
[0075]
[0076] Where M is the inertia matrix. and denote the fuselage linear acceleration and joint angular acceleration respectively, represents the generalized angular acceleration of the fuselage. h represents the nonlinear term in the dynamic equation. S is the selection matrix. τ is the 12-dimensional joint torque. J is the contact Jacobian matrix. f is the sole contact force.
[0077] Then, the continuous form of the full dynamic equation is simplified to obtain the central dynamic equation:
[0078] Where M1 is the 6×6 matrix in the upper left corner of M. h1 is the first 6 row vector of h. M2 is the 6×12 matrix in the upper right corner of M. Divide the first 6 columns and 12 rows of the J matrix into 4 groups of 3×6 matrices. j to represent the single-leg Jacobian matrix. j represents the 3D plantar contact force vector on the jth leg and is related to J j Corresponding.
[0079] Then, according to the relationship The dynamic state space equation of the complete robot continuous system is obtained. Finally, the dynamic state space equation is discretized to obtain F k .
[0080] By limiting the state vector and control vector at adjacent prediction moments in the nonlinear optimization model, the motion of the target robot can be made to conform to the laws of dynamics.
[0081] Optionally, the nonlinear optimization model may further include a second set of constraint equations, which is used to limit the speed of the leg ends of the target robot. The second set of constraint equations may be expressed as G k (x i+k ,u i+k )=0. k Represents the velocity constraint relationship of the target robot's leg ends.
[0082] G k Specifically, it is used to express the following constraint relationship: (1) For the jth leg (j ranges from 1 to n) of the target robot, if the jth leg is in the swing phase, the contact force f on the jth leg is j is equal to 0, that is, f j = 0, the z-direction component V of the foot end velocity corresponding to the jth leg z Equal to the planned value, that is, V z The difference from the planned value is equal to 0, V z -V0=0, V0 is the planning value, which is obtained according to the gait sequence of the target robot in the prediction time period, V zBased on the target robot's θ, v, ω, q, it is expressed as follows; (2) If the j-th leg is in the support phase, the foot end velocity V corresponding to the j-th leg is equal to 0, that is, V = 0. Since the target robot has n legs, f j is a 3-dimensional vector, V z is a 1-dimensional vector, V is a 3-dimensional vector, then G k The dimension is 4*(nm)+3*m=4n-m, where m is the number of supporting legs (i.e., legs in the supporting phase) in the target robot, that is, the second constraint equation group includes (4n-m)*N constraint equations.
[0083] By limiting the speed of the leg ends of the target robot in the nonlinear optimization model, the movement of the target robot can be made to conform to the gait cycle of the robot.
[0084] Based on the above description, the following nonlinear optimization model can be constructed:
[0085]
[0086] x i+k+1 =F k (x i+k ,u i+k ), k = 0, 1, 2, ..., N-1
[0087] G k (x i+k ,u i+k )=0,k=0,1,2,…,N-1
[0088] S103, based on the current state vector of the target robot, solving the nonlinear optimization model of the target robot within the prediction time period, and obtaining the prediction control vector and the prediction state vector of the target robot at each prediction moment within the prediction time period.
[0089] Among them, the nonlinear optimization model of the target robot in the prediction time period can be solved through the following steps A1-A3 to obtain the prediction control vector and the prediction state vector of the target robot at each prediction time in the prediction time period:
[0090] A1. Substitute the current state vector of the target robot into the nonlinear optimization model of the target robot within the prediction time period to obtain the target model.
[0091] Among them, since the state vector of the target robot at the next moment is related to the state vector and control vector of the target robot at the previous moment, the state vector of the target robot at the next moment can be represented by the state vector and control vector of the target robot at the previous moment. After substituting the current state vector of the target robot into the nonlinear optimization model of the target robot within the prediction time period, the state vector of the target robot at each prediction moment within the prediction time period can be represented by the current state vector of the target robot and the control vector of the target robot at each prediction moment.
[0092] Taking i=0 as an example, then:
[0093] x1=F0(x0,u0)
[0094] x2=F1(x1,u1)=F1(F0(x0,u0),u1)
[0095] …
[0096] x N-1 =F N-2 (x N-2 ,u N-2 )=F N-2 (F N-3 (x N-3 ,u N-3 ),u1)
[0097] x0 is the current state vector of the target robot, x0 is a known quantity, and the current state vector x0 and control vectors u0, u1, u2, ..., u N-1 Represents the state vector x1~x at the next moment N-1 After that, the target model can be obtained. The unknown quantities in the target model are the control vectors u0, u1, u2, ..., u N-1 , that is, the target model takes the control vector at each prediction moment within the prediction time period as the independent variable.
[0098] A2. Solve the optimal independent variable of the target model and obtain the predicted control vector of the target robot at each predicted time within the predicted time period.
[0099] Among them, the optimal independent variables of the target model can be solved by the gradient method, Newton method, conjugate gradient method and other methods to obtain the predicted control vector of the target robot at each predicted moment within the predicted time period.
[0100] A3. Determine the predicted state vector of the target robot at each predicted moment in the predicted time period based on the current state vector of the target robot, the predicted control vector of the target robot at each predicted moment in the predicted time period, and the relationship between the state vector and the control vector.
[0101] Here, the prediction state vector at the next prediction time is obtained based on the prediction state vector at the previous prediction time and the prediction state vector at the previous prediction time, that is, x i+k+1 =F k (x i+k ,u i+k ).
[0102] S104, performing motion control on the target robot according to the predicted control vector and the predicted state vector of the target robot at each predicted moment within the predicted time period.
[0103] Among them, the motion control of the target robot can be carried out through the following steps B1-B3:
[0104] B1. Obtain the predicted control vector of the target robot at the first prediction moment from the predicted control vectors of the target robot at each prediction moment within the prediction time period, and obtain the joint angle position vector of the target robot at the second prediction moment from the predicted state vectors of the target robot at each prediction moment within the prediction time period.
[0105] The first prediction time can be any prediction time within the prediction time period, and the first prediction time can be expressed as t i+k. The prediction control vector at the first prediction time is u i+k =[f i+k ,q i+k ]. The second prediction time is the next prediction time of the first prediction time. The second prediction time can be expressed as t i+k+1 , the predicted state vector x at the second prediction time i+k+1 =[p i+k+1 ,θ i+k+1 , v i+k+1 ,ω i+k+1 ,q i+k+1 ], the joint angle position vector of the target robot at the second prediction moment is obtained from the predicted state vector at the second prediction moment as q i+k+1 .
[0106] B2. Perform motion control on the target robot according to the predicted control vector of the target robot at the first predicted moment and the joint angle position vector of the target robot at the second predicted moment.
[0107] Among them, the joint position, joint speed and torque feedforward of the target robot's legs can be calculated according to the predicted control vector of the target robot at the first prediction moment and the joint angle position vector of the target robot at the second prediction moment, and the joint movement of the target robot can be controlled according to the joint position, joint speed and torque feedforward of the target robot's legs to make the target robot move.
[0108] In the above Figure 1 In the corresponding technical solution, the current state vector of the target robot is first obtained and a nonlinear optimization model of the target robot within a prediction time period is constructed. Then, based on the current state vector of the target robot, the nonlinear optimization model is solved to obtain a prediction control vector and a prediction state vector of the target robot within the prediction time period. Finally, according to the prediction control vector and the prediction state vector of the target robot within the prediction time period, the target robot is motion controlled to achieve motion control of the robot. In addition, by constructing a nonlinear optimization model and solving the predicted state vector and the predicted control vector, the robot is motion controlled. The state planning and motion control are combined as an overall optimization problem for solution, which can accurately control the motion and improve the motion control effect.
[0109] The method of the present application is introduced above, and the device of the present application is introduced below.
[0110] See also Figure 2 , Figure 2 Schematic diagram of a robot motion control device provided in an embodiment of the present application. Figure 2 As shown, the robot motion control device 20 includes:
[0111] A vector acquisition module 201 is used to acquire a current state vector of a target robot, wherein the current state vector is used to represent a current body state and joint positions of the target robot;
[0112] An optimization model building module 202 is used to build a nonlinear optimization model of the target robot within a prediction time period, the prediction time period includes at least one prediction moment, the at least one prediction moment includes a current moment, the nonlinear optimization model takes the state vector and control vector of the target robot within the prediction time period as optimization targets, the control vector is used to characterize the plantar contact force and joint angular velocity of the leg of the target robot;
[0113] A model solving module 203 is used to solve the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period;
[0114] The motion control module 204 is used to perform motion control on the target robot according to the predicted state vector and the predicted control vector.
[0115] In a possible design, the nonlinear optimization model includes an optimization objective function, and the optimization objective function is used to constrain the error between the predicted data and the expected data of the target robot within the prediction time period.
[0116] In one possible design, the optimization objective function includes a first constraint function and a second constraint function, wherein the first constraint function is used to constrain the error between the predicted control vector and the expected control vector of the target robot within the prediction time period, and the second constraint function is used to constrain the error between the predicted state vector and the expected state vector of the target robot within the prediction time period.
[0117] In a possible design, the optimization objective function is also used to constrain the plantar contact force of the legs of the target robot.
[0118] In a possible design, the optimization objective function includes a third constraint function, and the third constraint function is obtained based on the transformation of the friction cone constraint inequality.
[0119] In a possible design, the optimization objective function is also used to constrain the value range of the motion control variables of the target robot.
[0120] In a possible design, the nonlinear optimization model further includes a first set of constraint equations, where the first set of constraint equations is used to define a relationship between a state vector at a next moment and a state vector and a control vector at a previous moment.
[0121] In a possible design, the first set of constraint equations includes a plurality of discrete dynamic equations, and the discrete dynamic equations are obtained by discretizing the continuous form of the dynamic equations.
[0122] In a possible design, the nonlinear optimization model further includes a second set of constraint equations, where the second set of constraint equations is used to limit the speed of the end of the legs of the target robot.
[0123] In a possible design, the above-mentioned model solving module 203 is specifically used to: substitute the current state vector into the nonlinear optimization model to obtain a target model, wherein the target model uses the control vector at each prediction moment within the prediction time period as an independent variable; solve the optimal independent variable of the target model to obtain the predicted control vector; and determine the predicted state vector based on the current state vector, the predicted control vector, and the relationship between the state vector and the control vector.
[0124] In a possible design, the above-mentioned motion control module 204 is specifically used to: obtain a predicted control vector of the target robot at a first prediction moment from the predicted control vector, and obtain a joint angle position vector of the target robot at a second prediction moment from the predicted state vector, the first prediction moment being any prediction moment within the prediction time period, and the second prediction moment being the next prediction moment of the first prediction moment within the prediction time period; and perform motion control on the target robot according to the predicted control vector of the target robot at the first prediction moment and the joint angle position vector of the target robot at the second prediction moment.
[0125] It should be noted that Figure 2 For the contents not mentioned in the corresponding embodiments, please refer to the description of the aforementioned method embodiments, which will not be repeated here.
[0126] The above-mentioned device first obtains the current state vector of the target robot and constructs a nonlinear optimization model of the target robot within a prediction time period, then solves the nonlinear optimization model based on the current state vector of the target robot to obtain a prediction control vector and a prediction state vector of the target robot within the prediction time period, and finally performs motion control on the target robot according to the prediction control vector and the prediction state vector of the target robot within the prediction time period, thereby realizing motion control of the robot; in addition, by constructing a nonlinear optimization model and solving the prediction state vector and the prediction control vector, the robot is motion controlled, and the state planning and motion control are combined as an overall optimization problem for solution processing, which can accurately perform motion control and improve the motion control effect.
[0127] See also Figure 3 , Figure 3 3 is a schematic diagram of a computer device provided in an embodiment of the present application, wherein the computer device 30 includes a processor 301 and a memory 302. The memory 302 is connected to the processor 301, for example, via a bus.
[0128] The processor 301 is configured to support the computer device 30 to perform the corresponding functions in the method in the above method embodiment. The processor 301 can be a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0129] The memory 302 is used to store program codes, etc. The memory 302 may include a volatile memory (VM), such as a random access memory (RAM); the memory 302 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory 302 may also include a combination of the above-mentioned types of memories.
[0130] The processor 301 may call the program code to perform the following operations:
[0131] Acquire a current state vector of the target robot, where the current state vector is used to represent a current body state and joint positions of the target robot;
[0132] Constructing a nonlinear optimization model of the target robot within a prediction time period, wherein the prediction time period includes at least one prediction moment, and the at least one prediction moment includes a current moment, wherein the nonlinear optimization model takes a state vector and a control vector of the target robot within the prediction time period as optimization targets, and the control vector is used to characterize a plantar contact force and a joint angular velocity of a leg of the target robot;
[0133] Solving the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period;
[0134] The target robot is motion controlled according to the predicted state vector and the predicted control vector.
[0135] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the above embodiment.
[0136] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0137] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A robot motion control method, characterized in that: include: Acquire a current state vector of the target robot, where the current state vector is used to represent a current body state and joint positions of the target robot; Constructing a nonlinear optimization model of the target robot within a prediction time period, wherein the prediction time period includes at least one prediction moment, and the at least one prediction moment includes a current moment, wherein the nonlinear optimization model takes a state vector and a control vector of the target robot within the prediction time period as optimization targets, and the control vector is used to characterize a plantar contact force and a joint angular velocity of a leg of the target robot; Solving the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period; The target robot is motion controlled according to the predicted state vector and the predicted control vector.
2. The method according to claim 1, characterized in that: The nonlinear optimization model includes an optimization objective function, and the optimization objective function is used to constrain the error between the predicted data and the expected data of the target robot within the prediction time period.
3. The method according to claim 2, characterized in that The optimization objective function includes a first constraint function and a second constraint function. The first constraint function is used to constrain the error between the predicted control vector and the expected control vector of the target robot within the prediction time period, and the second constraint function is used to constrain the error between the predicted state vector and the expected state vector of the target robot within the prediction time period.
4. The method according to claim 2, characterized in that: The optimization objective function is also used to constrain the plantar contact force of the legs of the target robot, and / or the optimization objective function is also used to constrain the value range of the motion control variables of the target robot.
5. The method according to claim 4, characterized in that The optimization objective function includes a third constraint function, and the third constraint function is obtained based on the transformation of the friction cone constraint inequality.
6. The method according to claim 2, characterized in that The nonlinear optimization model also includes a first set of constraint equations and / or a second set of constraint equations, wherein the first set of constraint equations is used to limit the relationship between the state vector at the next moment and the state vector and control vector at the previous moment, and the second set of constraint equations is used to limit the speed of the leg ends of the target robot.
7. The method according to claim 6, characterized in that The first set of constraint equations includes a plurality of discrete dynamic equations, and the discrete dynamic equations are obtained by discretizing the continuous form of the dynamic equations.
8. The method according to any one of claims 1 to 7, characterized in that: The nonlinear optimization model is solved based on the current state vector to obtain the predicted control vector and the predicted state vector of the target robot at each predicted moment within the predicted time period, including: Substituting the current state vector into the nonlinear optimization model to obtain a target model, wherein the target model uses the control vectors at each prediction moment within the prediction time period as independent variables; Solving the optimal independent variable of the target model to obtain the predictive control vector; The predicted state vector is determined according to the current state vector, the predicted control vector, and the relationship between the state vector and the control vector.
9. The method according to any one of claims 1 to 7, characterized in that: The step of controlling the motion of the target robot according to the predicted state vector and the predicted control vector comprises: Obtaining a predicted control vector of the target robot at a first predicted moment from the predicted control vector, and obtaining a joint angle position vector of the target robot at a second predicted moment from the predicted state vector, wherein the first predicted moment is any predicted moment within the predicted time period, and the second predicted moment is a next predicted moment of the first predicted moment within the predicted time period; The target robot is motion controlled according to the predicted control vector of the target robot at the first predicted moment and the joint angle position vector of the target robot at the second predicted moment.
10. A robot motion control device, characterized in that: include: A vector acquisition module, used to acquire a current state vector of the target robot, wherein the current state vector is used to represent the current body state and joint positions of the target robot; an optimization model building module, used to build a nonlinear optimization model of the target robot within a prediction time period, the prediction time period includes at least one prediction moment, the at least one prediction moment includes a current moment, the nonlinear optimization model takes the state vector and control vector of the target robot within the prediction time period as optimization targets, the control vector is used to characterize the plantar contact force and joint angular velocity of the leg of the target robot; A model solving module, used for solving the nonlinear optimization model based on the current state vector to obtain a predicted control vector and a predicted state vector of the target robot at each predicted moment within the predicted time period; A motion control module is used to perform motion control on the target robot according to the predicted state vector and the predicted control vector.
11. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory and a processor are connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the computer device implements the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Global balance control method and device for foot-type robot and foot-type robot
CN114137840A
Robot motion control method and device, robot and storage medium
CN114986526A
Quadruped robot control method combined with terrain constraints
CN116237943A
Operation control system and operation control method for plant using nonlinear model
JP2006330892A
Method for maximum wind energy extraction of large-scale wind turbines using nonlinear model predictive control
KR102348388B1