Robot control method and device, electronic equipment, storage medium and robot
By acquiring the robot's target speed information and current state at the next moment, the step frequency is adjusted to adapt to speed changes, solving the stability and continuity problems of the robot when walking at varying speeds, and achieving the effect of automatically adjusting the step frequency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI ROBOT TECH CO LTD
- Filing Date
- 2022-08-02
- Publication Date
- 2026-06-05
AI Technical Summary
In existing technologies, bipedal, quadrupedal, and hexapod robots save energy when walking at low speeds but cannot achieve high-speed walking, and their step frequency cannot be automatically adjusted, making it difficult to meet the needs of scenarios involving variable-speed walking.
By acquiring the robot's target speed information for the next moment, the step frequency is adjusted according to the current state, including determining whether the legs are in a supporting state, speed difference, and average speed, and the step frequency is automatically switched to adapt to speed changes.
This technology enables the robot to automatically adjust its step frequency during variable-speed walking, meeting the requirements of variable-speed walking scenarios, ensuring the stability and continuity of walking, and avoiding excessively frequent step frequency adjustments or loss of balance.
Smart Images

Figure CN117532597B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robotics, and more particularly to a robot control method, apparatus, electronic device, storage medium, and robot. Background Technology
[0002] For bipedal, quadrupedal, and hexapod robots, using a lower step frequency when walking at low speeds or standing still can save energy and reduce noise. However, due to the limitations of leg swing speed and swing position, it is impossible to achieve a high walking speed when walking at low frequency. Therefore, robots need to use a higher step frequency when walking at high speeds to achieve a higher walking speed.
[0003] In different scenarios, robots need to walk at different speeds, and their step frequency needs to be adjusted accordingly when their walking speed changes. Current technologies cannot automatically adjust step frequency, making it difficult to meet the requirements of variable-speed walking scenarios. Summary of the Invention
[0004] This disclosure provides a robot control method, apparatus, electronic device, storage medium, and robot.
[0005] The first aspect of this disclosure provides a robot control method, comprising: acquiring target speed information of the robot at the next moment during robot walking; and adjusting the robot's step frequency according to the target speed information and the robot's current state.
[0006] In one embodiment of this disclosure, adjusting the robot's step frequency based on the target speed information and the robot's current state includes: determining the target step frequency of the robot at the next moment based on the target speed information; determining whether the robot meets the step frequency switching condition based on the robot's current state; and controlling the robot to switch from the current step frequency to the target step frequency at the next moment when the step frequency switching condition is met.
[0007] In one embodiment of this disclosure, the method further includes: determining whether each leg of the robot is in a supported state; and when all legs of the robot are in a supported state, determining that the robot meets the step frequency switching condition.
[0008] In one embodiment of this disclosure, determining whether each leg of the robot is in a supported state includes: determining the landing time when each leg of the robot touches the ground according to the robot's current step frequency; and determining that each leg of the robot is in a supported state in response to the robot's current time reaching the landing time.
[0009] In one embodiment of this disclosure, determining whether each leg of the robot is in a supported state includes: acquiring pressure data of each leg of the robot; and determining that each leg of the robot is in a supported state in response to the pressure data of each leg being greater than a set pressure value.
[0010] In one embodiment of this disclosure, the method further includes: acquiring the current speed information of the robot, and acquiring the speed difference between the target speed information and the current speed information; when the absolute value of the speed difference is greater than a set value, determining that the robot meets the step frequency switching condition.
[0011] In one embodiment of this disclosure, the method further includes: obtaining the average speed of the robot and the maximum speed allowed by the target step frequency; and determining that the robot meets the step frequency switching condition when the average speed is less than the maximum speed.
[0012] In one embodiment of this disclosure, the method further includes: when the step frequency switching condition is not met, controlling the robot to continue walking at the current step frequency in the next moment.
[0013] In one embodiment of this disclosure, determining the target step frequency of the robot at the next moment based on the target speed information includes: obtaining the speed values of the robot in multiple set directions based on the target speed information; determining the corresponding candidate step frequency based on the speed value in each direction; comparing the candidate step frequencies corresponding to the multiple set directions, selecting the candidate step frequency with the fastest step frequency, and determining it as the target step frequency.
[0014] A second aspect of this disclosure provides a robot control device, comprising: a first acquisition module for acquiring target speed information of the robot at the next moment during robot walking; and an adjustment module for adjusting the robot's step frequency based on the target speed information and the robot's current state.
[0015] In one embodiment of this disclosure, the adjustment module is further configured to: determine the target step frequency of the robot at the next moment based on the target speed information; determine whether the robot meets the step frequency switching condition based on the current state of the robot; and when the step frequency switching condition is met, control the robot to switch from the current step frequency to the target step frequency at the next moment.
[0016] In one embodiment of this disclosure, the device further includes: a first determining module, configured to determine whether each leg of the robot is in a supported state; and a second determining module, configured to determine that the robot meets the step frequency switching condition when all legs of the robot are in a supported state.
[0017] In one embodiment of this disclosure, the first determining module is further configured to: determine the landing time when all legs of the robot touch the ground according to the robot's current step frequency; and determine that all legs of the robot are in a supporting state in response to the robot's current time reaching the landing time.
[0018] In one embodiment of this disclosure, the first determining module is further configured to: acquire pressure data of each leg of the robot; and determine that each leg of the robot is in a supporting state in response to the fact that the pressure data of each leg is greater than a set pressure value.
[0019] In one embodiment of this disclosure, the device further includes: a second acquisition module, configured to acquire the current speed information of the robot and acquire the speed difference between the target speed information and the current speed information; and a third determination module, configured to determine that the robot meets the step frequency switching condition when the absolute value of the speed difference is greater than a set value.
[0020] In one embodiment of this disclosure, the apparatus further includes: a third acquisition module, configured to acquire the average speed of the robot and the maximum speed allowed by the target step frequency; and a fourth determination module, configured to determine that the robot meets the step frequency switching condition when the average speed is less than the maximum speed.
[0021] In one embodiment of this disclosure, the device further includes a control module, configured to control the robot to continue walking at the current step frequency in the next moment when the step frequency switching condition is not met.
[0022] In one embodiment of this disclosure, the adjustment module is further configured to: obtain the speed values of the robot in multiple set directions based on the target speed information; determine the corresponding candidate step frequency based on the speed value in each direction; compare the candidate step frequencies corresponding to the multiple set directions, and select the candidate step frequency with the fastest step frequency as the target step frequency.
[0023] A third aspect of this disclosure provides an electronic device, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement a robot control method proposed in a first aspect of this disclosure.
[0024] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium that, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a robot control method according to a first aspect of this disclosure.
[0025] The fifth aspect of this disclosure provides a robot, including the robot control device proposed in the second aspect of this disclosure or the electronic device proposed in the third aspect of this disclosure, to implement the robot control method proposed in the first aspect of this disclosure.
[0026] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects: When the robot needs to change speed during the walking process, the robot can automatically adjust its step frequency according to the speed at the next moment and the current state to change the walking speed and meet the needs of the variable speed walking scenario.
[0027] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0028] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0029] Figure 1 This is a flowchart illustrating a robot control method provided in an embodiment of the present disclosure;
[0030] Figure 2 This is a flowchart illustrating a robot control method provided in an embodiment of the present disclosure;
[0031] Figure 3 This is a flowchart illustrating another robot control method provided in an embodiment of the present disclosure;
[0032] Figure 4 A schematic diagram of the robot's walking motion;
[0033] Figure 5 This is a flowchart illustrating another robot control method provided in an embodiment of the present disclosure;
[0034] Figure 6 This is a schematic diagram illustrating the principle of step frequency adjustment.
[0035] Figure 7 This is a flowchart illustrating another robot control method provided in an embodiment of the present disclosure;
[0036] Figure 8 This is a flowchart illustrating a specific example of a robot control method according to the present disclosure;
[0037] Figure 9 This is a flowchart illustrating a specific example of a robot control method according to the present disclosure;
[0038] Figure 10 This is a schematic diagram showing the robot's walking direction;
[0039] Figure 11 A schematic diagram illustrating the practical application process of robot control methods;
[0040] Figure 12 This is a schematic diagram of the structure of a robot control device provided in an embodiment of the present disclosure;
[0041] Figure 13 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this disclosure as detailed in the appended claims.
[0043] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. The singular forms “a” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0044] It should be understood that although the terms first, second, third, etc., may be used to describe various information in embodiments of this disclosure, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of embodiments of this disclosure, and similarly, second information may also be referred to as first information. Depending on the context, the words “if” and “suppose” as used herein may be interpreted as “when”, “when”, or “in response to a determination”.
[0045] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0046] The following description, with reference to the accompanying drawings, outlines a robot control method, apparatus, electronic device, storage medium, and robot according to embodiments of the present disclosure.
[0047] Figure 1This is a flowchart illustrating a robot control method provided in an embodiment of this disclosure. Figure 1 As shown, the method includes the following steps:
[0048] S101: During the robot's movement, acquire the target speed information of the robot at the next moment.
[0049] The target speed information includes the robot's walking speed at the next moment.
[0050] The robot in this embodiment can be a bipedal robot, a quadrupedal robot, a hexapedal robot, etc., and no limitation is made here.
[0051] Before adjusting the robot's step frequency, you can enable the robot's automatic step frequency adjustment function to obtain the robot's target speed information at the next moment after enabling this function.
[0052] In some embodiments, during the robot's movement, the user can send speed commands to the robot via a remote control or other devices to instruct the robot to change speed.
[0053] In other embodiments, during the robot's autonomous navigation and walking process, when it is necessary to change the current walking speed, the server can send a speed command to the robot to instruct the robot to change speed.
[0054] In some other embodiments, during the robot's movement, the upper-level module can send speed commands to the robot to instruct it to change speed. This upper-level module can be the robot's control center module.
[0055] It should be noted that the speed command in this embodiment includes the robot's target speed information for the next moment.
[0056] S102, adjust the robot's step frequency based on the target speed information and the robot's current state.
[0057] The robot's current state includes its limb state, speed state, and posture state.
[0058] The robot's step frequency can be determined based on its walking speed in the next moment. It can also be determined whether to adjust the current step frequency based on the robot's current limb state, speed state, posture state, etc. If it is determined to adjust the current step frequency, the robot's current step frequency can be adjusted to the step frequency corresponding to the walking speed in the next moment.
[0059] Furthermore, after adjusting the robot's step frequency, the controller can control the robot to perform the corresponding gait according to the adjusted step frequency, so that the robot can achieve the adjusted step frequency.
[0060] In this embodiment of the disclosure, gait refers to the walking posture of the robot, and step frequency refers to the frequency of the robot's steps.
[0061] Optionally, the controller can be an MPC (Model Predictive Control) + WBC (Whole Body Control) controller.
[0062] In this embodiment of the present disclosure, during the robot's walking process, the target speed information of the robot at the next moment is acquired, and the robot's step frequency is adjusted according to the target speed information and the robot's current state. In this embodiment of the present disclosure, when the robot needs to change speed during its walking process, the robot can automatically adjust its step frequency according to the speed at the next moment and the current state to change its walking speed and meet the needs of variable speed walking scenarios.
[0063] Figure 2 This is a flowchart illustrating a robot control method provided in an embodiment of the present disclosure, as shown below. Figure 2 As shown, the method includes the following steps:
[0064] S201: During the robot's movement, acquire the target speed information of the robot at the next moment.
[0065] Step S201 in this embodiment is the same as step S101 in the above embodiment, and will not be repeated here.
[0066] S202, based on the target speed information, determine the target step frequency of the robot at the next moment.
[0067] The faster a robot walks, the higher its step frequency; the slower its walking speed, the lower its step frequency. Therefore, there is a certain mapping relationship between a robot's walking speed and its step frequency. After obtaining the target speed information, the target step frequency corresponding to the target speed information can be determined based on the mapping relationship between walking speed and step frequency.
[0068] S203, based on the robot's current state, determine whether the robot meets the step frequency switching conditions.
[0069] In some embodiments, the robot's step frequency switching conditions can be determined based on the support status of each of its legs.
[0070] In other embodiments, it can be determined whether the robot meets the step frequency switching condition based on the robot's speed state.
[0071] S204, when the step frequency switching condition is met, control the robot to switch from the current step frequency to the target step frequency in the next moment.
[0072] S205: If the step frequency switching condition is not met, control the robot to continue walking at the current step frequency in the next moment.
[0073] When the robot meets the step frequency switching conditions, the robot is controlled to switch from the current step frequency to the target step frequency in the next moment and walk at the target step frequency; when the robot does not meet the step frequency switching conditions, the robot is controlled to continue walking at the current step frequency in the next moment.
[0074] In this embodiment, during robot walking, the target speed information for the next moment is acquired. Based on the target speed information, the target step frequency for the next moment is determined. Based on the robot's current state, it is determined whether the robot meets the step frequency switching condition. If the step frequency switching condition is met, the robot is controlled to switch from the current step frequency to the target step frequency in the next moment. If the step frequency switching condition is not met, the robot continues walking at the current step frequency in the next moment. In this embodiment, the step frequency switching condition provides a decision-making basis for the robot's step frequency switching, avoiding erroneous switching. Furthermore, obtaining the robot's step frequency for the next moment through the speed ensures that the robot can reach the speed of the next moment after switching to the next step frequency, improving the accuracy of step frequency switching.
[0075] Figure 3 This is a flowchart illustrating a robot control method according to an embodiment of the present disclosure. Based on the above embodiment, it further incorporates... Figure 3 This paper explains a method for determining whether a robot meets the step frequency switching conditions, including the following steps:
[0076] S301, Determine whether each leg of the robot is in a supported state.
[0077] If a robot changes its step frequency before completing its current step while walking, the position of its feet will change abruptly, resulting in a discontinuous foot trajectory. To avoid this, the step frequency needs to be changed when the robot has completed its current step.
[0078] The following explanation uses a quadruped robot as an example:
[0079] See Figure 4(a) shows a gait with a period of 600ms, and (b) shows a gait with a period of 300ms. If the speeds of the two gaits are the same, then the stride length AB of (a) is twice that of (b). Assuming that the swinging legs in the diagram are all at 90% of their respective swing phases, if the gait with a period of 300ms is changed to a gait with a period of 600ms, the position of the corresponding swinging leg will change from C2 to C1, which causes a sudden change in the position of the swinging leg's foot. Therefore, the switching of stride frequency needs to be done when all legs are supporting legs, that is, when all legs are in a supporting state.
[0080] In some embodiments, the landing time of each leg of the robot is determined according to the robot's current step frequency, and in response to the robot's current time reaching the landing time, it is determined that each leg of the robot is in a supporting state.
[0081] In other embodiments, pressure data of each leg of the robot is acquired, and in response to the pressure data of each leg being greater than a set pressure value, it is determined that each leg of the robot is in a supported state.
[0082] S302, when all legs of the robot are in a supported state, determine that the robot meets the step frequency switching condition.
[0083] S303, when not all of the robot's legs are in a supported state, it is determined that the robot does not meet the step frequency switching condition.
[0084] Determine whether each leg of the robot is in a supported state. If so, the robot meets the step frequency switching condition; otherwise, the robot does not meet the step frequency switching condition.
[0085] In this embodiment, it is determined whether each leg of the robot is in a supported state. When all legs are in a supported state, the robot is determined to meet the step frequency switching condition; when not all legs are in a supported state, the robot is determined not to meet the step frequency switching condition. In this embodiment, switching the robot's step frequency when all legs are in a supported state ensures the stability and continuity of the robot's walking, avoiding abrupt changes in foot trajectory during walking that could affect the stability and continuity of the robot's walking.
[0086] Figure 5 This is a flowchart illustrating a robot control method according to an embodiment of the present disclosure. Based on the above embodiment, it further incorporates... Figure 5 This paper explains another method for determining whether a robot meets the step frequency switching conditions, including the following steps:
[0087] S501: Obtain the robot's current speed information and the speed difference between the target speed information and the current speed information.
[0088] S502, when the absolute value of the speed difference is greater than the set value, determine that the robot meets the step frequency switching condition.
[0089] S503: When the absolute value of the speed difference is less than or equal to the set value, it is determined that the robot does not meet the step frequency switching condition.
[0090] In practical applications, if a fixed speed is used as the condition for changing the step frequency, the robot's step frequency will also change repeatedly when the given speed changes repeatedly around this speed. This will cause the robot's step frequency to switch too frequently, affecting the robot's normal walking.
[0091] To address the aforementioned issues, this embodiment uses the speed difference between the target speed information and the current speed information as the criterion for robot step frequency switching. In this embodiment, it can be determined whether the absolute value of the speed difference is less than a set value; if so, the robot is determined to meet the step frequency switching condition; otherwise, the robot is determined not to meet the step frequency switching condition.
[0092] See Figure 6 v d As a set value, when increasing the robot's walking speed, if the speed difference between the robot's next speed and its current speed is greater than v... d If the robot's current speed is increased, its step frequency will be increased to reach the speed of the next moment; if the speed difference between the robot's current speed and its speed at the next moment is greater than v, then when the robot's walking speed is slowed down, it will be considered if the speed difference is greater than v. d This reduces the robot's step frequency, allowing the robot to reach the speed required for the next moment.
[0093] In this embodiment, the robot's current speed information is obtained, and the speed difference between the target speed information and the current speed information is obtained. When the absolute value of the speed difference is greater than a set value, it is determined that the robot meets the step frequency switching condition; when the absolute value of the speed difference is less than or equal to the set value, it is determined that the robot does not meet the step frequency switching condition. In this embodiment, when the absolute value of the speed difference between the robot's next speed and its current speed is greater than the set value, the robot's step frequency is adjusted. This avoids the robot adjusting its step frequency too frequently during its walking process, which could affect the robot's normal walking.
[0094] Figure 7 This is a flowchart illustrating a robot control method according to an embodiment of the present disclosure. Based on the above embodiment, it further incorporates... Figure 7 This paper explains another method for determining whether a robot meets the step frequency switching conditions, including the following steps:
[0095] S701, obtains the robot's average speed and the maximum speed allowed by the target step frequency.
[0096] When a robot walks at a relatively high speed, if the speed command changes instantaneously from its maximum speed to zero, according to existing logic, the robot will immediately switch to a low-frequency gait. However, due to the robot's inertia, it cannot decelerate immediately and still experiences significant acceleration at this moment. If it switches to a low-frequency gait at this time, but the robot's speed remains high, it may exceed the maximum speed of the low-frequency gait, causing the swinging leg to fail to reach the desired foot placement, thus leading to the robot losing balance. Therefore, this embodiment avoids the aforementioned problem by using the robot's average speed as the basis for gait frequency switching.
[0097] Here, average speed represents the average speed of the robot within one step. The maximum speed allowed by the target step frequency represents the maximum speed at which the robot can maintain balance while walking at the target step frequency.
[0098] S702 determines that the robot meets the step frequency switching condition when the average speed is less than the maximum speed.
[0099] S703: When the average speed is greater than or equal to the maximum speed, it is determined that the robot does not meet the step frequency switching condition.
[0100] After obtaining the robot's average speed and the maximum speed allowed by the target step frequency, it can be determined whether the robot's average speed is less than the maximum speed allowed by the target step frequency. If so, the robot is determined to meet the step frequency switching condition; otherwise, the robot is determined not to meet the step frequency switching condition.
[0101] In this embodiment, the robot's average speed and the maximum allowable speed for the target step frequency are obtained. When the average speed is less than the maximum speed, the robot is determined to meet the step frequency switching condition; when the average speed is greater than or equal to the maximum speed, the robot is determined not to meet the step frequency switching condition. In this embodiment, the robot's step frequency is adjusted only when the robot's average speed is greater than the maximum allowable speed for the next step frequency, which ensures the robot's balance during walking and prevents the robot from losing balance when changing speed.
[0102] Figure 8 This is a flowchart illustrating a robot control method according to an embodiment of the present disclosure. Based on the above embodiment, it further incorporates... Figure 8 The following steps explain another method for determining whether a robot meets the step frequency switching conditions:
[0103] S801, determine whether each leg of the robot is in a supported state.
[0104] S802, in response to determining that each leg of the robot is in a supported state, the robot's current speed information is obtained, and the speed difference between the target speed information and the current speed information is obtained, and it is determined whether the absolute value of the speed difference is greater than a set value.
[0105] S803, in response to the determination that the absolute value of the speed difference is greater than the set value, obtains the robot's average speed and the maximum speed allowed by the target step frequency, and determines whether the average speed is less than the maximum speed.
[0106] S804, in response to determining that the average speed is less than the maximum speed, determines that the robot meets the step frequency switching condition.
[0107] For a detailed description of steps S801 to S804, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.
[0108] Determine if each leg of the robot is in a supported state. If not, the robot does not meet the step frequency switching condition. If so, obtain the robot's current speed information and the speed difference between the target speed information and the current speed information. Determine if the absolute value of the speed difference is greater than a set value. If not, the robot does not meet the step frequency switching condition. If so, obtain the robot's average speed and the maximum speed allowed by the target step frequency. Determine if the average speed is less than the maximum speed. If not, the robot does not meet the step frequency switching condition. If so, the robot meets the step frequency switching condition.
[0109] In this embodiment of the disclosure, it is determined whether each leg of the robot is in a supported state. In response to determining that each leg of the robot is in a supported state, the current speed information of the robot is obtained, and the speed difference between the target speed information and the current speed information is obtained. It is determined whether the absolute value of the speed difference is greater than a set value. In response to determining that the absolute value of the speed difference is greater than the set value, the average speed of the robot and the maximum speed allowed by the target step frequency are obtained. It is determined whether the average speed is less than the maximum speed. In response to determining that the average speed is less than the maximum speed, it is determined that the robot meets the step frequency switching condition.
[0110] In this embodiment, the robot's step frequency is adjusted only when all legs of the robot are in a supported state, the difference between the robot's speed at the next moment and its current speed is greater than a set value, and the robot's average speed is greater than the maximum speed allowed by the robot's step frequency at the next moment. This ensures the stability and continuity of the robot's walking, avoids sudden changes in foot trajectory during walking, which would affect the stability and continuity of the robot's walking, and also avoids adjusting the step frequency too frequently during the robot's walking, which would affect the robot's normal walking. Furthermore, it ensures the robot's balance during walking and prevents the robot from losing balance when changing speed.
[0111] In summary, the following three conditions are used to determine whether a robot meets the step frequency switching criteria:
[0112] Condition 1: Determine whether each leg of the robot is in a supported state.
[0113] Condition 2: Determine whether the absolute value of the speed difference between the target speed information and the robot's current speed information is greater than a set value.
[0114] Condition 3: Determine whether the robot's average speed is less than the maximum speed allowed by the target step frequency.
[0115] In addition to the above, as possible implementation methods Figures 3-8 In addition to the four judgment schemes described in the four embodiments provided, conditions one and two, conditions two and three, and conditions one and three can be combined to form three other different judgment schemes. The specific process can be referred to the relevant descriptions in the above embodiments, and will not be repeated here.
[0116] Figure 9 This is a flowchart illustrating a robot control method provided in an embodiment of the present disclosure, as shown below. Figure 9 As shown, the method includes the following steps:
[0117] S901 acquires the target speed information of the robot at the next moment during the robot's movement.
[0118] For a detailed description of step S901, please refer to the relevant description in the above embodiments, which will not be repeated here.
[0119] S902 obtains the robot's speed values in multiple set directions based on the target speed information.
[0120] In some embodiments, see Figure 10 The robot's multiple preset directions can include the x-axis, y-axis, and yaw-axis, where the yaw-axis represents the rotation direction around the z-axis. Based on the target velocity information, the robot's velocity values in the x-axis, y-axis, and yaw-axis can be obtained separately.
[0121] S903 determines the corresponding candidate step frequency based on the velocity value in each direction.
[0122] In some embodiments, candidate step frequencies in the x, y, and yaw directions are determined based on velocity values in the x, y, and yaw directions, respectively.
[0123] S904: Compare the candidate step frequencies corresponding to multiple set directions, select the candidate step frequency with the fastest step frequency, and determine it as the target step frequency.
[0124] In some embodiments, candidate step frequencies in the x, y, and yaw directions can be compared, and the step frequency with the fastest step frequency can be selected as the target step frequency.
[0125] For example, when the velocity values in the x and y directions are small, the corresponding candidate step frequency is 1 / 600ms, while the velocity value in the yaw direction is large, and the corresponding candidate step frequency is 1 / 300ms. In this case, 1 / 300ms is taken as the target step frequency.
[0126] S905 determines whether the robot meets the step frequency switching conditions based on the robot's current state.
[0127] S906, when the step frequency switching condition is met, controls the robot to switch from the current step frequency to the target step frequency in the next moment.
[0128] S907 controls the robot to continue walking at the current step frequency in the next moment if the step frequency switching condition is not met.
[0129] For a description of steps S905 to S907, please refer to the description in the above-mentioned related embodiments, which will not be repeated here.
[0130] In this embodiment of the present disclosure, during the robot's walking process, the target speed information of the robot at the next moment is obtained. Based on the target speed information, the speed values of the robot in multiple set directions are obtained. Based on the speed value in each direction, the corresponding candidate step frequency is determined. The candidate step frequencies corresponding to the multiple set directions are compared, and the candidate step frequency with the fastest step frequency is selected as the target step frequency. Based on the current state of the robot, it is determined whether the robot meets the step frequency switching condition. If the step frequency switching condition is met, the robot is controlled to switch from the current step frequency to the target step frequency at the next moment. If the step frequency switching condition is not met, the robot is controlled to continue walking at the current step frequency at the next moment.
[0131] In this embodiment of the disclosure, since the various set directions of the robot are decoupled, the candidate step frequency with the fastest step frequency is selected from the candidate step frequencies of the robot's multiple set directions as the target step frequency of the robot, which can ensure that the movement of the robot in each set direction can be executed.
[0132] In order to enable those skilled in the art to more clearly understand this disclosure, Figure 11 This is a schematic diagram illustrating the actual application process of the robot control method according to an embodiment of this disclosure, such as... Figure 11 As shown, it includes the following steps:
[0133] S1101, Obtain the target velocity information of the robot at the next moment.
[0134] S1102, Select whether to enable the automatic frequency conversion function. If yes, proceed to step S1103; otherwise, proceed to step S1104.
[0135] S1103, determine the target step frequency of the robot at the next moment based on the target speed information and the current state.
[0136] S1104, Determine whether the user or navigation module has specified a step frequency. If yes, proceed to step S1105; otherwise, proceed to step S1106.
[0137] S1105 is set to a specified step frequency.
[0138] S1106 is set to the default step frequency.
[0139] S1107, Determine whether the robot meets the step frequency switching conditions. If yes, proceed to step S1108; otherwise, proceed to step S1109.
[0140] S1108, switch step frequency.
[0141] S1109, maintain current pace.
[0142] S1110, the controller controls the robot to walk according to the step frequency.
[0143] To implement the above embodiments, this disclosure also proposes a robot control device. Figure 12 This is a schematic diagram of the structure of a robot control device provided in an embodiment of this disclosure. Figure 12 As shown, the robot's control device 1200 includes: a first acquisition module 1210, used to acquire the robot's target speed information at the next moment during the robot's walking process;
[0144] The adjustment module 1220 is used to adjust the robot's step frequency based on the target speed information and the robot's current state.
[0145] In one embodiment of this disclosure, the adjustment module 1220 is further configured to: determine the target step frequency of the robot at the next moment based on the target speed information; determine whether the robot meets the step frequency switching conditions based on the current state of the robot; and control the robot to switch from the current step frequency to the target step frequency at the next moment when the step frequency switching conditions are met.
[0146] In one embodiment of this disclosure, the robot control device 1200 further includes: a first determining module 1230, used to determine whether each leg of the robot is in a supported state;
[0147] The second determining module 1240 is used to determine that the robot meets the step frequency switching conditions when all of the robot's legs are in a supported state.
[0148] In one embodiment of this disclosure, the first determining module 1230 is further configured to: determine the landing time when all legs of the robot touch the ground according to the robot's current step frequency; and determine that all legs of the robot are in a supporting state in response to the robot's current time reaching the landing time.
[0149] In one embodiment of this disclosure, the first determining module 1230 is further configured to: acquire pressure data of each leg of the robot; and determine that each leg of the robot is in a supported state in response to the fact that the pressure data of each leg is greater than a set pressure value.
[0150] In one embodiment of this disclosure, the robot control device 1200 further includes: a second acquisition module 1250, used to acquire the robot's current speed information and acquire the speed difference between the target speed information and the current speed information; and a third determination module 1260, used to determine that the robot meets the step frequency switching condition when the absolute value of the speed difference is greater than a set value.
[0151] In one embodiment of this disclosure, the robot control device 1200 further includes: a third acquisition module 1270, used to acquire the robot's average speed and the maximum speed allowed by the target step frequency; and a fourth determination module 1280, used to determine that the robot meets the step frequency switching condition when the average speed is less than the maximum speed.
[0152] In one embodiment of this disclosure, the robot's control device 1200 further includes a control module 1290, used to control the robot to continue walking at the current step frequency in the next moment when the step frequency switching condition is not met.
[0153] In one embodiment of this disclosure, the adjustment module 1220 is further configured to: obtain the robot's speed values in multiple set directions based on the target speed information; determine the corresponding candidate step frequency based on the speed value in each direction; compare the candidate step frequencies corresponding to the multiple set directions, select the candidate step frequency with the fastest step frequency, and determine it as the target step frequency.
[0154] It should be noted that the foregoing explanation of the robot control method embodiment also applies to the robot control device of this embodiment, and will not be repeated here.
[0155] In this embodiment of the present disclosure, during the robot's walking process, the target speed information of the robot at the next moment is acquired, and the robot's step frequency is adjusted according to the target speed information and the robot's current state. In this embodiment of the present disclosure, when the robot needs to change speed during its walking process, the robot can automatically adjust its step frequency according to the speed at the next moment and the current state to change its walking speed and meet the needs of variable speed walking scenarios.
[0156] According to a third aspect of the present disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement the robot control method described above.
[0157] To implement the above embodiments, this disclosure also proposes a storage medium.
[0158] When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to execute the robot control method described above.
[0159] To implement the above embodiments, this disclosure also proposes a robot, including the robot control device proposed in the second aspect of this disclosure or the electronic device proposed in the third aspect of this disclosure, to implement the robot control method proposed in the first aspect of this disclosure.
[0160] Figure 13 This is a block diagram of an electronic device according to an exemplary embodiment. Figure 13 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0161] like Figure 13 As shown, the electronic device 1300 includes a processor 111, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 112 or a program loaded from memory 116 into random access memory (RAM) 113. The RAM 113 also stores various programs and data required for the operation of the electronic device 1300. The processor 111, ROM 112, and RAM 113 are interconnected via a bus 114. An input / output (I / O) interface 115 is also connected to the bus 114.
[0162] The following components are connected to I / O interface 115: memory 116 including hard disks, etc.; and communication section 117 including network interface cards such as LAN (Local Area Network) cards, modems, etc., which performs communication processing via a network such as the Internet; and driver 118 is also connected to I / O interface 115 as needed.
[0163] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 117. When the computer program is executed by processor 111, it performs the functions defined in the methods of this disclosure.
[0164] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, which can be executed by the processor 111 of the electronic device 1300 to perform the above-described method. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0165] In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wireline, optical fiber, RF, etc., or any suitable combination thereof.
[0166] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0167] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for controlling a robot, characterized in that, include: During the robot's movement, the target speed information of the robot at the next moment is obtained; Based on the target speed information, the target step frequency of the robot at the next moment is determined; Based on the robot's current state, determine whether the robot meets the step frequency switching condition, wherein the robot's current state includes at least one of the robot's current limb state, speed state, and posture state; When the step frequency switching condition is met, the robot is controlled to switch from the current step frequency to the target step frequency at the next moment.
2. The method according to claim 1, characterized in that, The method further includes: Determine whether each leg of the robot is in a supported state; When all legs of the robot are in a supported state, it is determined that the robot meets the step frequency switching condition.
3. The method according to claim 2, characterized in that, Determining whether each leg of the robot is in a supported state includes: Based on the robot's current step frequency, determine the landing time when all of the robot's legs touch the ground; In response to the robot's current moment reaching the landing moment, it is determined that all of the robot's legs are in a supporting state.
4. The method according to claim 2, characterized in that, Determining whether each leg of the robot is in a supported state includes: Obtain pressure data for each leg of the robot; In response to the fact that the pressure data of each leg is greater than the set pressure value, it is determined that each leg of the robot is in a supported state.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the robot's current speed information, and obtain the speed difference between the target speed information and the current speed information; When the absolute value of the speed difference is greater than a set value, the robot is determined to meet the step frequency switching condition.
6. The method according to any one of claims 1-4, characterized in that, The method further includes: Obtain the robot's average speed and the maximum speed allowed by the target step frequency; When the average speed is less than the maximum speed, it is determined that the robot meets the step frequency switching condition.
7. The method according to claim 1, characterized in that, The method further includes: If the step frequency switching condition is not met, the robot is controlled to continue walking at the current step frequency in the next moment.
8. The method according to claim 1, characterized in that, Determining the target step frequency of the robot at the next moment based on the target speed information includes: Based on the target speed information, the robot's speed values in multiple predetermined directions are obtained; Determine the corresponding candidate step frequency based on the velocity value in each direction; The candidate step frequencies corresponding to the multiple set directions are compared, and the candidate step frequency with the fastest step frequency is selected as the target step frequency.
9. A control device for a robot, characterized in that, include: The first acquisition module is used to acquire the target speed information of the robot at the next moment during the robot's walking process; The adjustment module is used to determine the target step frequency of the robot at the next moment based on the target speed information; Determine whether the robot meets the step frequency switching condition, wherein the current state of the robot includes at least one of the robot's current limb state, speed state, and posture state; based on the robot's current state, determine whether the robot meets the step frequency switching condition, wherein the robot's current state includes at least the robot's current limb state, speed state, and posture state; when the step frequency switching condition is met, control the robot to switch from the current step frequency to the target step frequency at the next moment.
10. The apparatus according to claim 9, characterized in that, The device further includes: The first determining module is used to determine whether each leg of the robot is in a supported state; The second determining module is used to determine that the robot meets the step frequency switching condition when all of the robot's legs are in a supported state.
11. The apparatus according to claim 10, characterized in that, The first determining module is further configured to: Based on the robot's current step frequency, determine the landing time when all of the robot's legs touch the ground; In response to the robot's current moment reaching the landing moment, it is determined that all of the robot's legs are in a supporting state.
12. The apparatus according to claim 10, characterized in that, in, The first determining module is further configured to: Obtain pressure data for each leg of the robot; In response to the fact that the pressure data of each leg is greater than the set pressure value, it is determined that each leg of the robot is in a supported state.
13. The apparatus according to any one of claims 9-12, characterized in that, The device further includes: The second acquisition module is used to acquire the current speed information of the robot and to acquire the speed difference between the target speed information and the current speed information; The third determining module is used to determine that the robot meets the step frequency switching condition when the absolute value of the speed difference is greater than a set value.
14. The apparatus according to any one of claims 9-12, characterized in that, The device further includes: The third acquisition module is used to acquire the robot's average speed and the maximum speed allowed by the target step frequency; The fourth determining module is used to determine that the robot meets the step frequency switching condition when the average speed is less than the maximum speed.
15. The apparatus according to claim 9, characterized in that, The device further includes: The control module is used to control the robot to continue walking at the current step frequency in the next moment if the step frequency switching condition is not met.
16. The apparatus according to claim 9, characterized in that, The adjustment module is also used for: Based on the target speed information, the robot's speed values in multiple predetermined directions are obtained; Determine the corresponding candidate step frequency based on the velocity value in each direction; The candidate step frequencies corresponding to the multiple set directions are compared, and the candidate step frequency with the fastest step frequency is selected as the target step frequency.
17. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the robot control method as described in any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the robot control method as described in any one of claims 1 to 8.
19. A robot, characterized in that, This includes the robot control device as described in any one of claims 9-16 or the electronic device as described in claim 17.