Motion control method and device, behavior tree, electronic device and storage medium

Through the subtree switching mechanism of the behavior tree, the robot can detect and recover abnormally when performing follow-up motion, solve the problems of damage or failure caused by follow-up motion abnormalities, and improve the stability and safety of the motion.

CN118322207BActive Publication Date: 2024-12-03BEIJING XIAOMI ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410565081.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-08
Publication Date
2024-12-03
Estimated Expiration
2044-05-08

AI Technical Summary

Technical Problem

When the robot performs a follow-up action, it causes damage or follow-up failure due to its own or environmental reasons.

Method used

Using the motion control method based on the behavior tree, the robot is controlled to perform preset motion and detect indicators through the first subtree. If an abnormality occurs, switch to the second subtree to perform abnormal recovery actions until the indicator returns to normal before continuing to perform preset motion. .

Benefits of technology

The stability and safety of the robot's movement are improved, and damage or motion failure caused by abnormalities is avoided. Real-time attention and timely recovery of the robot status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118322207B_ABST
    Figure CN118322207B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a motion control method and device, a behavior tree, an electronic device and a storage medium. The method comprises: controlling a robot to perform a preset motion based on a first subtree of a behavior tree, and detecting at least one indicator of the robot; in response to an abnormality in any indicator of the robot, performing an abnormal recovery action for any indicator based on a second subtree of the behavior tree and detecting any indicator, until any indicator returns to normal, controlling the robot to perform a preset motion based on the first subtree, and detecting at least one indicator of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of robotics technology, and in particular to a motion control method and device, a behavior tree, an electronic device, and a storage medium. Background Art

[0002] In recent years, the technology of robotics has been developing continuously, becoming more and more intelligent and automated, and the richness, stability and flexibility of actions have been improved to varying degrees. Current robots can not only complete periodic and repetitive actions such as sweeping and walking, but also perform following actions, that is, follow a target to move. However, in related technologies, when robots perform following actions, they often have abnormalities due to themselves or the environment, which can cause problems such as self-damage and following failure. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a motion control method and device, a behavior tree, an electronic device and a storage medium to solve the defects in the related art.

[0004] According to a first aspect of an embodiment of the present disclosure, a motion control method is provided, the method comprising:

[0005] Controlling the robot to perform a preset movement based on the first subtree of the behavior tree, and detecting at least one indicator of the robot;

[0006] In response to an abnormality in any indicator of the robot, an abnormal recovery action for any indicator is executed based on the second subtree of the behavior tree and any indicator is detected, until any indicator returns to normal, the robot is controlled to execute a preset movement based on the first subtree, and at least one indicator of the robot is detected.

[0007] In one embodiment of the present disclosure, the behavior tree includes a first control node and the first subtree and the second subtree under the first control node;

[0008] In response to any indicator of the robot being abnormal, executing a recovery action of any indicator and detecting any indicator based on the second subtree of the behavior tree, until any indicator returns to normal, controlling the robot to execute a preset movement based on the first subtree, and detecting at least one indicator of the robot, includes:

[0009] In response to the first subtree reporting an abnormality, the first control node controls the second subtree to detect at least one indicator of the robot and perform an abnormal recovery action for the abnormal indicator; and in response to the second subtree reporting a normal state, the first control node controls the first subtree to control the robot to perform a preset movement and detect at least one indicator of the robot.

[0010] In one embodiment of the present disclosure, the first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot;

[0011] The first subtree based on the behavior tree controls the robot to perform a preset movement and detects at least one indicator of the robot, including:

[0012] Each secondary subtree is executed alternately and cyclically based on the second control node to control the robot to execute a preset motion and detect at least one indicator of the robot.

[0013] In one embodiment of the present disclosure, a secondary subtree among the multiple secondary subtrees for controlling the robot to perform a preset motion and detecting at least one indicator of the robot includes a first decoration node, a third control node under the first decoration node, and a first action node and at least one detection node under the third control node, wherein the first decoration node is used to instruct the child node to keep running until failure is returned, the third control node is used to control the child node to execute in sequence and return the execution result to the parent node, the first action node is used to continuously execute the preset motion, and the detection node is used to detect an indicator of the robot.

[0014] In one embodiment of the present disclosure, the secondary subtree among the multiple secondary subtrees for detecting at least one indicator of the robot includes a third control node and at least one detection node under the third control node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator of the robot.

[0015] In one embodiment of the present disclosure, the secondary subtree for detecting at least one indicator of the robot among the multiple secondary subtrees further includes a second decoration node above the second control node, and the second decoration node is used to control the execution frequency of the subnode.

[0016] In one embodiment of the present disclosure, the first subtree of the behavior tree is used to control the robot to perform a preset motion and detect at least one indicator of the robot, including:

[0017] Controlling the robot to perform a preset movement based on the first subtree of the behavior tree, and detecting at least one first-category indicator and at least one second-category indicator of the robot;

[0018] In response to any indicator of the robot being abnormal, executing a recovery action for any indicator and detecting any indicator based on the second subtree of the behavior tree, until any indicator returns to normal, controlling the robot to execute a preset motion based on the first subtree, and detecting at least one indicator of the robot, including:

[0019] In response to an abnormality in any first-category indicator or the preset motion of the robot, an abnormal recovery action for any first-category indicator or the preset motion is executed based on the second subtree of the behavior tree, and any first-category indicator is detected, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

[0020] In one embodiment of the present disclosure, the method further includes:

[0021] In response to any second-category indicator of the robot being abnormal, the robot is controlled to perform a recovery action for any second-category indicator based on the first subtree.

[0022] In one embodiment of the present disclosure, there is a second action node under the detection node for detecting the second type of indicator of the secondary subtree, and the second action node is used to execute an abnormal recovery action of the indicator detected by the parent node;

[0023] In response to any second-category indicator of the robot being abnormal, controlling the robot to perform a recovery action for any first-category indicator based on the first subtree includes:

[0024] The detection node of the secondary subtree for detecting the second type of indicator controls the subnode to execute an abnormality recovery action for the detected second type of indicator in response to the detected second type of indicator being abnormal.

[0025] In one embodiment of the present disclosure, the second subtree includes a third control node, at least one detection node under the third control node, and a third action node under each detection node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator and control the child node to execute an abnormal recovery action for the detected indicator when the detected indicator is abnormal.

[0026] In one embodiment of the present disclosure, the first subtree is used to output an abnormality code of any indicator when any indicator is abnormal; the detection node of the second subtree is used to detect whether there is an abnormality code of the detected indicator to determine whether the detected indicator is abnormal.

[0027] In one embodiment of the present disclosure, the first subtree is used to control the robot to output a voice reminder when the abnormality degree of any indicator is greater than a first threshold and not greater than a second threshold, and to output an abnormality code of any indicator when the abnormality degree of any indicator is greater than the second threshold.

[0028] In one embodiment of the present disclosure, the preset motion includes a follow-up motion; the at least one indicator includes at least one of the following: motor status, target posture, obstacle, whether to fall, target posture, and trajectory status.

[0029] According to a second aspect of an embodiment of the present disclosure, a motion control device is provided, the device comprising:

[0030] A detection module, used to control the robot to perform a preset movement based on the first subtree of the behavior tree, and detect at least one indicator of the robot;

[0031] An abnormality recovery module is used to respond to an abnormality of any indicator of the robot, execute an abnormality recovery action of any indicator based on the second subtree of the behavior tree and detect any indicator, until any indicator returns to normal, control the robot to perform a preset movement based on the first subtree, and detect at least one indicator of the robot.

[0032] In one embodiment of the present disclosure, the behavior tree includes a first control node and the first subtree and the second subtree under the first control node;

[0033] The abnormal recovery module is used for:

[0034] In response to the first subtree reporting an abnormality, the first control node controls the second subtree to detect at least one indicator of the robot and perform an abnormal recovery action for the abnormal indicator; and in response to the second subtree reporting a normal state, the first control node controls the first subtree to control the robot to perform a preset movement and detect at least one indicator of the robot.

[0035] In one embodiment of the present disclosure, the first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot;

[0036] The detection module is used for:

[0037] Each secondary subtree is executed alternately and cyclically based on the second control node to control the robot to execute a preset motion and detect at least one indicator of the robot.

[0038] In one embodiment of the present disclosure, a secondary subtree among the multiple secondary subtrees for controlling the robot to perform a preset motion and detecting at least one indicator of the robot includes a first decoration node, a third control node under the first decoration node, and a first action node and at least one detection node under the third control node, wherein the first decoration node is used to instruct the child node to keep running until failure is returned, the third control node is used to control the child node to execute in sequence and return the execution result to the parent node, the first action node is used to continuously execute the preset motion, and the detection node is used to detect an indicator of the robot.

[0039] In one embodiment of the present disclosure, the secondary subtree among the multiple secondary subtrees for detecting at least one indicator of the robot includes a third control node and at least one detection node under the third control node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator of the robot.

[0040] In one embodiment of the present disclosure, the secondary subtree for detecting at least one indicator of the robot among the multiple secondary subtrees further includes a second decoration node above the second control node, and the second decoration node is used to control the execution frequency of the subnode.

[0041] In one embodiment of the present disclosure, the detection module is used to:

[0042] Controlling the robot to perform a preset movement based on the first subtree of the behavior tree, and detecting at least one first-category indicator and at least one second-category indicator of the robot;

[0043] The abnormal recovery module is used for:

[0044] In response to an abnormality in any first-category indicator or the preset motion of the robot, an abnormal recovery action for any first-category indicator or the preset motion is executed based on the second subtree of the behavior tree, and any first-category indicator is detected, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

[0045] In one embodiment of the present disclosure, the device further includes a self-recovery module, which is used to:

[0046] In response to any second-category indicator of the robot being abnormal, the robot is controlled to perform a recovery action for any second-category indicator based on the first subtree.

[0047] In one embodiment of the present disclosure, there is a second action node under the detection node for detecting the second type of indicator of the secondary subtree, and the second action node is used to execute an abnormal recovery action of the indicator detected by the parent node;

[0048] The self-recovery module is used for:

[0049] The detection node of the secondary subtree for detecting the second type of indicator controls the subnode to execute an abnormality recovery action for the detected second type of indicator in response to the detected second type of indicator being abnormal.

[0050] In one embodiment of the present disclosure, the second subtree includes a third control node, at least one detection node under the third control node, and a third action node under each detection node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator and control the child node to execute an abnormal recovery action for the detected indicator when the detected indicator is abnormal.

[0051] In one embodiment of the present disclosure, the first subtree is used to output an abnormality code of any indicator when any indicator is abnormal; the detection node of the second subtree is used to detect whether there is an abnormality code of the detected indicator to determine whether the detected indicator is abnormal.

[0052] In one embodiment of the present disclosure, the first subtree is used to control the robot to output a voice reminder when the abnormality degree of any indicator is greater than a first threshold and not greater than a second threshold, and to output an abnormality code of any indicator when the abnormality degree of any indicator is greater than the second threshold.

[0053] In one embodiment of the present disclosure, the preset motion includes a follow-up motion; the at least one indicator includes at least one of the following: motor status, target posture, obstacle, whether to fall, target posture, and trajectory status.

[0054] According to a third aspect of an embodiment of the present disclosure, a behavior tree is provided, the behavior tree comprising a first control node and a first subtree and a second subtree under the first control node;

[0055] The first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot;

[0056] The second subtree includes a third control node, at least one detection node under the second control node, and a third action node under each detection node, wherein the detection node is used to detect an indicator and control the subnode to perform an abnormal recovery action for the detected indicator when the detected indicator is abnormal;

[0057] Among them, the first control node is used to control the first subtree to continue to run and report the status, control the second subtree to continue to run and report the status in response to the first subtree reporting an abnormality, and control the first subtree to run and report the status in response to the second subtree reporting a normal state; the second control node is used to control the child nodes to execute alternately and cyclically; the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node.

[0058] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the motion control method provided in any embodiment of the first aspect when executing the computer instructions.

[0059] According to a fifth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.

[0060] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0061] The motion control method provided by the embodiment of the present disclosure sets a behavior tree, and controls the robot to perform a preset motion, such as a follow-up motion, based on the first subtree of the behavior tree, and detects at least one indicator of the robot, and can perform an abnormal recovery action of the abnormal indicator based on the second subtree of the behavior tree when any indicator is abnormal, and continue to move and detect normally based on the first subtree after returning to normal. Because the behavior tree can summarize and identify abnormal situations, and can accurately trigger corresponding abnormal recovery actions according to the abnormal recovery strategy when an abnormality occurs, it is possible to pay attention to the status of the robot in real time when it is moving, and recover in time when an abnormality occurs, thereby avoiding problems such as damage to the robot itself or movement failure. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0063] Figure 1 is a schematic diagram of a behavior tree structure shown in an exemplary embodiment of the present disclosure;

[0064] Figure 2 is a flow chart of a motion control method shown in an exemplary embodiment of the present disclosure;

[0065] Figure 3 is a structural schematic diagram of a motion control device shown in an exemplary embodiment of the present disclosure;

[0066] Figure 4It is a structural block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0067] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0068] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0069] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0070] In recent years, the technology of robotics has been developing continuously, becoming more and more intelligent and automated, and the richness, stability and flexibility of actions have been improved to varying degrees. Current robots can not only complete periodic and repetitive actions such as sweeping and walking, but also perform following actions, that is, follow a target to move. However, in related technologies, when robots perform following actions, they often have abnormalities due to themselves or the environment, which can cause problems such as self-damage and following failure.

[0071] Based on this, on the first aspect, at least one embodiment of the present disclosure provides a behavior tree applied to robot control, which can control the robot to move, and when an abnormality occurs during the robot's movement, it can alarm, perform abnormal recovery actions, etc., thereby avoiding long-term continuous abnormalities of the robot due to its own or environmental reasons, and improving the stability and safety of the robot's movement.

[0072] Please refer to the attached Figure 1, which exemplarily shows the structure diagram of the behavior tree, which is used to control the robot to perform following motion, and to alarm and perform abnormal recovery actions when an abnormality occurs during the robot's following motion, thereby ensuring the stability and safety of the following motion. Figure 1 The structure of the behavior tree of the present disclosure is described in detail. Figure 1 The behavior tree provided in the present disclosure is not limited in structure.

[0073] The behavior tree includes a root node, a first control node under the root node, and a first subtree and a second subtree under the first control node.

[0074] The first control node is introduced in detail below.

[0075] The first control node is a control node, which is used to control the execution mode of the first subtree and the second subtree. For example, the first control node is used to control the first subtree to continue to run and report the status, to control the second subtree to continue to run and report the status in response to the first subtree reporting an abnormality, and to control the first subtree to run and report the status in response to the second subtree reporting a normal state. Moreover, the first control node can set the number of abnormal tolerance times for the second subtree. If the number of abnormalities reported by the second subtree is less than or equal to the above-mentioned abnormal tolerance times, the second subtree continues to execute. If the number of abnormalities reported by the second subtree is greater than the above-mentioned abnormal tolerance times, the execution of the behavior tree is stopped. Exemplarily, the first control node can be attached Figure 1 The Recovery node shown in .

[0076] The first subtree is introduced in detail below.

[0077] The first subtree includes a second control node and multiple secondary subtrees under the second control node, one of the multiple secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot. The second control node is used to control the subnodes to execute alternately and cyclically.

[0078] The second control node is a control node, which is used to control the execution mode of multiple secondary subtrees under it, for example, to control multiple secondary subtrees under it to execute alternately and cyclically, and the stopping condition of the alternate cyclic execution is that any secondary subtree fails to report; in other words, if each secondary subtree reports normal or is running, the second control node continues to control the multiple secondary subtrees under it to execute alternately and cyclically, and reports normal to its parent node, the first control node. Exemplarily, the second control node can be attached Figure 1 The Pileline Sequence node shown in .

[0079] Among them, the secondary subtree among the multiple secondary subtrees used to control the robot to perform preset movements and detect at least one indicator of the robot includes a first decoration node, a third control node under the first decoration node, and a first action node and at least one detection node under the third control node, wherein the first decoration node is used to instruct the child node to keep running until failure is returned, the third control node is used to control the child node to execute in sequence and return the execution result to the parent node, the first action node is used to continuously execute the preset movement, and the detection node is used to detect an indicator of the robot.

[0080] Attach Figure 1 Taking the behavior tree shown as an example, the second-level subtree on the right of the two second-level subtrees of the first subtree is used to control the robot to execute preset movements and detect at least one indicator of the robot. The third control node of the second-level subtree is a Sequence node. Under the Sequence node, there is a first action node that executes the control of the regulation algorithm (the node can plan the motion trajectory based on the regulation algorithm, and control the robot to move according to the motion trajectory. The node can also detect whether the trajectory output by the regulation algorithm is normal, and report to the Sequence node when it is abnormal. In other words, the node can also detect the trajectory state output by the regulation algorithm. This indicator) and an obstacle detection node for detecting obstacles (such as whether there is an obstacle and the positional relationship between the obstacle and the robot, etc.), and a fall detection node for detecting whether a fall occurs.

[0081] Among the multiple secondary subtrees, the secondary subtree for detecting at least one indicator of the robot includes a third control node and at least one detection node under the third control node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator of the robot. Exemplarily, the secondary subtree for detecting at least one indicator of the robot among the multiple secondary subtrees also includes a second decoration node above the second control node, and the second decoration node is used to control the execution frequency of the child nodes.

[0082] Attach Figure 1Taking the behavior tree shown as an example, the second-level subtree on the left of the two second-level subtrees of the first subtree is used to detect at least one indicator of the robot, and the third control node of the second-level subtree is a Sequence node. The Sequence node is provided with a frequency control decoration node for controlling the execution frequency of the Sequence node, and the Sequence node is provided with a motor state detection node for detecting the motor state (for example, the node is used to detect whether the motor is in an abnormal state such as overheating) and a target detection node for detecting the target posture (i.e. the posture of the tracked target). It should be understood that an action node for updating the tracking target posture can be provided under the target detection node, and the action node can transform the target posture detected by the target detection node into the robot's following coordinate system, and send the converted target posture to the first action node, so that the regulation and control algorithm plans the following trajectory based on the target posture.

[0083] The second decoration node can control the detection frequency of the secondary subtree where it is located to adapt to the index of its detection, so as to ensure the timeliness of detection and avoid energy waste caused by too frequent detection. Preferably, multiple indicators with similar detection frequencies, especially lower detection frequencies, are allocated to the secondary subtree where the second decoration node is located.

[0084] Preferably, an action node for selecting motion parameters can be set under the third control node of any secondary subtree of the first subtree, so that the motion parameters can be updated in time. Figure 1 An action node for selecting a following distance is provided in the secondary subtree on the left side of the figure, so that the target can be tracked according to the latest following distance when the following distance is updated.

[0085] Exemplarily, the at least one indicator detected by the first subtree may include at least one first-category indicator and at least one second-category indicator. Figure 1 Taking the behavior tree shown as an example, the motor state, target posture, and trajectory state detected by the first subtree are the first type of indicators, and the obstacles and whether to fall detected by the second subtree are the second type of indicators.

[0086] Based on this, in response to any first-category indicator or the preset motion of the robot being abnormal, the behavior tree executes the abnormal recovery action of any first-category indicator or the preset motion based on the second subtree of the behavior tree and detects any first-category indicator, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected. Figure 1Taking the behavior tree shown as an example, when the first subtree detects abnormal motor status, abnormal target posture (for example, the tracking target disappears) or abnormal trajectory status, it will report the abnormality to the first control node. The first control node will control the second subtree to perform abnormal recovery actions for the abnormal indicators and report normal to the first control node when it detects that the abnormal indicators are normal. The first control node controls the first subtree to continue execution.

[0087] Based on this, the behavior tree responds to any abnormality of the second-category indicator of the robot, and controls the robot to perform a recovery action for any of the second-category indicators based on the first subtree. For example, there is a second action node under the detection node for detecting the second-category indicator of the secondary subtree, and the second action node is used to perform an abnormal recovery action for the indicator detected by the parent node; then the detection node for detecting the second-category indicator of the secondary subtree responds to the abnormality of the detected second-category indicator and controls the child node to perform an abnormal recovery action for the detected second-category indicator. Figure 1 Taking the behavior tree shown as an example, a second action node for switching the speed gear of the robot is provided under the obstacle detection node of the first subtree. When the obstacle detection node detects the existence of an obstacle, it will control the execution of the second action node under it to reduce the speed gear of the robot or make an emergency stop, and when it is detected that the obstacle disappears, it will control the execution of the second action node under it to restore the speed gear of the robot; under the fall detection node of the first subtree, there is a decoration node for keeping running until success and a second action node under the decoration node for entering enhanced standing and voice interaction reminder. When the fall detection node detects that the robot falls, it will control the execution of the decoration node under it, and after the decoration node runs, it will control the execution of the second action node under it to enter enhanced standing and make a language interaction reminder, until the second action node succeeds in enhanced standing and reports success, and the decoration node controls the second action node to stop running.

[0088] The second subtree is introduced in detail below.

[0089] The second subtree includes a third control node, at least one detection node under the third control node, and a condition node or a third action node under each detection node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator and, if the detected indicator is abnormal, control the child node (third action node) to execute the abnormal recovery action of the detected indicator or control the child node (condition node) to determine whether the detected indicator has returned to normal.

[0090] When the second subtree is controlled and operated by the first control node, its third control node will control each detection node in turn to detect whether its corresponding indicator is abnormal. If it is abnormal, it will control the third action node under it to perform the abnormal recovery action of the indicator. If it is normal, it will report normal to the third control node. When all detection nodes report normal, the third control node reports normal to the first control node, and the first control node can control the first subtree to resume operation.

[0091] Attach Figure 1 Taking the behavior tree shown as an example, the third control node of the second subtree is a Sequence node, and under the Sequence node are a motor abnormality detection node for detecting whether the motor state is abnormal, a target abnormality detection node for detecting whether the tracking target is lost, and a trajectory abnormality detection node for detecting whether the tracking trajectory is abnormal. Under the motor abnormality detection node, there is a condition node for judging whether the motor has returned to normal, under the target abnormality detection node, there is a third action node for making the robot rotate in place to find the target, and under the trajectory abnormality detection node, there is a third action node for clearing the cost map.

[0092] Exemplarily, the first subtree can notify the second subtree of the abnormal indicator in the following manner: the first subtree is used to output the abnormal code of any indicator when any indicator is abnormal; the detection node of the second subtree is used to detect whether there is an abnormal code of the detected indicator to determine whether the detected indicator is abnormal.

[0093] Attach Figure 1 Taking the behavior tree shown as an example, when the first subtree detects abnormal motor state, abnormal target posture (for example, target disappears) or abnormal trajectory state, it will not only report the abnormality to the first control node, but also output the corresponding abnormality code to the blackboard, namely, the motor state abnormality code, the target posture abnormality code, and the trajectory state abnormality code; when the first control node controls the execution of the second subtree, the motor abnormality detection node of the second subtree will detect whether there is a motor state abnormality code to determine the motor state, the target abnormality detection node will detect whether there is a target posture abnormality code to determine whether the tracking target is lost, and the trajectory abnormality detection node will detect whether there is a trajectory state abnormality code to determine whether the tracking trajectory is normal.

[0094] Preferably, the first subtree is used to control the robot to output a voice reminder when the abnormality level of any indicator is greater than the first threshold and not greater than the second threshold, and to output the abnormality code of any indicator or trigger the subnode to perform an abnormal recovery action when the abnormality level of any indicator is greater than the second threshold. In other words, the first subtree can choose to output a voice reminder for alarm or output an abnormality code to trigger abnormal recovery according to the degree of abnormality. It should be understood that the first threshold and the second threshold of some indicators are different so that the abnormality level is compatible with the processing strategy, and the first threshold and the second threshold of some indicators are the same so that the abnormality level can be recovered in time (when the first threshold and the second threshold are the same, a voice reminder and / or abnormality code output can be triggered (controlling the subnode to perform an abnormal recovery action)). Figure 1 Taking the behavior tree shown as an example, for the trajectory state detected by the first subtree, the first threshold and the second threshold are the same, and the trajectory state abnormality code is output when the abnormality reaches the threshold; for the motor state detected by the first subtree, the first threshold and the second threshold are the same, and the motor state abnormality code is output when the abnormality reaches the threshold; for the target posture detected by the first subtree, the first threshold and the second threshold are different, and when the tracking target is far away from the robot, it is determined that the abnormality reaches the first threshold, and the interactive voice is output, and when the tracking target is lost, it is determined that the abnormality reaches the second threshold, and the target posture abnormality code is output; for the obstacle detected by the first subtree, the first threshold and the second threshold are different, and when the abnormality (the abnormality is measured by the distance between the obstacle and the robot) reaches the first threshold, its child node is controlled to lower the gear, and when it reaches the second threshold, its child node is controlled to stop suddenly; for whether the first subtree detects a fall, the first threshold and the second threshold are the same, and when the abnormality reaches the threshold, its child node is controlled to perform enhanced standing.

[0095] Since the behavior tree provided by the present disclosure can summarize and identify abnormal situations, and can accurately trigger corresponding abnormal recovery actions according to the abnormal recovery strategy when an abnormality occurs, it is possible to pay attention to the status of the robot in real time when it is moving, and recover in time when an abnormality occurs, thereby avoiding damage to the robot itself, or movement failure and other problems.

[0096] Based on this, in the second aspect, at least one embodiment of the present disclosure provides a motion control method, which can perform motion control on the robot based on the behavior tree provided in the first aspect, or based on other behavior trees, and can pay attention to the status of the robot in real time when it moves, and recover in time when an abnormality occurs, thereby avoiding damage to the robot itself, or movement failure and other problems.

[0097] Please refer to the attached Figure 2 , which exemplarily shows a flow chart of the method, including steps S201 to S202.

[0098] In step S201 , the robot is controlled to perform a preset motion based on the first subtree of the behavior tree, and at least one indicator of the robot is detected.

[0099] Taking the behavior tree provided in the first aspect as an example, this step can be based on the second control node of the first subtree to alternately and cyclically execute each secondary subtree thereof to control the robot to perform a preset movement and detect at least one indicator of the robot.

[0100] Exemplarily, this step can control the robot to perform a preset movement based on the first subtree of the behavior tree, and detect at least one first-category indicator and at least one second-category indicator of the robot.

[0101] In step S202, in response to any indicator of the robot being abnormal, an abnormal recovery action for any indicator is executed based on the second subtree of the behavior tree and any indicator is detected, until any indicator returns to normal, the robot is controlled to execute a preset movement based on the first subtree, and at least one indicator of the robot is detected.

[0102] Taking the behavior tree provided in the first aspect as an example, in this step, the first control node can respond to the first subtree reporting an abnormality, control the second subtree to detect at least one indicator of the robot and perform an abnormal recovery action for the abnormal indicator, and respond to the second subtree reporting a normal state, control the first subtree to control the robot to perform a preset movement and detect at least one indicator of the robot.

[0103] Exemplarily, this step can respond to any first-category indicator of the robot or the preset motion being abnormal, execute the abnormal recovery action of any first-category indicator or the preset motion based on the second subtree of the behavior tree and detect any first-category indicator, until any first-category indicator returns to normal, then control the robot to execute the preset motion based on the first subtree and detect at least one indicator of the robot.

[0104] Correspondingly, in response to any second-category indicator of the robot being abnormal, the robot can be controlled based on the first subtree to perform a recovery action for any second-category indicator. Taking the behavior tree provided in the first aspect as an example, the detection node for detecting the second-category indicator of the secondary subtree can control the subnode to perform an abnormal recovery action for the detected second-category indicator in response to the detected second-category indicator being abnormal.

[0105] Exemplarily, the first subtree is used to output an abnormality code of any indicator when any indicator is abnormal; for example, the first subtree is used to control the robot to output a voice reminder when the abnormality degree of any indicator is greater than a first threshold and not greater than a second threshold, and to output an abnormality code of any indicator when the abnormality degree of any indicator is greater than the second threshold.

[0106] Correspondingly, the detection node of the second subtree is used to detect whether there is an abnormal code of the detected indicator to determine whether the detected indicator is abnormal.

[0107] Next, combine with Figure 1 The behavior tree shown is used as an example to further introduce this method.

[0108] In the method, the preset motion includes a follow-up motion; the at least one indicator includes at least one of the following: motor status, target posture, obstacle, whether to fall, and trajectory status.

[0109] If the motor status detection node in the secondary subtree to the left of the first subtree detects that the motor temperature is too high, it will stop following the movement, output interactive voice, and output a motor status abnormality code; then the abnormality will be reported to the Recovery node step by step, and the Recovery node will control the operation of the second subtree. The motor abnormality detection node of the second subtree will detect the motor status abnormality code and control the child node to determine whether the motor status has returned to normal. If normal, it will report normal to its parent node, Sequence node, so that the Sequence node will report normal to the Recovery node when its three child nodes all report normal, so that the Recovery node can control the first subtree to resume operation.

[0110] If the target posture detection node in the secondary subtree on the left side of the first subtree detects that the tracking target is too far away from the robot, it will output interactive voice and continue to follow the movement; if the target posture detection node in the secondary subtree on the left side of the first subtree detects that the tracking target is lost, it will stop following the movement, output interactive voice, and output the target posture abnormality code; then the abnormality will be reported to the Recovery node step by step, and the Recovery node will control the operation of the second subtree. The target abnormality detection node of the second subtree will detect the target posture abnormality code and control the child node to perform abnormal recovery action - the robot rotates in place to find the target until the tracking target is found. It will report normal to its parent node Sequence node, so that the Sequence node will report normal to the Recovery node when its three child nodes all report normal, so that the Recovery node controls the first subtree to resume operation.

[0111] If the obstacle detection node in the secondary subtree to the right of the first subtree detects an obstacle, and the obstacle is far away from the robot, the obstacle detection node will control its child nodes to switch the robot speed gear, and transmit the switched gear to the first action node for use by the regulation and control algorithm; if the obstacle detection node in the secondary subtree to the right of the first subtree detects an obstacle, and the obstacle is close to the robot, the obstacle detection node will output interactive voice, control its child nodes to make the robot stop urgently, and transmit the emergency stop result to the first action node for use by the regulation and control algorithm.

[0112] If the fall detection node in the secondary subtree to the right of the first subtree detects that the robot falls, the fall detection node can control its child nodes to enter enhanced standing and output voice reminders until the robot successfully stands up.

[0113] If the first action node in the secondary subtree to the right of the first subtree detects a tracking trajectory abnormality, it stops following the motion and outputs a trajectory status abnormality code; then the abnormality is reported to the Recovery node step by step, and the Recovery node controls the operation of the second subtree. The trajectory abnormality detection node of the second subtree detects the trajectory status abnormality code and controls the child node to perform abnormal recovery action - clear the cost map, and report normal to its parent node Sequence node, so that the Sequence node reports normal to the Recovery node when its three child nodes all report normal, so that the Recovery node controls the first subtree to resume operation.

[0114] The motion control method provided by the embodiment of the present disclosure sets a behavior tree, and controls the robot to perform a preset motion, such as a follow-up motion, based on the first subtree of the behavior tree, and detects at least one indicator of the robot, and can perform an abnormal recovery action of the abnormal indicator based on the second subtree of the behavior tree when any indicator is abnormal, and continue to move and detect normally based on the first subtree after returning to normal. Because the behavior tree can summarize and identify abnormal situations, and can accurately trigger corresponding abnormal recovery actions according to the abnormal recovery strategy when an abnormality occurs, it is possible to pay attention to the status of the robot in real time when it is moving, and recover in time when an abnormality occurs, thereby avoiding problems such as damage to the robot itself or movement failure.

[0115] According to a third aspect of the present disclosure, a motion control device is provided. Figure 3 , the device comprises:

[0116] A detection module 301 is used to control the robot to perform a preset movement based on the first subtree of the behavior tree, and detect at least one indicator of the robot;

[0117] The abnormality recovery module 302 is used to respond to any abnormality of any indicator of the robot, execute the abnormality recovery action of any indicator based on the second subtree of the behavior tree and detect any indicator, until any indicator returns to normal, control the robot to perform a preset movement based on the first subtree, and detect at least one indicator of the robot.

[0118] In one embodiment of the present disclosure, the behavior tree includes a first control node and the first subtree and the second subtree under the first control node;

[0119] The abnormal recovery module is used for:

[0120] In response to the first subtree reporting an abnormality, the first control node controls the second subtree to detect at least one indicator of the robot and perform an abnormal recovery action for the abnormal indicator; and in response to the second subtree reporting a normal state, the first control node controls the first subtree to control the robot to perform a preset movement and detect at least one indicator of the robot.

[0121] In one embodiment of the present disclosure, the first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot;

[0122] The detection module is used for:

[0123] Each secondary subtree is executed alternately and cyclically based on the second control node to control the robot to execute a preset motion and detect at least one indicator of the robot.

[0124] In one embodiment of the present disclosure, a secondary subtree among the multiple secondary subtrees for controlling the robot to perform a preset motion and detecting at least one indicator of the robot includes a first decoration node, a third control node under the first decoration node, and a first action node and at least one detection node under the third control node, wherein the first decoration node is used to instruct the child node to keep running until failure is returned, the third control node is used to control the child node to execute in sequence and return the execution result to the parent node, the first action node is used to continuously execute the preset motion, and the detection node is used to detect an indicator of the robot.

[0125] In one embodiment of the present disclosure, the secondary subtree among the multiple secondary subtrees for detecting at least one indicator of the robot includes a third control node and at least one detection node under the third control node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator of the robot.

[0126] In one embodiment of the present disclosure, the secondary subtree for detecting at least one indicator of the robot among the multiple secondary subtrees further includes a second decoration node above the second control node, and the second decoration node is used to control the execution frequency of the subnode.

[0127] In one embodiment of the present disclosure, the detection module is used to:

[0128] Controlling the robot to perform a preset movement based on the first subtree of the behavior tree, and detecting at least one first-category indicator and at least one second-category indicator of the robot;

[0129] The abnormal recovery module is used for:

[0130] In response to an abnormality in any first-category indicator or the preset motion of the robot, an abnormal recovery action for any first-category indicator or the preset motion is executed based on the second subtree of the behavior tree, and any first-category indicator is detected, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

[0131] In one embodiment of the present disclosure, the device further includes a self-recovery module, which is used to:

[0132] In response to any second-category indicator of the robot being abnormal, the robot is controlled to perform a recovery action for any second-category indicator based on the first subtree.

[0133] In one embodiment of the present disclosure, there is a second action node under the detection node for detecting the second type of indicator of the secondary subtree, and the second action node is used to execute an abnormal recovery action of the indicator detected by the parent node;

[0134] The self-recovery module is used for:

[0135] The detection node of the secondary subtree for detecting the second type of indicator controls the subnode to execute an abnormality recovery action for the detected second type of indicator in response to the detected second type of indicator being abnormal.

[0136] In one embodiment of the present disclosure, the second subtree includes a third control node, at least one detection node under the third control node, and a third action node under each detection node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator and control the child node to execute an abnormal recovery action for the detected indicator when the detected indicator is abnormal.

[0137] In one embodiment of the present disclosure, the first subtree is used to output an abnormality code of any indicator when any indicator is abnormal; the detection node of the second subtree is used to detect whether there is an abnormality code of the detected indicator to determine whether the detected indicator is abnormal.

[0138] In one embodiment of the present disclosure, the first subtree is used to control the robot to output a voice reminder when the abnormality degree of any indicator is greater than a first threshold and not greater than a second threshold, and to output an abnormality code of any indicator when the abnormality degree of any indicator is greater than the second threshold.

[0139] In one embodiment of the present disclosure, the preset motion includes a follow-up motion; the at least one indicator includes at least one of the following: motor status, target posture, obstacle, whether to fall, target posture, and trajectory status.

[0140] According to a fourth aspect of the present disclosure, an electronic device is provided. Figure 4 The electronic device includes a memory and a processor, wherein the memory is used to store computer instructions that can be executed on the processor, and the processor is used to implement the motion control method provided in any of the above embodiments when executing the computer instructions.

[0141] The electronic device may be a terminal, a robot, etc.

[0142] In a fifth aspect, at least one embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the motion control method provided by any of the above embodiments.

[0143] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0144] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A motion control method, It is characterized in that The method comprises: Controlling the robot to perform a preset movement based on the first subtree of the behavior tree, and detecting at least one indicator of the robot, wherein the at least one indicator includes at least one first-category indicator and at least one second-category indicator; In response to any indicator of the robot being abnormal, executing an abnormal recovery action for any indicator based on the second subtree of the behavior tree and detecting any indicator, until any indicator returns to normal, controlling the robot to execute a preset motion based on the first subtree and detecting at least one indicator of the robot; Wherein, in response to any indicator of the robot being abnormal, executing a recovery action of any indicator and detecting any indicator based on the second subtree of the behavior tree, until any indicator returns to normal, controlling the robot to execute a preset movement based on the first subtree, and detecting at least one indicator of the robot, includes: In response to an abnormality in any first-category indicator or the preset motion of the robot, an abnormal recovery action for any first-category indicator or the preset motion is executed based on the second subtree of the behavior tree, and any first-category indicator is detected, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

2. The motion control method according to claim 1, It is characterized in that The behavior tree includes a first control node and the first subtree and the second subtree under the first control node; In response to any indicator of the robot being abnormal, executing a recovery action of any indicator and detecting any indicator based on the second subtree of the behavior tree, until any indicator returns to normal, controlling the robot to execute a preset movement based on the first subtree, and detecting at least one indicator of the robot, includes: In response to the first subtree reporting an abnormality, the first control node controls the second subtree to detect at least one indicator of the robot and perform an abnormal recovery action for the abnormal indicator; and in response to the second subtree reporting a normal state, the first control node controls the first subtree to control the robot to perform a preset movement and detect at least one indicator of the robot.

3. The motion control method according to claim 1, It is characterized in that The first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot; The first subtree based on the behavior tree controls the robot to perform a preset movement and detects at least one indicator of the robot, including: Each secondary subtree is executed alternately and cyclically based on the second control node to control the robot to execute a preset motion and detect at least one indicator of the robot.

4. The motion control method according to claim 3, It is characterized in that The secondary subtree among the multiple secondary subtrees used to control the robot to perform preset movements and detect at least one indicator of the robot includes a first decoration node, a third control node under the first decoration node, and a first action node and at least one detection node under the third control node, wherein the first decoration node is used to instruct the child node to keep running until failure is returned, the third control node is used to control the child node to execute in sequence and return the execution result to the parent node, the first action node is used to continuously execute the preset movement, and the detection node is used to detect an indicator of the robot.

5. The motion control method according to claim 3, It is characterized in that The secondary subtree among the multiple secondary subtrees used to detect at least one indicator of the robot includes a third control node and at least one detection node under the third control node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator of the robot.

6. The motion control method according to claim 5, It is characterized in that The secondary subtree used to detect at least one indicator of the robot among the multiple secondary subtrees further includes a second decoration node above the second control node, and the second decoration node is used to control the execution frequency of the subnode.

7. The motion control method according to claim 3, It is characterized in that The first subtree based on the behavior tree controls the robot to perform a preset movement and detects at least one indicator of the robot, including: The robot is controlled to execute a preset movement based on the first subtree of the behavior tree, and at least one first-category indicator and at least one second-category indicator of the robot are detected.

8. The motion control method according to claim 7, It is characterized in that The method further comprises: In response to any second-category indicator of the robot being abnormal, the robot is controlled based on the first subtree to perform a recovery action for any second-category indicator.

9. The motion control method according to claim 8, It is characterized in that A second action node exists under the detection node of the secondary subtree for detecting the second type of indicator, and the second action node is used to execute an abnormal recovery action of the indicator detected by the parent node; In response to any second-category indicator of the robot being abnormal, controlling the robot to perform a recovery action for any first-category indicator based on the first subtree includes: The detection node of the secondary subtree for detecting the second type of indicator controls the subnode to execute an abnormality recovery action for the detected second type of indicator in response to the detected second type of indicator being abnormal.

10. The motion control method according to claim 2 or 3, It is characterized in that The second subtree includes a third control node, at least one detection node under the third control node, and a third action node under each detection node, wherein the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node, and the detection node is used to detect an indicator and control the child node to execute the abnormal recovery action of the detected indicator when the detected indicator is abnormal.

11. The motion control method according to claim 10, It is characterized in that The first subtree is used to output an abnormality code of any indicator when any indicator is abnormal; the detection node of the second subtree is used to detect whether there is an abnormality code of the detected indicator to determine whether the detected indicator is abnormal.

12. The motion control method according to claim 11, It is characterized in that The first subtree is used to control the robot to output a voice reminder when the abnormality degree of any indicator is greater than a first threshold and not greater than a second threshold, and to output an abnormality code of any indicator when the abnormality degree of any indicator is greater than the second threshold.

13. The motion control method according to claim 1, It is characterized in that The preset motion includes a follow-up motion; the at least one indicator includes at least one of the following: motor status, target posture, obstacle, whether to fall, target posture, and trajectory status.

14. A motion control device, It is characterized in that The device comprises: A detection module, used to control the robot to perform a preset movement based on the first subtree of the behavior tree, and detect at least one indicator of the robot, wherein the at least one indicator includes at least one first-category indicator and at least one second-category indicator; an abnormality recovery module, configured to, in response to an abnormality of any indicator of the robot, execute an abnormality recovery action of any indicator based on the second subtree of the behavior tree and detect any indicator, until any indicator returns to normal, control the robot to execute a preset motion based on the first subtree, and detect at least one indicator of the robot; The abnormal recovery module is specifically used for: In response to an abnormality in any first-category indicator or the preset motion of the robot, an abnormal recovery action for any first-category indicator or the preset motion is executed based on the second subtree of the behavior tree, and any first-category indicator is detected, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

15. A behavior tree, It is characterized in that The behavior tree includes a first control node and a first subtree and a second subtree under the first control node; The first subtree includes a second control node and a plurality of secondary subtrees under the second control node, one of the plurality of secondary subtrees is used to control the robot to perform a preset motion and detect at least one indicator of the robot, and the other secondary subtrees are used to detect at least one indicator of the robot; The second subtree includes a third control node, at least one detection node under the second control node, and a third action node under each detection node, wherein the detection node is used to detect an indicator and control the subnode to perform an abnormal recovery action for the detected indicator when the detected indicator is abnormal; The first control node is used to control the first subtree to continue to run and report the status, control the second subtree to continue to run and report the status in response to the first subtree reporting an abnormality, and control the first subtree to run and report the status in response to the second subtree reporting a normal state; the second control node is used to control the child nodes to execute alternately and cyclically; the third control node is used to control the child nodes to execute in sequence and return the execution results to the parent node; Among them, the at least one indicator detected by the first subtree includes at least one first-category indicator and at least one second-category indicator. In response to any first-category indicator or the preset motion abnormality of the robot, the behavior tree executes the abnormal recovery action of any first-category indicator or the preset motion based on the second subtree of the behavior tree and detects any first-category indicator, until any first-category indicator returns to normal, the robot is controlled to execute the preset motion based on the first subtree, and at least one indicator of the robot is detected.

16. An electronic device, It is characterized in that The electronic device comprises a memory and a processor, wherein the memory is used to store computer instructions executable on the processor, and the processor is used to implement the motion control method according to any one of claims 1 to 13 when executing the computer instructions.

17. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.