Motion control method and device, motion trajectory generation method and device
By generating multiple motion stages and their time, determining the desired pose and inputting a cost function model, the problem of existing robots being difficult to complete complex actions is solved, and the accurate completion of high-complexity actions and the expansion of action complexity is achieved.
Patent Information
- Application Number
- CN202211496305.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-24
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-11-24
AI Technical Summary
Existing robots find it difficult to complete complex and time-consuming actions with high quality, and even fail to complete these actions.
By generating multiple motion stages and their time of the motion process, the desired pose during the robot's motion is determined, and input it as a reference value into the cost function model to obtain the trajectory of the expected motion, and finally control the robot's motion according to the trajectory.
Ability to accurately describe and complete high-complex and time-consuming high-difficulty movements, expand the robot's movement complexity, and ensure that the motion trajectory accurately represents the expected motion process.
Smart Images

Figure CN118131801B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of robotics, and particularly to a motion control method and device, and a motion trajectory generation method and device. Background Art
[0002] In recent years, the technology of robotics has been continuously developing, becoming more and more intelligent and automated, and the richness, stability, and flexibility of movements have all been improved to varying degrees. Robots can gradually replace humans in production and life for labor and operations, greatly improving people's work and lifestyle. In particular, quadruped robots and humanoid robots can make more movements relying on their multi-joint characteristics. In related technologies, robots can achieve simple repetitive movements with high quality, but for some movements with high complexity and long duration, robots still cannot achieve high quality, or even cannot complete them. Summary of the Invention
[0003] To overcome the problems existing in related technologies, embodiments of the present disclosure provide a walking control method, device, electronic device, and storage medium to solve the defects in related technologies.
[0004] According to a first aspect of embodiments of the present disclosure, there is provided a motion control method applied to a robot, the method including:
[0005] Generating at least one motion stage of a motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0006] Determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage;
[0007] Taking the desired poses of the at least one node as reference values and inputting them into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process;
[0008] Controlling the robot to move according to the trajectory of the desired motion.
[0009] In one embodiment, the determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage includes:
[0010] Determining the desired poses of multiple nodes of the robot during the motion process according to the at least one motion stage, the time of each motion stage in the at least one motion stage, and the relative relationship between the desired poses of the robot at different nodes.
[0011] In one embodiment, it further includes:
[0012] When any two nodes belong to the same motion stage, determine the relative relationship between the desired poses of the robot at these two nodes according to the positions of the two nodes in the motion stage.
[0013] In one embodiment, the cost function model includes the following items to be optimized:
[0014] At least one of the differences between the pose to be optimized at each sampling point and the desired poses of at least one node, and the differences between the poses to be optimized at at least one node and the desired poses;
[0015] At least one of the control parameters to be optimized at each sampling point and the differences between the control parameters to be optimized at each sampling point and the control parameters to be optimized at the previous sampling point.
[0016] In one embodiment, the cost function model further includes the following item to be optimized: the difference between the change speed of the pose to be optimized at each sampling point and the change speed of the pose to be optimized at the previous sampling point.
[0017] In one embodiment, each item to be optimized in the cost function model has a corresponding weight.
[0018] In one embodiment, the constraint conditions of the cost function model include at least one of the following:
[0019] The poses to be optimized and / or the control parameters to be optimized at different sampling points satisfy a preset dynamic equation;
[0020] The poses to be optimized and / or the control parameters to be optimized at each sampling point satisfy a preset empirical range.
[0021] In one embodiment, the desired pose and the pose include at least one of the body displacement, the body attitude angle, and the joint angular displacement; and / or, the control parameter includes the joint torque.
[0022] In one embodiment, the desired motion includes a front flip motion, a back flip motion, and a jump motion.
[0023] In one embodiment, controlling the robot to move according to the trajectory of the desired motion includes:
[0024] Before the robot moves to any sampling point of the trajectory, update the control parameter of the sampling point according to the pose of the sampling point and the current pose of the robot;
[0025] Control the robot to move according to the updated control parameter.
[0026] According to a second aspect of the embodiments of the present disclosure, a method for generating a motion trajectory is provided. The method includes:
[0027] Generating at least one motion stage of a motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0028] Determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage;
[0029] Inputting the pose information of the at least one node as a reference value into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process.
[0030] According to a third aspect of the embodiments of the present disclosure, a motion control method applied to a robot is provided. The method includes:
[0031] Controlling the robot to move according to a pre-configured trajectory in the robot, where the trajectory is generated by the motion trajectory generation method described in the second aspect.
[0032] According to a fourth aspect of the embodiments of the present disclosure, a motion control device applied to a robot is provided. The device includes:
[0033] A first stage module, configured to generate at least one motion stage of a motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0034] A first desired module, configured to determine the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage;
[0035] A first cost module, configured to input the desired poses of the at least one node as a reference value into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process;
[0036] A first control module, configured to control the robot to move according to the trajectory of the desired motion.
[0037] In one embodiment, the first desired module is specifically configured to:
[0038] Determine the desired poses of multiple nodes during the movement of the robot based on the relative relationships among the at least one motion stage, the time of each motion stage in the at least one motion stage, and the desired poses of the robot at different nodes.
[0039] In one embodiment, it further includes a relationship module for:
[0040] In the case where any two nodes belong to the same motion stage, determine the relative relationship between the desired poses of the robot at these two nodes according to the positions of the two nodes in the motion stage.
[0041] In one embodiment, the cost function model includes the following items to be optimized:
[0042] At least one of the difference between the pose to be optimized at each sampling point and the desired pose of at least one node, and the difference between the pose to be optimized at at least one node and the desired pose;
[0043] At least one of the control parameter to be optimized at each sampling point and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point.
[0044] In one embodiment, the cost function model further includes the following item to be optimized: the difference between the change speed of the pose to be optimized at each sampling point and the change speed of the pose to be optimized at the previous sampling point.
[0045] In one embodiment, each item to be optimized in the cost function model has a corresponding weight.
[0046] In one embodiment, the constraint conditions of the cost function model include at least one of the following:
[0047] The poses to be optimized and / or the control parameters to be optimized at different sampling points satisfy a preset dynamic equation;
[0048] The poses to be optimized and / or the control parameters to be optimized at each sampling point satisfy a preset empirical range.
[0049] In one embodiment, the desired pose and the pose include at least one of body displacement, body attitude angle, and joint angle displacement; and / or, the control parameter includes joint torque.
[0050] In one embodiment, the desired motion includes front somersault motion, back somersault motion, and jumping motion.
[0051] In one embodiment, the controlling the robot to move according to the trajectory of the desired motion includes:
[0052] Before the robot moves to any sampling point on the trajectory, update the control parameters of the sampling point according to the pose of the sampling point and the current pose of the robot;
[0053] Control the movement of the robot according to the updated control parameters.
[0054] According to the fifth aspect of the embodiments of the present disclosure, there is provided a motion trajectory generation device, the device includes:
[0055] A second stage module, configured to generate at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0056] A second desired module, configured to determine the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage;
[0057] A second cost module, configured to input the pose information of the at least one node as a reference value into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process.
[0058] According to the sixth aspect of the embodiments of the present disclosure, there is provided a motion control device applied to a robot, the device includes a second control module, configured to:
[0059] Control the movement of the robot according to the trajectory pre-configured in the robot, where the trajectory is generated by the motion trajectory generation method described in the second aspect.
[0060] According to the seventh aspect of the embodiments of the present disclosure, there is provided an electronic device, the electronic device includes a memory and a processor, the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the method described in the first aspect, the second aspect or the third aspect when executing the computer instructions.
[0061] According to the eighth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored, and the program implements the method described in the first aspect, the second aspect or the third aspect when executed by a processor.
[0062] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0063] The motion control method provided by the embodiments of the present disclosure first generates at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion, so that at least one desired pose of the robot at at least one node during the motion process can be determined according to the at least one motion stage and the time of each motion stage in the at least one motion stage. Furthermore, the desired poses of the at least one node are used as reference values and input into the cost function model to obtain the trajectory of the desired motion. Finally, the robot can be controlled to move according to the trajectory of the desired motion. Since the trajectory includes the pose and control parameters at each sampling point, it can describe high-complexity and time-consuming high-difficulty actions. Controlling the robot to move accordingly can enable the robot to accurately complete high-difficulty actions and expand the complexity of the actions that the robot can complete. Moreover, since the desired poses, which are the reference values of the cost function model, are determined according to the stage division of the motion process of the desired motion, the trajectory determined accordingly can accurately represent the process of the desired motion. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings are incorporated herein and constitute a part of this specification, showing embodiments consistent with the present invention and, together with the specification, are used to explain the principles of the present invention.
[0065] Figure 1 is a flowchart of a motion control method shown in an exemplary embodiment of the present disclosure;
[0066] Figures 2A to 2F is a schematic diagram of the motion process of a quadruped robot performing a front flip shown in an exemplary embodiment of the present disclosure;
[0067] Figure 3 is a flowchart of a trajectory generation method shown in another exemplary embodiment of the present disclosure;
[0068] Figure 4 is a schematic structural diagram of a motion control device shown in an exemplary embodiment of the present disclosure;
[0069] Figure 5 is a block diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0071] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a", "the", and "said" used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0072] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0073] In recent years, the technology of robotics has been continuously developing, becoming more and more intelligent and automated, and the richness, stability, and flexibility of movements have all been improved to varying degrees. Robots can gradually replace humans in production and life for labor and operations, greatly improving people's work and lifestyle. In particular, quadruped robots and humanoid robots can make more movements relying on their multi-joint characteristics. In related technologies, robots can achieve simple repetitive movements with high quality, but for some movements with high complexity and long duration, robots are still unable to achieve high quality, or even unable to complete them.
[0074] Based on this, in a first aspect, at least one embodiment of this disclosure provides a motion control method. Please refer to the attached Figure 1 , which shows the flow of this method, including steps S101 to S104.
[0075] Among them, this method can be applied to robots, such as legged robots like quadruped robots and humanoid robots. Exemplarily, this method can be applied to scenarios where a robot is controlled to complete actions such as front somersault, back somersault, and jumping movements.
[0076] In step S101, according to the type of the desired motion, at least one motion stage of the motion process is generated, as well as the time of each motion stage in the at least one motion stage.
[0077] Among them, the expected movement can refer to the movement that the robot is expected to complete, that is, the movement that the robot is about to be controlled to complete. The type of expected movement can be a front flip movement, a back flip movement, a jumping movement, etc. A running type library can be pre-set in the robot, and the above-mentioned movement types can be pre-configured in the movement type library. Each type of movement can be divided into at least one movement stage, so the mapping relationship between the movement type and the movement stage division result can be pre-configured in the robot. The movement stage division result may include at least one movement stage in the movement process, and the time of each movement stage, and then in this step, according to the type of expected movement, the corresponding movement stage division result can be obtained from the above-mentioned mapping relationship.
[0078] Taking the front flip of a quadruped robot as an example, the front flip is a highly dynamic and ultra-extreme sport that places high demands on the robot's joint output force and speed as well as its balance control ability. Borrowing the definition from bionics or sports, a front flip is a type of movement in which the body flips in the air. For a quadruped robot, it is a movement in which the body flips in the roll or pitch direction. In order to achieve a front flip, it is necessary to reach a high speed and angular velocity at the moment of take-off. Under the condition of a certain joint output power, the workspace of the quadruped should be maximized. Therefore, the movement process can be divided into a take-off stage and a take-off stage; please refer to the attached figure. Figure 2A To Attachment Figure 2F The quadruped robot shown in the figure completes the front flip movement, in which the attached Figure 2A To Attachment Figure 2C For the take-off stage, Figure 2C To Attachment Figure 2F It is the launch stage; it can be understood that the above figures simplify the quadruped robot into a two-dimensional joint model.
[0079] It can be understood that the expected motion can be sent to the robot by a remote control connected to the robot for communication or a terminal device installed with a robot control program; the expected motion can also be generated by the robot when planning the motion path, based on obstacle information, road condition information, etc. obtained by scanning. For example, when the robot scans that there is an obstacle ahead, it can generate a jumping action as the expected motion.
[0080] In step S102, the expected position and posture of at least one node of the robot during the movement process is determined according to the at least one movement phase and the time of each movement phase in the at least one movement phase.
[0081] The nodes are specific sampling points in the robot's motion process, for example, the nodes can be the starting sampling point or the ending sampling point of the motion stage. These nodes are samples of all sampling points in the motion process. The desired posture may include at least one of the body displacement, body attitude angle, and joint angle displacement.Figure 2A To Attachment Figure 2F Taking the robot shown as an example, the robot includes a torso and legs, the body posture and attitude angle can be the posture and attitude angle of the torso, and the joint angular displacement can be the angular displacement of the hip joint, the angular displacement of the knee joint and the angular displacement of the ankle joint on the legs.
[0082] The expected position of a node can be determined based on the node's motion phase and its position in the motion phase. Figure 2C The nodes shown can be based on the current posture of the robot and the relationship between the current posture and the surrounding Figure 2C The relative relationship between the poses of the node is used to determine the expected pose of the node.
[0083] Exemplarily, the desired postures of multiple nodes of the robot during the movement process can be determined according to the at least one movement phase, the time of each movement phase in the at least one movement phase, and the relative relationship between the desired postures of different nodes of the robot. In this example, the relative relationship between the desired postures of different nodes is further combined to constrain the desired postures of the nodes, so that the determined desired postures are more accurate and closer to reality.
[0084] The relative relationship between the desired positions and postures of different nodes can be determined in the following manner: when any two nodes belong to the same motion phase, the relative relationship between the desired positions and postures of the robot at the two nodes is determined according to the positions of the two nodes in the motion phase. It is understandable that the relative relationship between the desired positions and postures of different nodes can also be determined in other reasonable ways, which is not limited by the present disclosure.
[0085] For example, for the attached Figure 2A To Attachment Figure 2F The front flip motion shown mainly considers the trajectory of the fuselage in the Z and Pitch directions (i.e., the fuselage height and the rotation angle of the fuselage around the rotation axis perpendicular to the plane). The Z direction of the flight stage is simplified to free fall motion, and the Pitch direction is simplified to uniform motion. Then, the starting sampling point of the flight stage (i.e., the adjacent Figure 2C The node shown in the figure) and the end sampling point (i.e. Figure 2F The relative relationship between the expected pose of the node shown in the above two directions:
[0086] Z direction:
[0087] P_la=P_lo+V_lo*t_fly-0.5*g*(t_fly^2)
[0088] Among them, P_la is the fuselage displacement at the end sampling point, P_lo is the fuselage displacement at the starting sampling point, V_lo is the fuselage speed at the starting sampling point, and t_fly is the time of the flight stage.
[0089] Pitch direction
[0090] theta_la = theta_lo + W_lo * t_fly
[0091] Wherein, theta_la is the body attitude angle at the end sampling point, theta_lo is the body attitude angle at the starting sampling point, W_lo is the body angular velocity at the starting sampling point, and t_fly is the time of the airborne phase.
[0092] In step S103, the desired pose of the at least one node is input into the cost function model as a reference value to obtain the trajectory of the desired motion, wherein the trajectory includes the pose and control parameters of the robot at each sampling point during the motion.
[0093] Wherein, the control parameters may include joint torque, foot end reaction force, etc.
[0094] The cost function model includes the following terms to be optimized: at least one of the difference between the pose to be optimized at each sampling point and the desired pose of the at least one node, and the difference between the pose to be optimized at at least one node and the desired pose; at least one of the control parameter to be optimized at each sampling point and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point; the difference between the change rate of the pose to be optimized at each sampling point and the change rate of the pose to be optimized at the previous sampling point.
[0095] It can be understood that each term to be optimized in the cost function model has a corresponding weight.
[0096] In addition, the constraint conditions of the cost function model include at least one of the following: the pose to be optimized and / or the control parameter to be optimized at different sampling points satisfy a preset dynamic equation; the pose to be optimized and / or the control parameter to be optimized at each sampling point satisfy a preset empirical range.
[0097] Exemplarily, for the front flip motion of the quadruped robot shown in Attachment Figure 2A to Attachment Figure 2F The following cost function model can be constructed by using offline trajectory optimization (Trajectory Optimization) and MPC control:
[0098] Cost = W1 * ||q(k) - q(N)||2 + W2 * ||qbody_flying - qbody_des||2 + W3 * ||qdbody(k) - qdbody(k - 1)||2 + W4 * ||τ(k)||2 + W5 * ||τ(k) - τ(k - 1)||2
[0099] Among them, Cost is the cost value, W1, W2, W3, W4, and W5 are five weights, q(k) is the pose to be optimized of the robot at the k-th (k = 1......N) sampling point, such as the displacement of the robot body to be optimized, the attitude angle of the robot body to be optimized, and the joint angle displacement to be optimized at the k-th sampling point. q(N) is the expected pose of the robot at the end sampling point of the airborne phase (this sampling point is a node), such as the expected displacement of the robot body, the expected attitude angle of the robot body, and the expected joint angle displacement at the end sampling point of the airborne phase; qbody_flying is the pose to be optimized of the robot at the start sampling point of the airborne phase (this sampling point is a node), such as the displacement of the robot body to be optimized, the attitude angle of the robot body to be optimized, and the joint angle displacement to be optimized at the start sampling point of the airborne phase. qbody_des is the expected pose of the robot at the start sampling point of the airborne phase (this sampling point is a node), such as the expected displacement of the robot body, the expected attitude angle of the robot body, and the expected joint angle displacement at the start sampling point of the airborne phase; qdbody(k) is the change speed of the pose to be optimized of the robot at the k-th sampling point, such as the change speed of the displacement of the robot body to be optimized, the change speed of the attitude angle of the robot body to be optimized, and the change speed of the joint angle displacement to be optimized at the k-th sampling point. qdbody(k - 1) is the change speed of the pose to be optimized of the robot at the (k - 1)-th sampling point, such as the change speed of the displacement of the robot body to be optimized, the change speed of the attitude angle of the robot body to be optimized, and the change speed of the joint angle displacement to be optimized at the (k - 1)-th sampling point; τ(k) is the joint torque to be optimized of the robot at the k-th sampling point, such as the joint torque to be optimized of the hip joint, the joint torque to be optimized of the knee joint, and the joint torque to be optimized of the ankle joint of each leg of the robot at the k-th sampling point; τ(k - 1) is the joint torque to be optimized of the robot at the (k - 1)-th sampling point, such as the joint torque to be optimized of the hip joint, the joint torque to be optimized of the knee joint, and the joint torque to be optimized of the ankle joint of each leg of the robot at the (k - 1)-th sampling point.
[0100] It can be understood that each term in the above cost function model can be split into the sum of multiple terms. For example, the first term can be split into the sum of eight terms: body displacement, body attitude angle, front leg hip joint angular displacement, front leg knee joint angular displacement, front leg ankle joint angular displacement, rear leg hip joint angular displacement, rear leg knee joint angular displacement, and rear leg ankle joint angular displacement; the second term can be split into the sum of eight terms: body displacement, body attitude angle, front leg hip joint angular displacement, front leg knee joint angular displacement, front leg ankle joint angular displacement, rear leg hip joint angular displacement, rear leg knee joint angular displacement, and rear leg ankle joint angular displacement; the third term can be split into the sum of eight terms: the change speed of body displacement, the change speed of body attitude angle, the change speed of front leg hip joint angular displacement, the change speed of front leg knee joint angular displacement, the change speed of front leg ankle joint angular displacement, the change speed of rear leg hip joint angular displacement, the change speed of rear leg knee joint angular displacement, and the change speed of rear leg ankle joint angular displacement; the fourth term can be split into the sum of six terms: the torque of the front leg hip joint, the torque of the front leg knee joint, the torque of the front leg ankle joint, the torque of the rear leg hip joint, the torque of the rear leg knee joint, and the torque of the rear leg ankle joint; the fifth term can be split into the sum of six terms: the torque of the front leg hip joint, the torque of the front leg knee joint, the torque of the front leg ankle joint, the torque of the rear leg hip joint, the torque of the rear leg knee joint, and the torque of the rear leg ankle joint.
[0101] In addition, the constraint conditions of the above cost function model can include:
[0102] Xdot_k+1 = Xdot_k + Xddot_k * dt (that is, the pose X satisfies the discretized dynamic equation);
[0103] vel_foot_contact = 0 (that is, there is no slip at the supporting foot end);
[0104] pos_special > 0.01 (that is, special points such as the knee joint and the midpoint of the torso do not touch the ground);
[0105] force_foot_contact < force_max, force_foot_contact > f_min (that is, the reaction force at the supporting leg foot end is within the normal range of the reaction force);
[0106] force_foot_swing = 0 (the reaction force at the swinging leg foot end is zero);
[0107] joint_torque > -torque_max && joint_torque < -torque_max (that is, the joint torque is within the normal range of the torque. This condition can maximize the use of the output torque of the joint and improve the motion limit of the robot);
[0108] joint_vel > -vel_max && joint_vel < vel_max (i.e., the joint rotation speed is within the normal rotation speed range. This condition can maximize the utilization of the joint rotation speed and improve the motion limit of the robot).
[0109] It can be understood that a non - linear solution library (such as IPOPT, etc.) can be used to optimize the cost function model to obtain the optimization results of each parameter to be optimized, such as the pose optimization result, the optimization result of the pose change speed, the optimization result of the control parameter, etc.
[0110] The above steps S101 to S103 can be used for online trajectory optimization of the robot or for offline trajectory optimization of the robot in advance, that is, when the robot is not moving, the trajectories of various motion types are generated and optimized according to the above steps.
[0111] In step S104, the robot is controlled to move according to the expected motion trajectory.
[0112] Exemplarily, before the robot moves to any sampling point of the trajectory, the control parameter of this sampling point is updated according to the pose of this sampling point and the current pose of the robot; and the robot is controlled to move according to the updated control parameter. Preferably, the control parameter of a sampling point can be updated when approaching a certain sampling point. Since the current pose of the robot is close to the actual pose of this sampling point at this time, the update result is more accurate.
[0113] For example, the following formula can be used to update the control parameter of the sampling point:
[0114] τ = k * τ_ff + kp * (q - q_cur) + kd * (qd - qd_cur)
[0115] where τ is the updated joint torque, τ_ff is the joint torque before update, q is the pose of the sampling point (i.e., the pose optimization result in step S103), q_cur is the current pose of the robot, qd is the pose change speed of the sampling point (i.e., the optimization result of the pose change speed in step S103), qd_cur is the current pose change speed of the robot, k is the preset feed - forward torque coefficient, kp is the pose gain, and kd is the speed gain.
[0116] The motion control method provided by the embodiments of the present disclosure first generates at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion, so that at least one desired pose of the robot at at least one node during the motion process can be determined according to the at least one motion stage and the time of each motion stage in the at least one motion stage. Furthermore, the at least one desired pose of the node is used as a reference value to be input into the cost function model to obtain the trajectory of the desired motion. Finally, the robot can be controlled to move according to the trajectory of the desired motion. Since the trajectory includes the pose and control parameters at each sampling point, it can describe high-complexity and time-consuming high-difficulty actions. Controlling the robot to move accordingly can enable the robot to accurately complete high-difficulty actions and expand the complexity of the actions that the robot can complete. Moreover, since the desired pose, which is the reference value of the cost function model, is determined according to the stage division of the motion process of the desired motion, the trajectory determined accordingly can accurately represent the process of the desired motion.
[0117] According to the second aspect of the embodiments of the present disclosure, a motion trajectory generation method is provided. Please refer to the attached Figure 3 , which shows the flow of the method, including steps S301 to S303.
[0118] In step S301, at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage are generated according to the type of the desired motion.
[0119] In step S302, at least one desired pose of the robot at at least one node during the motion process is determined according to the at least one motion stage and the time of each motion stage in the at least one motion stage.
[0120] In step S303, the pose information of the at least one node is used as a reference value to be input into the cost function model to obtain the trajectory of the desired motion, where the trajectory includes the pose and control parameters of the robot at each sampling point during the motion process.
[0121] The above three steps are the same as steps S101 to S103 in the attached Figure 1 , so the details of the steps will not be repeated here. It should be noted that steps S301 to S303 can run on the robot or on a computer for developing the robot motion trajectory. If the above three steps are executed using a computer to develop the trajectory of the desired motion, the obtained trajectory can be configured into the robot.
[0122] According to the second aspect of the embodiments of the present disclosure, a motion control method is provided, which is applied to a robot. The method includes:
[0123] Control the robot to move according to a trajectory pre-configured in the robot, where the trajectory is generated by the motion trajectory generation method described in the second aspect.
[0124] This step is the same as step S104 in the appendix Figure 1 and thus details of this step will not be repeated here. The trajectory used in this step is a trajectory pre-configured in the robot.
[0125] According to a fourth aspect of the embodiments of the present disclosure, there is provided a motion control device applied to a robot. Please refer to the appendix Figure 4 , the device includes:
[0126] A first stage module 401, configured to generate at least one motion stage of a motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0127] A first desired module 402, configured to determine the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage;
[0128] A first cost module 403, configured to input the desired poses of the at least one node as reference values into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process;
[0129] A first control module 404, configured to control the robot to move according to the trajectory of the desired motion.
[0130] In one embodiment, the first desired module is specifically configured to:
[0131] Determine the desired poses of multiple nodes of the robot during the motion process according to the at least one motion stage, the time of each motion stage in the at least one motion stage, and the relative relationship between the desired poses of the robot at different nodes.
[0132] In one embodiment, it further includes a relationship module, configured to:
[0133] When any two nodes belong to the same motion stage, determine the relative relationship between the desired poses of the robot at the two nodes according to the positions of the two nodes in the motion stage.
[0134] In one embodiment, the cost function model includes the following terms to be optimized:
[0135] The difference between the pose to be optimized at each sampling point and the desired pose of at least one node, and at least one of the differences between the pose to be optimized and the desired pose at at least one node;
[0136] At least one of the control parameters to be optimized at each sampling point and the difference between the control parameters to be optimized at each sampling point and the control parameters to be optimized at the previous sampling point.
[0137] In one embodiment, the cost function model further includes the following items to be optimized: the difference in the change rate of the pose to be optimized at each sampling point with respect to the change rate of the pose to be optimized at the previous sampling point.
[0138] In one embodiment, each item to be optimized in the cost function model has a corresponding weight.
[0139] In one embodiment, the constraint conditions of the cost function model include at least one of the following:
[0140] The poses and / or control parameters to be optimized at different sampling points satisfy a preset dynamic equation;
[0141] The poses and / or control parameters to be optimized at each sampling point satisfy a preset empirical range.
[0142] In one embodiment, the desired pose and the pose include at least one of body displacement, body attitude angle, and joint angular displacement; and / or, the control parameter includes joint torque.
[0143] In one embodiment, the desired motion includes front flip motion, back flip motion, and jump motion.
[0144] In one embodiment, controlling the robot to move according to the trajectory of the desired motion includes:
[0145] Before the robot moves to any sampling point of the trajectory, update the control parameter of the sampling point according to the pose of the sampling point and the current pose of the robot;
[0146] Control the robot to move according to the updated control parameter.
[0147] According to the fifth aspect of the embodiments of the present disclosure, there is provided a motion trajectory generation device, the device includes:
[0148] A second-stage module, configured to generate at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion;
[0149] A second expectation module, configured to determine an expected pose of at least one node during the movement of the robot according to the at least one motion phase and the time of each motion phase in the at least one motion phase;
[0150] A second cost module, configured to input the pose information of the at least one node as a reference value into a cost function model to obtain a trajectory of the expected motion, where the trajectory includes the pose and control parameters of the robot at each sampling point during the movement.
[0151] According to a sixth aspect of the embodiments of the present disclosure, there is provided a motion control device applied to a robot. The device includes a second control module, configured to:
[0152] Control the robot to move according to a trajectory pre-configured in the robot, where the trajectory is generated by the motion trajectory generation method described in the fifth aspect.
[0153] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments of the method in the first aspect, and will not be elaborated herein.
[0154] According to a seventh aspect of the embodiments of the present disclosure, please refer to the attached Figure 5 , which exemplarily shows a block diagram of an electronic device. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0155] Refer to Figure 5 , the device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 516.
[0156] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing element 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0157] The memory 504 is configured to store various types of data to support the operation of the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, and the like. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.
[0158] The power component 506 provides power to the various components of the device 500. The power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.
[0159] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0160] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC) that is configured to receive external audio signals when the device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further includes a speaker for outputting audio signals.
[0161] The I / O interface 512 provides an interface between the processing component 502 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power-on button, and a lock button.
[0162] The sensor assembly 514 includes one or more sensors for providing a status assessment of various aspects of the device 500. For example, the sensor assembly 514 can detect the on / off state of the device 500, the relative positioning of components, such as the display and keypad of the device 500. The sensor assembly 514 can also detect a change in the position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 516 is configured to facilitate communication between the device 500 and other devices in a wired or wireless manner. The device 500 can access a wireless network based on communication standards, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0164] In an exemplary embodiment, the device 500 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the methods of the above-described electronic devices.
[0165] In an eighth aspect, in an exemplary embodiment, the present disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 504 including instructions, and the above instructions can be executed by a processor 520 of the device 500 to complete the methods of the above-described electronic devices. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0166] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0167] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A motion control method, characterized in that, applied to a robot, the method includes: generating at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion; determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage; inputting the desired poses of the at least one node as reference values into a cost function model to obtain the trajectory of the desired motion, wherein the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process; controlling the robot to move according to the trajectory of the desired motion; the determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage includes: determining the desired poses of multiple nodes of the robot during the motion process according to the at least one motion stage, the time of each motion stage in the at least one motion stage, and the relative relationship between the desired poses of the robot at different nodes; the method further includes: when any two nodes belong to the same motion stage, determining the relative relationship between the desired poses of the robot at the two nodes according to the positions of the two nodes in the motion stage; the cost function model includes the following items to be optimized, and each item to be optimized has a corresponding weight: the difference between the pose to be optimized at each sampling point and the desired poses of at least one node, and the difference between the pose to be optimized at at least one node and the desired pose; the control parameter to be optimized at each sampling point and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point, wherein the control parameter includes joint torque; the difference between the change speed of the pose to be optimized at each sampling point and the change speed of the pose to be optimized at the previous sampling point.
2. The motion control method according to claim 1, characterized in that, the constraint conditions of the cost function model include at least one of the following: the poses to be optimized and / or the control parameters to be optimized at different sampling points satisfy a preset dynamic equation; the poses to be optimized and / or the control parameters to be optimized at each sampling point satisfy a preset empirical range.
3. The motion control method according to claim 1 or 2, characterized in that, the desired pose and the pose include at least one of the body displacement, the body attitude angle, and the joint angular displacement.
4. The motion control method according to claim 1 or 2, characterized in that, the desired motion includes a front somersault motion, a back somersault motion, and a jump motion.
5. The motion control method according to claim 1 or 2, characterized in that, the controlling the robot to move according to the trajectory of the desired motion includes: before the robot moves to any sampling point of the trajectory, updating the control parameter of the sampling point according to the pose of the sampling point and the current pose of the robot; Control the robot to move according to the updated control parameters.
6. A method for generating a motion trajectory, characterized in that, the method includes: generating at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion; determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage; inputting the pose information of the at least one node as a reference value into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process; the determining the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage includes: determining the desired poses of multiple nodes of the robot during the motion process according to the at least one motion stage, the time of each motion stage in the at least one motion stage, and the relative relationship between the desired poses of the robot at different nodes; the method further includes: when any two nodes belong to the same motion stage, determining the relative relationship between the desired poses of the robot at the two nodes according to the positions of the two nodes in the motion stage; the cost function model includes the following items to be optimized, and each item to be optimized has a corresponding weight: the difference between the pose to be optimized at each sampling point and the desired pose of at least one node, and the difference between the pose to be optimized at at least one node and the desired pose; the control parameter to be optimized at each sampling point and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point, where the control parameter includes joint torque; the difference between the change speed of the pose to be optimized at each sampling point and the change speed of the pose to be optimized at the previous sampling point.
7. A motion control method, characterized in that, applied to a robot, the method includes: controlling the robot to move according to the trajectory pre-configured in the robot, where the trajectory is generated by the motion trajectory generation method described in claim 6.
8. A motion control device, characterized in that, applied to a robot, the device includes: a first stage module, configured to generate at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the desired motion; a first desired module, configured to determine the desired poses of at least one node of the robot during the motion process according to the at least one motion stage and the time of each motion stage in the at least one motion stage; a first cost module, configured to input the desired poses of the at least one node as a reference value into a cost function model to obtain the trajectory of the desired motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion process; a first control module, configured to control the robot to move according to the trajectory of the desired motion; The specific function of the first expectation module is as follows: Based on the at least one motion stage, the time of each motion stage in the at least one motion stage, and the relative relationship between the expected poses of the robot at different nodes, determine the expected poses of multiple nodes of the robot during the motion; The device further includes a relationship module, which is used for: When any two nodes belong to the same motion stage, determine the relative relationship between the expected poses of the robot at these two nodes according to the positions of these two nodes in the motion stage; The cost function model includes the following items to be optimized, and each item to be optimized has a corresponding weight: The difference between the pose to be optimized at each sampling point and the expected poses of at least one node, and the difference between the pose to be optimized at at least one node and the expected pose; The control parameter to be optimized at each sampling point, and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point, where the control parameter includes joint torque; The difference between the change speed of the pose to be optimized at each sampling point and the change speed of the pose to be optimized at the previous sampling point.
9. The motion control device according to claim 8, wherein, The constraint conditions of the cost function model include at least one of the following: The poses to be optimized and / or the control parameters to be optimized at different sampling points satisfy a preset dynamic equation; The poses to be optimized and / or the control parameters to be optimized at each sampling point satisfy a preset empirical range.
10. The motion control device according to claim 8 or 9, wherein, The expected pose and the pose include at least one of body displacement, body attitude angle, and joint angular displacement.
11. The motion control device according to claim 8 or 9, wherein, The expected motion includes front somersault motion, back somersault motion, and jump motion.
12. The motion control device according to claim 8 or 9, wherein, The controlling the robot to perform motion according to the trajectory of the expected motion includes: Before the robot moves to any sampling point of the trajectory, update the control parameter of this sampling point according to the pose of this sampling point and the current pose of the robot; Control the robot to perform motion according to the updated control parameter.
13. A motion trajectory generation device, wherein, The device includes: A second stage module, which is used for generating at least one motion stage of the motion process and the time of each motion stage in the at least one motion stage according to the type of the expected motion; A second expectation module, which is used for determining the expected poses of at least one node of the robot during the motion according to the at least one motion stage and the time of each motion stage in the at least one motion stage; A second cost module, which is used for inputting the pose information of the at least one node as a reference value into the cost function model to obtain the trajectory of the expected motion, where the trajectory includes the poses and control parameters of the robot at each sampling point during the motion; The specific function of the second expectation module is as follows: Determine the desired poses of multiple nodes during the movement of the robot according to the relative relationship between the at least one movement phase, the time of each movement phase in the at least one movement phase, and the desired poses of the robot at different nodes; The device further includes a relationship module for: When any two nodes belong to the same movement phase, determine the relative relationship between the desired poses of the robot at the two nodes according to the positions of the two nodes in the movement phase; The cost function model includes the following terms to be optimized, and each term to be optimized has a corresponding weight: The difference between the pose to be optimized at each sampling point and the desired poses of at least one node, and the difference between the pose to be optimized at at least one node and the desired pose; The control parameter to be optimized at each sampling point, and the difference between the control parameter to be optimized at each sampling point and the control parameter to be optimized at the previous sampling point, where the control parameter includes joint torque; The difference in the change rate of the pose to be optimized at each sampling point relative to the change rate of the pose to be optimized at the previous sampling point.
14. A motion control device, Characterized in that, Applied to a robot, the device includes a second control module for: Control the robot to move according to the trajectory pre-configured in the robot, where the trajectory is generated by the motion trajectory generation method according to claim 6.
15. An electronic device, Characterized in that, The electronic device includes a memory and a processor, the memory is used to store computer instructions that can be run on the processor, and the processor is used to implement the method according to any one of claims 1 to 7 when executing the computer instructions.
16. A computer-readable storage medium, on which a computer program is stored, Characterized in that, The program implements the method according to any one of claims 1 to 7 when executed by a processor.