Motion control method and device for multi-legged robots
By switching to a preset control mode when the multi-legged robot is subjected to changes in force, the problem of motor idling and loss of control when suspended in the air is solved, realizing intelligent motion control of the robot's legs and reducing damage and resource waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MAGICLAB ROBOTICS TECHNOLOGY (WUXI) CO LTD
- Filing Date
- 2022-07-12
- Publication Date
- 2026-05-26
AI Technical Summary
Multi-legged robots are prone to motor idling and loss of control when suspended in the air, leading to robot damage and resource waste. Current technology cannot intelligently control the movement of robot legs in different scenarios.
When the force on the multi-legged robot changes, it switches to a preset control mode, including a motor position control mode and a motor speed control mode, to control the position or speed of the leg motors respectively, so as to fix or stabilize the leg movement.
This effectively prevents the motors from spinning uncontrollably when the multi-legged robot is suspended in the air, improves the robot's intelligence, and reduces damage and resource waste.
Smart Images

Figure CN117428750B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of robotics, and more specifically, to a motion control method and apparatus for a multi-legged robot. Background Technology
[0002] During robot movement on the ground, it is prone to being lifted or tilted, causing some legs to dangle in the air. When the robot's legs are dangling, without the ground to provide support, the legs will continue to move in the original pattern, causing the robot's motors to spin idly. This can lead to robot malfunction, damage, and wasted resources. In current technology, the robot is typically manually turned off when picked up. When the robot is placed back on the ground for movement, it needs to be turned on again. This method does not provide intelligent control over the robot's leg movements to suit different scenarios. Summary of the Invention
[0003] The present invention provides a motion control method and apparatus for a multi-legged robot, so as to at least solve the problem of motor idling and loss of control when a multi-legged robot is suspended in the air in the related art.
[0004] According to an embodiment of the present invention, a motion control method for a multi-legged robot is provided, comprising: controlling the multi-legged robot to switch to a preset control mode when the force on the multi-legged robot changes, wherein the preset control mode includes one of the following: a motor position control mode, and a motor speed control mode; the motor position control mode includes: controlling the motors of N legs of the multi-legged robot to rotate to corresponding first preset positions to fix the legs in corresponding second preset positions, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot; the motor speed control mode includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed to control the N legs to move at the first preset speed.
[0005] According to an embodiment of the present invention, a motion control method for a multi-legged robot is provided, comprising: determining the forces acting on the multi-legged robot, wherein the forces represent the sum of the supporting forces at the ends of the legs of the multi-legged robot; determining the resultant force of the forces acting on the multi-legged robot in the direction of gravity; and controlling the motion state of the legs according to a preset control mode when the forces acting on the multi-legged robot change based on the resultant force; wherein the preset control mode includes one of the following: a motor position control mode, a motor speed control mode; the motor position control mode includes: controlling the motors of the legs of the multi-legged robot to rotate to corresponding first preset positions to fix the legs in corresponding second preset positions; the motor speed control mode includes: controlling the motors of the legs of the multi-legged robot to rotate at a first preset speed to control the legs to move at the first preset speed.
[0006] According to another embodiment of the present invention, a motion control device for a multi-legged robot is also provided, comprising: a first control module, configured to control the multi-legged robot to switch to a preset control mode when the force on the multi-legged robot changes, wherein the preset control mode includes one of the following: a motor position control mode, and a motor speed control mode; the motor position control mode includes: controlling the motors of N legs of the multi-legged robot to rotate to corresponding first preset positions to fix the legs in corresponding second preset positions, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot; the motor speed control mode includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed to control the N legs to move at the first preset speed.
[0007] In one exemplary embodiment, the device further includes a fifth determining module, configured to determine that the N legs switch from a ground-based motion state to a suspended motion state, causing a change in the forces acting on the multi-legged robot.
[0008] In an exemplary embodiment, the first control module includes: a first control unit, configured to, when the preset control mode is the motor position control mode, control the motors of N legs to rotate to the corresponding first preset positions respectively when the force on the multi-legged robot changes, so as to fix the N legs in the corresponding second preset positions and stop their movement, wherein the other legs not in a suspended state maintain their original movement state; or, control all the motors of the legs to rotate to the corresponding first preset positions respectively, so as to fix all the legs in the corresponding second preset positions and stop their movement; or, a second control unit, configured to, when the preset control mode is the motor speed control mode, control the motors of N legs to rotate at the first preset speed, so as to control the N legs to move at the first preset speed, wherein the other legs not in a suspended state maintain their original movement state; or, control all the motors of the legs to rotate at the first preset speed, so as to control all the legs to move in the air at the first preset speed.
[0009] In one exemplary embodiment, the device further includes: a second control module, configured to, when the force on the multi-legged robot changes, control the multi-legged robot to switch to a control mode, and when the preset control mode is the control mode for the motor position, if it is determined that N legs have switched from a suspended static state to a ground static state and all legs are in contact with the ground, control the motors of all the legs to rotate at a second preset speed to restore all the legs to ground motion, or control all the legs to remain stationary; if a preset motion mode is detected, control the legs to move according to the preset motion mode, or if a motion control command is received, control the legs to move according to the motion mode indicated by the motion control command, wherein the preset motion mode... The motion mode is the motion mode of the multi-legged robot before the force changes; or, the third control module is used to control the motors of all the legs to rotate at a second preset speed when the preset control mode is the control mode of the motor speed, and when N of the legs switch from the suspended running state to the ground movement state and all the legs are in contact with the ground, so as to restore all the legs to the movement on the ground, or to control all the legs to stop moving on the ground; when the preset motion mode is detected, the legs are controlled to move according to the preset motion mode, or when a motion control command is received, the legs are controlled to move according to the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force changes.
[0010] According to another embodiment of the present invention, a motion control device for a multi-legged robot is also provided, comprising: a first determining module for determining the forces acting on the multi-legged robot, wherein the forces are used to represent the sum of forces acting on the ends of the legs supporting the multi-legged robot; a second determining module for determining the resultant force of the forces acting on the multi-legged robot in the direction of gravity; a third determining module for determining the state of the multi-legged robot based on the resultant force; and a fourth determining module for controlling the motion state of the legs according to a preset control mode when the forces acting on the multi-legged robot change based on the resultant force; wherein the preset control mode includes one of the following: a motor position control mode, and a motor speed control mode; the motor position control mode includes controlling the motors of the multi-legged robot's legs to rotate to corresponding first preset positions to fix the legs in corresponding second preset positions; the motor speed control mode includes controlling the motors of the multi-legged robot's legs to rotate at a first preset speed to control the legs to move at the first preset speed.
[0011] In an exemplary embodiment, the first determining module includes: a first acquiring unit, configured to acquire the torque of a motor used to control the corresponding leg movement, and obtain the supporting force at the end of the leg; a first processing unit, configured to filter the supporting force at the end of the leg, and obtain the filtered supporting force at the end of the leg; and a first determining unit, configured to determine the sum of the filtered supporting forces at the end of the leg as the force on the multi-legged robot.
[0012] In an exemplary embodiment, the apparatus further includes a sixth determining module, configured to determine that the force on the multi-legged robot has changed when the resultant force is less than or equal to a first preset resultant force, wherein the first preset resultant force is determined based on the weight of the multi-legged robot.
[0013] In an exemplary embodiment, the device further includes: a fourth control module, configured to, after controlling the movement state of the legs according to the preset control mode, control all the motors of the legs to rotate at a second preset speed when the resultant force is greater than a second preset resultant force, so that all the legs return to ground motion, or control all the legs to remain stationary, wherein the second preset resultant force is determined based on the weight of the multi-legged robot; and a fifth control module, configured to, upon detecting a preset movement mode, control the legs to move according to the preset movement mode; or, upon receiving a issued movement control command, control the legs to move according to the movement mode indicated by the movement control command, wherein the preset movement mode is the movement mode of the multi-legged robot before the force changes.
[0014] In an exemplary embodiment, the second determining module includes: a first transformation unit, configured to convert the force into a force in the world coordinate system using a preset rotation matrix to obtain the transformed force, wherein the force is a force in the body coordinate system of the multi-legged robot, and the preset rotation matrix is a coordinate transformation matrix between the body coordinate system and the world coordinate system; and a second determining unit, configured to determine the force in the direction of gravity of the transformed force as the resultant force.
[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when in motion.
[0016] According to yet another embodiment of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.
[0017] This invention allows a multi-legged robot to switch to a preset control mode when the forces acting on it change. The preset control mode includes one of the following: a motor position control mode or a motor speed control mode. The motor position control mode involves controlling the motors of the N legs of the multi-legged robot to rotate to their respective first preset positions, thereby fixing the legs in their corresponding second preset positions. Here, N is a natural number greater than 1 and less than or equal to the number of legs in the multi-legged robot. The motor speed control mode involves controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, thereby controlling the N legs to move at the first preset speed. Because the method switches control modes when the forces acting on the multi-legged robot change, it does not continuously follow the original control mode, thus preventing the legs from spinning freely. Therefore, it solves the problem of motor spinning uncontrollably when the multi-legged robot is suspended in the air, which exists in related technologies. This achieves effective control of the multi-legged robot's leg movement, improves the robot's intelligence, and reduces damage to the robot. Attached Figure Description
[0018] Figure 1 This is a block diagram of the mobile terminal hardware structure of the motion control method for a multi-legged robot according to an embodiment of the present invention;
[0019] Figure 2 This is a flowchart (I) of a motion control method for a multi-legged robot according to an embodiment of the present invention;
[0020] Figure 3 This is a flowchart (II) of a motion control method for a multi-legged robot according to an embodiment of the present invention;
[0021] Figure 4 This is a structural block diagram (I) of the motion control device for a multi-legged robot according to an embodiment of the present invention;
[0022] Figure 5 This is a flowchart (II) of a motion control method for a multi-legged robot according to an embodiment of the present invention. Detailed Implementation
[0023] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0025] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a mobile terminal hardware structure block diagram of the motion control method for a multi-legged robot according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the motion control method for the multi-legged robot in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0028] This embodiment provides a motion control method for a multi-legged robot. Figure 2 This is a flowchart (I) of a motion control method for a multi-legged robot according to an embodiment of the present invention, as shown below. Figure 2 As shown, the process includes the following steps:
[0029] Step S202: When the force on the multi-legged robot changes, control the multi-legged robot to switch to a preset control mode. The preset control mode includes one of the following: motor position control mode, motor speed control mode.
[0030] The motor position control mode includes: controlling the motors of N legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot;
[0031] The motor speed control mode includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, so as to control the N legs to move at the first preset speed.
[0032] The aforementioned motion control methods for multi-legged robots include, but are not limited to, applications in scenarios where the legs of a multi-legged robot are suspended in the air during ground movement (walking, running, trotting), such as when it is lifted up by an external force or when all four legs are off the ground during running.
[0033] In this embodiment, a multi-legged robot refers to a robot with multiple legs (e.g., a robot dog, a bipedal robot, a hexapedal robot, etc.). Each leg can have multiple joints, and different leg joints can be controlled by different leg motors. The leg movements of a multi-legged robot can be either a stepping mode or a gliding mode. For example, if a quadruped robot runs in a stepping mode, and the motors continue to move at the running speed while all four legs are off the ground, it will cause the robot to lose control.
[0034] Optionally, the forces acting on the multi-legged robot may change in the following ways:
[0035] 1) When a multi-legged robot is walking, running, or jogging on the ground, it is lifted up and its legs are suspended in the air, which reduces the force on the multi-legged robot.
[0036] 2) When a multi-legged robot is lifted up while walking, running, or jogging on the ground, with some of its legs suspended in the air, the force exerted on the multi-legged robot will decrease.
[0037] 3) When the multi-legged robot is put back on the ground from a suspended state, the force on the multi-legged robot will increase.
[0038] In this embodiment, each leg can be equipped with a motor to control its movement. Alternatively, a single motor can be installed on all legs to control the movement of all legs simultaneously. For example, with a motor on each leg, when the leg is suspended in the air, each motor can be controlled to rotate to a fixed position to fix the end of each leg, or each motor can be controlled to operate at a low speed to control the slow movement of the end of each leg.
[0039] Optionally, the value of N can be determined based on different application scenarios. For example, the value of N is equal to the number of legs of the multi-legged robot, so that all legs are suspended in the air when the multi-legged robot is lifted; or, the value of N is less than the number of legs of the multi-legged robot (for example, N=2), so that two legs are suspended in the air when the multi-legged robot is lifted, while the remaining legs are grounded, maintaining the original movement mode unchanged.
[0040] The entity performing the above steps may be a terminal, a server, a specific processor set in the terminal or server, or a processor or processing device set up relatively independently of the terminal or server, but is not limited to these.
[0041] Through the above steps, when the force applied to the multi-legged robot changes, the robot is controlled to switch to a preset control mode. The preset control mode includes one of the following: a motor position control mode, or a motor speed control mode. The motor position control mode involves controlling the motors of the N legs of the multi-legged robot to rotate to their respective first preset positions, thereby fixing the legs in their corresponding second preset positions. Here, N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot. The motor speed control mode involves controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, thereby controlling the N legs to move at the first preset speed. Because the control mode is switched when the force applied to the multi-legged robot changes, the robot does not continue to move according to the original control mode, thus preventing the legs from spinning freely. Therefore, this solves the problem of motor spinning out of control when the multi-legged robot is lifted and suspended in the air, which exists in related technologies. This achieves effective control of the multi-legged robot's leg movement, improves the robot's intelligence, and reduces robot damage.
[0042] In one exemplary embodiment, the above method further includes:
[0043] S1 determines that N legs switch from ground motion to suspended motion, causing a change in the forces acting on the multi-legged robot.
[0044] Optionally, the transition of N legs from a ground-based movement state to a suspended movement state includes one of the following cases:
[0045] When a multi-legged robot is lifted during movement, all its legs are suspended in the air. The ends of all its legs bear no load; in other words, the multi-legged robot is completely lifted and suspended. For example, if a quadruped robot is lifted while walking, all four legs are suspended in the air, causing the forces acting on the quadruped robot to change, becoming less than the forces acting on it when walking on the ground.
[0046] In a multi-legged robot, some legs are lifted and suspended in the air during movement. The ends of some legs are not subjected to force, meaning the robot is not completely lifted and suspended; some legs are on the ground. For example, in a quadruped robot walking, two legs are lifted while maintaining a walking posture on the ground. This causes a change in the forces acting on the quadruped robot; the forces acting on the two suspended legs are less than the forces acting on all legs when walking on the ground.
[0047] When a multi-legged robot is lifted up during movement, its body is not subjected to force. For example, when a quadruped robot is walking, its body is lifted up. Although its legs are on the ground, the force acting on the quadruped robot changes. That is, being lifted up results in a force less than that experienced by the quadruped robot when it is walking normally on the ground.
[0048] In one exemplary embodiment, when the forces acting on the multi-legged robot change, controlling the multi-legged robot to switch to a preset control mode includes:
[0049] S1, when the preset control mode is the motor position control mode, when the force on the multi-legged robot changes, the motors of N legs are controlled to rotate to their respective first preset positions to fix the N legs in their respective second preset positions and stop the movement. The other legs not in a suspended state maintain their original movement state. Alternatively, the motors of all legs are controlled to rotate to their respective first preset positions to fix all legs in their respective second preset positions and stop the movement.
[0050] S2, when the preset control mode is the motor speed control mode, control the motors of N legs to rotate at the first preset speed, so as to control the N legs to move at the first preset speed, wherein the other legs that are not in the suspended movement state maintain their original movement state, or control the motors of all legs to rotate at the first preset speed, so as to control all legs to move in the air at the first preset speed.
[0051] This embodiment applies to scenarios where at least some legs of a multi-legged robot are suspended in the air. For example, when a quadruped robot is jumping, or when two legs are lifted by hand, leaving the two legs suspended in the air, controlling the motors of the other two suspended legs to rotate slowly, or stopping the motors altogether, can prevent the quadruped robot from going out of control.
[0052] Optionally, the motors of the N legs of the multi-legged robot are controlled to rotate to their respective first preset positions, including controlling the motor of each leg to rotate to a fixed position and then stop rotating.
[0053] Optionally, controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed can be achieved by controlling the N legs to move at a relatively slow speed, for example, controlling the leg motors to rotate at a speed of 400 revolutions per minute. This can prevent the multi-legged robot from going out of control due to excessively high motor speeds.
[0054] In one exemplary embodiment, after controlling the multi-legged robot to switch to a control mode when the force acting on the multi-legged robot changes, the method further includes:
[0055] S1, when the preset control mode is the motor position control mode, after determining that N legs have switched from a suspended static state to a ground static state and all legs are in contact with the ground, control the motors of all legs to rotate at a second preset speed to restore all legs to ground motion, or control all legs to remain stationary; when a preset motion mode is detected, control the legs to move according to the preset motion mode, or when a motion control command is received, control the legs to move according to the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force changes; or...
[0056] S2, when the preset control mode is the motor speed control mode, when N legs switch from the suspended running state to the ground movement state and all legs are in contact with the ground, control all leg motors to rotate at the second preset speed so that all legs resume movement on the ground, or control all legs to stop moving on the ground; when a preset movement mode is detected, control the legs to move according to the preset movement mode, or when a motion control command is received, control the legs to move according to the movement mode indicated by the motion control command, wherein the preset movement mode is the movement mode of the multi-legged robot before the force changes.
[0057] Optionally, this embodiment applies to scenarios where a multi-legged robot is lowered back to the ground from a suspended state. In this scenario, the leg control modes include one of the following movement patterns:
[0058] 1) Control N legs to remain fixed on the ground, detect the movement pattern before being suspended in the air, and control all legs to move at the speed of the movement pattern before being suspended in the air.
[0059] 2) Keep N legs fixed on the ground, detect new motion control commands, and control all legs to move at the speed specified in the new motion control commands.
[0060] 3) Control N legs to switch from slow movement to fixed position, detect the movement state mode before being suspended, and control all legs to move at the movement speed in the movement mode before being suspended.
[0061] 4) Control N legs to switch from slow movement to fixed position, detect new motion control commands, and control all legs to move at the speed specified in the new motion control command.
[0062] 5) Control N legs to continue moving slowly on the ground, detect the movement pattern before being suspended in the air, and if the movement pattern before being suspended in the air is detected, control all legs to move at the movement speed in the movement pattern before being suspended in the air.
[0063] 6) Control N legs to continue moving slowly on the ground, detect new motion control commands, and if a new motion control command is detected, control all legs to move at the speed specified in the new motion control command.
[0064] For example, the legs of a quadruped robot can rotate at 400 revolutions per minute while suspended in the air, or the legs can remain stationary and then move at 2900 rpm (the original movement pattern) when placed back on the ground. The multi-legged robot can be intelligently controlled to resume movement.
[0065] This embodiment provides a motion control method for a multi-legged robot. Figure 3 This is a flowchart (II) of a motion control method for a multi-legged robot according to an embodiment of the present invention, as shown below. Figure 3 As shown, the process includes the following steps:
[0066] Step S302: Determine the forces acting on the multi-legged robot, wherein the forces are used to represent the sum of the supporting forces at the ends of the legs of the multi-legged robot.
[0067] Step S304: Determine the resultant force of the above-mentioned forces in the direction of gravity;
[0068] Step S306: When it is determined that the force on the multi-legged robot has changed based on the above-mentioned resultant force, the movement state of the legs is controlled according to a preset control mode.
[0069] Among them, the above-mentioned preset control modes include one of the following: motor position control mode, motor speed control mode;
[0070] The control mode for the motor position includes: controlling the motors of the legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position;
[0071] The control mode of the motor speed mentioned above includes: controlling the motor of the legs of the multi-legged robot to rotate at a first preset speed, so as to control the legs to move at the first preset speed.
[0072] In this embodiment, a multi-legged robot refers to a robot with N legs (e.g., a robot dog, a bipedal robot, a hexapod robot, etc.). Each leg can have N joints, and different leg joints can be controlled by different leg motors. The leg movements of a multi-legged robot can be either a stepping mode or a gliding mode.
[0073] Optionally, there are several ways to obtain the torque of each motor controlling each leg movement, such as detecting the torque of each motor by sensors placed on the leg, or obtaining the torque through torque sensors at the joints. The force at the end of the leg is then calculated based on the Jacobian matrix.
[0074] Optionally, in force control mode, the multi-legged robot's controller calculates the torque required for each motor based on the robot's current state and commands. Furthermore, when the multi-legged robot is on the ground, the ground provides corresponding support to the legs, generating a force in the direction of gravity.
[0075] Optionally, the states of the multi-legged robot include the state of walking, trotting, running, etc., under the force control mode, where the end effector is subjected to the ground force, and the state of the multi-legged robot being picked up and suspended in the air.
[0076] The entity performing the above steps may be a terminal, a server, a specific processor set in the terminal or server, or a processor or processing device set up relatively independently of the terminal or server, but is not limited to these.
[0077] Through the above steps, the forces acting on the multi-legged robot are determined, where these forces represent the sum of the supporting forces at the ends of the robot's legs; the resultant force of these forces in the direction of gravity is determined; and when the forces acting on the multi-legged robot change based on this resultant force, the movement of the legs is controlled according to a preset control mode. That is, by determining the resultant force of N legs, it can be determined whether the multi-legged robot is moving on the ground or being lifted, and the movement of the multi-legged robot's legs is controlled according to the changes in the forces acting on the robot. Therefore, this solves the problem of motor idling and loss of control that occurs when a multi-legged robot is suspended in the air, a problem present in related technologies, achieving effective control of the multi-legged robot's leg movement, improving the robot's intelligence, and reducing robot damage.
[0078] In one exemplary embodiment, determining the forces acting on the multi-legged robot includes:
[0079] S1, Determine the forces acting on the multi-legged robot, including:
[0080] S2, obtain the torque of the motor used to control the corresponding leg movement, and obtain the supporting force at the end of the leg;
[0081] S3, filter the supporting force at the end of the leg to obtain the filtered supporting force at the end of the leg;
[0082] S4 determines the sum of the supporting forces at the ends of the filtered legs as the forces acting on the multi-legged robot.
[0083] Optionally, there are several ways to obtain the torque of the motors used to control the corresponding leg movements. For example, the torque of each motor can be detected by sensors placed on the legs, or the supporting force of each leg can be detected by sensors placed on the ground. Torque represents a physical quantity that describes the rotational effect produced when a force acts on an object. The vector product of force and lever arm is torque.
[0084] Furthermore, since the detected torque may contain noise signals, a low-pass filter can be used to filter the supporting force of each leg. Low-pass filtering is a noise filtering method where low-frequency signals can pass normally, while high-frequency signals exceeding a set threshold are blocked or attenuated. However, the extent of blocking or attenuation varies depending on the frequency and the filtering procedure (purpose). By summing the filtered supporting forces of each leg, the force experienced by the multi-legged robot can be obtained.
[0085] Optionally, in this embodiment, the sum of unfiltered support forces can be calculated first, and then the sum of support forces can be filtered to obtain the forces acting on the multi-legged robot.
[0086] In one exemplary embodiment, the above method further includes:
[0087] S1, when the resultant force is less than or equal to the first preset resultant force, it is determined that the force on the multi-legged robot has changed, wherein the first preset resultant force is determined based on the weight of the multi-legged robot.
[0088] Optionally, the forces acting on the multi-legged robot may change in the following ways:
[0089] 1) When a multi-legged robot is walking, running, or jogging on the ground, it is lifted up and its legs are suspended in the air, which reduces the force on the multi-legged robot.
[0090] 2) When a multi-legged robot is lifted up while walking, running, or jogging on the ground, with some of its legs suspended in the air, the force exerted on the multi-legged robot will decrease.
[0091] 3) When the multi-legged robot is put back on the ground from a suspended state, the force on the multi-legged robot will increase.
[0092] Optionally, the first preset resultant force can be a value between 30% and 50% of the weight of the multi-legged robot body. For example, the first preset resultant force is 30%, 40%, or 50% of the weight of the multi-legged robot body.
[0093] Optionally, the value of the first preset resultant force can also be a predetermined parameter, such as 1, 0.5, etc.
[0094] In one exemplary embodiment, the above method further includes:
[0095] S1, after controlling the leg's movement according to the preset control mode, the method further includes:
[0096] S2, when the resultant force is greater than the second preset resultant force, control all the motors of the legs to rotate at the second preset speed so that all the legs can return to the ground motion, or control all the legs to be stationary, wherein the second preset resultant force is determined based on the weight of the multi-legged robot;
[0097] S3, when a preset motion pattern is detected, control the legs to move according to the preset motion pattern; or, when a motion control command is received, control the legs to move according to the motion pattern indicated by the motion control command, wherein the preset motion pattern is the motion pattern of the multi-legged robot before the force changes.
[0098] Optionally, this embodiment applies to scenarios where a multi-legged robot is lowered back to the ground from a suspended state. In this scenario, the leg control modes include one of the following movement patterns:
[0099] 1) Control N legs to remain fixed on the ground, detect the movement pattern before being suspended in the air, and control all legs to move at the speed of the movement pattern before being suspended in the air.
[0100] 2) Keep N legs fixed on the ground, detect new motion control commands, and control all legs to move at the speed specified in the new motion control commands.
[0101] 3) Control N legs to switch from slow movement to fixed position, detect the movement state mode before being suspended, and control all legs to move at the movement speed in the movement mode before being suspended.
[0102] 4) Control N legs to switch from slow movement to fixed position, detect new motion control commands, and control all legs to move at the speed specified in the new motion control command.
[0103] 5) Control N legs to continue moving slowly on the ground, detect the movement pattern before being suspended in the air, and if the movement pattern before being suspended in the air is detected, control all legs to move at the movement speed in the movement pattern before being suspended in the air.
[0104] 6) Control N legs to continue moving slowly on the ground, detect new motion control commands, and if a new motion control command is detected, control all legs to move at the speed specified in the new motion control command.
[0105] Optionally, the second preset resultant force can be a value between 70% and 100% of the weight of the multi-legged robot body. For example, the second preset resultant force can be 70% of the weight of the multi-legged robot body, 80% of the weight of the multi-legged robot body, or the weight of the multi-legged robot body. Optionally, the value of the second preset resultant force can also be a predetermined parameter, such as 2, 2.5, etc.
[0106] Furthermore, in this embodiment, the legs of the multi-legged robot can be in a moving state or a stationary state before being suspended in the air. For example, if the legs of the multi-legged robot are in a moving state before being suspended in the air, when the multi-legged robot is placed back on the ground, the resultant force of the N legs is greater than or equal to 70% of the weight of the multi-legged robot body, and the motors of each leg resume rotation to restore the movement of the multi-legged robot's legs.
[0107] In one exemplary embodiment, determining the resultant force of the forces acting on the object in the direction of gravity includes:
[0108] S1, using a preset rotation matrix to transform the force into a force in the world coordinate system, and obtain the transformed force, where the force is the force in the body coordinate system of the multi-legged robot, and the preset rotation matrix is the coordinate transformation matrix between the body coordinate system and the world coordinate system.
[0109] S2 determines the resultant force as the force in the direction of gravity after the transformation.
[0110] Optionally, the rotation matrix can be determined based on the body posture of the multi-legged robot. For example, the forces acting on the body of the multi-legged robot in the multi-legged robot coordinate system. B f = f1 + f2 + f3 + f4; the fuselage attitude angles roll, pitch, and yaw are [αβγ]. T Then the rotation matrix R = Rx(α)*Rx(β)*Rx(β);
[0111] in, Forces acting on the fuselage in the world coordinate system: w f = R* B f = [ w fx* w fy* w fz] T .
[0112] In this embodiment, by fixing the legs or controlling their slow movement when they are suspended in the air, loss of control due to excessively rapid leg rotation can be prevented.
[0113] The present invention will now be described in conjunction with specific embodiments:
[0114] This embodiment uses the scenario of a quadruped robot's legs being suspended in the air and then being placed back on the ground as an example for illustration, specifically including the following steps:
[0115] S1. The supporting force at the end of each leg is calculated based on the torque of the motors in the quadruped robot. There are various ways to obtain the torque, such as detecting the torque of each motor by sensors installed on each leg. In this embodiment, the torque obtained by the joint torque sensor is used to calculate the supporting force at the end of each leg based on the Jacobian matrix.
[0116] S2. Because fluctuations in motor torque can cause significant fluctuations in the calculated force, the supporting force of each leg needs to be low-pass filtered. Low-pass filtering is a noise filtering method where low-frequency signals can pass normally, while high-frequency signals exceeding a set threshold are blocked or weakened. However, the extent of blocking or weakening will vary depending on the frequency and the specific filtering procedure (purpose).
[0117] S3, add up all the filtered support forces to get the resultant force of the support forces (corresponding to the forces mentioned above), and the direction of this resultant force is relative to the fuselage coordinate system;
[0118] S4, based on the fuselage attitude, converts the resultant force into a force in the world coordinate system;
[0119] S5, judge the force obtained from S4. If it is less than 30% of the body weight, it is determined that the quadruped robot has been picked up and at least part of its legs are suspended in the air; if it is greater than 70% of the body weight, it is determined that the suspended legs of the quadruped robot have been put back on the ground.
[0120] S6. Based on the judgment obtained in S5, if the quadruped robot is picked up and at least part of its legs are suspended in the air, it enters the motor position control mode or the motor speed control mode; if the suspended legs of the quadruped robot are put back on the ground, it returns to the mode before it was picked up (movement mode or stationary mode); if it is not picked up, it maintains the current movement mode.
[0121] In summary, the resultant force of the supporting legs determines whether the quadruped robot has been picked up. When the quadruped robot is picked up, it enters a motor position control mode, in which case the legs will be in a fixed position or in a slow movement. When the quadruped robot is placed back on the ground, it returns to its original movement mode. This solves the problem of quadruped robots easily losing control in force control mode.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the M contributions to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0123] This embodiment also provides a motion control device for a multi-legged robot. Figure 4 This is a structural block diagram (I) of the motion control device for a multi-legged robot according to an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes:
[0124] The first control module 42 is used to control the multi-legged robot to switch to a preset control mode when the force on the multi-legged robot changes. The preset control mode includes one of the following: motor position control mode and motor speed control mode.
[0125] The control mode for the motor position includes: controlling the motors of the N legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot.
[0126] The control mode of the motor speed mentioned above includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, so as to control the N legs to move at the first preset speed.
[0127] In one exemplary embodiment, the above-described apparatus further includes:
[0128] The fifth determining module is used to determine the change in force experienced by the multi-legged robot caused by the N legs switching from ground movement to suspended movement.
[0129] In one exemplary embodiment, the first control module includes:
[0130] The first control unit is configured to, when the preset control mode is the motor position control mode, control the motors of N legs to rotate to the corresponding first preset positions when the force on the multi-legged robot changes, thereby fixing the N legs in the corresponding second preset positions and stopping movement, wherein the other legs not in a suspended state maintain their original movement state; or, control the motors of all legs to rotate to the corresponding first preset positions, thereby fixing all legs in the corresponding second preset positions and stopping movement; or...
[0131] The second control unit is configured to, when the preset control mode is the motor speed control mode, control the motors of N legs to rotate at the first preset speed, so as to control the N legs to move at the first preset speed, wherein the other legs not in the suspended movement state maintain their original movement state, or control all the motors of the legs to rotate at the first preset speed, so as to control all the legs to move in the air at the first preset speed.
[0132] In one exemplary embodiment, the above-described apparatus further includes:
[0133] The second control module is used to, when the force on the multi-legged robot changes, control the multi-legged robot to switch to a control mode. When the preset control mode is the motor position control mode, and it is determined that N legs have switched from a suspended static state to a ground static state and all legs are in contact with the ground, control the motors of all the legs to rotate at a second preset speed to restore all the legs to ground-based movement, or control all the legs to remain stationary. When a preset motion mode is detected, control the legs to move according to the preset motion mode, or, when a motion control command is received, control the legs to move according to the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force change; or...
[0134] The third control module is configured to, when the preset control mode is the motor speed control mode, control all the motors of the legs to rotate at a second preset speed so that all the legs can resume movement on the ground, or control all the legs to stop moving on the ground when the N legs switch from the suspended running state to the ground movement state and all the legs are in contact with the ground; when a preset movement mode is detected, control the legs to move according to the preset movement mode, or when a motion control command is received, control the legs to move according to the movement mode indicated by the motion control command, wherein the preset movement mode is the movement mode of the multi-legged robot before the force changes.
[0135] This embodiment also provides a motion control device for a multi-legged robot. Figure 5 This is a structural block diagram (II) of the motion control device for a multi-legged robot according to an embodiment of the present invention, as shown below. Figure 5 As shown, the device includes:
[0136] The first determining module 52 is used to determine the forces acting on the multi-legged robot, wherein the forces are used to represent the sum of the forces acting on the ends of the legs supporting the multi-legged robot.
[0137] The second determining module 54 is used to determine the resultant force of the above-mentioned forces in the direction of gravity;
[0138] The third determining module 56 is used to determine the state of the multi-legged robot based on the above-mentioned combined force.
[0139] The fourth determining module 58 is used to control the movement state of the legs according to a preset control mode when the force on the multi-legged robot changes based on the above-mentioned resultant force.
[0140] Among them, the above-mentioned preset control modes include one of the following: motor position control mode, motor speed control mode;
[0141] The control mode for the motor position includes: controlling the motors of the legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position;
[0142] The control mode of the motor speed mentioned above includes: controlling the motor of the legs of the multi-legged robot to rotate at a first preset speed, so as to control the legs to move at the first preset speed.
[0143] In one exemplary embodiment, the first determining module includes:
[0144] The first acquisition unit is used to acquire the torque of the motor used to control the corresponding leg movement, and to obtain the supporting force at the end of the leg.
[0145] The first processing unit is used to filter the support force at the end of the leg to obtain the filtered support force at the end of the leg.
[0146] The first determining unit is used to determine the sum of the filtering support forces at the ends of the legs as the force on the multi-legged robot.
[0147] In one exemplary embodiment, the above-described apparatus further includes:
[0148] The sixth determining module is used to determine that the force on the multi-legged robot has changed when the resultant force is less than or equal to the first preset resultant force, wherein the first preset resultant force is determined based on the weight of the multi-legged robot.
[0149] In one exemplary embodiment, the above-described apparatus further includes:
[0150] The fourth control module is used to control the movement state of the legs according to the preset control mode, and when the resultant force is greater than the second preset resultant force, control all the motors of the legs to rotate at the second preset speed so that all the legs can return to the movement on the ground, or control all the legs to be stationary, wherein the second preset resultant force is determined based on the weight of the multi-legged robot.
[0151] The fifth control module is used to control the legs to move in accordance with the preset motion mode when a preset motion mode is detected; or, when a motion control command is received, control the legs to move in accordance with the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force changes.
[0152] In one exemplary embodiment, the second determining module described above includes:
[0153] The first transformation unit is used to transform the above-mentioned force into a force in the world coordinate system using a preset rotation matrix to obtain the transformed force, wherein the above-mentioned force is a force in the body coordinate system of the multi-legged robot, and the preset rotation matrix is a coordinate transformation matrix between the body coordinate system and the world coordinate system.
[0154] The second determining unit is used to determine the force in the direction of gravity of the transformed force as the resultant force.
[0155] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0156] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when in motion.
[0157] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0158] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program, the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.
[0159] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0160] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0161] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or all of the modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0162] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A motion control method for a multi-legged robot, characterized in that, include: When the force on the multi-legged robot changes, the multi-legged robot is controlled to switch to a preset control mode, wherein the preset control mode includes one of the following: motor position control mode, motor speed control mode; The control mode for the motor position includes: controlling the motors of N legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot; The control mode of the motor speed includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, so as to control the N legs to move at the first preset speed; It is determined that when N legs switch from a ground-based movement state to a suspended movement state, the forces acting on the multi-legged robot change. When the force on the multi-legged robot changes, the robot is controlled to switch to a preset control mode, including: when the preset control mode is the motor position control mode, when the force on the multi-legged robot changes, the motors of N legs are controlled to rotate to the corresponding first preset position to fix the N legs in the corresponding second preset position and stop moving, wherein the other legs that are not in a suspended state maintain their original movement state; or, all the motors of the legs are controlled to rotate to the corresponding first preset position to fix all the legs in the corresponding second preset position and stop moving; or, when the preset control mode is the motor speed control mode, the motors of N legs are controlled to rotate at the first preset speed to control the N legs to move at the first preset speed, wherein the other legs that are not in a suspended state maintain their original movement state; or, all the motors of the legs are controlled to rotate at the first preset speed to control all the legs to move in the air at the first preset speed.
2. The method according to claim 1, characterized in that, When the forces acting on the multi-legged robot change, after controlling the multi-legged robot to switch to a control mode, the method further includes: When the preset control mode is the motor position control mode, if it is determined that N legs have switched from a suspended static state to a ground static state and all legs are in contact with the ground, the motors of all legs are controlled to rotate at a second preset speed to restore all legs to ground motion, or all legs are controlled to remain stationary; if a preset motion mode is detected, the legs are controlled to move according to the preset motion mode, or if a motion control command is received, the legs are controlled to move according to the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force changes; or... When the preset control mode is the motor speed control mode, when N legs switch from a suspended running state to a ground movement state and all legs are in contact with the ground, the motors of all legs are controlled to rotate at a second preset speed to restore all legs to ground movement, or the legs are controlled to stop moving on the ground; when a preset movement mode is detected, the legs are controlled to move according to the preset movement mode, or when a motion control command is received, the legs are controlled to move according to the movement mode indicated by the motion control command, wherein the preset movement mode is the movement mode of the multi-legged robot before the force changes.
3. A motion control method for a multi-legged robot, characterized in that, include: Determine the forces acting on the multi-legged robot, wherein the forces are used to represent the sum of the supporting forces at the ends of the legs of the multi-legged robot; Determine the resultant force of the forces acting on the object in the direction of gravity; When the force on the multi-legged robot changes based on the resultant force, the movement state of the legs is controlled according to a preset control mode. The preset control mode includes one of the following: motor position control mode, motor speed control mode; The control mode for the motor position includes: controlling the motors of the legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position; The control mode of the motor speed includes: controlling the motor of the multi-legged robot's leg to rotate at a first preset speed, so as to control the leg to move at the first preset speed; The determination of the forces acting on the multi-legged robot includes: acquiring the torque of the motor used to control the movement of the corresponding leg to obtain the supporting force at the end of the leg; filtering the supporting force at the end of the leg to obtain the filtered supporting force at the end of the leg; and determining the sum of the filtered supporting forces at the end of the leg as the forces acting on the multi-legged robot. After controlling the movement state of the legs according to the preset control mode, the method further includes: when the resultant force is greater than a second preset resultant force, controlling all the motors of the legs to rotate at a second preset speed to restore all the legs to ground motion, or controlling all the legs to be stationary, wherein the second preset resultant force is determined based on the weight of the multi-legged robot; when a preset motion mode is detected, controlling the legs to move according to the preset motion mode; or, when a motion control command is received, controlling the legs to move according to the motion mode indicated by the motion control command, wherein the preset motion mode is the motion mode of the multi-legged robot before the force changes.
4. The method according to claim 3, characterized in that, The method further includes: When the resultant force is less than or equal to a first preset resultant force, it is determined that the force on the multi-legged robot has changed, wherein the first preset resultant force is determined based on the weight of the multi-legged robot.
5. The method according to any one of claims 3 to 4, characterized in that, Determining the resultant force of the forces acting on the object in the direction of gravity includes: The force is transformed into a force in the world coordinate system using a preset rotation matrix, and the transformed force is obtained. The force is the force in the body coordinate system of the multi-legged robot, and the preset rotation matrix is the coordinate transformation matrix between the body coordinate system and the world coordinate system. The force in the direction of gravity after the transformation is determined as the resultant force.
6. A motion control device for a multi-legged robot, used to implement the method of claim 1, characterized in that, The device includes: The first control module is used to control the multi-legged robot to switch to a preset control mode when the force on the multi-legged robot changes. The preset control mode includes one of the following: a motor position control mode and a motor speed control mode. The control mode for the motor position includes: controlling the motors of N legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position, wherein N is a natural number greater than 1 and less than or equal to the number of legs of the multi-legged robot; The control mode of the motor speed includes: controlling the motors of the N legs of the multi-legged robot to rotate at a first preset speed, so as to control the N legs to move at the first preset speed.
7. A motion control device for a multi-legged robot, used to implement the method of claim 3, characterized in that, The device includes: The first determining module is used to determine the forces acting on the multi-legged robot, wherein the forces are used to represent the sum of the forces acting on the ends of the legs supporting the multi-legged robot. The second determining module is used to determine the resultant force of the applied forces in the direction of gravity; The third determining module is used to determine the state of the multi-legged robot based on the resultant force. The fourth determining module is used to control the movement state of the legs according to a preset control mode when the force on the multi-legged robot changes based on the resultant force. The preset control mode includes one of the following: motor position control mode, motor speed control mode; The control mode for the motor position includes: controlling the motors of the legs of the multi-legged robot to rotate to the corresponding first preset position, so as to fix the legs in the corresponding second preset position; The control mode of the motor speed includes: controlling the motor of the multi-legged robot's leg to rotate at a first preset speed, so as to control the leg to move at the first preset speed.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 2, or when the computer program is executed by a processor, it implements the steps of the method described in any one of claims 3 to 5.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 2, and when the processor executes the computer program, it implements the steps of the method described in any one of claims 3 to 5.