Robot control method and apparatus, and robot and storage medium

By determining compliant transfer relationships and interruptible states, the problem of unsafe robot state machine transitions is solved, resulting in more stable state machine transitions and robot control.

WO2026158024A1PCT designated stage Publication Date: 2026-07-30TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-01-08
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

In existing technologies, the transitions between robot state machines are not safe and stable enough, and it is difficult to make transitions under reasonable and safe conditions, resulting in unstable control.

Method used

By determining compliant transition relationships and interruptible states, state machine switching is only performed when there is a compliant transition relationship between the first and second state machines and the first state machine is in an interruptible state, thus achieving safe and stable state machine switching.

Benefits of technology

This improves the safety and stability of state machine transitions, and enhances the control safety and robustness of the robot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026071341_30072026_PF_FP_ABST
    Figure CN2026071341_30072026_PF_FP_ABST
Patent Text Reader

Abstract

A robot control method and apparatus, and a robot and a storage medium, which relate to the technical field of robots. The method comprises: controlling the movement of a robot by means of a first state machine (301); receiving a switching instruction, wherein the switching instruction is used for indicating the switching to a second state machine (302); if there is a compliant transfer relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, switching the first state machine to the second state machine, wherein the compliant transfer relationship is used for indicating that the first state machine supports the switching to the second state machine, and the interruptible state refers to a state in which the first state machine is supported to interrupt the operation (303); and controlling the movement of the robot by means of the second state machine (304). When a first state machine supports the switching to a second state machine, and the first state machine supports the interruption of the operation, the first state machine is switched to the second state machine instead of switching the state machine at will and at any time, thereby improving the switching safety of the state machine.
Need to check novelty before this filing date? Find Prior Art

Description

Robot control methods, devices, robots, and storage media

[0001] This application claims priority to Chinese Patent Application No. 202510125183.8, filed on January 26, 2025, entitled "Control Method, Apparatus, Chip Product, Robot and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of robotics, and in particular to a robot control method, device, robot, and storage medium. Background Technology

[0003] A robot's state machine is a mathematical model used to control a robot, describing the robot's transition behavior between different states. For example, a state machine can consist of a set of states, transition conditions, and actions, and it can control the robot to perform corresponding actions to change the robot's state based on the transition conditions.

[0004] A robot can be equipped with multiple different state machines, each capable of controlling the robot to perform at least one task, such as gait walking, climbing stairs, waving, and overcoming obstacles. The robot can switch between state machines to perform different tasks. However, not all state machines can be switched arbitrarily at any time; therefore, how to safely switch state machines is a problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a robot control method, device, robot, and storage medium. The technical solutions provided in this application may include the following.

[0006] According to one aspect of the embodiments of this application, a robot control method is provided, the method being executed by the robot, the method comprising:

[0007] The robot's movement is controlled by a first state machine;

[0008] Receive a switching instruction, the switching instruction being used to indicate switching to the second state machine;

[0009] If there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, then the first state machine is switched to the second state machine. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine. The interruptible state refers to the state that supports the interrupted operation of the first state machine.

[0010] The robot's movement is controlled by the second state machine.

[0011] According to one aspect of the embodiments of this application, a robot control device is provided, the device comprising:

[0012] The motion control module is used to control the robot's motion via a first state machine;

[0013] The instruction receiving module is used to receive switching instructions, which are used to indicate switching to the second state machine;

[0014] A state machine switching module is used to switch the first state machine to the second state machine if there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine, and the interruptible state refers to a state that supports the interrupted operation of the first state machine.

[0015] The motion control module is also used to control the robot's motion through the second state machine.

[0016] According to one aspect of the embodiments of this application, a robot is provided, the robot including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the control method of the robot described above.

[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, the computer program being loaded and executed by a processor to implement the above-described robot control method.

[0018] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium. A robot's processor reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the robot to perform the aforementioned robot control method.

[0019] The technical solutions provided in this application embodiment may include the following beneficial effects.

[0020] Upon receiving a switching instruction, the first state machine is switched to the second state machine if it supports switching to the second state machine, and if the first state machine supports interruption of operation, instead of switching the state machine arbitrarily at any time. This effectively improves the switching safety of the state machine, and thus helps to improve the control safety of the robot.

[0021] In addition, upon receiving a switching instruction, regardless of whether the switching instruction is compliant, the first state machine will only be switched to the second state machine if the first state machine supports switching to the second state machine and if the first state machine supports interrupted operation. This avoids the first state machine from being arbitrarily interrupted, which helps to improve the execution stability and robustness of the state machine, and thus helps to improve the control stability and robustness of the robot. Attached Figure Description

[0022] Figure 1 is a schematic diagram of a robot provided in one embodiment of this application;

[0023] Figure 2 is a schematic diagram of a quadrupedal wheeled hybrid robot provided in one embodiment of this application;

[0024] Figure 3 is a flowchart of a robot control method provided in an embodiment of this application;

[0025] Figure 4 is a schematic diagram of the robot in its initial state according to an embodiment of this application;

[0026] Figure 5 is a schematic diagram of a robot in a wheel motion state according to an embodiment of this application;

[0027] Figure 6 is a schematic diagram of a robot switching from a wheel-supported state to a foot-supported state according to an embodiment of this application;

[0028] Figure 7 is a schematic diagram of a robot switching from a foot-supported state to a wheel-supported state according to an embodiment of this application;

[0029] Figure 8 is a schematic diagram of a robot waving its robotic arm according to an embodiment of this application;

[0030] Figure 9 is a schematic diagram of a robot climbing stairs according to an embodiment of this application;

[0031] Figure 10 is a schematic diagram of a robot exchanging the positions of a first mechanical leg assembly and a second mechanical leg assembly according to an embodiment of this application;

[0032] Figure 11 is a schematic diagram of compliant transfer data of a robot provided in one embodiment of this application;

[0033] Figure 12 is a flowchart of a robot control method provided in another embodiment of this application;

[0034] Figure 13 is a schematic diagram of a robot state switching machine provided in one embodiment of this application;

[0035] Figure 14 is a schematic diagram of relevant data during the robot state machine switching process provided in an embodiment of this application;

[0036] Figure 15 is a block diagram of a robot control device provided in an embodiment of this application;

[0037] Figure 16 is a simplified structural block diagram of a robot provided in one embodiment of this application. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0039] The technical solutions provided in this application mainly relate to robotics, particularly intelligent control of robots. A robot is a mechatronic device that combines mechanical transmission and modern microelectronics technology. It can mimic certain human skills and has developed based on electronic, mechanical, and information technologies. A robot does not necessarily have to resemble a human; as long as it can autonomously complete tasks and commands given to it by humans, it belongs to the robot family. A robot is an automated machine possessing some intelligent abilities similar to humans or other living beings, such as perception, planning, movement, and coordination. It is a highly flexible automated machine. With the development of computer technology and artificial intelligence technology, robots have greatly improved in terms of function and technology. Mobile robots, robot vision, and tactile technologies are typical examples.

[0040] For the technical solutions provided in the embodiments of this application, the executing entity for each step can be a robot, such as a computer system integrated into the robot. This computer system can not only process perceived information but also make decisions through methods such as logical reasoning, fuzzy processing, and neural networks to ensure that the robot can make appropriate responses to environmental changes and execute specified tasks according to control instructions. The embodiments of this application do not limit the computer system. Exemplarily, the computer system can be implemented as a NUC (Next Unit of Computing) minicomputer. Optionally, the computer system includes a processor to support data processing.

[0041] In one feasible example, the technical solutions provided in this application can also be applied to scenarios such as robot testing and simulation, such as testing robot performance or simulating robots through a target application. The target application can be any application with robot testing or simulation capabilities. In this case, the executing entity for each step of the technical solution provided in this application can be a client or server of the target application. For example, the client can use the technical solution provided in this application to control the state machine switching of a virtual robot simulated from a real robot, thereby achieving the testing or simulation of a real robot. This application does not limit this aspect.

[0042] Optionally, the robot is coupled to an external device, allowing designers to control the robot by sending control information to it via the external device. Exemplarily, this external device can be a remote control, keyboard, or other command triggering device; it can also be a PC (Personal Computer) device such as a desktop computer or laptop computer; or it can be a server used to control the robot. This application embodiment does not limit this. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The external device and the robot can be connected (i.e., coupled) via physical lines, networks (such as wired networks, wireless networks, etc.).

[0043] For example, referring to Figure 1, a workstation can be deployed in robot 103. This workstation can be used to control the movement of various parts of the robot and can be implemented as a NUC (Non-Computer Integrated Circuit). Robot 103 is also connected to an external device 101, which can be connected to robot 103 via network 102. Designers can send control information to robot 103 through external device 101, and the workstation of robot 103 can execute corresponding tasks according to the control information. For example, if the control information is a switching instruction indicating a state machine switch, the workstation of robot 103 can parse the switching instruction to determine whether a state machine switch of robot 103 is necessary.

[0044] Optionally, the robot described above deploys multiple different state machines, each of which can be used to control the robot to perform at least one task, such as gait walking, climbing stairs, waving, and crossing obstacles. The state machine is a mathematical model for controlling the robot, which can be used to describe the robot's transition behavior between different states. For example, a state machine can consist of a set of states, transition conditions, and actions, which can control the robot to perform corresponding actions to change the robot's state based on the transition conditions. Here, a state is the state of the robot when performing a task, and an action is the action performed by the robot when performing the task. For example, for any task, the task can be decomposed into a sequence of actions, and the state machine corresponding to that task can be used to control the robot to perform the actions in that sequence, so that the robot completes the task.

[0045] In one example, any state machine of the robot can be implemented as a code segment to implement the function of that state machine. This code segment can be compiled into instructions by the computer system of robot 103 to control the robot to perform corresponding tasks. The execution process of the task can be implemented as a process of switching states of the state machine (i.e., executing the code segment corresponding to the state machine). The task switching process can be implemented as a state machine switching process, and the state machine switching process can be implemented as a process of the computer system of robot 103 switching to execute the corresponding code segment. This embodiment of the application does not limit this.

[0046] In some embodiments, the robot described above can be implemented as at least one of the following: a wheel-legged robot, a legged robot, or a hybrid wheel-legged robot. A hybrid wheel-legged robot refers to a wheel-legged robot with mechanical feet; a wheel-legged robot refers to a legged robot with mechanical wheels as feet (i.e., a robot that moves based on mechanical legs); and a legged robot refers to a legged robot with mechanical feet as feet.

[0047] This application uses a hybrid wheel-foot robot as an example for illustration. Exemplarily, a hybrid wheel-foot robot can refer to a legged robot with a pair of mechanical wheels and mechanical feet on its feet. For example, referring to Figure 1, robot 103 is a quadruped hybrid wheel-foot robot. Robot 103 has four mechanical legs, and each mechanical leg has a pair of coaxial mechanical wheels and mechanical feet on its feet. The hybrid wheel-foot robot can perform wheeled movements such as gliding, gait walking, climbing stairs, overcoming obstacles, waving, picking up objects, and carrying using only the mechanical wheels. It can also perform legged movements such as gait walking, climbing stairs, overcoming obstacles, stepping in place, waving, picking up objects, and carrying using the mechanical feet in conjunction with the mechanical wheels. This application does not limit this aspect.

[0048] In one example, referring to Figure 1, the foot-wheel hybrid robot (i.e., robot 103) in this embodiment may include a body 106, two outer mechanical legs connected to the body 106 via hip joints, and at least one inner mechanical leg. The two outer mechanical legs of robot 103 form a first mechanical leg group 104, and the at least one inner mechanical leg of robot 103 may form a second mechanical leg group 105. The two outer mechanical legs are located on either side of the central axis (i.e., sagittal plane) of robot 103. Optionally, the two outer mechanical legs may be the two outermost mechanical legs of robot 103.

[0049] The robotic legs of robot 103 are arranged side by side. That is, the rotation center of the hip joint corresponding to the outer robotic leg and the rotation center of the hip joint corresponding to the inner robotic leg are located in the same vertical plane. For example, the rotation axis of the hip joint corresponding to the first robotic leg group 104 and the rotation axis of the hip joint corresponding to the second robotic leg group 105 are located in the same vertical plane. Here, the rotation center refers to a point on the rotation axis of the hip joint.

[0050] Optionally, at least one inner mechanical leg's hip joint is located between the two outer mechanical legs' hip joints, meaning at least one inner mechanical leg is entirely located between the two outer mechanical legs. For example, if the second mechanical leg group 105 includes two inner mechanical legs, the two outer mechanical legs in the first mechanical leg group 104 can be respectively positioned on both sides of the second mechanical leg group 105, meaning the two inner mechanical legs in the second mechanical leg group 105 can be positioned between the two outer mechanical legs in the first mechanical leg group 104.

[0051] For example, robot 103 can be a quadrupedal wheeled hybrid robot, such as robot 103 including two outer mechanical legs and two inner mechanical legs; robot 103 can also be a tripedal wheeled hybrid robot, such as robot 103 including two outer mechanical legs and one inner mechanical leg, and this application embodiment does not limit this. Robot 103 can stand on the support surface by means of mechanical wheels on the outer or inner mechanical legs, or slide on the support surface by means of mechanical wheels on the outer or inner mechanical legs, or move on the support surface by controlling the alternating swing of the first mechanical leg group 104 and the second mechanical leg group 105 (i.e., gait walking), and can switch between legged and wheeled movement by rotating the mechanical feet, and this application embodiment does not limit this. Among them, the mechanical feet of robot 103 can assist the mechanical wheels to make robot 103 perform legged movement more stably.

[0052] Optionally, the fuselage 106 is provided with pitch and yaw joints at its waist. These joints control the rotation of the fuselage 106, such as pitching forward and backward, and adjusting the yaw angle (e.g., rotating about the central axis of the fuselage 106). The mechanical legs can be rotated via hip joints, and each leg can extend and retract independently. In one example, the mechanical legs corresponding to the first mechanical leg group 104 move synchronously, as do the mechanical legs corresponding to the second mechanical leg group 105; the mechanical wheels corresponding to the first mechanical leg group 104 and the second mechanical leg group 105 also move synchronously.

[0053] For example, in the mechanical legs of the foot-wheel hybrid robot, at least one mechanical leg has a pair of coaxial mechanical wheels and mechanical feet on its foot portion away from the hip joint; that is, at least one foot has a mechanical wheel whose rotation axis and its corresponding mechanical foot's rotation axis located on the same straight line. For example, all mechanical legs of robot 103 are provided with a pair of coaxial mechanical wheels and mechanical feet; or, some mechanical legs of robot 103 are provided with a pair of coaxial mechanical wheels and mechanical feet.

[0054] For example, taking a quadrupedal wheel-driven hybrid robot as an example, each of the corresponding mechanical legs of the quadrupedal wheel-driven hybrid robot can be equipped with a pair of coaxial mechanical wheels and mechanical feet; or, for the two mechanical leg groups corresponding to the quadrupedal wheel-driven hybrid robot, only one of the mechanical leg groups has a pair of coaxial mechanical wheels and mechanical feet on each mechanical leg; or, for the two mechanical leg groups corresponding to the quadrupedal wheel-driven hybrid robot, each mechanical leg group has one mechanical leg corresponding to a pair of coaxial mechanical wheels and mechanical feet; or, for each mechanical leg corresponding to the quadrupedal wheel-driven hybrid robot, only one mechanical leg has a pair of coaxial mechanical wheels and mechanical feet. The embodiments of this application do not limit this.

[0055] Each mechanical wheel can be driven independently, and each mechanical foot can rotate independently. The mechanical feet can be located on the left or right side of the mechanical wheels, or the mechanical wheels can be located in the hollowed-out area at the base of the mechanical feet in a hollowed-out style. This application embodiment does not limit this.

[0056] This application does not limit the dimensions of the mechanical wheels and mechanical feet. For example, all mechanical wheels may have the same diameter, and all mechanical feet may have the same length. The length of the mechanical feet may be 1.5 times, 2 times, or the diameter of the mechanical wheels. This application also does not limit the style of the mechanical feet. For example, the style of the mechanical feet may include at least one of the following: foot-like style, rectangular style, and triangular style.

[0057] Mechanical feet can be used to assist mechanical wheels, enabling the robot to stand more stably on the support surface. Optionally, when mechanical feet are not needed, they can rotate to coincide with the mechanical legs, or rotate to be perpendicular to the mechanical legs, or rotate to any angle that does not affect the contact between the mechanical feet and the support surface; this embodiment does not limit this. When mechanical feet are needed, they can rotate to contact the support surface, so that together with the mechanical wheels, they can support the robot standing on the support surface.

[0058] For example, referring to Figure 1, taking a quadrupedal wheel-and-machine hybrid robot as an example, when each mechanical leg of robot 103 is equipped with a pair of coaxial mechanical wheels and mechanical feet, if any mechanical wheel contacts the support surface, the mechanical feet coaxial with the mechanical wheel can be used to assist the mechanical wheel in supporting robot 103 to stand; or, when only one set of mechanical legs is equipped with a pair of coaxial mechanical wheels and mechanical feet, if there is no mechanical leg set for support, then robot 103 can stand solely by relying on the mechanical wheels corresponding to the mechanical leg set. If a mechanical leg assembly with mechanical feet is used for support, the robot 103 can stand upright by relying on the corresponding mechanical wheels and mechanical feet of the mechanical leg assembly; or, if only one mechanical leg is provided with a pair of coaxial mechanical wheels and mechanical feet, if there is no mechanical leg assembly with mechanical feet for support, the robot 103 can stand upright solely by relying on the corresponding mechanical wheels of the mechanical leg assembly; if there is a mechanical leg assembly with mechanical feet for support, the robot 103 can stand upright by relying on the corresponding mechanical wheels and one mechanical foot of the mechanical leg assembly. This application embodiment does not limit this. For ease of explanation and understanding, the following will use the example of each foot of the robot being provided with a pair of coaxial mechanical wheels and mechanical feet to illustrate the technical solution provided in this application embodiment.

[0059] In some embodiments, referring to FIG2, it is a structural schematic diagram of a quadrupedal wheeled hybrid robot provided in an embodiment of the present application. The quadrupedal wheeled hybrid robot 200 may include: a body (including a waist 207, a torso 208, a head 209, and an upper limb 210), a hip joint 211, and mechanical legs (such as an outer mechanical leg 201 and an inner mechanical leg 202).

[0060] The quadrupedal wheeled hybrid robot 200 has four mechanical legs: two outer mechanical legs 201 (referred to as the first mechanical leg group) and two inner mechanical legs 202 (referred to as the second mechanical leg group). The two inner mechanical legs 202 are located between the two outer mechanical legs 201. All four mechanical legs can extend and retract independently along the direction shown in Figure 2 (double-headed arrows) (achieved by corresponding telescopic joints). The four mechanical legs can be symmetrically distributed on both sides of the sagittal plane 206.

[0061] Each of the four mechanical legs is equipped with a pair of coaxial mechanical wheels 203 and mechanical feet 204. That is, the rotation axis corresponding to the mechanical wheel 203 and the rotation axis corresponding to the mechanical foot 204 are located on the same straight line. The mechanical foot 204 is installed on the outside of the mechanical wheel 203. Each mechanical wheel 203 can be driven independently (by the corresponding wheel joint), and each mechanical foot 204 can also be driven independently (by the corresponding ankle joint).

[0062] The quadrupedal wheeled hybrid robot 200 can stand on the mechanical wheels on the two inner mechanical legs 202 or the two outer mechanical legs 201 to be in a two-wheel support state; the quadrupedal wheeled hybrid robot 200 can also stand on the mechanical wheels on the two inner mechanical legs 202 and the two outer mechanical legs 201 at the same time to be in a four-wheel support state. The two-wheel support state and the four-wheel support state can be collectively referred to as the wheel support state, and the embodiments of this application do not limit this.

[0063] The quadrupedal wheel-driven hybrid robot 200 can stand on either the mechanical wheels and feet on its two inner mechanical legs 202 or the mechanical wheels and feet on its two outer mechanical legs 201, thus achieving a bipedal support state. Alternatively, the quadrupedal wheel-driven hybrid robot 200 can stand simultaneously on both the mechanical wheels and feet on its two inner mechanical legs 202 and the mechanical wheels and feet on its two outer mechanical legs 201, thus achieving a quadrupedal support state. Both bipedal and quadrupedal support states can be collectively referred to as foot support states, and this embodiment does not limit the specific terminology used in this application.

[0064] In the embodiments of this application, when at least one mechanical foot assists the mechanical wheel in supporting the robot to stand, it can be determined that the robot is in a foot-supported state; when the robot is supported to stand only by the mechanical wheel, it can be determined that the robot is in a wheel-supported state.

[0065] Alternatively, the two inner mechanical legs 202 can be implemented as a single unit, that is, the quadrupedal wheel hybrid robot 200 can be implemented as a tripedal wheel hybrid robot with only one inner mechanical leg.

[0066] Each robotic leg, at its other end away from the foot, is connected to a hip joint 211. Each robotic leg can rotate around its respective hip joint 211 and maintain linkage. In this embodiment, the rotation axes of the hip joints 211 corresponding to the quadrupedal wheeled hybrid robot 200 are located in the same vertical plane 205, and the rotation planes of the robotic legs corresponding to the quadrupedal wheeled hybrid robot 200 are parallel. The hip joints 211 corresponding to the two inner robotic legs 202 are located between the hip joints 211 corresponding to the two outer robotic legs 201, and the four hip joints 211 are symmetrically distributed on both sides of the sagittal plane 206.

[0067] Optionally, the hip joints 211 of the quadrupedal wheeled hybrid robot 200 can be coaxial, meaning that the rotation axes of the hip joints 211 are located on the same straight line. Alternatively, the hip joints 211 of the quadrupedal wheeled hybrid robot 200 can be non-coaxial. For example, the hip joints 211 corresponding to the two inner mechanical legs 202 can be coaxial, and the hip joints 211 corresponding to the two outer mechanical legs 201 can be coaxial, but the hip joints 211 corresponding to the two inner mechanical legs 202 are not coaxial with the hip joints 211 corresponding to the two outer mechanical legs 201.

[0068] In one example, the hip joints 211 corresponding to the two outer robotic legs 201 share the same drive motor, so that the two outer robotic legs 201 move synchronously; the hip joints 211 corresponding to the two inner robotic legs 202 share the same drive motor, so that the two inner robotic legs 202 move synchronously. In a feasible example, each hip joint 211 corresponding to the quadrupedal wheel hybrid robot 200 can also be driven independently by its own independently configured drive motor, and this application embodiment does not limit this.

[0069] The quadrupedal wheeled hybrid robot 200 may include a waist 207, a torso 208, a head 209, and upper limbs 210. Each hip joint 211 of the quadrupedal wheeled hybrid robot 200 is connected to the same end of the waist 207, and the other end of the waist 207 is connected to one end of the torso 208. The waist 207 has two rotation axes: a pitch rotation axis (which may have a corresponding pitch joint) that allows the torso 208 to pitch, and a yaw rotation axis (which may have a corresponding yaw joint) that allows the torso 208 to yaw. The yaw joint is connected in series with the pitch joint and is located above the pitch joint, connected to the torso 208. In this embodiment, rotating the robot body refers to rotating the pitch joint around the pitch rotation axis, causing the torso 208 to rotate.

[0070] The other end of the torso 208 is connected to the head 209 and the upper limb 210. The upper limb 210 can be a multi-degree-of-freedom upper limb, such as a robotic arm. Optionally, an end effector, such as a robotic gripper or a suction cup, can be deployed on the upper limb 210. Data acquisition devices, such as image acquisition devices, video recording devices, and IMUs (Inertial Measurement Units), can be deployed in the head 209 to perceive the real environment. The IMU can be placed at the geometric center of the torso 208, the center point of the hip joint, etc., and can be used to measure information such as the actual acceleration, actual angular velocity, actual Euler angles, actual position, actual angle, and actual angular velocity of the torso 208.

[0071] Optionally, the quadrupedal wheeled hybrid robot 200 may also include a workstation for controlling the movement of various parts of the robot, such as controlling the joints to enable movement. This workstation can be implemented as a NUC (Novice Computer). The hip, ankle, wheel, telescopic, pitch, and yaw joints of the quadrupedal wheeled hybrid robot 200 can be independently driven by their respective drive motors.

[0072] Compared to bipedal-wheeled hybrid robots, quadrupedal-wheeled hybrid robots have a more stable structure and stronger resistance to external impacts and disturbances. Compared to hexapedal-wheeled hybrid robots, they have fewer redundant joints, lower design complexity, and can bear heavy loads, move through narrow spaces, and perform tasks on objects of different heights. Quadrupedal-wheeled robots have a strong adaptability to the environment.

[0073] The following will use method embodiments to describe the robot control method provided in the embodiments of this application. For content not described in the method embodiments, please refer to the above embodiments.

[0074] Please refer to Figure 3, which shows a flowchart of a robot control method provided in one embodiment of this application. In this embodiment, the robot control method is described using a robot as the executing entity for each step. The method may include the following steps (301-304).

[0075] Step 301: Control the robot's movement through the first state machine.

[0076] In the robot control process, the first state machine in this application embodiment can be used to refer to the state machine being executed at the current moment, which can be any one of at least two state machines possessed by the robot. Each state machine can be used to control the robot to perform at least one task. At least one task includes at least one of the following: gait walking, climbing stairs, crossing obstacles, gliding, picking up objects, waving, and mode switching (such as switching between legged movement and wheeled movement). This application embodiment illustrates the use of each state machine to control the robot to perform one task as an example.

[0077] Optionally, different state machines can be used to control the robot to perform action sequences for different tasks. For example, a first state machine can be used to control the robot to perform an action sequence for a gait walking task, thereby completing the gait walking task; the first state machine can also be used to control the robot to perform an action sequence for a stair climbing task, thereby completing the stair climbing task; the first state machine can also be used to control the robot to perform an action sequence for a waving task, thereby completing the waving task. This application embodiment does not limit the scope of the application. The robot in this application embodiment is the same as that described in the above embodiments, and will not be repeated here.

[0078] In one example, the robot's state machine is related to the robot's body design. The robot's body design can be used to determine the tasks that the robot can perform, and then the robot's state machine can be constructed based on the action sequence of the tasks that the robot can perform. For example, taking a quadrupedal wheeled hybrid robot as an example, since its legs have coaxial mechanical feet and mechanical wheels, the quadrupedal wheeled hybrid robot can have unique tasks that switch between legged and wheeled movements, and then a corresponding state machine can be designed for the quadrupedal wheeled hybrid robot for this switching task. The embodiments of this application do not limit the method of setting the state machine.

[0079] Optionally, the robot's computer system (such as the main program) can jump to execute the code segment of the first state machine, causing the robot to enter the execution process of the first state machine. During the execution of the first state machine, the first state machine can control the robot to perform the action sequence of the task corresponding to the first state machine, thereby controlling the robot's movement. For example, taking a quadrupedal wheeled hybrid robot as an example, when the first state machine is used to control the robot to perform gait walking tasks, the first state machine can be used to control the robot to alternately swing the first mechanical leg group and the second mechanical leg group to move on the support surface (such as the ground, platform, etc.).

[0080] Step 302: Receive a switching instruction, which is used to indicate switching to the second state machine.

[0081] The second state machine described above is a different state machine from the first state machine; that is, the task implemented by the second state machine is different from the task implemented by the first state machine. For example, if the first state machine is used to control the robot to perform a sequence of actions for a gait walking task, the second state machine can be used to control the robot to perform a sequence of actions for a waving hand task.

[0082] The switching instruction is a command used to trigger a switch of the state machine. Optionally, the switching instruction includes identification information of the second state machine, which is used to uniquely identify the second state machine. For example, the identification information of the second state machine may include at least one of the following: name, number, or ID (Identity Document). For example, upon receiving a switching instruction, the robot's computer system analyzes the switching instruction to obtain the identification information of the second state machine.

[0083] In one example, the robot's computer system receives switching instructions from an external device coupled to the robot; that is, the switching instructions can originate from outside the robot. Exemplarily, the designer can generate switching instructions by operating the external device. For example, if the external device is a remote control for controlling the robot, the designer can generate switching instructions to instruct the robot to switch state machines using buttons on the remote control. As another example, if the external device is a computer device for controlling the robot, the designer can control the computer device to generate switching instructions by entering commands and parameters through the command line provided by the computer device; this embodiment of the application does not limit this approach.

[0084] In one example, the robot's computer system receives a switching instruction generated by an instruction generation module within the robot; that is, the switching instruction can originate from the robot itself. The instruction generation module, which generates the switching instruction, can be deployed within the robot's computer system. Exemplarily, the instruction generation module generates a switching instruction and sends it to the processor in the computer system when it detects that switching conditions are met. Optionally, the switching conditions satisfy at least one of the following: a first state machine completes operation; a switching state machine is determined based on perception information to adapt to environmental changes; or preset identification information for indicating the switching state machine is detected. Perception information can refer to information perceived by the robot in relation to the real environment.

[0085] The embodiments of this application improve the flexibility of state machine switching by supporting multiple triggering methods for switching instructions.

[0086] Step 303: If there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, then switch the first state machine to the second state machine. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine. The interruptible state refers to the state that supports the interrupted operation of the first state machine.

[0087] In this embodiment, the compliant transition relationship can be used to indicate the switching relationship between state machines. For example, if there is a compliant transition relationship between the first state machine and the second state machine, the first state machine is allowed to switch to the second state machine; if there is no compliant transition relationship between the first state machine and the second state machine, the first state machine is not allowed to switch to the second state machine.

[0088] Optionally, the compliance transition relationship is represented by the identification information of the state machine. For example, if the computer system records a compliance transition relationship between the identification information of the first state machine and the identification information of the second state machine, then it can be determined that there is a compliance transition relationship between the first state machine and the second state machine.

[0089] Optionally, the compliance transfer relationship is directional, such as the former corresponding to the compliance transfer relationship pointing to the latter. For example, when there is a compliance transfer relationship between the first state machine and the second state machine, the first state machine supports switching to the second state machine; when there is a compliance transfer relationship between the second state machine and the first state machine, the second state machine supports switching to the first state machine; and when there is no compliance transfer relationship between the second state machine and the first state machine, the second state machine does not support switching to the first state machine.

[0090] Optionally, the aforementioned compliant transition relationships are preset in the robot's computer system. In this embodiment, not all state machines can be switched at will. Each state machine has requirements for the robot's own state and posture when entering that state machine. That is, the determination of compliant transition relationships needs to meet the robot's control safety and rationality. Therefore, compliant transition relationships can be used to indicate whether it is safe and reasonable for the first state machine to switch to the second state machine.

[0091] For example, the compliance transfer relationship can be preset based on the robot's architecture and control standards. For instance, the compliance transfer relationship between state machines can be set according to actual usage needs. If, due to robot architecture constraints, the first state machine needs to be executed before the second state machine is executed, a compliance transfer relationship can be set between the first and second state machines. Alternatively, the compliance transfer relationship between state machines can also be set according to the robot's control standards. For instance, if the first state machine needs to be executed before the second state machine is executed to improve the robot's control accuracy, a compliance transfer relationship can be set between the first and second state machines. Furthermore, during the execution of the first state machine, even under robot architecture constraints, the first state machine can be switched to the second state machine; a compliance transfer relationship can then be set between the first and second state machines. This application embodiment does not limit the method for setting the compliance transfer relationship.

[0092] In one example, the method for determining the compliance transfer relationship may include the following: obtaining the identification information of the first state machine and the identification information of the second state machine; querying the robot's compliance transfer data based on the identification information of the first state machine and the identification information of the second state machine to obtain the query results.

[0093] The query result indicates whether there is a compliant transition relationship between the first state machine and the second state machine. The compliant transition data indicates whether there is a compliant transition relationship between the robot's various state machines. For example, the compliant transition data can be implemented as a directed acyclic graph (DAG), where state machines are nodes and compliant transition relationships are edges. If the first state machine has an edge pointing to the second state machine in the DAG, a query result indicating a compliant transition relationship between the first and second state machines can be generated; otherwise, a query result indicating no compliant transition relationship between the first and second state machines can be generated.

[0094] Optionally, the compliance transfer data can also be implemented as a compliance transfer relationship table. Each row in the compliance transfer relationship table records a group of state machines with compliance transfer relationships. If the first state machine and the second state machine are a group in the compliance transfer relationship table, a query result can be generated to indicate that there is a compliance transfer relationship between the first state machine and the second state machine. Otherwise, a query result can be generated to indicate that there is no compliance transfer relationship between the first state machine and the second state machine.

[0095] Compliance transfer data can be preset based on the robot's architecture or control standards. After determining the compliance transfer relationships between each state machine, compliance transfer data can be generated and pre-stored in the robot's computer system. This application does not limit the format or determination method of the compliance transfer data.

[0096] This application's embodiments support determining whether there is a compliant transition relationship between state machines by querying preset compliant transition data. This allows for a more stable and accurate determination of whether state machines can switch between each other, thereby improving the stability and accuracy of state machine switching. Furthermore, by using preset compliant transition data, the robot can be controlled to switch state machines only when the robot's control safety requirements are met, which helps improve the robot's control safety.

[0097] Optionally, the aforementioned interruptible state is used to indicate whether the timing of the transition from the first state machine to the second state machine is reasonable. Even if the first state machine supports the transition to the second state machine, not all states corresponding to the first state machine satisfy the requirement to enter the second state machine. For example, the aforementioned interruptible state can be determined by the first state machine in real time. The timing of the state machine transition is related to the robot's current state. If the robot's current state satisfies the requirement to enter the second state machine, the robot's computer system can transition from the first state machine to the second state machine.

[0098] Optionally, during the execution of the first state machine, the first state machine can determine in real time whether it is in an interruptible state based on the robot's current state. After determining whether it is in an interruptible state, the first state machine informs the robot's computer system. The method for determining the interruptible state will be explained in detail below, and will not be repeated here.

[0099] In one example, the robot can first determine whether there is a compliant transition relationship between the first state machine and the second state machine, and then determine whether the first state machine is in an interruptible state. Alternatively, the robot can first determine whether the first state machine is in an interruptible state, and then determine whether there is a compliant transition relationship between the first state machine and the second state machine. This application does not limit this approach.

[0100] For example, step 303 may include the following: if there is a compliant transition relationship between the first state machine and the second state machine, then obtain the interruption identification information generated by the first state machine, the interruption identification information is used to indicate whether the first state machine is in an interruptible state; if the interruption identification information is a first parameter, switch the first state machine to the second state machine, the first parameter is used to indicate that the first state machine is in an interruptible state.

[0101] Optionally, when the first state machine determines that it is in an interruptible state, it generates an interrupt identifier as a first parameter; when it determines that it is in an uninterruptible state, it generates an interrupt identifier as a second parameter. The second parameter is used to indicate that the first state machine is in an uninterruptible state, which means that the first state machine is prohibited from interrupting its operation. This application embodiment does not limit the first and second parameters, and they can be set and adjusted according to actual usage requirements.

[0102] If there is a compliant transition relationship between the first state machine and the second state machine, it can be determined that the first state machine supports switching to the second state machine. If the first state machine is in an interruptible state at the current moment, it can be determined that the first state machine meets the timing for switching to the second state machine. Switching the first state machine to the second state machine can mean: stopping the execution of the first state machine and starting the execution of the second state machine so that the second state machine can control the robot's movement.

[0103] Optionally, if the interrupt flag is the second parameter, the computer system continues to control the robot's movement through the first state machine. That is, although the first state machine supports switching to the second state machine, if the robot's state does not meet the switching timing, the first state machine can continue to execute. If the interrupt flag changes from the second parameter to the first parameter, the computer system switches the first state machine to the second state machine. In other words, if the first state machine supports switching to the second state machine, it can switch to the second state machine as long as the robot's state meets the switching timing.

[0104] Optionally, if there is no compliant transition relationship between the first state machine and the second state machine, the computer system will continue to control the robot's movement through the first state machine. That is, if there is no compliant transition relationship between the first state machine and the second state machine, the computer system can stop determining whether to switch state machines.

[0105] This embodiment of the application performs an interruptible state check only after the compliance transition relationship is verified, eliminating the need for an interruptible state check for each switching instruction. This reduces the workload of the checks and improves the efficiency of determining whether to switch the state machine. Furthermore, regardless of whether the switching instruction is compliant, the computer system does not switch the state machine if the switching conditions are not met, which improves the stability and robustness of the state machine switching.

[0106] For example, step 303 above may also include the following: in response to a switching instruction, obtaining interrupt identification information generated by the first state machine, the interrupt identification information being used to indicate whether the first state machine is in an interruptible state; if the interrupt identification information is a first parameter, and if there is a compliant transition relationship between the first state machine and the second state machine, then switching the first state machine to the second state machine.

[0107] In other words, when the first state machine meets the switching timing, it is determined whether the first state machine supports switching to the second state machine, without having to query the compliant transfer data and determine the compliant transfer relationship for each switching instruction. This helps to reduce the workload of judgment and thus improve the efficiency of the judgment on whether to switch the state machine.

[0108] Optionally, if the interrupt flag information of the first state machine is the second parameter, the computer system continues to control the robot's movement through the first state machine. That is, if the robot's state does not meet the switching timing, the first state machine can continue to be executed. If the interrupt flag information of the first state machine changes from the second parameter to the first parameter, and if there is a compliant transition relationship between the first and second state machines, the first state machine will be switched to the second state machine. In other words, if the first state machine supports switching to the second state machine, the first state machine can be switched to the second state machine as long as the robot's state meets the switching timing.

[0109] For any switching instruction, regardless of whether the switching instruction is compliant, the computer system will not switch the state machine if the switching conditions are not met. This helps to improve the stability and robustness of the state machine switching.

[0110] Step 304: Control the robot's movement through the second state machine.

[0111] Optionally, the robot's computer system stops executing the first state machine and starts executing the second state machine, so as to control the robot to execute the action sequence of the corresponding task through the second state machine.

[0112] For example, the state corresponding to the first state machine at the current moment (i.e. the state of the robot) is the first state. The second state machine starts from the first state and controls the robot to execute the action sequence of the corresponding task, so that the robot's state changes sequentially according to the state sequence corresponding to the second state machine, thereby realizing the control of the robot's movement.

[0113] Optionally, if the computer system determines that the first state machine cannot be switched to the second state machine, it generates an alarm message to notify the user that the currently running state machine cannot be switched.

[0114] In summary, the technical solution provided in this application, upon receiving a switching instruction, switches the first state machine to the second state machine when the first state machine supports switching to the second state machine and when the first state machine supports interruption, rather than switching the state machine arbitrarily at any time. This effectively improves the switching security of the state machine, and thus helps to improve the control security of the robot.

[0115] In addition, upon receiving a switching instruction, regardless of whether the switching instruction is compliant, the first state machine will only be switched to the second state machine if the first state machine supports switching to the second state machine and if the first state machine supports interrupted operation. This avoids the first state machine from being arbitrarily interrupted, which helps to improve the execution stability and robustness of the state machine, and thus helps to improve the control stability and robustness of the robot.

[0116] In this embodiment, the tasks that the robot can perform can be determined based on the robot's architecture. Then, a state machine for the robot can be constructed based on these tasks. Finally, compliant transfer data for the robot can be constructed based on the robot's architecture and control standards. For example, taking the aforementioned robot as a hybrid wheeled robot, the process of constructing the robot's compliant transfer data may include the following:

[0117] I. Constructing the robot's state machine.

[0118] 1. If the robot needs to be powered on to start moving, then the wheeled hybrid robot may include an initial state machine for controlling the robot to enter the initial state.

[0119] The initial state mentioned above refers to the state the robot automatically enters after powering on and passing its self-test. The initial state machine is used to control the robot's joints to be near their default initial poses. For example, referring to Figure 4, the initial state machine controls the robot 400 to stand stably on its four mechanical legs 401, with its two mechanical arms 402 hanging down naturally, thus enabling the robot 400 to enter the initial state.

[0120] 2. The wheeled hybrid robot may include a relaxation state machine for controlling the robot to enter a zero-torque state.

[0121] In the zero-torque state, all joint motors of the robot operate at zero torque. Optionally, the robot's shape in the zero-torque state is the same as its shape in the initial state. During the robot's operation, if the robot is switched to a relaxed state machine control, the robot will exhibit a shape where all joint torques are 0 and the robot is freely hanging under gravity.

[0122] 3. The wheeled hybrid robot may include a calibration state machine for calibrating the angles of each joint of the robot.

[0123] Since many joints of a robot lack absolute encoders, a general joint angle calibration procedure is required during the robot's power-on process. For example, the joint angle calibration procedure can be as follows: The calibration state machine controls each drive motor to apply a small joint torque, causing each joint of the robot to move slightly within a small range to confirm that each joint is within its physical limits. Then, based on the physical limit values ​​of each joint at the current moment, the joint angles of each joint in the robot's joint coordinate system are calibrated. These joint angles will be used for subsequent calculations and control of the robot.

[0124] In this embodiment of the application, according to the robot control standard, after the relaxation state machine has finished running, the robot must first be controlled through the calibration state machine, and it can only switch from the relaxation state machine to the calibration state machine.

[0125] 4. A wheel-based hybrid robot may include a wheel state machine for controlling the robot to enter a wheel motion state.

[0126] In this context, the wheel motion state refers to the state in which the robot moves solely through its mechanical wheels; that is, in the wheel motion state, the robot performs wheeled motion. For example, in the wheel motion state, the robot can glide on its mechanical wheels, and its mechanical feet do not contact the supporting surface. In other words, the wheel state machine is only used to control the robot's movement by controlling its mechanical wheels.

[0127] For example, referring to Figure 5, the working content of the wheel state machine can be as follows: by controlling all the mechanical wheels of the robot 500 to roll in the same direction, the robot 500 can be controlled to move forward and backward; or, by controlling the rolling speed of the left mechanical wheel 501 and the right mechanical wheel 502 of the robot 500 to be different, the robot 500 can be controlled to turn.

[0128] Optionally, the wheel motion state can be set as a standard state. For example, when designing the state machine transition, the wheel state machine can serve as the designated entry and exit point for multiple state machines. That is, the multiple state machines start with the wheel motion state or end with the wheel motion state.

[0129] 5. A wheel-foot hybrid robot may include a wheel-foot switching state machine for controlling the robot to switch from a wheel-supported state to a foot-supported state.

[0130] Wheel-supported state refers to the state in which the robot stands up using only mechanical wheels, while foot-supported state refers to the state in which the robot stands up using mechanical feet to assist the mechanical wheels.

[0131] Referring to Figure 6, the working content of the wheel-leg switching state machine includes: (1) controlling the robot 600 to enter the wheel support state. In the wheel support state, the robot 600 stands on the support surface through four mechanical wheels, the mechanical legs do not contact the support surface, the base of the robot 600 remains vertical, the first mechanical leg group 601 and the second mechanical leg group 602 are naturally spread apart, and the two mechanical arms are bent and placed on both sides of the robot 600's body; (2) controlling the robot 600 to reduce the rotation angle of the hip joint and extend the mechanical legs, so that the robot 600... 0. Enter the first state; (3) Control the robot 600 to adjust the rotation angle of the hip joint and the length of the mechanical leg, and use the mechanical wheel in the first mechanical leg group 601 as the fulcrum to move the center of mass to the mechanical foot in the first mechanical leg group 601, so that the robot 600 enters the second state; (4) Control the robot 600 to merge the hip joint, so that the robot 600 enters the third state; (5) Control the robot 600 to lower the mechanical foot in the second mechanical leg group 602 for support and extend the mechanical leg, so that the robot 600 enters the foot support state.

[0132] Under the planned motion sequence, the wheel-leg switching state machine can maintain the motion stability of the robot 600 at all times by controlling the position of the center of mass of the robot 600, thereby efficiently completing the switch from wheeled motion to legged motion.

[0133] 6. The foot-wheel hybrid robot may include a foot-wheel switching state machine for controlling the robot to switch from a foot-supported state to a wheel-supported state.

[0134] Referring to Figure 7, the working content of the foot-wheel switching state machine includes: (1) controlling the robot 700 to enter the foot support state. In the foot support state, the robot 700 stands on the support surface with the assistance of four mechanical wheels through four mechanical feet. The base of the robot 700 remains vertical, the first mechanical leg group 701 and the second mechanical leg group 702 are combined, and the two mechanical arms are bent and placed on both sides of the robot 700's body; (2) controlling the robot 700 to shorten the length of the mechanical legs to lower the height of the robot 700's center of gravity, and controlling the robot 700 to lift the mechanical feet in the first mechanical leg group 701, so that the robot 700 enters the first state. (3) Control the robot 700 to adjust the rotation angle of the hip joint and the length of the mechanical leg, and use the mechanical wheel in the first mechanical leg group 701 as the fulcrum to spread the first mechanical leg group 701 and the second mechanical leg group 702 apart, and place the center of mass of the robot 700 in the middle of the first mechanical leg group 701 and the second mechanical leg group 702, so that the robot 700 enters the second state; (4) Control the robot 700 to lift the mechanical foot in the second mechanical leg group 702, and adjust the rotation angle of the hip joint and the length of the mechanical leg, so that the center of mass of the robot 700 drops to the set position, so that the robot 700 enters the wheel support state.

[0135] Under the planned motion sequence, the foot-wheel switching state machine can maintain the motion stability of the robot 700 at all times by controlling the position of the center of mass of the robot 700, thereby efficiently completing the switch from foot motion to wheel motion.

[0136] It should be noted that for each state machine in the embodiments of this application, each state in the state machine is related to the task performed by the state machine and is not affected by the naming of the state. For example, the first state in the sixth state machine is not the same as the first state in the fourth state machine.

[0137] 7. The wheeled hybrid robot may include a waving state machine for controlling the robot to wave its robotic arm.

[0138] The hand-waving state machine is used to control the robot to perform hand-waving tasks, which can consist of a set of hand-waving actions. The hand-waving action is equivalent to waving the robotic arm. Optionally, the hand-waving state machine uses a wheel state machine as the designated entry point and a wheel state machine as the designated exit point.

[0139] For example, referring to Figure 8, when the robot 800 is in a wheel-supported state, the working content of the wheel state machine can be as follows: control the robot 800's robotic arm 801 to lift up, then control the robotic arm 801 to swing several times, and finally control the robot 800's robotic arm 801 to retract.

[0140] 8. A foot-wheel hybrid robot may include a stair-climbing state machine for controlling the alternating swinging of the robot's mechanical legs to climb stairs.

[0141] The stair-climbing state machine is used to control the robot to perform the task of climbing stairs. The task of climbing stairs can be composed of a set of alternating swinging movements of the first and second mechanical leg groups.

[0142] For example, referring to Figure 9, the working content of the stair-climbing state machine can be as follows: (1) Control the robot 900 to enter the foot support state (such as the quadruped support state); (2) Using the first mechanical leg group 902 as support, swing the second mechanical leg group 901 so that the second mechanical leg group 901 climbs the step and enters the first state; (3) Using the second mechanical leg group 901 as support, swing the first mechanical leg group 902 so that the first mechanical leg group 902 also climbs the step, thereby enabling the robot 900 to climb one step. By repeating this process, the robot 900 can complete the stair-climbing task.

[0143] Optionally, during the process of robot 900 climbing stairs, if a four-legged support state exists, robot 900 will periodically switch between a two-legged support state and a four-legged support state. Specifically, when robot 900 swings its mechanical legs and stands on only one mechanical leg assembly, robot 900 is in a two-legged support state. When the mechanical leg swing ends and robot 900 stands on two mechanical leg assemblies, robot 900 is in a four-legged support state.

[0144] In this embodiment, the mechanical leg used for swinging is a swinging mechanical leg, and the mechanical leg used for support is a supporting mechanical leg. The process of the robot 900 climbing stairs includes the swinging mechanical leg moving from back to front. The supporting mechanical leg and the swinging mechanical leg can swing periodically and alternately. By alternating the swinging of the two mechanical leg sets, the position of the robot 900's footing point on the support surface changes, thereby realizing the spatial movement of the robot 900.

[0145] During the movement of robot 900, the posture of its body remains largely unchanged, and the movement of its upper limbs is relatively independent, not affecting the swinging of its mechanical legs. From the initial moment to the final moment of this process, the height of robot 900's center of mass changes.

[0146] Optionally, the stair-climbing state machine can be used to control the robot 900 to climb one or more steps, or to control the robot 900 to climb one or more steps. Similar parameter and scene changes are all included in the action scope of the stair-climbing state machine, and this application embodiment does not limit this.

[0147] 9. The foot-wheel hybrid robot may include a first leg-switching state machine for controlling the robot to switch the positions of the first mechanical leg group (such as the outer mechanical leg) and the second mechanical leg group (such as the inner mechanical leg).

[0148] For example, referring to Figure 10, during the process of controlling the robot 1000 to exchange the positions of the first mechanical leg group 1001 and the second mechanical leg group 1002, none of the four mechanical wheels of the robot 1000 leave the support surface, and none of the four mechanical feet are in contact with the support surface. Taking the forward direction of the robot 1000 as a reference, in the initial state corresponding to the first leg exchange state machine, the mechanical wheel of the first mechanical leg group 1001 (such as the outer mechanical leg) is in front, and the mechanical wheel of the second mechanical leg group 1002 (such as the inner mechanical leg) is behind. In the final state corresponding to the first leg exchange state machine, the mechanical wheel of the first mechanical leg group 1001 (such as the outer mechanical leg) is behind, and the mechanical wheel of the second mechanical leg group 1002 (such as the inner mechanical leg) is in front.

[0149] The working content of the first leg exchange state machine can be as follows: control the mechanical wheels of the first mechanical leg group 1001 to keep their positions unchanged in the world coordinate system of the robot 1000, and control the mechanical wheels of the second mechanical leg group 1002 to actively roll, adjust the joint positions of the mechanical legs (such as telescopic joints) and adjust the position of the hip joint, so that the mechanical wheels of the second mechanical leg group 1002 move from back to front, passing the position of the mechanical wheels of the first mechanical leg group 1001, until they stop in front of the mechanical wheels of the first mechanical leg group 1001, so as to complete the position exchange between the first mechanical leg group and the second mechanical leg group.

[0150] The supporting and swinging mechanical legs can periodically alternate swinging. By exchanging the positions of the first mechanical leg group 1001 and the second mechanical leg group 1002, the position of the robot 1000's footing on the supporting surface changes, thereby enabling the robot 1000 to move in space. During the movement of the robot 1000, the first mechanical leg group 1001 and the second mechanical leg group 1002 exchange and move, but the robot 1000's body posture remains roughly unchanged. The movement of the body is relatively independent and does not affect the movement of the mechanical legs. From the initial moment to the final moment of this process, the height of the robot 1000's center of mass remains almost unchanged.

[0151] 10. The wheeled hybrid robot may include a second leg-switching state machine for controlling the robot to switch the positions of the second mechanical leg group (such as the inner mechanical leg) and the first mechanical leg group (such as the outer mechanical leg).

[0152] The action sequence corresponding to the second leg exchange state machine is the reverse process of the action sequence corresponding to the first leg exchange state machine. During the process of controlling the robot to exchange the positions of the second and first mechanical leg groups, none of the robot's four mechanical wheels leave the support surface, and none of the four mechanical feet are in contact with the support surface. Taking the robot's forward direction as a reference, in the initial state corresponding to the second leg exchange state machine, the mechanical wheels of the first mechanical leg group (e.g., the outer mechanical leg) are behind, and the mechanical wheels of the second mechanical leg group (e.g., the inner mechanical leg) are in front. In the final state corresponding to the second leg exchange state machine, the mechanical wheels of the first mechanical leg group (e.g., the outer mechanical leg) are in front, and the mechanical wheels of the second mechanical leg group (e.g., the inner mechanical leg) are behind.

[0153] The working content of the second leg exchange state machine can be as follows: keep the position of the mechanical wheels of the second mechanical leg group unchanged in the robot's world coordinate system, and control the mechanical wheels of the first mechanical leg group to move from front to back by actively rolling, adjusting the joint position of the mechanical leg (such as the telescopic joint) and adjusting the position of the hip joint, so that the mechanical wheels of the first mechanical leg group move past the position of the mechanical wheels of the second mechanical leg group until they stop behind the mechanical wheels of the second mechanical leg group, so as to complete the position exchange between the second and first mechanical leg groups.

[0154] The supporting and swinging robotic legs can periodically alternate in their swinging motion. By exchanging the positions of the second and first robotic leg groups, the robot's footing point on the support surface changes, thus enabling spatial movement. During the robot's movement, the second and first robotic leg groups exchange and move, but the robot's body posture remains largely unchanged. The body's movement is relatively independent and does not affect the movement of the robotic legs. From the initial moment to the final moment of this process, the robot's center of mass height remains almost unchanged.

[0155] 11. A wheeled hybrid robot may include a recovery state machine for controlling the robot to return to a zero-torque state.

[0156] The action sequence corresponding to the recovery state machine consists of various actions that enable the robot to transition from a zero-torque state to a wheel motion state. In other words, the wheel-shaped state machine can be switched to the recovery state machine to control the robot to re-enter the relaxation state machine.

[0157] This application embodiment determines the robot's state machine based on the robot's architecture, making the state machine more closely match the robot's architecture, thereby improving the accuracy of state machine construction.

[0158] II. Constructing compliant data transfer for robots.

[0159] In one example, when a hybrid wheel-footed robot includes a wheel state machine and a wheel-foot switching state machine, there is a compliant transition relationship between the wheel state machine and the wheel-foot switching state machine, meaning that the wheel state machine supports switching to the wheel-foot switching state machine. However, there is no compliant transition relationship between the wheel-foot switching state machine and the wheel state machine, meaning that the wheel-foot switching state machine does not support switching to the wheel state machine.

[0160] In one example, when the hybrid wheel-wheel robot also includes a stair-climbing state machine and a wheel-wheel switching state machine, there is a compliant transfer relationship between the wheel-wheel switching state machine and the stair-climbing state machine, that is, the wheel-wheel switching state machine can support switching to the stair-climbing state machine; however, there is no compliant transfer relationship between the stair-climbing state machine and the wheel-wheel switching state machine, that is, the stair-climbing state machine does not support switching to the wheel-wheel switching state machine.

[0161] There is a compliant transfer relationship between the stair climbing state machine and the wheel switching state machine, meaning that the stair climbing state machine supports switching to the wheel switching state machine; there is no compliant transfer relationship between the wheel switching state machine and the stair climbing state machine, meaning that the wheel switching state machine does not support switching to the stair climbing state machine.

[0162] There is no compliant transition relationship between the wheel state machine and the foot wheel switching state machine; however, there is a compliant transition relationship between the foot wheel switching state machine and the wheel state machine. There is also a compliant transition relationship between the wheel-foot switching state machine and the foot wheel switching state machine.

[0163] In one example, in the case of a foot-wheel hybrid robot that also includes a waving state machine, there is a compliant transition relationship between the wheel state machine and the waving state machine, as well as between the waving state machine and the wheel state machine.

[0164] In one example, when the footwheel hybrid robot also includes an initial state machine, a relaxation state machine, and a calibration state machine, there is a compliant transition relationship between the initial state machine and the relaxation state machine, a compliant transition relationship between the relaxation state machine and the calibration state machine, and a compliant transition relationship between the calibration state machine and the relaxation state machine.

[0165] This application embodiment sets the robot's compliant transfer data according to the robot's architecture, thereby making the compliant transfer data more consistent with the robot's architecture, which helps to improve the accuracy and rationality of the compliant transfer data settings.

[0166] For example, referring to Figure 11, the compliant transfer data of the foot-wheel hybrid robot can be realized as a directed acyclic graph 1100, with state machines as nodes and compliant transfer relationships as edges.

[0167] Optionally, without considering interruptible states, the transition process of each state machine may include the following.

[0168] The computer system first initializes the foot-wheel hybrid robot.

[0169] For example, after a hybrid wheeled robot is powered on, its computer system automatically runs an initial state machine to control the robot into its initial state. Upon receiving a trigger command to initiate the brake release state, the computer system switches the initial state machine to a release state machine, which controls the robot to enter a zero-torque state. Upon receiving a calibration trigger command to initiate the calibration process, the computer system switches the release state machine to a calibration state machine to control the robot to calibrate joint angles.

[0170] After the initialization of the footwheel hybrid robot is completed, the computer system controls the switching of the state machine according to the switching instructions.

[0171] For example, upon receiving a switching instruction indicating a switch to the wheel state machine, the computer system switches the calibration state machine to the wheel state machine to control the robot into wheel motion mode. Optionally, starting from the wheel state machine, upon receiving a switching instruction indicating a switch to the waving state machine, the computer system switches the wheel state machine to the waving state machine to control the robot to perform a waving task. After the waving task is completed, upon receiving a switching instruction indicating a switch to the return wheel state machine, the computer system switches the waving state machine back to the wheel state machine. Optionally, this switching process can be manually completed by the user through an external device, or it can be set to complete automatically after the waving state machine finishes execution.

[0172] Optionally, starting with the wheel state machine, upon receiving a switching instruction indicating a switch to the first leg switching state machine, the computer system switches the wheel state machine to the first leg switching state machine. Upon receiving a switching instruction indicating a switch to the second leg switching state machine, the computer system switches the first leg switching state machine to the second leg switching state machine. Upon receiving a switching instruction indicating a switch to the wheel state machine, the computer system switches the second leg switching state machine back to the wheel state machine. Optionally, this switching process can be manually completed by the user through an external device, or it can be set to complete automatically after the second leg switching state machine finishes execution.

[0173] Optionally, starting with the wheel state machine, the computer system switches from the wheel state machine to the wheel-foot switching state machine upon receiving a switching instruction indicating a switch to the stair-climbing state machine. Similarly, upon receiving a switching instruction indicating a switch to the wheel-foot switching state machine, the computer system switches from the wheel-foot switching state machine to the stair-climbing state machine. Finally, upon receiving a switching instruction indicating a switch to the wheel state machine, the computer system switches from the stair-climbing state machine to the wheel-foot switching state machine. Optionally, this switching process can be manually completed by the user via an external device, or it can be set to complete automatically after the wheel-foot switching state machine finishes execution.

[0174] Optionally, starting with the wheel state machine, the computer system switches the wheel state machine to the recovery state machine upon receiving a switching instruction indicating a switch to the recovery state machine. Upon receiving a switching instruction indicating a switch to the relaxation state machine, the computer system switches the recovery state machine to the relaxation state machine. Afterward, the wheel-foot hybrid robot waits for switching instructions in real time.

[0175] In summary, the embodiments of this application, by setting the robot's compliant transfer data according to the robot's architecture, make the compliant transfer data more closely match the robot's architecture, thereby improving the accuracy and rationality of the compliant transfer data settings.

[0176] In this embodiment of the application, the first state machine can generate interruption identification information of the first state machine at the current moment according to the state of the robot at the current moment.

[0177] For example, when the robot's state type is static equilibrium state, the interruption identification information of the first state machine is the first parameter.

[0178] The first parameter indicates that the robot is in an interruptible state. The static equilibrium state indicates that the robot is in a static, stable state. For example, the robot's wheel-supported state (e.g., four-wheel support state) and foot-supported state (e.g., four-legged support state) can both put the robot in a static, stable state. Since all joints of the robot's body have brake designs, interrupting the state machine in these states will not cause safety hazards such as the robot falling or tilting. Therefore, the wheel-supported state, foot-supported state, etc., can be defined as static equilibrium states, and the interruption flag information of the first state machine can be set as the first parameter.

[0179] For example, when the robot's state type is dynamic equilibrium, the interruption identifier information of the first state machine is the second parameter.

[0180] The second parameter indicates that the robot is not in an interruptible state. A dynamic equilibrium state indicates that the robot is in a dynamically stable state. For example, in the process of a robot climbing stairs, or in a two-wheel balance state, the robot is in a dynamically stable or quasi-static stable state, not a statically stable state. In these states, interrupting the state machine can easily cause safety hazards such as loss of robot control or falls. Therefore, states such as climbing stairs and two-wheel balance can be defined as dynamic equilibrium states, and the interruption flag information of the first state machine can be set as the second parameter.

[0181] For example, the interrupt identification information of the first state machine is always either the first parameter or the second parameter.

[0182] Optionally, if the designer determines that the first state machine can be interrupted at any time without causing safety hazards, the interruption flag information of the first state machine can be preset to the first parameter.

[0183] Optionally, if the designer determines that interrupting the first state machine at any time will cause a safety hazard, the interruption flag information of the first state machine can be preset to the second parameter.

[0184] For example, the interrupt identification information of the first state machine is related to the runtime of the first state machine. For any runtime, the interrupt identification information of the first state machine is one of the first parameter and the second parameter.

[0185] Optionally, the first state machine may simply respond to a clock signal to generate interrupt identification information. For example, when the runtime of the first state machine reaches a first preset value, the first state machine generates the interrupt identification information as a first parameter; when the runtime of the first state machine reaches a second preset value, the first state machine generates the interrupt identification information as a second parameter. Alternatively, when the runtime of the first state machine reaches the first preset value, the first state machine generates the interrupt identification information as a second parameter; when the runtime of the first state machine reaches the second preset value, the first state machine generates the interrupt identification information as a first parameter. The first and second preset values ​​can be set and adjusted according to actual usage requirements. This application embodiment does not limit the number of preset values, and may also include a third preset value, a fourth preset value, etc.

[0186] In a feasible example, taking the above-mentioned robot as a foot-wheel hybrid robot, the interruption identification information can correspond to three states: interruptible at any time, never interruptible, and currently uninterruptible.

[0187] An interruptible state refers to a state in which the state machine can be interrupted at any time. For example, if all states of the first state machine are in a static equilibrium state, the first state machine can be determined to be in an interruptible state, and the interruption flag information is always the first parameter.

[0188] For example, when the first state machine is used to control the robot to enter the four-wheel support state, the state type of all states corresponding to the first state machine is the static equilibrium state, that is, the first state machine can be interrupted at any time. Therefore, it can be determined that the first state machine is in the interruptible state at any time, and the interruption flag information of the first state machine is always the first parameter.

[0189] The state that can never be interrupted refers to a state in which the state machine cannot be interrupted at any time. For example, if all the states of the first state machine are in a dynamic equilibrium state, that is, the first state machine cannot be interrupted at any time, it can be determined that the first state machine is in a state that can never be interrupted, and the interruption flag information is always the second parameter.

[0190] For example, if the first state machine is used to control the robot to climb stairs, and all states of the first state machine are in a dynamic equilibrium state, then it can be determined that the first state machine is in a state that can never be interrupted, and the interruption flag information of the first state machine is always the second parameter.

[0191] The current uninterruptible state refers to a state in which the interruption of the state machine's operation is not supported at the current moment. If the state type of the first state machine at the current moment is a dynamic equilibrium state, then the first state machine can be determined to be in a current uninterruptible state, and the interruption flag information at the current moment is the second parameter. If the state type of the first state machine at the current moment is a static equilibrium state, then the first state machine can be determined to be in a current interruptible state. The current interruptible state refers to a state in which the interruption of the state machine's operation is supported at the current moment, and the interruption flag information at the current moment is the first parameter.

[0192] For example, when the first state machine controls the robot to switch the positions of the first mechanical leg group (e.g., the outer mechanical leg) and the second mechanical leg group (e.g., the inner mechanical leg), the robot can be in a two-wheel balanced state and a four-wheel supported state. In the two-wheel balanced state, the first state machine can be determined to be in an uninterruptible state, with the interruption flag being the second parameter. In the four-wheel supported state, the first state machine can be determined to be in an interruptible state, with the interruption flag being the first parameter. The two-wheel balanced state refers to the state in which the robot maintains its standing position using only two wheels from one mechanical leg group.

[0193] Optionally, the wheeled hybrid robot combines a clock signal to determine its state at various times. For example, the wheeled hybrid robot can determine its current state based on sensing information (such as force sensor data) measured by an IMU. If the sensing information determines that the current state is a static equilibrium state, the first state machine can be determined to be in an interruptible state. If the sensing information determines that the current state is a dynamic equilibrium state, the first state machine can be determined to be in an uninterruptible state.

[0194] Optionally, if it is determined from the perception information that all states corresponding to the first state machine are in a dynamic equilibrium state, it can be determined that the first state machine is always in a state that can never be interrupted; if it is determined from the perception information that all states corresponding to the first state machine are in a static equilibrium state, it can be determined that the first state machine is always in a state that can be interrupted at any time.

[0195] In summary, the embodiments of this application generate interruption identification information in real time based on the current state through the first state machine, which helps to improve the accuracy of determining the state machine switching timing, and thus helps to improve the control accuracy of the robot.

[0196] In some embodiments, taking the above-mentioned robot as a foot-wheel hybrid robot as an example, referring to FIG12, the technical solution provided by the embodiments of this application may include the following contents.

[0197] 1. Query compliant transfer data.

[0198] Optionally, at the current moment, the computer system of the wheeled hybrid robot executes a first state machine to control the movement of the wheeled hybrid robot. The first state machine can refer to any of the state machines possessed by the wheeled hybrid robot.

[0199] When the computer system receives a switching instruction at the current moment, it obtains the identification information of the second state machine according to the switching instruction, and queries the compliant transfer data of the foot-wheel hybrid robot according to the identification information of the first state machine and the identification information of the second state machine, so as to determine whether the first state machine supports switching to the second state machine.

[0200] 2. If the first state machine supports switching to the second state machine, query the interrupt flag information of the first state machine at the current moment.

[0201] The interrupt flag information of the first state machine at the current moment can be used to indicate whether the first state machine supports interrupted execution at the current moment.

[0202] 3. If the first state machine is in a state that can be interrupted at any time, interrupt the first state machine.

[0203] That is, when the first state machine is in an interruptible state, the first state machine supports being interrupted at the current moment, and the first state machine can be interrupted during its operation. Continue to step 4.

[0204] 4. Switch to the second state machine to continue execution.

[0205] In this embodiment, the entry conditions of each state machine are designed to be clear by default. At the time of switching between the first state machine and the second state machine, the computer system can perform attitude adaptation on the state controlled by the robot at the time of switching, so that the first state machine can be smoothly switched to the second state machine.

[0206] 5. When the first state machine is in an uninterruptible state, it does not respond to the switching instruction at the current moment.

[0207] That is, if the first state machine is in a non-interruptible state, the first state machine does not support being interrupted at the current moment. Continue to step 6.

[0208] 6. Continue executing the first state machine.

[0209] 7. Once the first state machine is interruptible, switch to the second state machine.

[0210] Optionally, if the first state machine is updated to be in the current interruptible state, the computer system can switch the first state machine to the second state machine.

[0211] 8. If the first state machine does not support switching to the second state machine, do not respond to the switching command at the current moment.

[0212] If the first state machine is in a state that can never be interrupted, that is, the first state machine does not support being interrupted at any time.

[0213] 9. Continue executing the first state machine.

[0214] 10. Discard the switching command.

[0215] In some embodiments, referring to FIG13, a schematic diagram of a state machine switching method provided in an embodiment of the present application is shown.

[0216] For robot 1300, during the transitions from the initial state machine to the relaxation state machine and from the relaxation state machine to the calibration state machine, the robot's own posture remains almost unchanged. After the calibration state machine is triggered by a switching command to enter the wheel state machine, the robot 1300's localization, navigation, and terrain detection modules are activated. The robot 1300 then completes tasks such as localizing its own state, recognizing the surrounding terrain, recognizing step heights, and calculating the distance between the robot's mechanical wheels and the front edge of the step, according to a pre-set process. After this process is completed, the robot 1300's state machine can be automatically or manually switched from the wheel state machine to the wheel-foot switching state machine. After the wheel-foot switching state machine completes, the robot 1300's state machine switches to the stair-climbing state machine, where further calibration of some joints is performed. After confirming the calibration is complete, the robot 1300 can automatically or manually switch to the stair-climbing state machine. Automatic switching is performed by the robot 1300, while manual switching is performed by the operator.

[0217] After the stair-climbing state machine finishes execution, the state machine of robot 1300 can be automatically or manually switched to the wheel-switching state machine.

[0218] Referring to Figure 14, curve 1401 shows the transitions of the various state machines of robot 1300 over time. Curve 1402 shows the change in the radian value of the base pitch angle detected by the IMU of robot 1300 over time. Curve 1403 shows the change in the joint angle (in radians) of the drive motor corresponding to the hip joint of the outer mechanical leg of robot 1300 over time. Curve 1404 shows the change in the joint angle of the drive motor corresponding to the hip joint of the inner mechanical leg of robot 1300 over time. Curve 1405 shows the change in the joint angle of the drive motor corresponding to the telescopic joint of the two outer mechanical legs of robot 1300 over time. Curve 1406 shows the change in the joint angle of the drive motor corresponding to the telescopic joint of the two inner mechanical legs of robot 1300 over time. Curve 1407 shows the change in the joint angle of the drive motor corresponding to the wheel joint of the mechanical wheel on the two outer mechanical legs of robot 1300 over time. Curve 1408 shows the change over time of the joint angles of the drive motors corresponding to the wheel joints of the mechanical wheels on the two inner mechanical legs of robot 1300. Curve 1409 shows the change over time of the joint angles of the drive motors corresponding to the ankle joints of the mechanical feet on the two outer mechanical legs of robot 1300. Curve 1410 shows the change over time of the joint angles of the drive motors corresponding to the ankle joints of the mechanical feet on the two inner mechanical legs of robot 1300.

[0219] As can be seen from the curves in Figure 14, the technical solution provided in the embodiments of this application can realize flexible and safe switching between the various state machines of the robot 1300.

[0220] In summary, the technical solution provided in this application, upon receiving a switching instruction, switches the first state machine to the second state machine when the first state machine supports switching to the second state machine and when the first state machine supports interruption, rather than switching the state machine arbitrarily at any time. This effectively improves the switching security of the state machine, and thus helps to improve the control security of the robot.

[0221] In addition, upon receiving a switching instruction, regardless of whether the switching instruction is compliant, the first state machine will only be switched to the second state machine if the first state machine supports switching to the second state machine and if the first state machine supports interrupted operation. This avoids the first state machine from being arbitrarily interrupted, which helps to improve the execution stability and robustness of the state machine, and thus helps to improve the control stability and robustness of the robot.

[0222] The following are embodiments of the apparatus of this application, which can be used to execute the embodiments of the method of this application. For details not disclosed in the embodiments of the apparatus of this application, please refer to the embodiments of the method of this application.

[0223] Referring to Figure 15, a block diagram of a robot control device according to an embodiment of this application is shown. This device has the function of implementing the robot control method described above; the function can be implemented in hardware or by hardware executing corresponding software. This device can be the robot described above, or it can be installed within a robot. As shown in Figure 15, the device 1500 includes: a motion control module 1501, an instruction receiving module 1502, and a state machine switching module 1503.

[0224] The motion control module 1501 is used to control the motion of the robot through a first state machine.

[0225] The instruction receiving module 1502 is used to receive a switching instruction, which is used to indicate switching to the second state machine.

[0226] The state machine switching module 1503 is used to switch the first state machine to the second state machine if there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine, and the interruptible state refers to a state that supports the interrupted operation of the first state machine.

[0227] The motion control module 1501 is also used to control the robot's motion through the second state machine.

[0228] In some embodiments, the state machine switching module 1503 is configured to:

[0229] If there is a compliant transition relationship between the first state machine and the second state machine, then the interruption identification information generated by the first state machine is obtained, and the interruption identification information is used to indicate whether the first state machine is in the interruptible state;

[0230] When the interruption identifier information is the first parameter, the first state machine is switched to the second state machine, and the first parameter is used to indicate that the first state machine is in the interruptible state.

[0231] In some embodiments, the state machine switching module 1503 is further configured to:

[0232] When the interruption identifier information is the second parameter, the robot movement continues to be controlled by the first state machine. The second parameter is used to indicate that the first state machine is in an uninterruptible state, which means that the first state machine is prohibited from interrupting its operation.

[0233] Alternatively, if there is no compliant transition relationship between the first state machine and the second state machine, the robot's movement will continue to be controlled through the first state machine.

[0234] In some embodiments, the state machine switching module 1503 is further configured to:

[0235] In response to the switching instruction, interrupt identification information generated by the first state machine is obtained, and the interrupt identification information is used to indicate whether the first state machine is in the interruptible state;

[0236] If the interruption identifier information is the first parameter, and there is a compliant transition relationship between the first state machine and the second state machine, then the first state machine is switched to the second state machine, and the first parameter is used to indicate that the first state machine is in the interruptible state.

[0237] In some embodiments, the state machine switching module 1503 is further configured to:

[0238] When the interruption flag information of the first state machine is the second parameter, the robot movement continues to be controlled by the first state machine. The second parameter is used to indicate that the first state machine is in an uninterruptible state, which means that the first state machine is prohibited from interrupting its operation.

[0239] If the interrupt identifier information of the first state machine is changed from the second parameter to the first parameter, and if there is a compliant transition relationship between the first state machine and the second state machine, then the first state machine is switched to the second state machine.

[0240] In some embodiments, the device 1500 further includes an identification information acquisition module and a query structure acquisition module (not shown in the figure).

[0241] The identification information acquisition module is used to acquire the identification information of the first state machine and the identification information of the second state machine.

[0242] The query structure acquisition module is used to query the compliance transfer data of the robot based on the identification information of the first state machine and the identification information of the second state machine, and obtain the query result. The compliance transfer data is used to indicate whether there is a compliance transfer relationship between the various state machines of the robot, and the query result is used to indicate whether there is a compliance transfer relationship between the first state machine and the second state machine.

[0243] In some embodiments, when the robot's state type is a static equilibrium state, the interruption identification information of the first state machine is the first parameter;

[0244] Alternatively, if the robot's state type is a dynamic equilibrium state, the interruption identifier information of the first state machine is the second parameter;

[0245] Alternatively, the interrupt flag information of the first state machine is always the first parameter or the second parameter;

[0246] Alternatively, the interrupt identification information of the first state machine is related to the runtime of the first state machine. For any runtime, the interrupt identification information of the first state machine is one of the first parameter and the second parameter.

[0247] Wherein, the first parameter is used to indicate that the first state machine is in the interruptible state, and the second parameter is used to indicate that the first state machine is not in the interruptible state.

[0248] In some embodiments, the instruction receiving module 1502 is configured to:

[0249] Receive the switching command from an external device coupled to the robot;

[0250] Alternatively, the switching command may be received from the command generation module inside the robot.

[0251] In some embodiments, the robot is a foot-wheel hybrid robot, wherein at least one of the mechanical legs has a pair of coaxial mechanical wheels and a mechanical foot.

[0252] The wheel-foot hybrid robot includes a wheel state machine and a wheel-foot switching state machine;

[0253] The wheel state machine is used to control the robot to enter the wheel motion state, which refers to the state in which the robot moves only through the mechanical wheels.

[0254] The wheel-foot switching state machine is used to control the robot to switch from a wheel-supported state to a foot-supported state. The wheel-supported state refers to the state in which the robot stands up using only the mechanical wheels, while the foot-supported state refers to the state in which the robot stands up using the mechanical feet to assist the mechanical wheels.

[0255] The compliant transfer relationship exists between the wheel state machine and the wheel foot switching state machine.

[0256] In some embodiments, the footwheel hybrid robot further includes a stair-climbing state machine and a footwheel switching state machine;

[0257] The stair-climbing state machine is used to control the robot's mechanical legs to swing alternately to climb stairs;

[0258] The foot-wheel switching state machine is used to control the robot to switch from the foot-supported state to the wheel-supported state;

[0259] The compliant transfer relationship exists between the wheel-foot switching state machine and the stair-climbing state machine;

[0260] The climbing state machine and the wheel switching state machine have the compliance transfer relationship;

[0261] There is no compliant transfer relationship between the wheel state machine and the foot wheel switching state machine;

[0262] The compliant transfer relationship exists between the foot wheel switching state machine and the wheel state machine.

[0263] In some embodiments, the wheeled hybrid robot has a robotic arm housed in its body, and the wheeled hybrid robot also includes a hand-waving state machine;

[0264] The hand-waving state machine is used to control the robot to wave the robotic arm;

[0265] The compliant transfer relationship exists between the wheel state machine and the wave state machine.

[0266] In summary, the technical solution provided in this application, upon receiving a switching instruction, switches the first state machine to the second state machine when the first state machine supports switching to the second state machine and when the first state machine supports interruption, rather than switching the state machine arbitrarily at any time. This effectively improves the switching security of the state machine, and thus helps to improve the control security of the robot.

[0267] In addition, upon receiving a switching instruction, regardless of whether the switching instruction is compliant, the first state machine will only be switched to the second state machine if the first state machine supports switching to the second state machine and if the first state machine supports interrupted operation. This avoids the first state machine from being arbitrarily interrupted, which helps to improve the execution stability and robustness of the state machine, and thus helps to improve the control stability and robustness of the robot.

[0268] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0269] Please refer to Figure 16, which shows a simplified structural block diagram of a robot provided in one embodiment of this application. This robot 1600 can be used to implement the robot control method provided in the above embodiments.

[0270] Typically, robot 1600 includes a processor 1601 and a memory 1602.

[0271] Processor 1601 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1601 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1601 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1601 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1601 may also include an AI processor for handling computational operations related to machine learning.

[0272] The memory 1602 may include one or more computer-readable storage media, which may be non-transitory. The memory 1602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1602 is used to store a computer program configured to be executed by one or more processors to implement the robot control method described above.

[0273] Those skilled in the art will understand that the structure shown in FIG16 does not constitute a limitation on the robot 1600, and may include more or fewer components than shown, or combine certain components, or employ different component arrangements.

[0274] In some embodiments, a computer-readable storage medium is also provided, wherein a computer program is stored therein, which, when executed by a processor of a computer device, implements the above-described robot control method.

[0275] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0276] In some embodiments, a computer program product is also provided, the computer program product comprising a computer program stored in a computer-readable storage medium. A robot's processor reads the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the robot to perform the aforementioned robot control method.

[0277] It should be noted that, in this application embodiment, before and during the collection of user-related data, a prompt interface, pop-up window, or voice prompt message can be displayed. This prompt interface, pop-up window, or voice prompt message is used to inform the user that their relevant data is being collected. This ensures that the application only begins executing the steps related to collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up window; otherwise (i.e., without receiving confirmation from the user), the steps to collect user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is processed strictly in accordance with the requirements of relevant national laws and regulations. The informed consent or separate consent of the personal information subject is obtained only with the user's consent and authorization. Subsequent data use and processing are conducted within the scope of laws and regulations and the authorization of the personal information subject. Furthermore, the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the actual location, real environment, and robots involved in this application are all obtained with full authorization.

[0278] It should be understood that "multiple" as used herein refers to two or more. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order between steps. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this approach.

[0279] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for controlling a robot, the method being executed by the robot, the method comprising: The robot's movement is controlled by a first state machine; Receive a switching instruction, the switching instruction being used to indicate switching to the second state machine; If there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, then the first state machine is switched to the second state machine. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine. The interruptible state refers to the state that supports the interrupted operation of the first state machine. The robot's movement is controlled by the second state machine.

2. The method according to claim 1, wherein, If there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, then switching the first state machine to the second state machine includes: If there is a compliant transition relationship between the first state machine and the second state machine, then the interruption identification information generated by the first state machine is obtained, and the interruption identification information is used to indicate whether the first state machine is in the interruptible state; When the interruption identifier information is the first parameter, the first state machine is switched to the second state machine, and the first parameter is used to indicate that the first state machine is in the interruptible state.

3. The method according to claim 2, wherein, The method further includes: When the interruption identifier information is the second parameter, the robot movement continues to be controlled by the first state machine. The second parameter is used to indicate that the first state machine is in an uninterruptible state, which means that the first state machine is prohibited from interrupting its operation. or, If there is no compliant transition relationship between the first state machine and the second state machine, the robot movement will continue to be controlled through the first state machine.

4. The method according to claim 1, wherein, If there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state, then switching the first state machine to the second state machine includes: In response to the switching instruction, interrupt identification information generated by the first state machine is obtained, and the interrupt identification information is used to indicate whether the first state machine is in the interruptible state; If the interruption identifier information is the first parameter, and there is a compliant transition relationship between the first state machine and the second state machine, then the first state machine is switched to the second state machine, and the first parameter is used to indicate that the first state machine is in the interruptible state.

5. The method according to claim 4, wherein, The method further includes: When the interruption flag information of the first state machine is the second parameter, the robot movement continues to be controlled by the first state machine. The second parameter is used to indicate that the first state machine is in an uninterruptible state, which means that the first state machine is prohibited from interrupting its operation. If the interrupt identifier information of the first state machine is changed from the second parameter to the first parameter, and if there is a compliant transition relationship between the first state machine and the second state machine, then the first state machine is switched to the second state machine.

6. The method according to any one of claims 1 to 5, wherein, The method further includes: Obtain the identification information of the first state machine and the identification information of the second state machine; Based on the identification information of the first state machine and the identification information of the second state machine, the compliance transfer data of the robot is queried to obtain the query result. The compliance transfer data is used to indicate whether there is a compliance transfer relationship between the various state machines of the robot, and the query result is used to indicate whether there is a compliance transfer relationship between the first state machine and the second state machine.

7. The method according to any one of claims 1 to 6, wherein, When the robot's state type is static equilibrium, the interruption identifier information of the first state machine is the first parameter; or, When the robot's state type is dynamic equilibrium, the interruption identifier information of the first state machine is the second parameter; or, The interrupt flag information of the first state machine is always either the first parameter or the second parameter; or, The interrupt identification information of the first state machine is related to the runtime of the first state machine. For any runtime, the interrupt identification information of the first state machine is one of the first parameter and the second parameter. Wherein, the first parameter is used to indicate that the first state machine is in the interruptible state, and the second parameter is used to indicate that the first state machine is not in the interruptible state.

8. The method according to any one of claims 1 to 7, wherein, The receiving of the handover instruction includes: Receive the switching command from an external device coupled to the robot; or, The switching command is received from the command generation module inside the robot.

9. The method according to any one of claims 1 to 8, wherein, The robot is a foot-wheel hybrid robot. In the mechanical legs of the foot-wheel hybrid robot, at least one mechanical leg has a pair of coaxial mechanical wheels and a mechanical foot. The wheel-foot hybrid robot includes a wheel state machine and a wheel-foot switching state machine; The wheel state machine is used to control the robot to enter the wheel motion state, which refers to the state in which the robot moves only through the mechanical wheels. The wheel-foot switching state machine is used to control the robot to switch from a wheel-supported state to a foot-supported state. The wheel-supported state refers to the state in which the robot stands up using only the mechanical wheels, while the foot-supported state refers to the state in which the robot stands up using the mechanical feet to assist the mechanical wheels. The compliant transfer relationship exists between the wheel state machine and the wheel foot switching state machine.

10. The method according to claim 9, wherein, The footwheel hybrid robot also includes a stair-climbing state machine and a footwheel switching state machine; The stair-climbing state machine is used to control the robot's mechanical legs to swing alternately to climb stairs; The foot-wheel switching state machine is used to control the robot to switch from the foot-supported state to the wheel-supported state; The compliant transfer relationship exists between the wheel-foot switching state machine and the stair-climbing state machine; The climbing state machine and the wheel switching state machine have the compliance transfer relationship; There is no compliant transfer relationship between the wheel state machine and the foot wheel switching state machine; The compliant transfer relationship exists between the foot wheel switching state machine and the wheel state machine.

11. The method according to claim 9 or 10, wherein, The footwheel hybrid robot has a robotic arm installed in its body, and it also includes a hand-waving state machine. The hand-waving state machine is used to control the robot to wave the robotic arm; The compliant transfer relationship exists between the wheel state machine and the wave state machine.

12. A control device for a robot, the device comprising: The motion control module is used to control the robot's motion via a first state machine; The instruction receiving module is used to receive switching instructions, which are used to indicate switching to the second state machine; A state machine switching module is used to switch the first state machine to the second state machine if there is a compliant transition relationship between the first state machine and the second state machine, and the first state machine is in an interruptible state. The compliant transition relationship is used to indicate that the first state machine supports switching to the second state machine, and the interruptible state refers to a state that supports the interrupted operation of the first state machine. The motion control module is also used to control the robot's motion through the second state machine.

13. A robot comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the robot control method as claimed in any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, the computer program being loaded and executed by a processor to implement the robot control method as claimed in any one of claims 1 to 11.

15. A computer program product comprising a computer program stored in a computer-readable storage medium, wherein a processor reads from and executes the computer program to implement the robot control method as claimed in any one of claims 1 to 11.