Robot control method and robot
Patent Information
- Application Number
- CN202610958462.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2046-06-30
AI Technical Summary
[0007]响应于针对目标机器人的控制指令,针对每一控制周期,在目标机器人的当前状态不满足控制指令所指示的目标状态的情况下,获取目标机器人在控制周期的初始运动状态数据;
[0037]第三方面,本申请还提供了一种机器人,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一方面的方法的步骤。
Smart Images

Figure CN122469879B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and in particular to a robot control method and a robot. Background Technology
[0002] With the development of robotics technology, running of legged robots on different terrains has become a research hotspot. In order to maintain the stability of the robot's gait, a phase generator is usually used to guide the lifting and lowering of the feet by outputting phase signals in a fixed timing sequence.
[0003] However, problems such as tripping, self-interference, and falling forward are common when robots accelerate or decelerate rapidly, which seriously affect the smoothness of the robot's movement.
[0004] Therefore, improving the smoothness of robot motion is an urgent problem to be solved. Summary of the Invention
[0005] Based on this, this application addresses the aforementioned technical problems by providing a robot control method and a robot that can improve the smoothness of robot motion.
[0006] In a first aspect, this application provides a robot control method, including:
[0007] In response to control commands for the target robot, for each control cycle, if the current state of the target robot does not meet the target state indicated by the control command, the initial motion state data of the target robot in the control cycle is acquired.
[0008] Based on the initial motion state data and the allowable speed increment of the target robot, determine the target speed of the target robot within the control cycle;
[0009] Based on the target speed, determine the target step frequency of the target robot within the control cycle;
[0010] Within the control cycle, the target robot is controlled according to the target speed and / or target step frequency.
[0011] By employing the above-mentioned robot control method, in each control cycle, if the current state of the target robot does not meet the target state indicated by the control command, the target speed and / or target step frequency in the control cycle can be updated, so that the speed and / or step frequency of the target robot changes steadily, thereby achieving steady movement of the target robot and improving the smoothness of the target robot's movement.
[0012] In one embodiment, determining the target step frequency of the target robot within a control cycle based on the target speed includes: if the target speed is less than a speed threshold, using a preset first step frequency as the target step frequency of the target robot within the control cycle; if the target speed is not less than the speed threshold, determining the target step frequency of the target robot within the control cycle based on the target speed and the speed threshold.
[0013] In this embodiment, when the target speed is less than the speed threshold, such as during the jogging phase, the preset first step frequency is used as the target step frequency of the target robot within the control cycle, which allows the target robot to run stably at a fixed step frequency. When the target speed is not less than the speed threshold, such as during the sprinting phase, the target step frequency is determined based on the target speed and the speed threshold, which allows the target robot's step frequency to increase rapidly, thereby enabling the target robot to move steadily while accelerating rapidly and improving the smoothness of the target robot's movement.
[0014] In one embodiment, determining the target step frequency of the target robot within a control cycle based on the target speed and a speed threshold includes: determining the speed difference between the target speed and the speed threshold; and determining the target step frequency of the target robot within a control cycle based on the product of the speed difference and the step frequency growth factor, and the first step frequency.
[0015] In this embodiment, the target step frequency of the target robot within the control cycle is determined based on the product of the speed difference and the step frequency growth factor, as well as the first step frequency. This allows the target step frequency of the target robot to increase linearly with the target speed, thereby achieving a steady change in the target step frequency with the target speed, and thus enabling the target robot to move steadily.
[0016] In one embodiment, the robot control method further includes: acquiring a first acceleration of the target robot based on joint motor performance constraints, and a second acceleration of the target robot based on ground friction constraints; determining a safe acceleration of the target robot based on the first acceleration and / or the second acceleration; and determining an allowable speed increment of the target robot based on the safe acceleration and the duration of the control cycle.
[0017] In this embodiment, by determining the safe acceleration of the target robot through the first acceleration and / or the second acceleration, the target robot can achieve rapid speed updates while ensuring steady movement under the constraints of joint motor performance and / or ground friction.
[0018] In one embodiment, obtaining a first acceleration of the target robot based on joint motor performance constraints includes: determining the horizontal thrust of the target robot's foot end based on the peak joint torque of the target robot and the effective action length of the mechanical leg; determining the first acceleration of the target robot based on joint motor performance constraints based on the horizontal thrust of the foot end, the number of mechanical legs of the target robot in the support phase, and the weight of the target robot; and / or, obtaining a second acceleration of the target robot based on ground friction constraints includes: determining the second acceleration of the target robot based on ground friction constraints based on the friction coefficient corresponding to the foot end of the target robot and the gravitational acceleration.
[0019] In this embodiment, the maximum acceleration of the target robot under the constraint of ground friction can be determined based on the friction coefficient and gravitational acceleration corresponding to the foot of the target robot, and / or, the maximum acceleration of the target robot under the constraint of joint motor performance can be determined based on the horizontal thrust of the foot, the number of mechanical legs of the target robot in the support phase, and the weight of the target robot, so as to achieve rapid updating of the target robot's speed.
[0020] In one embodiment, controlling the target robot based on a target speed and / or a target step frequency includes: acquiring the current foot phase of the target robot within a control cycle; determining the leg lift height data of the target robot based on the current foot phase; and controlling the target robot based on the target speed and / or target step frequency, and the leg lift height data.
[0021] In this embodiment, by determining the leg lift height data of the target robot, the stepping can be made smoother during the control of the target robot's movement, thereby improving the smoothness of the target robot's movement.
[0022] In one embodiment, obtaining the current foot phase of the target robot within a control cycle includes: obtaining the historical foot phase of the target robot within the previous control cycle; and determining the current foot phase of the target robot within the control cycle based on the historical foot phase, the target gait frequency, and the duration of the control cycle.
[0023] In this embodiment, the current foot phase of the target robot in the control cycle is determined based on the historical foot phase of the target robot in the previous control cycle. This allows the foot behavior of the target robot to be smoothly accumulated from the historical foot phase in the previous control cycle, reducing the occurrence of phase jumps or phase reversals.
[0024] In one embodiment, controlling the target robot based on a target speed and / or a target step frequency includes: determining a trajectory offset corresponding to the foot of the target robot based on the target speed, the target step frequency, and a desired speed in the target state; acquiring the forward mechanical mounting distance between the leg joints of the target robot and the robot's body, and the swing position data corresponding to the foot of the target robot; determining the desired swing position corresponding to the foot of the target robot based on the forward mechanical mounting distance, the swing position data, and the trajectory offset; and controlling the target robot based on the target speed and / or the target step frequency, and the desired swing position.
[0025] In this embodiment, by determining the desired swing position corresponding to the foot of the target robot, the swing position can be made smoother during the control of the target robot's movement, thereby improving the smoothness of the target robot's movement.
[0026] In one embodiment, controlling the target robot according to the target step frequency includes: when the target robot is detected to switch from a first phase state to a second phase state, controlling the target robot according to the target step frequency; wherein, when the first phase state is a swinging phase, the second phase state is a supporting phase; and when the first phase state is a supporting phase, the second phase state is a swinging phase.
[0027] In this embodiment, by controlling the target robot according to the target step frequency when the target robot switches from the first phase state to the second phase state, the occurrence of abnormal stepping caused by phase change during the speed change phase can be reduced to a certain extent. This can reduce problems such as tripping, self-interference and forward fall when the target robot is accelerating / decelerating rapidly.
[0028] In one embodiment, determining the target speed of the target robot within a control cycle based on initial motion state data and the allowable speed increment of the target robot includes: inputting the initial motion state data and the allowable speed increment of the target robot into the target model to obtain the target speed of the target robot within the control cycle; wherein the target model is trained based on sample motion state data generated by the sample robot in multiple iterations, including: in each iteration, acquiring the control speed of the sample robot in the current iteration; wherein, if the current iteration is the first iteration, the control speed is a preset speed; if the current iteration is not the first iteration, the control speed is determined based on the sample motion state data of the sample robot in the previous iteration and the allowable speed increment of the sample robot; controlling the movement of the sample robot according to the control speed to generate sample motion state data for the current iteration; evaluating the control speed of the current iteration based on the sample motion state data for the current iteration to obtain a sample evaluation result; and adjusting the model parameters of the target model according to the sample evaluation result.
[0029] In this embodiment, by training the target model, the target model can accurately obtain the target speed of the current control cycle based on motion state data. This not only improves control efficiency but also enhances model robustness. Thus, when controlling the target robot in multiple control cycles, the target speed of the target robot in each control cycle can be quickly obtained based on the trained target model, thereby improving the smoothness of the target robot's motion.
[0030] In one embodiment, the sample motion state data includes at least one of the following: actual leg lift height, actual swing position of the foot in the sample robot, actual pitch angle of the base in the sample robot, and actual roll angle of the base. Based on the sample motion state data of the current iteration process, the control speed of the current iteration process is evaluated to obtain a sample evaluation result, including: determining the actual speed of the current iteration process based on the sample motion state data of the current iteration process; determining the speed tracking evaluation result based on the deviation between the actual speed and the control speed of the current iteration process; determining the foot trajectory tracking evaluation result based on the deviation between the actual leg lift height and the target leg lift height, and / or the deviation between the actual swing position and the target swing position; determining the base attitude stability evaluation result based on the deviation between the actual pitch angle and the target pitch angle of the base, and / or the deviation between the actual roll angle and the target roll angle of the base; and determining the sample evaluation result based on at least one of the speed tracking evaluation result, the foot trajectory tracking evaluation result, and the base attitude stability evaluation result.
[0031] In this embodiment, by determining at least one sample evaluation result among the velocity tracking evaluation result, the foot trajectory tracking evaluation result, and the base posture stability evaluation result, the trained target model can have good robustness in terms of base posture stability, velocity tracking, and foot trajectory tracking.
[0032] Secondly, this application also provides a robot control device, comprising:
[0033] The first acquisition module is configured to, in response to a control command for the target robot, acquire initial motion state data of the target robot in the control cycle when the current state of the target robot does not satisfy the target state indicated by the control command for each control cycle.
[0034] The first determining module is used to determine the target speed of the target robot within the control cycle based on the initial motion state data and the allowable speed increment of the target robot;
[0035] The second determining module is used to determine the target step frequency of the target robot within the control cycle based on the target speed;
[0036] A control module is configured to control the target robot according to the target speed and / or the target step frequency during the control cycle.
[0037] Thirdly, this application also provides a robot including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.
[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0039] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the above aspects.
[0040] Regarding the beneficial effects of any of the technical solutions in the second to fifth aspects mentioned above, refer to the beneficial effects of the corresponding technical solutions in the first aspect; repeated examples will not be listed here. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of an optional flowchart of a robot control method in one embodiment;
[0043] Figure 2 This is a schematic diagram of an optional process for determining the allowed speed increment in one embodiment;
[0044] Figure 3 This is a schematic diagram of an optional process for controlling a target robot in one embodiment;
[0045] Figure 4 This is an optional flowchart illustrating the steps of controlling the target robot in another embodiment;
[0046] Figure 5 This is a schematic diagram of an optional training process for the target model in one embodiment.
[0047] Figure 6 This is a schematic diagram of an alternative flow of the robot control method in another embodiment;
[0048] Figure 7 This is a schematic diagram of an optional structure of the robot control device in one embodiment;
[0049] Figure 8 This is a schematic diagram of an optional internal structure of the robot in one embodiment. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0051] The terms "first," "second," etc., used in this application may be used to describe various elements, but these elements are not limited by these terms. These terms are used only to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0052] In one exemplary embodiment, such as Figure 1 As shown, a robot control method is provided, including the following steps:
[0053] S110, in response to the control command for the target robot, for each control cycle, if the current state of the target robot does not meet the target state indicated by the control command, acquire the initial motion state data of the target robot in the control cycle.
[0054] The target robot can be a legged robot. Optionally, the target robot can be a bipedal robot, a quadrupedal robot, or any multi-legged robot.
[0055] Control commands can be understood as instructions used to control the motion of the target robot. Optionally, control commands may include at least one of the following forms of instructions: voice commands, button commands, remote control commands, and gesture commands.
[0056] The control cycle can be understood as the time period for controlling the target robot. Optionally, the duration of each control cycle can be the same.
[0057] The target state indicated by the control command may include the desired speed of the target robot. The desired speed can be understood as the speed that the target robot is expected to reach.
[0058] In this context, the fact that the target robot's current state does not meet the target state indicated by the control command can be understood as the target robot's current speed being less than the expected speed.
[0059] The initial motion state data can be understood as the motion state data of the target robot at the initial moment of the control cycle. Optionally, the motion state data may include at least one of the following: the joint rotation angle of the target robot, the leg lifting height of the target robot, the swing position corresponding to the foot of the target robot, the pitch angle of the target robot base, and the roll angle of the target robot base.
[0060] In some embodiments, initial motion state data can be acquired via sensors. For example, the rotation angles of each joint in the target robot can be acquired using an encoder (such as an absolute or variable encoder). The rotation angles of each joint in the target robot can be acquired via the encoder, and based on these rotation angles, the leg lift height and the corresponding swing position of the foot can be determined. The pitch and roll angles of the target robot's base can be acquired via an inertial measurement unit (IMU).
[0061] S120: Based on the initial motion state data and the allowable speed increment of the target robot, determine the target speed of the target robot within the control cycle.
[0062] The target speed can be understood as the speed that the target robot should reach within the control cycle. The target speed is used to control the movement of the target robot within the control cycle.
[0063] The allowable speed increment can be understood as the speed increment allowed within the control cycle.
[0064] In some embodiments, the allowed speed increment can be a preset speed increment.
[0065] In some embodiments, the permissible velocity increment can be determined according to the following steps: obtaining a preset acceleration of the target robot; and determining the permissible velocity increment of the target robot based on the preset acceleration and the duration of the control cycle.
[0066] The preset acceleration can be understood as the preset maximum acceleration that the target robot can achieve.
[0067] In some embodiments, the allowable speed increment of the target robot can be determined based on the product of a preset acceleration and the duration of a control cycle.
[0068] In some embodiments, the initial velocity of the target robot in the control cycle can be determined based on the initial motion state data, and the target velocity of the target robot in the control cycle can be determined based on the initial velocity and the allowable velocity increment of the target robot.
[0069] In some embodiments, the initial velocity corresponding to the initial motion state data can be determined based on the initial motion state data and the reference velocities corresponding to each motion state data. Optionally, a reference velocity matching the initial motion state data can be queried from the reference velocities corresponding to each motion state data, and the queried reference velocity can be used as the initial velocity corresponding to the initial motion state data.
[0070] In some embodiments, the initial joint state data of each joint of the target robot under the control cycle can be determined based on the initial motion state data, and kinematic solutions can be performed based on the initial joint state data to determine the initial velocity of the target robot under the control cycle.
[0071] In some embodiments, the reference speed corresponding to each motion state data can be preset. Optionally, for each reference speed, motion state data of the target robot moving at the reference speed can be acquired, and then a correspondence between the reference speed and the motion state data can be established to determine the reference speed corresponding to each motion state data.
[0072] In some embodiments, the target speed of the target robot within a control cycle can be determined based on the sum of the initial speed and the allowable speed increment of the target robot.
[0073] For example, in the first control cycle, the initial speed is 0.5. The allowable speed increment for the target robot within the current period is 0.03. Therefore, the target speed of the target robot in the first control cycle can be 0.53. Subsequently, in each control cycle, the target speed of the target robot is linearly accumulated until the desired speed in the target state is reached.
[0074] S130: Determine the target step frequency of the target robot within the control cycle based on the target speed.
[0075] The target gait frequency can be understood as the number of complete gait cycles completed by the target robot per unit time, with the dimension being Hertz (Hz).
[0076] In some embodiments, the target step frequency and target speed of the target robot within a control cycle can be positively correlated. That is, the greater the target speed, the greater the target step frequency.
[0077] In some embodiments, the target step frequency of the target robot within a control cycle can be determined based on the target speed and the ratio coefficient between the step frequency and the speed.
[0078] S140, within the control cycle, controls the target robot according to the target speed and / or target step frequency.
[0079] In some embodiments, a first control command can be generated based on the target speed and sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the speed of the target robot.
[0080] In some embodiments, a second control command can be generated based on the target step frequency, and the second control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the step frequency of the target robot.
[0081] In some embodiments, a third control command can be generated based on the target speed and target step frequency, and the third control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the speed and step frequency of the target robot.
[0082] In some embodiments, to prevent the target robot from tripping, the target robot can be controlled according to the target step frequency when the target robot is detected to switch from the first phase state to the second phase state; wherein, when the first phase state is the swing phase, the second phase state is the support phase; and when the first phase state is the support phase, the second phase state is the swing phase.
[0083] The swing phase can be understood as the stage in the gait cycle where the foot completely leaves the ground and swings forward until it touches the ground again. The support phase can be understood as the stage where the foot contacts the ground and bears the weight of gravity.
[0084] In the above robot control method, in each control cycle, if the current state of the target robot does not meet the target state indicated by the control command, the target speed and / or target step frequency in the control cycle can be updated, so that the speed and / or step frequency of the target robot changes steadily, thereby achieving steady movement of the target robot and improving the smoothness of the target robot's movement.
[0085] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for determining the target step frequency are described in detail. Based on the comparison between the target speed and a speed threshold, the target step frequency can be determined in the following ways:
[0086] 1) When the target speed is less than the speed threshold, the preset first step frequency is used as the target step frequency of the target robot within the control cycle.
[0087] The speed threshold can be set based on experience.
[0088] In some embodiments, the target robot may be in a jogging state when the target speed is less than a speed threshold. When the target speed is not less than the speed threshold, the target robot may be in a running state.
[0089] The first step frequency can be understood as a fixed step frequency preset based on experience.
[0090] For example, when the target speed is less than 1 In this case, 1.5Hz can be used as the target step frequency of the target robot within the control cycle.
[0091] By setting a preset step frequency as the target step frequency of the target robot within the control cycle, the target robot can operate stably at a fixed step frequency even at low speeds.
[0092] 2) If the target speed is not less than the speed threshold, determine the target step frequency of the target robot within the control cycle based on the target speed and the speed threshold.
[0093] In some embodiments, the speed difference between the target speed and the speed threshold can be determined; the target step frequency of the target robot within the control cycle can be determined based on the product of the speed difference and the step frequency growth factor.
[0094] In some embodiments, the speed difference between the target speed and the speed threshold can be determined; the target step frequency of the target robot within the control cycle is determined based on the product of the speed difference and the step frequency growth factor, and the first step frequency.
[0095] The step frequency growth factor can be set according to actual needs. The dimension of the step frequency growth factor is Hertz per second (Hz / s).
[0096] In some embodiments, the product of the speed difference and the step frequency growth factor can be denoted as the reference step frequency. The sum of the reference step frequency and the first step frequency can be used as the target step frequency of the target robot within the control cycle.
[0097] In this embodiment, by determining the target step frequency based on the target speed, the speed threshold, and the first step frequency when the target speed is not less than the target speed threshold, the target step frequency of the target robot can be controlled to increase linearly with the target speed, thereby enabling the target robot to move steadily while accelerating rapidly and improving the smoothness of the target robot's movement.
[0098] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for determining the allowable speed increment are described in detail.
[0099] See Figure 2 The steps for determining the permissible speed increment shown include:
[0100] S210, acquire the first acceleration of the target robot based on the joint motor performance constraints, and the second acceleration of the target robot based on the ground friction constraints.
[0101] The first acceleration can be understood as the maximum theoretical acceleration that the target robot can achieve in the horizontal direction based on the performance constraints of the joint motors.
[0102] The second acceleration can be understood as the maximum acceleration that the target robot can achieve in the horizontal direction based on the constraint of ground friction.
[0103] In some embodiments, the first acceleration can be obtained according to the following steps: determining the foot-end horizontal thrust of the target robot based on the peak joint torque of the target robot and the effective action length of the mechanical leg; determining the first acceleration of the target robot based on the joint motor performance constraints based on the foot-end horizontal thrust, the number of mechanical legs of the target robot in the support phase, and the weight of the target robot.
[0104] Among them, the peak joint torque can be understood as the maximum joint torque corresponding to the target robot.
[0105] The effective working length of the mechanical leg can be understood as the horizontal projection distance between the target robot's center of mass and the contact point at the foot of the mechanical leg in the support phase.
[0106] The horizontal thrust at the foot can be understood as the maximum horizontal thrust provided by the foot under theoretical conditions. The horizontal thrust at the foot is constrained by the peak torque of the joint.
[0107] The weight of the target robot can be understood as its mass.
[0108] In some embodiments, the foot-end horizontal thrust can be determined based on the ratio between the peak joint torque and the effective working length of the mechanical leg.
[0109] In some embodiments, the horizontal thrust at the foot can be obtained according to the following formula:
[0110]
[0111] in, Indicates the horizontal thrust at the foot; Indicates the peak torque of the joint; This indicates the effective length of the mechanical leg's lever.
[0112] In some embodiments, the total foot-end horizontal thrust of the mechanical leg can be obtained by multiplying the number of mechanical legs in the support phase of the target robot by the foot-end horizontal thrust. Based on Newton's second law, the first acceleration of the target robot based on the joint motor performance constraints can be determined by the ratio of the total foot-end horizontal thrust to the weight of the target robot.
[0113] In some embodiments, the first acceleration can be obtained according to the following formula:
[0114]
[0115] in, This represents the first acceleration of the target robot based on the performance constraints of its joint motors; This indicates the number of mechanical legs of the target robot in the support phase (e.g., when the target robot is a quadruped robot and is in a trot gait). (equal to 2) This indicates the weight of the target robot. Among them, For dimensionless parameters, the peak joint torque The dimensions are kilograms per square meter per second squared (kilograms per square meter per second squared). The weight of the target robot The dimension of the unit is kilogram (kg) ), effective working length of the mechanical leg The dimension of the unit is meter (m) The first acceleration can be obtained. The dimension is meters per second squared (m² / s). ).
[0116] In some embodiments, the second acceleration can be obtained according to the following steps: determining the second acceleration of the target robot based on ground friction constraints according to the friction coefficient and gravitational acceleration corresponding to the foot of the target robot.
[0117] To prevent the target robot from slipping during acceleration or deceleration, the horizontal force at the foot can be constrained to not exceed the maximum static friction. Furthermore, the maximum static friction of the target robot is equal to the product of the normal support force and the friction coefficient corresponding to the foot. Therefore, the horizontal force at the foot and the normal support force have the following relationship: .in, For the horizontal force at the foot, Let be the coefficient of friction corresponding to the foot of the target robot. For the maximum static friction force, The normal support force is equal to the weight of the target robot and its gravitational acceleration. The product of, i.e. .
[0118] Therefore, the second acceleration of the target robot constrained by ground friction can be obtained from the ratio of the maximum static friction to the weight of the target robot, i.e. .in, The weight of the target robot. This is the second acceleration.
[0119] Furthermore, the second acceleration of the target robot based on the constraint of ground friction is equal to the product of the friction coefficient and the gravitational acceleration, that is... Among them, the coefficient of friction corresponding to the foot of the target robot. Since it is a dimensionless coefficient, the dimensions of the second acceleration are the same as those of gravitational acceleration. The units are the same, that is, meters per second squared (m²). ).
[0120] S220, determine the safe acceleration of the target robot based on the first acceleration and / or the second acceleration.
[0121] Among them, safe acceleration can be understood as the maximum acceleration that the target robot can achieve.
[0122] In some embodiments, the safe acceleration of the target robot can be determined based on the first acceleration. For example, the first acceleration can be used as the safe acceleration of the target robot.
[0123] In some embodiments, the safe acceleration of the target robot can be determined based on the second acceleration. For example, the second acceleration can be used as the safe acceleration of the target robot.
[0124] In some embodiments, the safe acceleration of the target robot can be determined based on the first acceleration and the second acceleration. In some embodiments, the safe acceleration of the target robot can be determined based on the smaller value of the first acceleration and the second acceleration.
[0125] In some embodiments, the safe acceleration of the target robot can be determined based on the smaller of the first acceleration and the second acceleration, and a safety margin coefficient. Optionally, the product of the smaller of the first acceleration and the second acceleration and the safety margin coefficient can be used as the safe acceleration of the target robot.
[0126] In some embodiments, the safety acceleration can be obtained according to the following formula:
[0127]
[0128] in, This represents the safety margin factor. The safety margin factor can be preset based on actual needs. Optional. .
[0129] By taking the product of the smaller of the first and second accelerations and the safety margin coefficient as the safety acceleration of the target robot, it is possible to control the target robot to smoothly change speed to the desired speed during acceleration or deceleration, thereby reducing abnormal steps caused by sudden speed changes to a certain extent.
[0130] S230 determines the permissible speed increment of the target robot based on the safety acceleration and the duration of the control cycle.
[0131] In some embodiments, the permissible speed increment of the target robot can be determined based on the product of the safe acceleration and the duration of the control cycle.
[0132] In this embodiment, by determining the safe acceleration of the target robot through the first acceleration and / or the second acceleration, the target robot can change the allowable speed increment according to the safe acceleration under the constraints of joint motor performance and / or ground friction, thereby achieving the motion stability of the target robot.
[0133] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment in which the control of the target robot is refined.
[0134] See Figure 3 The steps for controlling the target robot shown include:
[0135] S310, acquire the current foot phase of the target robot within the control cycle.
[0136] The current foot phase can be understood as the progress of the robotic leg's foot in a complete gait cycle, specifically the ratio between the duration of the foot in the support phase and the duration in the swing phase. The current foot phase is a dimensionless variable, which can be denoted as φ∈[0,1).
[0137] When φ∈[0,0.25), it corresponds to the leg-lifting stage of the target robot, that is, the target robot lifts its foot; when φ∈[0.25,0.5), it corresponds to the leg-lowering stage of the target robot, that is, the target robot smoothly lowers its foot from the highest point to the target landing point; when φ∈[0.5,1), it corresponds to the ground-touching support stage of the target robot, that is, the height of the target robot's foot from the ground is 0.
[0138] When the quadruped robot is in a trot gait, the right front leg is in phase with the left hind leg, and the left front leg is in phase with the right hind leg. The phase difference between the right front leg / left hind leg and the left front leg / right hind leg can be set to 0.5, thereby constraining the gait of the quadruped robot.
[0139] In some embodiments, the historical foot phase of the target robot in the previous control cycle can be obtained; based on the historical foot phase, the target step frequency and the duration of the control cycle, the current foot phase of the target robot in the control cycle can be determined.
[0140] In some embodiments, the phase increment can be determined based on the target step frequency and the duration of the control cycle; the current foot phase of the target robot within the control cycle can be determined based on the phase increment and the historical foot phase.
[0141] In some embodiments, the product of the target step frequency and the duration of the control cycle can be used as the phase increment.
[0142] In some embodiments, the remainder of the phase increment and the sum of the historical foot phases can be taken, and the remainder can be used as the current foot phase of the target robot in the control cycle.
[0143] In some embodiments, the current foot phase can be calculated using the following formula:
[0144]
[0145] in, This indicates the current foot phase of the target robot within the control cycle; This indicates the historical foot phase of the target robot during the previous control cycle; Indicates the duration of the control cycle; Indicates the target step frequency; This indicates the modulo operation.
[0146] S320 determines the target robot's leg lift height data based on the current foot phase.
[0147] Among them, the leg lift height data can be understood as the height of the target robot's foot lift in the current foot phase.
[0148] In some embodiments, the leg-raising process of the target robot occurs in the swing phase, i.e., within [0, 0.5). Therefore, when the current foot phase belongs to the swing phase, the leg-raising height data corresponding to the current foot phase of the target robot is determined based on the current foot phase, the leg-raising height distribution data corresponding to each foot phase, and the highest leg-raising height.
[0149] In some embodiments, when the current foot phase falls within the range [0, 0.5), the current foot phase can be normalized to obtain a normalized current foot phase. Substituting the normalized current foot phase into the leg lift height distribution data yields the leg lift height coefficient corresponding to the normalized current foot phase. The product of the leg lift height coefficient and the highest leg lift height data is used as the leg lift height data corresponding to the current foot phase. The highest leg lift height is a preset value.
[0150] In some embodiments, the leg-raising height distribution data can be preset. The leg-raising height distribution data is dimensionless. For example, the leg-raising height distribution data can be represented by a high-order polynomial, such as... .in, This represents the normalized foot phase obtained by normalizing the foot phase within the range [0, 0.5). ∈[0,1). Based on the above high-order polynomial, the target robot's foot lifts up ( ) and contact ( At the instant of impact, both velocity and acceleration are zero, achieving flexible contact with the ground.
[0151] In some embodiments, the leg lift height data corresponding to the current foot phase of the target robot can be determined based on the current foot phase and the preset leg lift height data corresponding to each foot phase.
[0152] S330 controls the target robot based on the target speed and / or target step frequency, as well as leg lift height data.
[0153] In some embodiments, a fourth control command can be generated based on the target speed and leg lift height data, and the fourth control command can be sent to the actuators corresponding to the target robot (such as joint motors corresponding to each joint) to control the speed and leg lift height of the target robot.
[0154] In some embodiments, a fifth control command can be generated based on the target step frequency and leg lift height data, and the fifth control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the step frequency and leg lift height of the target robot.
[0155] In some embodiments, a sixth control command can be generated based on the target speed, target step frequency, and leg lift height, and the sixth control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the speed, step frequency, and leg lift height of the target robot.
[0156] In this embodiment, by determining the leg lift height data of the target robot, the stepping can be made smoother during the control of the target robot's movement, thereby improving the smoothness of the target robot's movement.
[0157] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment in which the control of the target robot is refined.
[0158] See Figure 4 The steps for controlling the target robot shown include:
[0159] S410 determines the trajectory offset of the target robot's foot based on the target speed, target step frequency, and desired speed in the target state.
[0160] The trajectory offset can be understood as the distance the target robot's foot tip deviates from the center point of the target robot's base in the target direction. The trajectory offset includes longitudinal trajectory offset and lateral trajectory offset. The longitudinal trajectory offset is the distance the target robot's foot tip deviates from the center point of the target robot's base in the longitudinal direction (the direction of the target robot's movement). The lateral trajectory offset is the distance the target robot's foot tip deviates from the center point of the target robot's base in the lateral direction (the direction perpendicular to the target robot's movement on the horizontal plane).
[0161] Taking the longitudinal trajectory offset as an example, the velocity difference between the target velocity component and the desired velocity component in the longitudinal direction can be determined. Based on the product of this velocity difference and the longitudinal gain coefficient, a first reference velocity in the longitudinal direction is determined. A second reference velocity in the longitudinal direction is determined based on the target velocity. A third reference velocity is determined based on the sum of the first and second reference velocities. The longitudinal trajectory offset is determined based on the ratio of the third reference velocity to the target step frequency.
[0162] In some embodiments, the longitudinal trajectory offset can be determined according to the following formula:
[0163]
[0164] in, This represents the longitudinal trajectory offset, with the dimension in meters (m). ); This represents the gain coefficient in the longitudinal direction, and is a dimensionless coefficient. This represents the longitudinal component of the target velocity, with dimensions in meters per second (m / s). ); This represents the longitudinal component of the desired velocity, with dimensions in meters per second (m / s). ); The target step frequency is expressed in Hertz (Hz). ).
[0165] The process of determining the lateral trajectory offset is similar to that of determining the longitudinal trajectory offset, and will not be repeated here.
[0166] S420: Obtain the forward mechanical mounting distance between the leg joints of the target robot and the robot's body, as well as the swing position data corresponding to the foot of the target robot.
[0167] The forward mechanical installation distance can be understood as the distance between the installation point of the target robot's leg joint and the center point of the target robot's base.
[0168] Among them, the swing position data can be understood as the landing point position of the target robot corresponding to the current foot phase under the swing phase.
[0169] In some embodiments, the swinging process of the target robot occurs in the swing phase phase, i.e., within [0, 0.5). Therefore, when the current foot phase belongs to the swing phase, the swing position data corresponding to the current foot phase of the target robot is determined based on the current foot phase, the maximum foot landing position data, and the foot landing distribution data corresponding to each foot phase.
[0170] In some embodiments, when the current foot phase falls within the range [0, 0.5), the current foot phase can be normalized to obtain a normalized current foot phase. Substituting the normalized current foot phase into the foot landing point distribution data yields the foot landing point distribution coefficient corresponding to the normalized current foot phase. The product of the foot landing point distribution coefficient and the maximum foot landing point position data is used as the swing position data corresponding to the current foot phase. The maximum foot landing point position data is preset.
[0171] In some embodiments, the foot placement distribution data can be preset. The foot placement distribution data is dimensionless data. For example, the foot placement distribution data can be represented as... .in, This represents the normalized foot phase obtained by normalizing the foot phase within the oscillation phase, i.e., [0, 0.5). ∈[0,1). This represents the distribution data of the landing points corresponding to the normalized foot phase, and is dimensionless data.
[0172] In some embodiments, the swing position data corresponding to the current foot phase of the target robot can be determined based on the current foot phase and the preset swing position data corresponding to each foot phase.
[0173] S430 determines the desired swing position corresponding to the foot of the target robot based on the forward mechanical installation distance, swing position data, and trajectory offset.
[0174] The desired swing position can be understood as the desired landing point of the target robot's foot.
[0175] The desired swing position can include the longitudinal desired swing position and the lateral desired swing position. The longitudinal desired swing position can be understood as the desired landing point of the target robot's foot in the longitudinal direction. The lateral desired swing position can be understood as the desired landing point of the target robot's foot in the lateral direction.
[0176] Taking the desired longitudinal swing position as an example, the reference swing position can be determined by the product of the longitudinal trajectory offset and the swing position corresponding to the current foot phase. The desired longitudinal swing position can be determined by the difference between the reference swing position and the longitudinal trajectory offset.
[0177] The process of determining the desired lateral swing position is similar to that of determining the desired longitudinal swing position, and will not be repeated here.
[0178] S440 controls the target robot based on the target speed and / or target step frequency, as well as the desired swing position.
[0179] In some embodiments, a seventh control command can be generated based on the target speed and the desired swing position, and the seventh control command can be sent to the actuators corresponding to the target robot (such as joint motors corresponding to each joint) to control the speed and leg lifting height of the target robot.
[0180] In some embodiments, an eighth control command can be generated based on the target step frequency and desired swing position, and the eighth control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the step frequency and leg lift height of the target robot.
[0181] In some embodiments, a ninth control command can be generated based on the target speed, target step frequency, and desired swing position, and the ninth control command can be sent to the actuators (such as joint motors corresponding to each joint) of the target robot to control the speed, step frequency, and leg lift height of the target robot.
[0182] In this embodiment, by determining the leg lift height data of the target robot, the stepping can be made smoother during the control of the target robot's movement, thereby improving the smoothness of the target robot's movement.
[0183] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the steps for determining the target speed are refined. Specifically, the initial motion state data and the allowable speed increment of the target robot can be input into the target model to obtain the target speed of the target robot within the control cycle; wherein, the target model is trained based on the sample motion state data generated by the sample robot during multiple iterations. In some embodiments, the target model can be a reinforcement learning model.
[0184] In some embodiments, see Figure 5 The training steps for the target model shown include:
[0185] S510 acquires the control speed of the sample robot during each iteration.
[0186] The sample robot can be the same as or similar to the target robot.
[0187] In the case of this iteration being the first iteration, the control speed is set to a preset speed.
[0188] In the case that this iteration process is not the first iteration process, the control speed is determined based on the sample robot's motion state data in the previous iteration process and the sample robot's allowable speed increment.
[0189] The process of determining the control speed of the sample robot in the current iteration based on the sample robot's motion state data in the previous iteration and the sample robot's allowable speed increment can be found in step S120 above, and will not be repeated here.
[0190] S520 controls the movement of the sample robot according to the control speed to generate sample motion state data for this iteration process.
[0191] S530: Based on the sample motion state data of this iteration process, evaluate the control speed of this iteration process and obtain the sample evaluation result.
[0192] In some embodiments, the sample motion state data may include at least one of the following: actual leg lift height, actual swing position of the foot in the sample robot, actual pitch angle of the base in the sample robot, and actual roll angle of the base.
[0193] In some embodiments, the actual speed of the current iteration can be determined based on the sample motion state data of the current iteration. The speed tracking evaluation result is then determined based on the deviation between the actual speed and the control speed of the current iteration.
[0194] Among them, the speed tracking evaluation results can be used to guide the sample robot to track the control speed and reduce the error between the actual speed and the control speed.
[0195] In some embodiments, the speed tracking evaluation result can be determined based on the squared difference between the actual speed and the control speed.
[0196] In some embodiments, the evaluation result of foot trajectory tracking can be determined based on the deviation between the actual leg lift height and the target leg lift height, and / or the deviation between the actual swing position and the target swing position.
[0197] Among them, the evaluation results of foot trajectory tracking can be used to guide the sample robot to track the foot trajectory, reduce the deviation between the actual leg lifting height and the target leg lifting height, and / or reduce the deviation between the actual swing position and the target swing position.
[0198] In some embodiments, the evaluation result of foot trajectory tracking can be determined based on the square difference between the actual leg lift height and the target leg lift height, and / or the root mean square error between the actual swing position and the target swing position.
[0199] In some embodiments, the attitude stability evaluation result of the base is determined based on the deviation between the actual pitch angle and the target pitch angle of the base, and / or the deviation between the actual roll angle and the target roll angle of the base.
[0200] Among them, the base attitude stability evaluation results are used to guide the sample robot to maintain a stable base attitude.
[0201] In some embodiments, the base attitude stability evaluation result can be determined based on the difference between the actual pitch angle and the target pitch angle, and / or the difference between the actual roll angle and the target roll angle of the base.
[0202] In some embodiments, the sample evaluation result is determined based on at least one of the velocity tracking evaluation result, the foot trajectory tracking evaluation result, and the base attitude stability evaluation result.
[0203] In this embodiment, by determining at least one sample evaluation result among the velocity tracking evaluation result, the foot trajectory tracking evaluation result, and the base posture stability evaluation result, the trained target model can have good robustness in terms of base posture stability, velocity tracking, and foot trajectory tracking.
[0204] S540, adjust the model parameters of the target model based on the sample evaluation results.
[0205] Adjusting the model parameters of the target model based on the sample evaluation results can provide a clear direction for optimization, allowing the target model to adjust the action probability according to the sample evaluation results, avoiding blind exploration and thus accelerating convergence.
[0206] Based on the technical solutions of the above embodiments, this application also provides another optional embodiment, in which the robot control method is described in detail.
[0207] See Figure 6 The robot control method shown includes:
[0208] S601, in response to the control command for the target robot, for each control cycle, if the current state of the target robot does not meet the target state indicated by the control command, acquires the initial motion state data of the target robot in the control cycle.
[0209] S602, based on the initial motion state data and the allowable speed increment of the target robot, determine the target speed of the target robot within the control cycle.
[0210] The permissible speed increment is determined according to the following steps: The horizontal thrust at the foot of the target robot is determined based on the peak joint torque of the target robot and the effective working length of the mechanical leg; the first acceleration of the target robot based on the joint motor performance constraints is determined based on the foot horizontal thrust, the number of mechanical legs in the support phase of the target robot, and the weight of the target robot; the second acceleration of the target robot based on the ground friction constraint is determined based on the friction coefficient corresponding to the foot of the target robot and the gravitational acceleration; the safe acceleration of the target robot is determined based on the smaller value of the first and second accelerations; and the permissible speed increment of the target robot is determined based on the safe acceleration and the duration of the control cycle.
[0211] S603: When the target speed is less than the speed threshold, the preset first step frequency is used as the target step frequency of the target robot within the control cycle.
[0212] S604, if the target speed is not less than the speed threshold, determine the speed difference between the target speed and the speed threshold.
[0213] S605: Based on the product of the speed difference and the step frequency growth factor, and the first step frequency, determine the target step frequency of the target robot within the control cycle.
[0214] S606, acquire the historical foot phase of the target robot in the previous control cycle.
[0215] S607 determines the current foot phase of the target robot within the control cycle based on the historical foot phase, target step frequency, and control cycle duration.
[0216] S608 determines the target robot's leg lift height data based on the current foot phase.
[0217] S609 determines the trajectory offset of the target robot's foot based on the target speed, target step frequency, and desired speed in the target state.
[0218] S610, acquire the forward mechanical mounting distance between the leg joints of the target robot and the robot's body, as well as the swing position data corresponding to the foot of the target robot.
[0219] S611, based on the forward mechanical installation distance, swing position data and trajectory offset, determine the desired swing position corresponding to the foot of the target robot.
[0220] S612, when the target robot is detected to switch from the first phase state to the second phase state, the target robot is controlled according to the target speed, target step frequency, leg lifting height data and the desired swing position.
[0221] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0222] Based on the same inventive concept, this application also provides a robot control device for implementing the robot control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more robot control device embodiments provided below can be found in the limitations of the robot control method described above, and will not be repeated here.
[0223] In one exemplary embodiment, such as Figure 7 As shown, a robot control device is provided, including: a first acquisition module 710, a first determination module 720, a second determination module 730, and a control module 740, wherein:
[0224] The first acquisition module 710 is used to respond to the control command for the target robot and, for each control cycle, acquire the initial motion state data of the target robot in the control cycle when the current state of the target robot does not meet the target state indicated by the control command.
[0225] The first determining module 720 is used to determine the target speed of the target robot within the control cycle based on the initial motion state data and the allowable speed increment of the target robot.
[0226] The second determining module 730 is used to determine the target step frequency of the target robot within the control cycle based on the target speed;
[0227] The control module 740 is used to control the target robot according to the target speed and / or target step frequency during the control cycle.
[0228] In one embodiment, the second determining module 730 includes: a first determining unit, configured to use a preset first step frequency as the target step frequency of the target robot within the control cycle when the target speed is less than a speed threshold; and a second determining unit, configured to determine the target step frequency of the target robot within the control cycle based on the target speed and the speed threshold when the target speed is not less than the speed threshold.
[0229] In one embodiment, the second determining unit is specifically used to: determine the speed difference between the target speed and the speed threshold; and determine the target step frequency of the target robot within the control cycle based on the product of the speed difference and the step frequency growth factor, and the first step frequency.
[0230] In one embodiment, the robot control device further includes: a second acquisition module for acquiring a first acceleration of the target robot based on joint motor performance constraints and a second acceleration of the target robot based on ground friction constraints; a third determination module for determining a safe acceleration of the target robot based on the first acceleration and / or the second acceleration; and a fourth determination module for determining an allowable speed increment of the target robot based on the safe acceleration and the duration of the control cycle. The second acquisition module includes: a third determination unit for determining the foot-end horizontal thrust of the target robot based on the peak joint torque of the target robot and the effective action length of the mechanical leg; and a fourth determination unit for determining the first acceleration of the target robot based on joint motor performance constraints based on the foot-end horizontal thrust, the number of mechanical legs of the target robot in the support phase, and the weight of the target robot.
[0231] In one embodiment, the second acquisition module includes: a fifth determining unit, configured to determine a second acceleration of the target robot based on ground friction constraints according to the friction coefficient and gravitational acceleration corresponding to the foot of the target robot.
[0232] In one embodiment, the control module 740 includes: a first acquisition unit for acquiring the current foot phase of the target robot during a control cycle; a sixth determination unit for determining the leg lift height data of the target robot based on the current foot phase; and a first control unit for controlling the target robot based on the target speed and / or target step frequency, and the leg lift height data.
[0233] In one embodiment, the first acquisition unit is specifically used to: acquire the historical foot phase of the target robot in the previous control cycle; and determine the current foot phase of the target robot in the control cycle based on the historical foot phase, the target step frequency, and the duration of the control cycle.
[0234] In one embodiment, the control module 740 includes: a seventh determining unit, configured to determine the trajectory offset corresponding to the foot of the target robot based on the target speed, target step frequency, and desired speed in the target state; a second acquiring unit, configured to acquire the forward mechanical mounting distance between the leg joint of the target robot and the robot body, and the swing position data corresponding to the foot of the target robot; an eighth determining unit, configured to determine the desired swing position corresponding to the foot of the target robot based on the forward mechanical mounting distance, swing position data, and trajectory offset; and a second control unit, configured to control the target robot based on the target speed and / or target step frequency, and the desired swing position.
[0235] In one embodiment, the control module 740 includes: a third control unit, configured to control the target robot according to the target step frequency when the target robot is detected to switch from a first phase state to a second phase state; wherein, when the first phase state is a swinging phase, the second phase state is a supporting phase; and when the first phase state is a supporting phase, the second phase state is a swinging phase.
[0236] In one embodiment, the first determining module 720 includes: an input unit, used to input initial motion state data and the allowable speed increment of the target robot into the target model to obtain the target speed of the target robot within a control cycle; wherein the target model is trained based on sample motion state data generated by the sample robot in multiple iterations, including: in each iteration, obtaining the control speed of the sample robot in the current iteration; wherein, if the current iteration is the first iteration, the control speed is a preset speed; if the current iteration is not the first iteration, the control speed is determined based on the sample motion state data of the sample robot in the previous iteration and the allowable speed increment of the sample robot; controlling the motion of the sample robot according to the control speed to generate sample motion state data for the current iteration; evaluating the control speed of the current iteration based on the sample motion state data for the current iteration to obtain a sample evaluation result; and adjusting the model parameters of the target model according to the sample evaluation result.
[0237] In one embodiment, the sample motion state data includes at least one of the following: actual leg lift height, actual swing position of the foot in the sample robot, actual pitch angle of the base in the sample robot, and actual roll angle of the base. Based on the sample motion state data of the current iteration process, the control speed of the current iteration process is evaluated to obtain a sample evaluation result, including: determining the actual speed of the current iteration process based on the sample motion state data of the current iteration process; determining the speed tracking evaluation result based on the deviation between the actual speed and the control speed of the current iteration process; determining the foot trajectory tracking evaluation result based on the deviation between the actual leg lift height and the target leg lift height, and / or the deviation between the actual swing position and the target swing position; determining the base attitude stability evaluation result based on the deviation between the actual pitch angle and the target pitch angle of the base, and / or the deviation between the actual roll angle and the target roll angle of the base; and determining the sample evaluation result based on at least one of the speed tracking evaluation result, the foot trajectory tracking evaluation result, and the base attitude stability evaluation result.
[0238] Each module in the aforementioned robot control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0239] In one exemplary embodiment, a robot is provided, the internal structure of which can be as follows: Figure 8As shown, the robot includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The robot's processor provides computational and control capabilities. The robot's memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The robot's database stores initial motion state data, allowable velocity increments, target velocity, target step frequency, first acceleration, second acceleration, current foot phase, leg lift height data, historical foot phase, desired velocity, trajectory offset, forward mechanical mounting distance, swing position data, desired swing position, control velocity of the sample robot in each iteration, sample motion state data, model parameters of the target model, sample evaluation results, and other relevant data. The robot's I / O interfaces are used for exchanging information between the processor and external devices. The robot's communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a robot control method.
[0240] Those skilled in the art will understand that Figure 8 The structure shown is a block diagram of a partial structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0241] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0242] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0243] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0244] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program mentioned can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0245] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0246] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A robot control method, characterized in that, The method includes: In response to a control command for the target robot, for each control cycle, if the current state of the target robot does not satisfy the target state indicated by the control command, the initial motion state data of the target robot in that control cycle is acquired. Based on the initial motion state data and the allowable speed increment of the target robot, the target speed of the target robot within the control cycle is determined; Based on the target speed, the target step frequency of the target robot within the control cycle is determined; During the control cycle, the target robot is controlled according to the target speed and / or the target step frequency; The method further includes: The horizontal thrust at the foot of the target robot is determined based on the peak joint torque of the target robot and the effective working length of the mechanical leg. Based on the horizontal thrust at the foot end, the number of mechanical legs of the target robot in the support phase, and the weight of the target robot, the first acceleration of the target robot based on the joint motor performance constraints is determined; Obtain the second acceleration of the target robot based on ground friction constraints; The safe acceleration of the target robot is determined by multiplying the smaller of the first acceleration and the second acceleration with a preset safety margin coefficient. The permissible speed increment of the target robot is determined based on the safety acceleration and the duration of the control cycle.
2. The method according to claim 1, characterized in that, Determining the target step frequency of the target robot within the control cycle based on the target speed includes: If the target speed is less than the speed threshold, the preset first step frequency will be used as the target step frequency of the target robot in the control cycle. If the target speed is not less than the speed threshold, the target step frequency of the target robot within the control cycle is determined based on the target speed and the speed threshold.
3. The method according to claim 2, characterized in that, Determining the target step frequency of the target robot within the control cycle based on the target speed and the speed threshold includes: Determine the speed difference between the target speed and the speed threshold; The target step frequency of the target robot within the control cycle is determined based on the product of the speed difference and the step frequency growth factor, and the first step frequency.
4. The method according to claim 1, characterized in that, Obtaining the second acceleration of the target robot based on ground friction constraints includes: Based on the friction coefficient and gravitational acceleration corresponding to the foot of the target robot, the second acceleration of the target robot constrained by ground friction is determined.
5. The method according to any one of claims 1-4, characterized in that, Controlling the target robot based on the target speed and / or the target step frequency includes: Obtain the current foot phase of the target robot within the control cycle; Based on the current foot phase, determine the leg lift height data of the target robot; The target robot is controlled based on the target speed and / or the target step frequency, as well as the leg lift height data.
6. The method according to claim 5, characterized in that, Obtaining the current foot phase of the target robot within the control cycle includes: Obtain the historical foot phase of the target robot in the previous control cycle; Based on the historical foot phase, the target gait frequency, and the duration of the control cycle, the current foot phase of the target robot within the control cycle is determined.
7. The method according to any one of claims 1-4, characterized in that, Controlling the target robot based on the target speed and / or the target step frequency includes: Based on the target speed, the target step frequency, and the desired speed in the target state, determine the trajectory offset corresponding to the foot of the target robot; Obtain the forward mechanical mounting distance between the leg joints of the target robot and the body of the robot, as well as the swing position data corresponding to the foot of the target robot; Based on the forward mechanical installation distance, the swing position data, and the trajectory offset, the desired swing position corresponding to the foot of the target robot is determined. The target robot is controlled based on the target speed and / or the target step frequency, and the desired swing position.
8. The method according to any one of claims 1-4, characterized in that, Controlling the target robot based on the target step frequency includes: Upon detecting that the target robot has switched from the first phase state to the second phase state, the target robot is controlled according to the target step frequency; Wherein, when the first phase is the swinging phase, the second phase is the supporting phase; when the first phase is the supporting phase, the second phase is the swinging phase.
9. The method according to any one of claims 1-4, characterized in that, Based on the initial motion state data and the allowable velocity increment of the target robot, the target velocity of the target robot within the control cycle is determined, including: The initial motion state data and the allowable velocity increment of the target robot are input into the target model to obtain the target velocity of the target robot within the control cycle; wherein, the target model is trained based on sample motion state data generated by the sample robot during multiple iterations, including: In each iteration, the control speed of the sample robot in this iteration is obtained; wherein, if this iteration is the first iteration, the control speed is a preset speed; if this iteration is not the first iteration, the control speed is determined based on the sample motion state data of the sample robot in the previous iteration and the allowable speed increment of the sample robot. Based on the control speed, the sample robot is controlled to move, so as to generate sample motion state data for this iteration process; Based on the sample motion state data of this iteration process, the control speed of this iteration process is evaluated, and the sample evaluation result is obtained; Based on the evaluation results of the samples, the model parameters of the target model are adjusted.
10. The method according to claim 9, characterized in that, The sample motion state data includes at least one of the following: actual leg lift height, actual swing position of the foot in the sample robot, actual pitch angle of the base in the sample robot, and actual roll angle of the base; Based on the sample motion state data of this iteration process, the control speed of this iteration process is evaluated, and the sample evaluation results are obtained, including: Based on the sample motion state data of this iteration process, determine the actual speed of this iteration process; The speed tracking evaluation result is determined based on the deviation between the actual speed and the control speed in this iteration process; The foot trajectory tracking evaluation result is determined based on the deviation between the actual leg lift height and the target leg lift height, and / or the deviation between the actual swing position and the target swing position; The attitude stability evaluation result of the base is determined based on the deviation between the actual pitch angle and the target pitch angle of the base, and / or the deviation between the actual roll angle and the target roll angle of the base. The sample evaluation result is determined based on at least one of the speed tracking evaluation result, the foot trajectory tracking evaluation result, and the base attitude stability evaluation result.
11. A robot comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Robot speed control method, robot and computer readable storage medium
CN115042170A
Robot control method and apparatus, electronic device, storage medium, and robot
US20240042599A1
Method for controlling motions of quadruped robot based on reinforcement learning and position increment
US20250021109A1