Humanoid robot joint linear motor control method and device, computer equipment and storage medium
By using parallel linear motors in humanoid robot joints to connect to pitch and roll joints, and using reinforcement learning models for precise control, the problems of large power consumption and limited load capacity of the rotating motor are solved, and higher motion accuracy and load capacity are achieved, adapting to more applications.
Patent Information
- Application Number
- CN202510299424.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-07-04
AI Technical Summary
The existing humanoid robot joints adopt rotating electric machine solutions, which have problems such as large power consumption, short battery life and limited load-bearing capacity, making it difficult to meet the needs of many occasions.
The first linear motor and the second linear motor are connected in parallel to each other, and are connected to the limb pitch joint and the limb roll joint. By obtaining the desired angle and theoretical length, the output length of the linear motor is controlled to achieve the desired angle, and precise control is performed using a reinforcement learning model.
The movement accuracy and load capacity of humanoid robots are improved, allowing them to better adapt to multiple applications, the movement mode is closer to humans, and the control mode is simpler and more accurate.
Smart Images

Figure CN120262965A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robots, and in particular, to a control method, device, computer device and storage medium for a linear motor of a humanoid robot joint. Background Art
[0002] With the development of robot technology, humanoid robots have become a hot topic in the industry. The most prominent feature of humanoid robots is the direct imitation of human movements. Humanoid robots have many advantages. For example, legged humanoid robots can plan unique discrete landing points, so they have significant advantages in unstructured terrains such as disaster areas, volcanoes, and planets. On the other hand, humanoid robots have a large number of redundant degrees of freedom, so they can perform a variety of complex tasks while maintaining balance, which is of great significance for subsequent applications in diverse production and living scenarios.
[0003] An extremely crucial part of humanoid robot technology is the design and control of each joint. Good joint design and control can, on the one hand, ensure the stable movement ability of the robot, and on the other hand, also improve the load capacity of the robot, facilitating the completion of diverse task requirements. In the prior art, rotary motors are used for each joint of humanoid robots. Although the structure of rotary motors is simple and the control difficulty is small, they have disadvantages such as large power consumption, short battery life, and limited load capacity. Therefore, it is very difficult to be actually implemented in scenarios such as factory handling that require large loads and long battery life.
[0004] It can be seen that the existing humanoid robots are difficult to meet the requirements of multiple scenarios. Summary of the Invention
[0005] To solve the above technical problems or at least partially solve the above technical problems, the present invention provides a control method, device, computer device and storage medium for a linear motor of a humanoid robot joint.
[0006] In a first aspect, the present invention provides a control method for a linear motor of a humanoid robot joint. The humanoid robot joint includes a first linear motor, a second linear motor, a limb pitch joint and a limb roll joint. The first linear motor and the second linear motor are connected in parallel and then connected to the limb pitch joint and the limb roll joint. The first linear motor includes a first linear slide bar, and the second linear motor includes a second linear slide bar.
[0007] The control method includes:
[0008] Obtain a desired first angle and a desired second angle;
[0009] Obtain a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle;
[0010] Adjust the output length of the first linear motor to the theoretical first length, and adjust the output length of the second linear motor to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle;
[0011] Wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0012] Optionally, the humanoid robot further includes a first link and a second link.
[0013] The second link is connected to the first link through the limb pitch joint, and the second link is also connected to the end part through the limb roll joint.
[0014] The first housing of the first linear motor is connected to the first link through a first upper spherical bearing at a second connection point.
[0015] The first linear slide rod of the first linear motor is connected to the end part through a first lower spherical bearing at a seventh connection point.
[0016] The first linear slide rod and the first housing slide relative to each other along the line between the second connection point and the seventh connection point.
[0017] The second housing of the second linear motor is connected to the first link through a second upper spherical bearing at a third connection point.
[0018] The second linear slide rod of the second linear motor is connected to the end part through a second lower spherical bearing at a sixth connection point.
[0019] The second linear slide rod and the second housing slide relative to each other along the line between the third connection point and the sixth connection point.
[0020] The obtaining of the theoretical first length and the theoretical second length according to the desired first angle and the desired second angle includes:
[0021] Obtain the first rotation matrix between the seventh connection point and the second connection point.
[0022] Obtain the second rotation matrix between the sixth connection point and the third connection point.
[0023] Obtain the theoretical first length and the theoretical second length according to the first rotation matrix and the second rotation matrix.
[0024] Wherein, the theoretical first length is the length between the third connection point and the sixth connection point, and the theoretical second length is the length between the second connection point and the seventh connection point.
[0025] Optionally, the first rotation matrix is:
[0026]
[0027] The second rotation matrix is:
[0028]
[0029] Wherein, θ1 is the limb pitch joint angle, and θ2 is the limb roll joint angle.
[0030] is the rotation matrix of the coordinate system {∑7} relative to the coordinate system {∑2}. is the rotation matrix of the coordinate system {∑4} relative to the coordinate system {∑2}. is the rotation matrix of the coordinate system {∑5} relative to the coordinate system {∑4}, and is a function of the limb pitch joint angle θ1. is the rotation matrix of the coordinate system {∑7} relative to the coordinate system {∑5}, and is a function of the limb roll joint angle θ2.
[0031] is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑3}; is the rotation matrix of the coordinate system {∑4} relative to the coordinate system {∑3}. is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑5}, and is a function of the limb roll joint angle θ2.
[0032] {∑2} is the second coordinate system established with the second connection point, {∑3} is the third coordinate system established with the third connection point, {∑4} is the fourth coordinate system established with the fourth connection point, {∑5} is the fifth coordinate system established with the fifth connection point, {∑6} is the sixth coordinate system established with the sixth connection point, and {∑7} is the seventh coordinate system established with the seventh connection point. The second coordinate system, the third coordinate system, the fourth coordinate system, the fifth coordinate system, the sixth coordinate system, and the seventh coordinate system are parallel to the world coordinate system.
[0033] The fifth connection point is the midpoint of the line connecting the center point of the limb roll joint to the first link.
[0034] The fourth connection point is the midpoint of the line connecting the sixth connection point and the seventh connection point.
[0035] Optionally, the theoretical first length is obtained in the following manner:
[0036]
[0037] The theoretical second length is obtained in the following manner:
[0038]
[0039] Wherein, and are respectively the fourth column elements of the first three rows of the rotation matrix ; and are respectively the fourth column elements of the first three rows of the rotation matrix .
[0040] Optionally, adjusting the output length of the first linear motor to the theoretical first length and adjusting the output length of the second linear motor to the theoretical second length includes:
[0041] Obtaining the first speed and the first direction of the first linear motor;
[0042] Obtaining the second speed and the second direction of the second linear motor;
[0043] Adjusting the output length of the first linear motor to the theoretical first length according to the first speed and the first direction;
[0044] Adjusting the output length of the second linear motor to the theoretical second length according to the second speed and the second direction.
[0045] Optionally, after adjusting the output length of the first linear motor to the theoretical first length and adjusting the output length of the second linear motor to the theoretical second length, the method further includes:
[0046] Obtaining the actual first length and the actual second length;
[0047] Obtaining a theoretical first angle and a theoretical second angle according to the actual first length and the actual second length;
[0048] Correcting the actual first length and the actual second length according to the difference between the theoretical first angle and the expected first angle and the difference between the theoretical second angle and the expected second angle.
[0049] Optionally, obtaining the theoretical first angle and the theoretical second angle according to the actual first length and the actual second length includes:
[0050] Obtain the current theoretical first length and the current theoretical second length according to the current theoretical first angle and the current theoretical second angle;
[0051] Obtain a length residual term according to the current theoretical first length, the current theoretical second length, the actual first length, and the actual second length;
[0052] Determine whether the length residual term is less than or equal to a preset precision threshold;
[0053] If the length residual term is greater than or equal to the preset precision threshold, update the current theoretical first angle as the next theoretical first angle and update the current theoretical second angle as the next theoretical second angle;
[0054] If the length residual term is less than the preset precision threshold, use the current theoretical first angle as the theoretical first angle and use the current theoretical second angle as the theoretical second angle.
[0055] Optionally, the obtaining of the length residual term according to the current theoretical first length, the current theoretical second length, the actual first length, and the actual second length is performed in the following manner:
[0056]
[0057] where L 1,i is the i-th theoretical first length, L 2,i is the i-th theoretical first length, L1 is the actual first length, and L2 is the actual second length;
[0058] The updating of the current theoretical first angle as the next theoretical first angle and the updating of the current theoretical second angle as the next theoretical second angle are performed in the following manner:
[0059] θ 1,i+1 = θ 1,i + Δθ 1,i+1
[0060] θ 2,i+1 = θ 2,i + Δθ 2,i+1
[0061]
[0062] where θ 1,i+1 is the next theoretical first angle, θ 2,i+1 is the next theoretical second angle, θ 1,i is the current theoretical first angle, θ 2,i is the current theoretical second angle, and Δθ 1,i+1 is the update amount of the next theoretical first angle, and Δθ2,i+1 For the update amount of the second angle of the next theory.
[0063] In a second aspect, a linear motor control device for a humanoid robot joint is provided. The device is arranged on the humanoid robot. The humanoid robot joint includes a first linear motor, a second linear motor, a limb pitch joint, and a limb roll joint. The first linear motor and the second linear motor are connected in parallel and then connected to the limb pitch joint and the limb roll joint. The first linear motor includes a first linear slide bar, and the second linear motor includes a second linear slide bar.
[0064] The device includes:
[0065] An angle acquisition unit for acquiring a desired first angle and a desired second angle;
[0066] A length acquisition unit for acquiring a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle;
[0067] A controller for controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle;
[0068] Wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0069] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in any one of the above is implemented.
[0070] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the above is implemented.
[0071] The present invention provides a control method, device, computer device and storage medium for a linear motor of a humanoid robot joint. The method includes: The humanoid robot joint includes a first linear motor, a second linear motor, a limb pitching joint and a limb rolling joint. The first linear motor and the second linear motor are connected in parallel and then connected to the limb pitching joint and the limb rolling joint. The first linear motor includes a first linear slide bar, and the second linear motor includes a second linear slide bar. The control method includes: obtaining a desired first angle and a desired second angle; obtaining a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle; controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle; where the first angle is the angle of the limb pitching joint and the second angle is the angle of the limb rolling joint. In the embodiments of the present invention, the humanoid robot joint includes two linear motors connected in parallel, which is basically the same as the structure of the upper and lower limbs of humans, and the linear motors used are also similar to the movement modes of the upper and lower limbs of humans. Therefore, the movement mode of the humanoid robot in the embodiments of the present invention is closer to that of humans. In the embodiments of the present invention, the control of the linear motor is more precise and the load capacity is greater, so that the control of the humanoid robot can be more precise and the load capacity is greater, and it can adapt to more application scenarios. In addition, the method in the embodiments of the present invention controls the length of the linear motor according to the angle of the limb pitching joint and the angle of the limb rolling joint, and the control method is simpler and more precise. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.
[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0074] Figure 1 The following shows an application environment diagram of the control method for the linear motor of the humanoid robot joint according to the embodiment of the present invention;
[0075] Figure 2 The following shows a flowchart of the control method for the linear motor of the humanoid robot joint according to the embodiment of the present invention;
[0076] Figure 3 The following shows a schematic diagram of the humanoid robot joint according to the embodiment of the present invention;
[0077] Figure 4 The figure shows a schematic diagram of a humanoid robot joint according to an embodiment of the present invention;
[0078] Figure 5 The figure shows a structural block diagram of a linear motor control device for a humanoid robot joint according to an embodiment of the present invention;
[0079] Figure 6 The figure shows an internal structure diagram of a computer device in an embodiment of the present invention. Detailed implementation manners
[0080] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0081] Figure 1 It is an application environment diagram of a linear motor control method for a humanoid robot joint in an embodiment. Refer to Figure 1 , this linear motor control method for a humanoid robot joint is applied to a linear motor control system for a humanoid robot joint. This linear motor control method for a humanoid robot joint includes a terminal 110 and / or a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, etc. The server 120 may be implemented by an independent server or a server cluster composed of multiple servers.
[0082] The linear motor control method of the present invention is applied to the terminal 110 and / or the server 120.
[0083] As Figure 2 shown, in an embodiment, a linear motor control method for a humanoid robot joint is provided. This embodiment mainly takes the application of this method to the server 120 in the above Figure 1 as an example for illustration.
[0084] Figure 3 , Figure 4 The figure shows a schematic diagram of a humanoid robot joint according to an embodiment of the present invention. As Figure 3As shown, the humanoid robot joint includes a first linear motor 310, a second linear motor 320, a limb pitch joint 330, and a limb roll joint 340. The first linear motor 310 and the second linear motor 320 are connected in parallel and then connected to the limb pitch joint 330 and the limb roll joint 340. The first linear motor 310 includes a first linear slide bar 311, and the second linear motor 320 includes a second linear slide bar 321.
[0085] Figure 3 The following is a schematic diagram of the lower limb joint of the humanoid robot according to an embodiment of the present invention. Figure 3 (a) is a left view. Figure 3 (b) is a rear view.
[0086] Figure 4 The following is a schematic diagram of the upper limb joint of the humanoid robot according to an embodiment of the present invention. Among them, Figure 4 (a) is a left view. Figure 4 (b) is a right view.
[0087] In the present invention, as Figure 3 shown, if it is the lower limb, the limb pitch joint is the ankle pitch joint, the limb roll joint is the ankle roll joint, the end part is the foot, the first link is the calf link, and the second link is the ankle link; as Figure 4 shown, if it is the upper limb, the limb pitch joint is the wrist pitch joint, the limb roll joint is the wrist roll joint, the end part is the hand, the first link is the forearm link, and the second link is the wrist link.
[0088] Referring to Figures 3 to 4 shown, the humanoid robot further includes a first link 350 and a second link 360.
[0089] The second link 360 is connected to the first link 350 through the limb pitch joint 330, and the second link 360 is also connected to the end part 390 through the limb roll joint 340.
[0090] The first housing of the first linear motor 310 is connected to the first link 350 through a first upper spherical bearing 312 at a second connection point.
[0091] The first linear slide bar 311 of the first linear motor 310 is connected to the end part through a first lower spherical bearing 313 at a seventh connection point.
[0092] The first linear slide bar 311 and the first housing slide relative to each other along the connection line between the second connection point and the seventh connection point.
[0093] The second housing of the second linear motor 320 is connected to the first link 350 through a second upper spherical bearing 322 at a third connection point.
[0094] The second linear slide bar 321 of the second linear motor 320 is connected to the end portion through a second lower spherical bearing 323 at a sixth connection point.
[0095] The second linear slide bar 321 and the second housing slide relative to each other along the line connecting the third connection point and the sixth connection point.
[0096] Figures 3 to 4 In the figure, P1 - P7 are the first connection point to the seventh connection point respectively. L1’ is the first length, which is the length from the second connection point to the seventh connection point; L2’ is the second length, which is the length from the third connection point to the sixth connection point. Since the present application involves the theoretical first length and the actual first length, etc., Figures 3 to 6 L1’ and L2’ in the figure can refer to the theoretical length or can refer to the actual length.
[0097] Refer to Figures 2 to 4 As shown, the method for controlling the linear motor of the humanoid robot joint includes:
[0098] Step 210, obtaining a desired first angle and a desired second angle;
[0099] Step 220, obtaining a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle;
[0100] Step 230, controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle;
[0101] Wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0102] In the embodiment of the present invention, the humanoid robot joint includes two parallel linear motors, which are basically the same as the structures of the upper and lower limbs of humans, and also use linear motors that are similar to the movement modes of the upper and lower limbs of humans. Therefore, the movement mode of the humanoid robot in the embodiment of the present invention is closer to that of humans. In the embodiment of the present invention, the control of the linear motor is more precise and the load capacity is greater, so that the control of the humanoid robot can be more precise, the load capacity is greater, and it can adapt to more application scenarios. In addition, the method in the embodiment of the present invention controls the length of the linear motor according to the angle of the limb pitch joint and the angle of the limb roll joint, and the control method is simpler and more precise.
[0103] In an embodiment of the present invention, the obtaining of the theoretical first length and the theoretical second length according to the expected first angle and the expected second angle includes:
[0104] Obtaining a first rotation matrix between the seventh connection point and the second connection point;
[0105] Obtaining a second rotation matrix between the sixth connection point and the third connection point;
[0106] Obtaining the theoretical first length and the theoretical second length according to the first rotation matrix and the second rotation matrix;
[0107] Wherein, the theoretical first length is the length between the third connection point and the sixth connection point, and the theoretical second length is the length between the second connection point and the seventh connection point.
[0108] In an embodiment of the present invention, the first rotation matrix is:
[0109]
[0110] The second rotation matrix is:
[0111]
[0112] Wherein, θ1 is the limb pitch joint angle, θ2 is the limb roll joint angle,
[0113] is the rotation matrix of the coordinate system {∑7} relative to the coordinate system {∑2}, is the rotation matrix of the coordinate system {∑4} relative to the coordinate system {∑2}, is the rotation matrix of the coordinate system {∑5} relative to the coordinate system {∑4}, and is a function of the limb pitch joint angle θ1, is the rotation matrix of the coordinate system {∑7} relative to the coordinate system {∑5}, and is a function of the limb roll joint angle θ2,
[0114] is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑3}; is the rotation matrix of the coordinate system {∑4} relative to the coordinate system {∑3}, is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑5}, and is a function of the limb roll joint angle θ2,
[0115] {∑2} is the second coordinate system established with the second connection point, {∑3} is the third coordinate system established with the third connection point, {∑4} is the fourth coordinate system established with the fourth connection point, {∑5} is the fifth coordinate system established with the fifth connection point, {∑6} is the sixth coordinate system established with the sixth connection point, {∑7} is the seventh coordinate system established with the seventh connection point. The second coordinate system, the third coordinate system, the fourth coordinate system, the fifth coordinate system, the sixth coordinate system, and the seventh coordinate system are parallel to the world coordinate system.
[0116] The fifth connection point is the midpoint of the line connecting the center point of the limb roll joint to the first link 350.
[0117] The fourth connection point is the midpoint of the line connecting the sixth connection point to the seventh connection point.
[0118] In the embodiment of the present invention, the theoretical first length is obtained in the following manner:
[0119]
[0120] The theoretical second length is obtained in the following manner:
[0121]
[0122] Wherein, and are respectively the fourth column elements of the first three rows of the rotation matrix , and are respectively the fourth column elements of the first three rows of the rotation matrix .
[0123] In the embodiment of the present invention, adjusting the output length of the first linear motor to the theoretical first length and adjusting the output length of the second linear motor to the theoretical second length includes:
[0124] Obtaining the first speed and the first direction of the first linear motor;
[0125] Obtaining the second speed and the second direction of the second linear motor;
[0126] Making the first linear motor adjust the output length to the theoretical first length according to the first speed and the first direction;
[0127] Making the second linear motor adjust the output length to the theoretical second length according to the second speed and the second direction.
[0128] In the embodiments of the present invention, the first speed and the first direction, the second speed and the second direction, as well as the theoretical first length and the theoretical second length can be obtained according to a reinforcement learning model.
[0129] The reinforcement learning model can be a Deep Q-Network (DQN) or an Actor-Critic algorithm. DQN uses a deep neural network to approximate the action-value function Q(s,a), while Actor-Critic uses two deep neural networks, one for approximating the policy function π(a|s) and the other for approximating the value function V(s). Both of these models can effectively solve the problem of continuous action spaces.
[0130] In the embodiments of the present invention, the reinforcement learning model can learn an optimal action policy, and can achieve precise control of joint angles even in the absence of an accurate mathematical model. In addition, the reinforcement learning model can also be adaptively adjusted according to different environmental and task requirements. For example, when the load changes, the model can automatically adjust the linear speed and direction of the motor to ensure precise control of the joint angles.
[0131] In the embodiments of the present invention, after step 230, after adjusting the output lengths of the first linear motor and the second linear motor to the theoretical first length and the theoretical second length respectively, the method further includes:
[0132] Obtaining an actual first length and an actual second length;
[0133] Obtaining a theoretical first angle and a theoretical second angle according to the actual first length and the actual second length;
[0134] Correcting the actual first length and the actual second length according to the difference between the theoretical first angle and the desired first angle, and the difference between the theoretical second angle and the desired second angle.
[0135] In the embodiments of the present invention, the step of obtaining a theoretical first angle and a theoretical second angle according to the actual first length and the actual second length includes:
[0136] Obtaining a current theoretical first length and a current theoretical second length according to the current theoretical first angle and the current theoretical second angle;
[0137] Obtaining a length residual term according to the current theoretical first length, the current theoretical second length, the actual first length and the actual second length;
[0138] Determining whether the length residual term is less than or equal to a preset precision threshold;
[0139] If the length residual term is greater than or equal to the preset precision threshold, update the current theoretical first angle as the next theoretical first angle, and update the current theoretical second angle as the next theoretical second angle;
[0140] If the length residual term is less than the preset precision threshold, use the current theoretical first angle as the theoretical first angle and the current theoretical second angle as the theoretical second angle.
[0141] In an embodiment of the present invention, the length residual term is obtained according to the current theoretical first length, the current theoretical second length, the actual first length, and the actual second length in the following manner:
[0142]
[0143] where L 1,i is the i-th theoretical first length, L 2,i is the i-th theoretical first length, L1 is the actual first length, and L2 is the actual second length;
[0144] The updating of the current theoretical first angle as the next theoretical first angle and the updating of the current theoretical second angle as the next theoretical second angle are performed in the following manner:
[0145] θ 1,i+1 = θ 1,i + Δθ 1,i+1
[0146] θ 2,i+1 = θ 2,i + Δθ 2,i+1
[0147]
[0148] where θ 1,i+1 is the next theoretical first angle, θ 2,i+1 is the next theoretical second angle, θ 1,i is the current theoretical first angle, θ 2,i is the current theoretical second angle, and Δθ 1,i+1 is the update amount of the next theoretical first angle, and Δθ 2,i+1 is the update amount of the next theoretical second angle.
[0149] In an embodiment of the present invention, the desired first angle and the desired second angle are the angles of the limb joints of the humanoid robot required. If it is the upper limb, the limb pitch joint is the wrist pitch joint, and the limb roll joint is the wrist roll joint; if it is the lower limb, the limb pitch joint is the ankle pitch joint, and the limb roll joint is the ankle roll joint.
[0150] To make the humanoid robot move, the first theoretical length of the first linear motor and the second theoretical length of the second linear motor are calculated according to the desired angles. By controlling the output length of the first linear motor to be adjusted to the first theoretical length and controlling the output length of the second linear motor to be adjusted to the second theoretical length, the joints of the humanoid robot can meet the required angles. However, because the joints have multiple degrees of freedom, and the first linear motor and the second linear motor work together to make the joints reach the desired angles, including various calculation errors, or the accuracy of the linear motor itself, or other reasons, there may be a difference between the actual length and the theoretical length output by the linear motor. Therefore, in the embodiments of the present invention, through the above method, by detecting the actual length of the linear motor, a more accurate correspondence relationship between the joint angle and the theoretical length of the linear motor is obtained, thereby eliminating the error between the actual length and the theoretical length, making the humanoid robot more accurate.
[0151] To calculate the joint angle from the theoretical length of the linear motor, the above-mentioned method of multiple iterations is adopted in the embodiments of the present invention, which has a high degree of accuracy and can also simplify the calculation process through iteration.
[0152] As Figures 3 to 5 shown, the present invention also provides a control device for the linear motor of the humanoid robot joint. The device is arranged on the humanoid robot. The humanoid robot joint includes a first linear motor 310, a second linear motor 320, a limb pitch joint and a limb roll joint. The first linear motor 310 and the second linear motor 320 are connected in parallel and then connected to the limb pitch joint and the limb roll joint. The first linear motor 310 includes a first linear slide bar 311, and the second linear motor 320 includes a second linear slide bar 321.
[0153] The device includes:
[0154] An angle acquisition unit 510 for acquiring a desired first angle and a desired second angle;
[0155] A length acquisition unit 520 for acquiring a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle;
[0156] A controller 530 for controlling the output length of the first linear motor 310 to be adjusted to the theoretical first length and controlling the output length of the second linear motor 320 to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle;
[0157] wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0158] In an embodiment of the present invention, the humanoid robot further includes a first link 350 and a second link 360.
[0159] The second link 360 is connected to the first link 350 through the limb pitch joint, and the second link 360 is also connected to the end portion through the limb roll joint.
[0160] The first housing of the first linear motor 310 is connected to the first link 350 through a first upper spherical bearing 312 at a second connection point.
[0161] The first linear slide rod 311 of the first linear motor 310 is connected to the end portion through a first lower spherical bearing 313 at a seventh connection point.
[0162] The first linear slide rod 311 and the first housing slide relative to each other along the line connecting the second connection point and the seventh connection point.
[0163] The second housing of the second linear motor 320 is connected to the first link 350 through a second upper spherical bearing 322 at a third connection point.
[0164] The second linear slide rod 321 of the second linear motor 320 is connected to the end portion through a second lower spherical bearing 323 at a sixth connection point.
[0165] The second linear slide rod 321 and the second housing slide relative to each other along the line connecting the third connection point and the sixth connection point.
[0166] The length acquisition unit 520 is further configured to:
[0167] Obtain a first rotation matrix between the seventh connection point and the second connection point;
[0168] Obtain a second rotation matrix between the sixth connection point and the third connection point;
[0169] Obtain the theoretical first length and the theoretical second length according to the first rotation matrix and the second rotation matrix;
[0170] Wherein, the theoretical first length is the length between the third connection point and the sixth connection point, and the theoretical second length is the length between the second connection point and the seventh connection point.
[0171] In an embodiment of the present invention, the first rotation matrix is:
[0172]
[0173] The second rotation matrix is:
[0174]
[0175] Among them, θ1 is the limb pitch joint angle, and θ2 is the limb roll joint angle.
[0176] is the rotation matrix of coordinate system {∑7} relative to coordinate system {∑2}. is the rotation matrix of coordinate system {∑4} relative to coordinate system {∑2}. is the rotation matrix of coordinate system {∑5} relative to coordinate system {∑4}, and is a function of the limb pitch joint angle θ1. is the rotation matrix of coordinate system {∑7} relative to coordinate system {∑5}, and is a function of the limb roll joint angle θ2.
[0177] is the rotation matrix of coordinate system {∑6} relative to coordinate system {∑3}; is the rotation matrix of coordinate system {∑4} relative to coordinate system {∑3}. is the rotation matrix of coordinate system {∑6} relative to coordinate system {∑5}, and is a function of the limb roll joint angle θ2.
[0178] {∑2} is the second coordinate system established with the second connection point, {∑3} is the third coordinate system established with the third connection point, {∑4} is the fourth coordinate system established with the fourth connection point, {∑5} is the fifth coordinate system established with the fifth connection point, {∑6} is the sixth coordinate system established with the sixth connection point, and {∑7} is the seventh coordinate system established with the seventh connection point. The second coordinate system, the third coordinate system, the fourth coordinate system, the fifth coordinate system, the sixth coordinate system, and the seventh coordinate system are parallel to the world coordinate system.
[0179] The fifth connection point is the midpoint of the line connecting the center point of the limb roll joint to the first link 350.
[0180] The fourth connection point is the midpoint of the line connecting the sixth connection point to the seventh connection point.
[0181] In the embodiment of the present invention, the length acquisition unit 520 is further configured to acquire the theoretical first length in the following manner:
[0182]
[0183] The theoretical second length is acquired in the following manner:
[0184]
[0185] Among them, and are respectively the fourth column elements of the first three rows of the rotation matrix . and are respectively the fourth column elements of the first three rows of the rotation matrix .
[0186] In an embodiment of the present invention, the controller 530 is further configured to:
[0187] Obtain the first speed and the first direction of the first linear motor;
[0188] Obtain the second speed and the second direction of the second linear motor;
[0189] Cause the first linear motor to adjust the output length to the theoretical first length according to the first speed and the first direction;
[0190] Cause the second linear motor to adjust the output length to the theoretical second length according to the second speed and the second direction.
[0191] In an embodiment of the present invention, the length acquisition unit 520 is further configured to:
[0192] Obtain the actual first length and the actual second length;
[0193] Obtain the theoretical first angle and the theoretical second angle according to the actual first length and the actual second length;
[0194] Correct the actual first length and the actual second length according to the difference between the theoretical first angle and the desired first angle and the difference between the theoretical second angle and the desired second angle.
[0195] In an embodiment of the present invention, the angle acquisition unit 510 is further configured to:
[0196] Obtain the current theoretical first length and the current theoretical second length according to the current theoretical first angle and the current theoretical second angle;
[0197] Obtain a length residual term according to the current theoretical first length, the current theoretical second length, the actual first length and the actual second length;
[0198] Judge whether the length residual term is less than or equal to a preset precision threshold;
[0199] If the length residual term is greater than or equal to the preset precision threshold, update the current theoretical first angle as the next theoretical first angle and update the current theoretical second angle as the next theoretical second angle;
[0200] If the length residual term is less than the preset precision threshold, the current theoretical first angle is taken as the theoretical first angle, and the current theoretical second angle is taken as the theoretical second angle.
[0201] In an embodiment of the present invention, the angle acquisition unit 510 is further configured to:
[0202] Obtain a length residual term according to the following method:
[0203]
[0204] where L 1,i is the i-th theoretical first length, L 2,i is the i-th theoretical first length, L1 is the actual first length, and L2 is the actual second length;
[0205] Update the current theoretical first angle according to the following method and use it as the next theoretical first angle, and update the current theoretical second angle and use it as the next theoretical second angle:
[0206] θ 1,i+1 = θ 1,i + Δθ 1,i+1
[0207] θ 2,i+1 = θ 2,i + Δθ 2,i+1
[0208]
[0209] where θ 1,i+1 is the next theoretical first angle, θ 2,i+1 is the next theoretical second angle, θ 1,i is the current theoretical first angle, θ 2,i is the current theoretical second angle, Δθ 1,i+1 is the update amount of the next theoretical first angle, and Δθ 2,i+1 is the update amount of the next theoretical second angle.
[0210] The present invention can make the movement of the humanoid robot closer to that of a human, with simple control and large load capacity.
[0211] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following method is implemented: obtaining a desired first angle and a desired second angle; obtaining a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle; controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle; wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0212] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following method is implemented: obtaining a desired first angle and a desired second angle; obtaining a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle; controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle; wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
[0213] The above-mentioned humanoid robot joint linear motor control method can achieve the beneficial effect of solving the technical problems proposed in the background art.
[0214] Figure 2 It is a schematic flowchart of the humanoid robot joint linear motor control method in one embodiment. It should be understood that although Figure 2 the steps in the flowchart are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 2 at least a part of the steps in
[0215] Figure 6 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps. Figure 1 in the server 120 shown in Figure 6As shown, the computer device includes a processor, a memory, a network interface, an input device, and a display screen connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the control method for the linear motor of the humanoid robot joint. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the control method for the linear motor of the humanoid robot joint. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0216] Those skilled in the art can understand that Figure 6 the structure shown in is only a block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0217] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or an external cache. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0218] It should be noted that in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0219] The above are only specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the broadest scope consistent with the principles and novel features claimed herein.
Claims
1. A control method for a linear motor of a humanoid robot joint, characterized in that, The humanoid robot joint includes a first linear motor, a second linear motor, a limb pitch joint, and a limb roll joint. The first linear motor and the second linear motor are connected in parallel and then connected to the limb pitch joint and the limb roll joint. The first linear motor includes a first linear slide bar, and the second linear motor includes a second linear slide bar. The control method includes: Obtaining a desired first angle and a desired second angle; Obtaining a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle; Controlling the output length of the first linear motor to be adjusted to the theoretical first length, and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle; Wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
2. The method according to claim 1, wherein The humanoid robot further includes a first connecting rod and a second connecting rod. The second connecting rod is connected to the first connecting rod through the limb pitch joint, and the second connecting rod is further connected to the end part through the limb roll joint. The first housing of the first linear motor is connected to the first connecting rod through a first upper spherical bearing at a second connection point. The first linear slide bar of the first linear motor is connected to the end part through a first lower spherical bearing at a seventh connection point. The first linear slide bar and the first housing slide relative to each other along the connection line between the second connection point and the seventh connection point. The second housing of the second linear motor is connected to the first connecting rod through a second upper spherical bearing at a third connection point. The second linear slide bar of the second linear motor is connected to the end part through a second lower spherical bearing at a sixth connection point. The second linear slide bar and the second housing slide relative to each other along the connection line between the third connection point and the sixth connection point. The obtaining the theoretical first length and the theoretical second length according to the desired first angle and the desired second angle includes: Obtaining a first rotation matrix between the seventh connection point and the second connection point; Obtaining a second rotation matrix between the sixth connection point and the third connection point; Obtaining the theoretical first length and the theoretical second length according to the first rotation matrix and the second rotation matrix; Wherein, the theoretical first length is the length between the third connection point and the sixth connection point, and the theoretical second length is the length between the second connection point and the seventh connection point.
3. The method according to claim 2, characterized in that, The first rotation matrix is: The second rotation matrix is: Wherein, θ1 is the angle of the limb pitch joint, and θ2 is the angle of the limb roll joint. is the rotation matrix of coordinate system {∑7} relative to coordinate system {∑2}, is the rotation matrix of coordinate system {∑4} relative to coordinate system {∑2}, is the rotation matrix of coordinate system {∑5} relative to coordinate system {∑4}, and is a function of the limb pitch joint angle θ1, is the rotation matrix of coordinate system {∑7} relative to coordinate system {∑5}, and is a function of the limb roll joint angle θ2, is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑3}; is the rotation matrix of the coordinate system {∑4} relative to the coordinate system {∑3}, is the rotation matrix of the coordinate system {∑6} relative to the coordinate system {∑5}, and is a function of the limb roll joint angle θ2, {∑2} is the second coordinate system established with the second connection point, {∑3} is the third coordinate system established with the third connection point, {∑4} is the fourth coordinate system established with the fourth connection point, {∑5} is the fifth coordinate system established with the fifth connection point, {∑6} is the sixth coordinate system established with the sixth connection point, {∑7} is the seventh coordinate system established with the seventh connection point. The second coordinate system, the third coordinate system, the fourth coordinate system, the fifth coordinate system, the sixth coordinate system, and the seventh coordinate system are parallel to the world coordinate system. The fifth connection point is the midpoint of the line connecting the center point of the limb roll joint to the first link. The fourth connection point is the midpoint of the line connecting the sixth connection point to the seventh connection point.
4. The method according to claim 3, wherein The theoretical first length is obtained in the following manner: The theoretical second length is obtained in the following manner: Among them, and are the fourth column elements of the first three rows of the rotation matrix respectively, and are the fourth column elements of the first three rows of the rotation matrix respectively.
5. The method according to claim 1, characterized in that, Adjusting the output length of the first linear motor to the theoretical first length and adjusting the output length of the second linear motor to the theoretical second length includes: Obtaining the first speed and the first direction of the first linear motor; Obtaining the second speed and the second direction of the second linear motor; Causing the first linear motor to adjust the output length to the theoretical first length according to the first speed and the first direction; Causing the second linear motor to adjust the output length to the theoretical second length according to the second speed and the second direction.
6. The method according to claim 1, characterized in that, After adjusting the output length of the first linear motor to the theoretical first length and adjusting the output length of the second linear motor to the theoretical second length, the method further includes: Obtaining the actual first length and the actual second length; Obtaining the theoretical first angle and the theoretical second angle according to the actual first length and the actual second length; Correcting the actual first length and the actual second length according to the difference between the theoretical first angle and the desired first angle and the difference between the theoretical second angle and the desired second angle.
7. The method according to claim 6, characterized in that, Obtaining the theoretical first angle and the theoretical second angle according to the actual first length and the actual second length includes: Obtaining the current theoretical first length and the current theoretical second length according to the current theoretical first angle and the current theoretical second angle; Obtaining a length residual term according to the current theoretical first length, the current theoretical second length, the actual first length, and the actual second length; Judging whether the length residual term is less than or equal to a preset precision threshold; If the length residual term is greater than or equal to the preset precision threshold, updating the current theoretical first angle as the next theoretical first angle and updating the current theoretical second angle as the next theoretical second angle; If the length residual term is less than the preset precision threshold, taking the current theoretical first angle as the theoretical first angle and taking the current theoretical second angle as the theoretical second angle.
8. The method according to claim 7, wherein Obtaining the length residual term according to the current theoretical first length, the current theoretical second length, the actual first length, and the actual second length in the following manner: Among them, L 1,i is the theoretical first length at the i-th time, L 2,i is the theoretical first length at the i-th time, L1 is the actual first length, and L2 is the actual second length; After updating the current first theoretical angle as the next first theoretical angle and updating the current second theoretical angle as the next second theoretical angle, in the following manner: θ 1,i+1 = θ 1,i + Δθ 1,i+1 θ 2,i+1 = θ 2,i + Δθ 2,i+1 Among them, θ 1,i+1 is the next theoretical first angle, θ 2,i+1 is the next theoretical second angle, θ 1,i is the current theoretical first angle, θ 2,i is the current theoretical second angle, Δθ 1,i+1 is the update amount of the next theoretical first angle, Δθ 2,i+1 is the update amount of the next theoretical second angle.
9. A linear motor control device for a humanoid robot joint, characterized in that, The device is provided on a humanoid robot. The joints of the humanoid robot include a first linear motor, a second linear motor, a limb pitch joint, and a limb roll joint. The first linear motor and the second linear motor are connected in parallel and then connected to the limb pitch joint and the limb roll joint. The first linear motor includes a first linear slide bar, and the second linear motor includes a second linear slide bar. The device includes: An angle acquisition unit for acquiring a desired first angle and a desired second angle; A length acquisition unit for acquiring a theoretical first length and a theoretical second length according to the desired first angle and the desired second angle; A controller for controlling the output length of the first linear motor to be adjusted to the theoretical first length and controlling the output length of the second linear motor to be adjusted to the theoretical second length, so that the actual first angle is equal to the desired first angle and the actual second angle is equal to the desired second angle; Wherein, the first angle is the angle of the limb pitch joint, and the second angle is the angle of the limb roll joint.
10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.