Control method and device of robot and robot

CN122210596BActive Publication Date: 2026-09-18ANHUI MOJIA ZHICHUANG ROBOT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610199727.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-02-11
Publication Date
2026-09-18
Estimated Expiration
2046-02-11

AI Technical Summary

Technical Problem

其中,数值迭代法(如牛顿-拉夫逊法、阻尼最小二乘法)通过迭代逼近末端期望位姿,但存在收敛性依赖初始值、实时性差的问题

Benefits of technology

[0015]In this application, the solution first determines the third distance from the shoulder to the wrist of the robotic arm based on the initial and desired poses. Then, it determines the first joint angle of the first joint of the elbow based on the first distance from the shoulder to the elbow, the second distance from the elbow to the wrist, and the third distance. After confirming that the first joint angle meets preset conditions, it determines the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance. This allows for the control of the robot based on the angles of multiple joints from the shoulder to the elbow and from the elbow to the wrist. Finally, the robot can be controlled based on these angles. This application uses a fully analytical closed-form solution, eliminating the need for iterative calculations. It decomposes the problem based on the geometric features of the shoulder-elbow-wrist region of the robotic arm, thus improving the speed of determining the joint angles of each joint and consequently the speed of determining the robot's control parameters. Furthermore, calculations continue only after the first joint angle meets preset conditions, ensuring the accuracy of the robot's control parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122210596B_ABST
    Figure CN122210596B_ABST
Patent Text Reader

Abstract

A robot control method is disclosed, relating to the field of robotics technology, comprising: acquiring the initial pose and desired pose of a robot's robotic arm; acquiring a first distance from the shoulder to the elbow of the robotic arm and a second distance from the shoulder to the wrist of the robotic arm; determining a third distance from the shoulder to the wrist based on the initial pose and desired pose; determining a first joint angle of a first joint of the shoulder based on the third distance, the first distance, and the second distance; determining the position of a first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance, provided that the first joint angle meets preset conditions; determining each angle of multiple joints from the shoulder to the elbow and each angle of multiple joints from the elbow to the wrist based on the first joint position; thereby controlling the robot. This application improves the speed of determining the robot's control parameters and ensures the accuracy of determining the control parameters of the robotic arm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robotics, and more specifically, to a method, apparatus, and robot control system. Background Technology

[0002] With the rapid development of technology, humanoid robots have shown broad application prospects in various fields such as human-robot collaboration, medical surgery, automotive painting, and aerospace. Solving the inverse kinematics of the humanoid robot's arm is a core technology for robot motion control, and the mainstream methods are currently divided into two categories: numerical iterative methods and analytical methods. Numerical iterative methods (such as the Newton-Raphson method and damped least squares method) approximate the desired end-effector pose through iteration, but they suffer from convergence dependence on initial values ​​and poor real-time performance. Therefore, how to quickly and accurately determine the robot's control parameters has become an urgent problem to be solved. Summary of the Invention

[0003] In view of this, embodiments of this application propose a robot control method, apparatus, and robot to improve the above-mentioned problems.

[0004] According to a first aspect of the embodiments of this application, a robot control method is provided, the method comprising: acquiring an initial pose and a desired pose of a robot arm; acquiring a first distance from the shoulder to the elbow of the robot arm and a second distance from the shoulder to the wrist of the robot arm; determining a third distance from the shoulder to the wrist based on the initial pose and the desired pose; determining a first joint angle of a first joint of the elbow based on the third distance, the first distance, and the second distance; determining a position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance, provided that the first joint angle satisfies a preset condition; determining each angle of a plurality of joints from the shoulder to the elbow and each angle of a plurality of joints from the elbow to the wrist based on the first joint position; and controlling the robot based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist.

[0005] In some embodiments, determining the first joint angle of the first joint of the elbow based on the third distance, the first distance, and the second distance includes: determining a normal vector based on the initial pose and the desired pose; determining a target point position and a target distance based on the first distance, the second distance, and the third distance; and determining the first joint position based on the normal vector, the target distance, and the target point position, wherein the first joint position is any position on a circle centered at the target point position and with the target distance as the radius.

[0006] In some embodiments, the plurality of joints from the shoulder to the elbow includes a second joint between the base of the robotic arm and the shoulder and a third joint of the shoulder. Determining each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist based on the position of the first joint includes: obtaining an initial position of the first joint, a first rotation of the second joint and a second rotation of the third joint, and obtaining a first rotation axis intersection point of the second joint and the third joint; determining a first rotation axis unit vector of the second joint based on the first rotation and a second rotation axis unit vector of the third joint based on the second rotation; determining a first target vector based on the first joint position and the rotation axis intersection point, and a second target vector based on the initial position and the first rotation axis intersection point; and determining a second joint angle of the second joint and a third joint angle of the third joint based on the first target vector, the second target vector, the first rotation axis unit vector, and the second rotation axis unit vector.

[0007] In some embodiments, the plurality of joints from the shoulder to the elbow further includes a fourth joint, and the method further includes: when the second joint angle and the third joint angle satisfy the preset condition, obtaining a first joint pivot point of the fourth joint and a third rotation of the first joint; determining a first reference vector based on the third rotation, the first joint angle and the initial pose, and determining a second reference vector based on the first rotation, the second rotation, the second joint angle, the third joint angle and the desired pose; determining a third target vector based on the first reference vector and the first joint pivot point, and determining a fourth target vector based on the second reference vector and the first joint pivot point; determining a third rotation axis unit vector of the fourth joint, and determining a fourth joint angle of the fourth joint based on the third rotation axis unit vector, the third target vector and the fourth target vector.

[0008] In some embodiments, the plurality of joints from the elbow to the wrist includes a fifth joint, a sixth joint, and a seventh joint. The method further includes: when the angle of the fourth joint satisfies the preset condition, obtaining the fourth rotation of the fourth joint, the intersection of the second rotation axes of the sixth and seventh joints, and the second joint pivot point of the fifth joint; determining a third reference vector based on the intersection of the second rotation axes, the first rotation, the second rotation, the third rotation, the fourth rotation, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the intersection of the second rotation axes, the initial pose, and the desired pose; determining a fifth target vector based on the intersection of the second rotation axes and the second joint pivot point, and determining a sixth target vector based on the third reference vector and the second joint pivot point; determining the fourth rotation axis unit vector of the fifth joint, and determining the fifth joint angle of the fifth joint based on the fifth target vector, the sixth target vector, and the fourth rotation axis unit vector.

[0009] In some embodiments, the method further includes: when the fifth joint angle satisfies the preset condition, obtaining the fifth rotation axis unit vector of the sixth joint, the fifth screw of the fifth joint, the third joint pivot point of the sixth joint, and a first reference point, wherein the first reference point is a point located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint; determining a fourth reference vector based on the first reference point, the first screw, the second screw, the third screw, the fourth screw, the fifth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the initial pose, and the desired pose; determining a seventh target vector based on the third joint pivot point and the first reference point, and determining an eighth target vector based on the first reference point and the fourth reference vector; determining the fifth rotation axis unit vector of the sixth joint, and determining the sixth joint angle of the sixth joint based on the seventh target vector, the eighth target vector, and the fifth rotation axis unit vector.

[0010] In some embodiments, the method further includes: when the sixth joint angle satisfies the preset condition, obtaining the sixth screw of the sixth joint, the fourth joint pivot point of the seventh joint, the sixth screw of the sixth joint, and a second reference point, wherein the second reference point is a point not located on the rotation axis of the seventh joint; determining a fifth reference vector based on the second reference point, the first screw, the second screw, the third screw, the fourth screw, the fifth screw, the sixth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the sixth joint angle, the initial pose, and the desired pose; determining a ninth target vector based on the fourth joint pivot point and the second reference point, and determining a tenth target vector based on the second reference point and the fifth reference vector; determining the sixth rotation axis unit vector of the seventh joint, and determining the seventh joint angle based on the ninth target vector, the tenth target vector, and the sixth rotation axis unit vector.

[0011] In some embodiments, controlling the robot based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist includes: when the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist all satisfy the preset conditions, determining a reference pose corresponding to each value of the first joint position when the first joint position has multiple values, based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist; determining an error based on the reference pose corresponding to each value of the first joint position when the first joint position has multiple values ​​and the desired pose; determining a target pose based on the error among the reference poses corresponding to each value of the first joint position when the first joint position has multiple values; and controlling the robot based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist corresponding to the target pose.

[0012] According to a second aspect of the embodiments of this application, a robot control device is provided, the device comprising: an acquisition module, configured to acquire an initial pose and a desired pose of a robot arm, and to acquire a first distance from the shoulder to the elbow of the robot arm, and a second distance from the shoulder to the wrist of the robot arm; a third distance determination module, configured to determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose; a first angle determination module, configured to determine a first joint angle of a first joint of the elbow based on the third distance, the first distance, and the second distance; a first joint position determination module, configured to determine the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance, provided that the first joint angle meets a preset condition; a second angle determination module, configured to determine each angle of a plurality of joints from the shoulder to the elbow, and each angle of a plurality of joints from the elbow to the wrist, based on the first joint position; and a control module, configured to control the robot based on the first joint angle, each joint angle of the plurality of joints from the shoulder to the elbow, and each joint angle of the plurality of joints from the elbow to the wrist.

[0013] According to a third aspect of the embodiments of this application, a robot is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the robot control method described above is implemented.

[0014] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, implement the robot control method described above.

[0015] In this application, the solution first determines the third distance from the shoulder to the wrist of the robotic arm based on the initial and desired poses. Then, it determines the first joint angle of the first joint of the elbow based on the first distance from the shoulder to the elbow, the second distance from the elbow to the wrist, and the third distance. After confirming that the first joint angle meets preset conditions, it determines the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance. This allows for the control of the robot based on the angles of multiple joints from the shoulder to the elbow and from the elbow to the wrist. Finally, the robot can be controlled based on these angles. This application uses a fully analytical closed-form solution, eliminating the need for iterative calculations. It decomposes the problem based on the geometric features of the shoulder-elbow-wrist region of the robotic arm, thus improving the speed of determining the joint angles of each joint and consequently the speed of determining the robot's control parameters. Furthermore, calculations continue only after the first joint angle meets preset conditions, ensuring the accuracy of the robot's control parameters.

[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the embodiments of this application. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0018] Figure 1 This is a schematic diagram of the joint composition of a robot's robotic arm according to an embodiment of this application.

[0019] Figure 2 This is a flowchart illustrating a robot control method according to an embodiment of this application.

[0020] Figure 3 This is a schematic diagram showing the joint angles and rotation axes of the joints of a robotic arm according to an embodiment of this application.

[0021] Figure 4 This is a schematic diagram of a triangle formed by the shoulder, elbow, and wrist of a robotic arm according to an embodiment of this application.

[0022] Figure 5 This is a flowchart illustrating a robot control method according to another embodiment of this application.

[0023] Figure 6 This is a flowchart illustrating a robot control method according to another embodiment of this application.

[0024] Figure 7 This is a flowchart illustrating the specific steps following step 480 according to an embodiment of this application.

[0025] Figure 8 This is a flowchart illustrating the specific steps following step 540 according to an embodiment of this application.

[0026] Figure 9 This is a flowchart illustrating the specific steps following step 640 according to an embodiment of this application.

[0027] Figure 10 This is a flowchart illustrating the specific steps following step 740 according to an embodiment of this application.

[0028] Figure 11 This is a flowchart illustrating a robot control method according to another embodiment of this application.

[0029] Figure 12 This is a block diagram of a robot control device according to an embodiment of this application.

[0030] Figure 13 This is a hardware structure diagram of a robot according to an embodiment of this application.

[0031] The accompanying drawings have illustrated specific embodiments of the present application. More detailed descriptions will follow. These drawings and descriptions are not intended to limit the scope of the present application's embodiments in any way, but rather to illustrate the concepts of the present application's embodiments to those skilled in the art through specific embodiments. Detailed Implementation

[0032] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.

[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.

[0034] Please see Figure 1 , Figure 1 This application illustrates a robotic arm provided in one embodiment, such as... Figure 1 As shown below, the control method of the robotic arm to realize the robot is illustrated by example.

[0035] In one alternative implementation, the robotic arm 100 includes a first joint 110 at the elbow of the robotic arm, a second joint 120 connected to the body of the robot, a third joint 130 at the shoulder of the robotic arm, a fourth joint 140 between the shoulder and the first joint 110 at the elbow of the robotic arm, a fifth joint 150 between the first joint 110 at the elbow of the robotic arm and the wrist 180, a sixth joint 160 and a seventh joint 170.

[0036] For example, the initial pose and desired pose of the robot's arm are first obtained, as well as the first distance from the third joint 130 of the shoulder of the robot arm to the first joint 110 of the elbow of the robot arm and the second distance from the third joint 130 of the shoulder of the robot arm to the wrist 180 of the robot arm are obtained. Then, the third distance from the third joint 130 of the shoulder of the robot arm to the wrist 180 of the robot arm is determined based on the initial pose and desired pose.

[0037] Then, the first joint angle of the first joint 110 is determined based on the third distance, the first distance and the second distance. And, if the first joint angle meets the preset conditions, the first joint position of the first joint 110 is determined based on the third distance, the initial pose, the desired pose, the first distance and the second distance.

[0038] In this way, the joint angles of the second joint 120, third joint 130, fourth joint 140, fifth joint 150, sixth joint 160 and seventh joint 170 can be determined based on the position of the first joint of the first joint 110; and finally, the robot can be controlled based on the joint angles of the first joint 110, second joint 120, third joint 130, fourth joint 140, fifth joint 150, sixth joint 160 and seventh joint 170.

[0039] For example, a spring-buffered joint structure combined with a pin-pressing mechanism can be used in the joint structure of the robotic arm 100 to compensate for mechanical structural errors of ±5mm. If the slider hole position deviates, pressing the pin pushes the slider axially downward by 3-5mm to ensure hole alignment, thereby controlling the deviation of the end effector pose (i.e., wrist 180) of the robotic arm 100 to ≤3mm. Furthermore, experimental verification shows that setting offset errors of 3mm and 5mm in the slider at the waist of the robotic arm, the pose deviations of the wrist 180 determined by the joint angles of each joint as specified in this application are 1.2mm and 2.8mm respectively, both meeting the accuracy requirements, thus further improving the control accuracy of the robot.

[0040] Figure 1 The robotic arm in the image can be used to achieve the following: Figure 2 For the described robot control method, please refer to [link / reference]. Figure 2 , Figure 2 This application illustrates a robot control method according to an embodiment of the present application. In a specific embodiment, the robot control method can be applied to, for example... Figure 12 The robot control device 1000 and the robot 1100 equipped with the robot control device 1000 are shown. Figure 13 The specific process of this embodiment will be described below. Of course, it is understood that this method can be executed by an electronic device with computing power, such as a control chip, a cloud server, or other processors with processing capabilities. The following will focus on... Figure 2 The process shown is described in detail, and the robot control method may specifically include the following steps 210-260.

[0041] Step 210: Obtain the initial pose and desired pose of the robot's robotic arm, and obtain the first distance from the shoulder to the elbow of the robotic arm and the second distance from the shoulder to the wrist of the robotic arm.

[0042] As an alternative approach, to accurately control the robot, the desired pose of the robot's arm can be set first. Then, the joint variables corresponding to each joint of the arm in the desired pose can be determined using an inverse position solution analytical method. This allows control of the robot's arm based on the determined joint variables of each joint in the desired pose. Alternatively, to determine the joint variables of each joint of the robot's arm, the initial pose of the robot's arm can be obtained first. This allows the joint variables of each joint to be determined based on the initial pose and the desired pose. The initial pose can be the robot's pose before executing the desired pose, and can be obtained through sensors in the robot. Optionally, the initial pose of the robot arm can include the initial pose of each of the multiple joints of the robot arm.

[0043] In one alternative scenario, the robot can be a humanoid robot, and its corresponding robotic arm can be a seven-degree-of-freedom robotic arm. The seven-degree-of-freedom robotic arm is also known as a redundant robotic arm, which is one joint more than a six-degree-of-freedom robotic arm. It is redundant, but this redundancy brings greater flexibility to the robotic arm. For example, it can achieve a specific pose at the end of the arm while avoiding specific obstacles, which is similar to a human arm, thus ensuring that the robot can perform more actions.

[0044] Optionally, in the robot's robotic arm, the arm lengths between the shoulder, wrist, and elbow form a corresponding triangle, such as... Figure 3 As shown, the first distance is the length of the upper arm between the shoulder and the elbow. The forearm length between the elbow and wrist (i.e., the second distance) is Once the robot is manufactured, its first and second distances remain fixed; therefore, the first and second distances can be directly obtained.

[0045] Step 220: Determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose.

[0046] As an alternative approach, since the shoulder position remains constant during the movement of the robotic arm, and the pose relationship between the shoulder, elbow, and wrist is related to the pose of the elbow and wrist, given the desired pose, the shoulder, elbow, and wrist will form a triangle, such as... Figure 3 As shown, given the desired pose, the position of the robotic arm's wrist is already known. Therefore, the third distance between the shoulder and wrist is also a fixed value in this case. Thus, the third distance between the shoulder and wrist can be determined based on the positions of the shoulder and wrist.

[0047] Optionally, the desired pose includes the target rotational orientation and target position of the robotic arm's wrist, i.e. ,in, Rotate the target orientation. The target position; the initial pose includes the initial rotational attitude and initial position of the robotic arm's wrist, i.e. ,in, This is the initial rotational orientation. This is the initial position.

[0048] In one alternative scenario, since the position of the shoulder remains unchanged, the first coordinate information of the shoulder of the robotic arm can be determined based on the initial pose of the robotic arm, and the second coordinate information of the wrist of the robotic arm can be determined based on the desired pose. Then, the Euclidean distance between the shoulder and the wrist can be calculated based on the first and second coordinate information, and this Euclidean distance can be determined as the third distance.

[0049] Optionally, if the first coordinate information of the shoulder is The second coordinate information of the wrist is Therefore, the third distance can be determined using the Euclidean distance formula. Its unit is millimeters.

[0050] Step 230: Determine the first joint angle of the first joint of the elbow based on the third distance, the first distance, and the second distance.

[0051] As an alternative approach, during the movement of the robotic arm, the position of the elbow joint changes, and the positions of all joints between the wrist and elbow also change. In order to accurately control the robotic arm, the pose information corresponding to the first joint of the elbow can be determined first, so that the pose information corresponding to other joints can be inferred based on the pose information corresponding to the first joint of the elbow.

[0052] In one optional scenario, the pose information corresponding to the first joint of the elbow includes the first joint angle and the first joint position. Since all joints in the robotic arm rotate around their corresponding spatial lines, i.e., rotation axes, and each rotation axis corresponds to a rotational degree of freedom, in this embodiment, the robotic arm has a seven-degree-of-freedom structure, each with its corresponding rotation axis, such as... Figure 4 As shown, the shoulder of the robotic arm contains joint 1 (rotating around the Z-axis), joint 2 (rotating around the Y-axis), and joint 3 (rotating around the Y-axis); the elbow contains joint 4 (rotating around the Y-axis); and the wrist contains joint 5 (rotating around the Y-axis), joint 6 (rotating around the X-axis), and joint 7 (rotating around the Y-axis). The angle of rotation of each joint affects the specific pose of the robotic arm. Therefore, the first joint angle of the first joint of the elbow can be determined first.

[0053] Optionally, during arm movement, the shoulder position remains unchanged. Given the desired pose, the shoulder, elbow, and wrist of the robotic arm form a triangle, such as... Figure 3 As shown, the first joint angle of the first joint of the elbow can be calculated based on the first distance, the second distance, and the third distance. This can be achieved using the formula... ,in, For the first joint angle, This is the third distance.

[0054] Optionally, when the first distance is 350mm and the second distance is 300mm, thereby... To determine the first joint angle, but since the first joint angle cannot be obtained at this point, the second coordinate information of the wrist is corrected. Then, the third distance is re-determined based on the corrected second coordinate information. Then, the first joint angle is recalculated based on the newly determined third distance. .

[0055] Step 240: If the first joint angle meets the preset conditions, determine the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance.

[0056] As an alternative approach, since the joints of a robot's arm are typically composed of mechanical components such as motors, reducers, and bearings, these components have their physical limits in their design. For example, motors and reducers can rotate continuously, but collisions may occur between the links of the robot arm, or the twisting angle of the cables may be limited. Furthermore, the workspace of the robot arm is the set of all points that its end effector can reach. The limitations of the joint angle of each joint directly define the boundary of the workspace. Therefore, the joint angle corresponding to each joint of the robot arm must be limited within the range allowed by the mechanical structure to avoid damage, while ensuring that the robot arm moves within a safe and efficient space, avoiding collisions with itself or the environment. Therefore, after determining the first joint angle, it can be first determined whether the determined first joint angle meets preset conditions. Only if the preset conditions are met will the position of the first joint of the elbow be further determined.

[0057] Optionally, since singular configuration problems may occur during the movement of the robotic arm, i.e., when the joint reaches ±180°, the robotic arm may be in a singular position, causing the Jacobian matrix to drop in rank, losing the ability to move in certain directions, or requiring extremely high joint velocities, a preset condition can be set such that the joint angle is within the joint limit (±170°). When the first joint angle satisfies At that time, it is determined that the preset conditions are met.

[0058] As an alternative approach, in a robotic arm, the specific position of the first joint of the elbow will affect the overall pose of the robotic arm, especially the pose of the end effector. Therefore, it is necessary to first determine the position of the first joint of the elbow, and then calculate the joint variables (i.e., joint angles) required for other joints to achieve the desired pose based on the position of the first joint.

[0059] In one alternative scenario, since the shoulder, elbow, and wrist of the robotic arm are any three points in space, and any three points in space form a triangle, and the position of the shoulder of the robotic arm remains unchanged during the movement, and given that the desired pose is known, the position of the first joint of the elbow can be determined based on the triangle formed by the shoulder, elbow, and wrist. That is, the position of the first joint of the elbow can be determined based on the initial pose, the desired pose, the first distance, the second distance, and the third distance.

[0060] Step 250: Based on the position of the first joint, determine each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist.

[0061] As an alternative approach, after determining the first joint angle and position of the elbow, the joint variables of the remaining joints are joint angles, and the joint angles of the remaining joints can be calculated based on the position of the first joint. Therefore, the joint angles of each joint of the multiple joints from the shoulder to the elbow and the joint angles of each joint of the multiple joints from the elbow to the wrist of the robotic arm can be determined according to the position of the first joint, the initial pose of the robotic arm and the desired pose of the robotic arm.

[0062] Optionally, since the position of the shoulder of the robotic arm does not change with the changes of other joints, the multiple joints between the shoulder and the elbow are only limited by the first joint of the elbow. Therefore, the joint angle of each joint among the multiple joints from the shoulder to the elbow can be determined first based on the position of the first joint of the elbow and the initial pose of the robotic arm, and then the joint angle of each joint among the multiple joints from the elbow to the wrist can be calculated based on the position of the first joint of the elbow and the desired pose of the robotic arm.

[0063] Step 260: Control the robot based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist.

[0064] As an alternative approach, after obtaining the first joint angle and position of the first joint, the angles of each joint from the shoulder to the elbow, and the angles of each joint from the elbow to the wrist, corresponding continuous control commands can be generated based on the joint sequence and angle of each joint in the robotic arm and the first joint position of the first joint. In this way, the central motor of the robotic arm can change the robotic arm from the initial pose to the desired pose according to the continuous control commands, thereby achieving precise control of the robot.

[0065] Optionally, after determining the joint angles of each joint of the robotic arm, to ensure the accuracy of robot control, it is necessary to verify the forward motion of each joint angle and the first joint position of the first joint. This determines whether the robot can obtain the desired pose based on the determined joint angles of each joint and the first joint position of the first joint. Furthermore, if it is determined that the desired pose can be obtained, control commands for the robot are generated based on the joint angles of each joint and the first joint position of the first joint, thereby enabling the robotic arm to be controlled based on the control commands.

[0066] In the embodiments of this application, the third distance from the shoulder to the wrist of the robotic arm is first determined based on the initial pose and desired pose of the robotic arm. Then, the first joint angle of the first joint of the elbow of the robotic arm is determined based on the first distance from the shoulder to the elbow, the second distance from the elbow to the wrist, and the third distance. Then, when the first joint angle meets the preset conditions, the position of the first joint of the elbow is determined based on the third distance, the initial pose, the desired pose, the first distance, and the second distance. In this way, the robot can be controlled based on each angle of the multiple joints from the shoulder to the elbow and each angle of the multiple joints from the elbow to the wrist based on the first joint position. Finally, the robot can be controlled based on the first joint angle, each joint angle of the multiple joints from the shoulder to the elbow, and each joint angle of the multiple joints from the elbow to the wrist. This application uses a fully analytical closed-form solution, eliminating the need for iterative calculations. It decomposes the problem based on the geometric features of the robotic arm's shoulder, elbow, and wrist. Each step directly solves for the joint angles using algebraic formulas, without iterative processes. This improves the speed of determining the joint angles of each joint of the robotic arm, thereby increasing the speed of determining the robot's control parameters. Furthermore, it only continues calculations when the first joint angle meets preset conditions, ensuring the accuracy of determining the robotic arm's control parameters.

[0067] Please see Figure 5 , Figure 5 This application illustrates a robot control method according to an embodiment of the present application. The following will focus on... Figure 5 The process shown is described in detail, and the robot control method may specifically include the following steps 310-380.

[0068] Step 310: Obtain the initial pose and desired pose of the robot's robotic arm, and obtain the first distance from the shoulder to the elbow of the robotic arm and the second distance from the shoulder to the wrist of the robotic arm.

[0069] Step 320: Determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose.

[0070] Step 330: Determine the normal vector based on the initial pose and the desired pose.

[0071] As an alternative approach, in a seven-DOF robotic arm, the position of the shoulder joint is largely fixed, while the wrist position is determined by the desired pose. Therefore, the position of the first elbow joint lies on a circle formed by the positions of the shoulder and wrist joints. This circle is formed by the intersection of two spheres: one centered at the shoulder joint position with a radius equal to the first distance from the shoulder to the elbow (upper arm length), and the other centered at the wrist joint position with a radius equal to the second distance from the elbow to the wrist (forearm length). Thus, the plane containing this circle is perpendicular to the line connecting the shoulder and wrist, and the elbow can be positioned arbitrarily on this circle. Therefore, the normal vector corresponding to the line connecting the shoulder and wrist joints can be determined first. Based on this normal vector, the circle containing the first elbow joint can be determined, and consequently, the position of the first elbow joint can be determined.

[0072] In one alternative scenario, since the position of the shoulder joint in the robot's arm is fixed, the initial position of the shoulder joint can be determined first based on the initial pose of the robot arm, and the target position of the wrist joint can be determined based on the desired pose. Then, the normal vector is determined based on the initial and target positions. Optionally, this can be achieved using a formula... ,in, It is the normal vector. This is the initial position of the shoulder joint. The target location for the wrist joint.

[0073] Optionally, if the first coordinate information of the shoulder is The second coordinate information of the wrist is The discovery vector can be calculated as follows: .

[0074] Step 340: Determine the target point location and target distance based on the first distance, the second distance, and the third distance.

[0075] As an alternative approach, since the position of the first joint of the elbow lies on the circle formed by the positions of the shoulder joint and the wrist joint, in order to accurately determine the position of the first joint of the elbow, the center and radius of the circle containing the position of the first joint of the elbow can be determined first, thereby enabling the determination of the position of the first joint of the elbow on that circle.

[0076] In one possible scenario, since the joints of the shoulder, elbow, and wrist form a triangle, according to the Pythagorean theorem, drawing a perpendicular line from the elbow to the third distance between the shoulder and wrist joints results in two right triangles. One right triangle has the projections of the shoulder and elbow joints onto the connecting line and the elbow joint as its vertices; the other right triangle has the projections of the wrist and elbow joints onto the connecting line and the elbow joint as its vertices. Therefore, the distance from the projection of the shoulder joint to the elbow joint onto the connecting line and the perpendicular distance from the elbow joint to the connecting line can be determined. This leads to the system of equations: ,in, This is the distance projected onto the line connecting the shoulder joint and the elbow joint. The perpendicular distance from the elbow joint to the line connecting them is the radius of the circle containing the first joint of the elbow (target distance).

[0077] Alternatively, the distance projected onto the line connecting the shoulder joint and the elbow joint can be obtained by solving the above system of equations: The radius is: Then, the center of the circle containing the first joint of the elbow can be determined based on the normal vector, the distance of the projection of the shoulder joint to the elbow joint onto the connecting line, and the target position of the wrist joint. This can be done using the formula... ,in, This represents the center position of the circle, i.e., the position of the target point.

[0078] Optionally, when L1=350, L2=300, and L3=474.34, the distance of the projection of the shoulder joint to the elbow joint onto the connecting line can be determined as follows: Its unit is millimeters. Therefore, the radius, in millimeters, can be obtained. .

[0079] Optionally, in determining , , At that time, the target point can be determined as .

[0080] Step 350: Determine the position of the first joint based on the normal vector, the target distance, and the target point position, wherein the position of the first joint is any position on a circle with the target point position as the center and the target distance as the radius.

[0081] As an alternative approach, after determining the target distance and target point location, since the joint position of the first joint of the elbow lies in a plane perpendicular to the normal vector, and its distance to the center of the circle is the target distance, a system of equations can be obtained. ,in, The equations represent the position of the first joint of the elbow, where the first joint of the elbow is located at the position of the first joint of the elbow. With center and radius as And the direction of the normal is On the circle, the position of the first joint can be any point on the circle.

[0082] Optionally, in determining , , At that time, the position of the first joint can be determined to be... , .

[0083] Step 360: If the first joint angle meets the preset conditions, determine the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance.

[0084] Step 370: Based on the position of the first joint, determine each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist.

[0085] Step 380: Control the robot based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist.

[0086] The specific steps of steps 310-320 and 360-380 can be found in steps 210-220 and 240-260, and will not be repeated here.

[0087] In this embodiment, the normal vector is first determined based on the initial pose and the desired pose, and the target point position and target distance are determined based on the first distance, the second distance and the third distance. In this way, the position of the first joint can be determined based on the normal vector, the target distance and the target point position. By geometric modeling, the position of the first joint of the elbow is constrained to a circular trajectory. Only traversing 2-4 candidate points is needed to cover all valid solutions, which greatly reduces the complexity of subsequent solutions, improves the speed of determining the joint angle of each joint of the robotic arm, and further improves the control efficiency of the robot.

[0088] Please see Figure 6 , Figure 6 This application illustrates a robot control method according to an embodiment of the present application. The following will focus on... Figure 6The process shown is described in detail. The multiple joints from the shoulder to the elbow include the second joint between the base of the robotic arm and the shoulder and the third joint of the shoulder. The control method of the robot may specifically include the following steps 410-490.

[0089] Step 410: Obtain the initial pose and desired pose of the robot's robotic arm, and obtain the first distance from the shoulder to the elbow of the robotic arm and the second distance from the shoulder to the wrist of the robotic arm.

[0090] Step 420: Determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose.

[0091] Step 430: Determine the first joint angle of the first joint of the elbow based on the third distance, the first distance, and the second distance.

[0092] Step 440: If the first joint angle meets the preset conditions, determine the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance.

[0093] Step 450: Obtain the initial position of the first joint, the first rotation of the second joint and the second rotation of the third joint, and obtain the intersection point of the first rotation axis of the second joint and the third joint.

[0094] As an alternative approach, before the elbow of the robotic arm, the joint between the base of the robotic arm and the shoulder to elbow includes a second joint, a third joint at the shoulder of the robotic arm, and a fourth joint between the shoulder and elbow of the robotic arm. The first joint of the elbow is located on the extension line of the rotation axis of the fourth joint. Therefore, the position of the first joint of the first joint of the robotic arm's elbow is influenced by the second and third joints. Consequently, the second joint angle of the second joint and the third joint angle of the third joint can be calculated based on the position of the first joint.

[0095] Optionally, since the position of the first joint of the elbow is affected by the second and third joints, in order to determine the rotation angle of the second and third joints to control the first joint to move from the initial position to the position corresponding to the desired pose, it is also necessary to obtain the initial position of the first joint, so that the joint angles of the second and third joints can be calculated based on the inverse motion of the first joint.

[0096] First, determine the initial position of the first joint of the elbow. Then, based on the initial position of the elbow and the position of the first joint, calculate the joint angles of the second and third joints when the elbow is moved from the initial position to the position of the first joint through the rotation of the second and third joints.

[0097] In one alternative scenario, the position of the shoulder in the robotic arm is jointly determined by the rotation of the second and third joints. However, since the rotation axes of the second and third joints intersect at the shoulder point, when the angles of the second and third joints change, the shoulder position remains unchanged in the base coordinate system and does not change with the rotation of these two joints, as the shoulder is located at the common point of the rotation axes of the second and third joints. Therefore, the respective angles of the second and third joints can be determined based on the first intersection point of their rotation axes.

[0098] Optionally, to determine the joint angles of the second and third joints, the screw parameters of the first and second joints can be obtained first, and then a reverse calculation can be performed based on the screw parameters. Here, screw parameter represents the motion helix of the joint, including the direction of the rotation axis and linear velocity components, and is used to describe the motion characteristics of the joint. Optionally, the intersection point of the first rotation axis can be p. 12 =[300,0,500]mm.

[0099] Step 460: Determine the first rotation axis unit vector of the second joint based on the first spin and determine the second rotation axis unit vector of the third joint based on the second spin.

[0100] As an alternative approach, to ensure the accuracy of the determined joint angles of the second and third joints, the first unit vector of the first rotation axis of the second joint can be determined based on the first screw, and the second unit vector of the third joint can be determined based on the second screw. Then, calculations can be performed based on the first unit vector of the rotation axis and the second unit vector of the third joint. In screw theory, the unit vector of the rotation axis is a unit vector describing the direction of the rotation axis. For a rotational joint, its motion is a rotation about a straight line in space. The unit vector not only gives the direction of the rotation axis but also determines the positive rotation direction using the right-hand rule. For example, as the joint angle increases, the object rotates about the indicated direction in a right-hand helical direction.

[0101] Optionally, since the rotation axis corresponding to each joint of the robot's robotic arm is fixed during the assembly process, the first rotation axis unit vector of the second joint can be determined directly based on the first screw corresponding to the rotation axis of the second joint in the robotic arm, and the second rotation axis unit vector of the third joint can be determined based on the second screw corresponding to the rotation axis of the third joint.

[0102] Step 470: Determine a first target vector based on the intersection of the first joint position and the rotation axis, and determine a second target vector based on the intersection of the initial position and the first rotation axis.

[0103] As an alternative approach, the vector difference between the intersection points of the rotation axes of the first joint of the elbow relative to the second and third joints can be used to determine the first target vector and the second target vector. This allows the second joint angle of the second joint and the third joint angle of the third joint to be calculated based on the first target vector and the second target vector.

[0104] Alternatively, it can be done through the formula To determine the first target vector, where, Let be the first target vector. This is the initial position of the first joint. This is the position vector of the intersection point of the first rotation axis of the second and third joints. It can be expressed by the formula... To determine the second target vector, where, The second target vector, This refers to the position of the first joint of the first joint.

[0105] Optionally, when the first rotation axis intersection is When this happens, the first target vector can be determined as... The second target vector is .

[0106] Step 480: Determine the second joint angle of the second joint and the third joint angle of the third joint based on the first target vector, the second target vector, the first rotation axis unit vector, and the second rotation axis unit vector.

[0107] As an alternative approach, since the position of the first joint of the first joint of the robotic arm's elbow is influenced by the second and third joints, it is possible to obtain... ,in, For the first spinor, The second joint angle is the angle of the second joint. For the second spinor, The angle of the third joint is the angle of the third joint. The spinor exponent mapping represents the rigid body transformation about the joint axis. Then, based on the first and second target vectors, we can obtain... Since the intersection point of the first rotation axis is fixed and not coded, we can obtain Since the rotational component of the spinor exponent mapping is rotation about an axis, we can determine the rotation matrices for rotating around the rotation axis of the second joint by a certain angle and the rotation matrices for rotating around the rotation axis of the third joint by a certain angle, thus obtaining... ,in, The unit vector for the first rotation axis of the second joint. Let R be the unit vector of the second rotation axis of the third joint, used to define the rotation axis of the rotation matrix. R is the rotation matrix. An optimization problem can be constructed using this formula, and the optimal solution can be obtained from this problem to obtain the second joint angle of the second joint and the third joint angle of the third joint.

[0108] In one alternative scenario, the optimization problem can be... Then, the first target vector and the second target vector are normalized to obtain the first unit vector. Second unit vector Then, construct a first reference vector perpendicular to the rotation axis of the second joint and the first unit vector, respectively. , and a second reference vector perpendicular to the rotation axis of the third joint and the second unit vector. For each rotation, construct a two-dimensional orthogonal basis in the plane perpendicular to the rotation axis. Since when a rotation acts on a vector, only the component perpendicular to the rotation axis rotates, while the parallel components remain unchanged, the vector can be decomposed, and its perpendicular components can be represented by two-dimensional vectors, thus obtaining the first matrix. Second matrix Then determine based on the first reference vector And determined based on the second reference vector Next, determine the first projection length of the first unit vector on the rotation axis of the second joint. The second projection length of the second unit vector on the rotation axis of the third joint. And determine the vertical distance between the rotation axes of the second and third joints. ,get , and When a rotation matrix is ​​applied to a vector, the rotation of the perpendicular component can be represented by a two-dimensional rotation matrix. Since it is actually necessary to solve for the sine and cosine values ​​of the joint angles of the second and third joints, the rotated vector can be projected onto the basis using the constructed basis matrix to obtain two-dimensional coordinates. , and Ultimately, the angle of the second joint can be calculated. and the third joint angle of the third joint Optionally, when the first rotation axis unit vector and the second rotation axis unit vector are not parallel, there are usually two sets of second joint angles and third joint angles (elbow on top or bottom); if the magnitude of the first target vector and the magnitude of the second target vector are not equal, there is no exact solution, and an approximate value can be determined by the least squares method to obtain the second joint angle and the third joint angle.

[0109] Optionally, the unit vector of the first rotation axis is (About the Z-axis) and the unit vector of the second rotation axis (around the Y-axis), thus the first unit vector can be obtained as: And the second unit vector is obtained as The first reference vector is and the second reference vector The first matrix Second matrix The first reference vector is determined. And determined based on the second reference vector First projection length Second projection length and vertical distance ,get , and And thus obtain , and Ultimately, the angle of the second joint can be calculated. and the third joint angle of the third joint At this point, both the second joint angle and the third joint angle meet the preset conditions.

[0110] In some embodiments, the plurality of joints from the shoulder to the elbow further includes a fourth joint, after step 480, as follows: Figure 7 As shown, the method further includes steps 510-540.

[0111] Step 510: If the second joint angle and the third joint angle satisfy the preset conditions, obtain the first joint axis point of the fourth joint and the third rotation of the first joint.

[0112] As an alternative approach, since the joint angles of each joint of the robotic arm must be limited within the range allowed by the mechanical structure to avoid damage, and to ensure that the robotic arm moves within a safe and efficient space, avoiding collisions with itself or the environment, after determining the second and third joint angles, it can be first determined whether the determined second and third joint angles both meet preset conditions. Only if the second and third joint angles both meet the preset conditions will the fourth joint angle of the elbow be further determined. The preset conditions can be that the joint angles are within the joint limit (±170°). At that time, it is determined that the preset conditions are met.

[0113] Optionally, since the determined position of the first joint can be any point on the circle, if the determined angles of the second and / or the third joint do not meet the preset conditions, a new point can be determined on the circle as the position of the first joint, and the angles of the second and third joints can be re-determined based on the position of the first joint. The fourth joint angle will only be determined when both the angles of the second and third joints meet the preset conditions.

[0114] In one alternative scenario, after determining the angles of the second and third joints, since the position of the robotic arm's wrist is only affected by the first, second, third, and fourth joints, the angle of the fourth joint can be determined based on this relationship, relating it to the first, second, third, and fourth joints. This leads to the formula... Therefore, it is necessary to obtain the third spin of the first joint.

[0115] Optionally, the screw of a revolute joint includes the direction of the rotation axis and a point on the axis. When calculating rotation using an exponential mapping, the specific position of the rotation axis in space needs to be known. When rotating about any axis in space, a point on the axis remains unchanged. Therefore, if a point on the rotation axis is known, the rotated position of any point can be obtained by first translating the vector, rotating it, and then translating it back. Therefore, the first joint axis point of the fourth joint is first obtained, and the fourth joint angle of the fourth joint is determined by using the first joint axis point. Here, the first joint axis point can be any point on the rotation axis of the fourth joint.

[0116] Step 520: Determine a first reference vector based on the third spinor, the first joint angle, and the initial pose; and determine a second reference vector based on the first spinor, the second spinor, the second joint angle, the third joint angle, and the desired pose.

[0117] As an alternative method, to quickly and easily determine the fourth joint angle, the formula can be used first. The process is simplified so that the first reference vector is determined based on the third spinor, the first joint angle, and the initial pose. And determine the second reference vector based on the first spinor, the second spinor, the second joint angle, the third joint angle, and the desired pose. Therefore, based on the first reference vector and the second reference vector, we can obtain .

[0118] Optionally, the first reference vector for the joint angle based on the first joint angle is: The second reference vector is .

[0119] Step 530: Determine a third target vector based on the first reference vector and the first joint pivot point, and determine a fourth target vector based on the second reference vector and the first joint pivot point.

[0120] As an alternative approach, when determining the fourth joint angle of the fourth joint, the rotation problem of a point can be transformed into the rotation problem of a vector. The rotation of a vector depends only on the direction and angle of the rotation axis and is independent of the position of the axis. Thus, the third target vector and the fourth target vector can be determined by the first joint axis point of the fourth joint, and then the fourth joint angle of the fourth joint can be determined by the third target vector and the fourth target vector.

[0121] In one alternative scenario, the third target vector can be expressed by the formula... To determine, among which, As the first reference vector, The first joint pivot point, The third target vector; the fourth target vector can be obtained through the formula To determine, among which, As the second reference vector, This is the fourth target vector.

[0122] Optional, first joint pivot point When the third target vector is The fourth target vector is .

[0123] Step 540: Determine the third rotation axis unit vector of the fourth joint, and determine the fourth joint angle of the fourth joint based on the third rotation axis unit vector, the third target vector, and the fourth target vector.

[0124] In one alternative approach, to accurately determine the fourth joint angle, the fourth joint angle can be calculated using screw theory and the screw exponent mapping of the fourth joint. Therefore, the third rotational unit vector of the fourth joint can be determined first. Alternatively, the third rotational axis unit vector of the fourth joint can be determined directly based on the fourth screw corresponding to the rotational axis of the fourth joint in the robotic arm.

[0125] In one alternative scenario, after determining the unit vector of the third rotation axis of the fourth joint, it can be obtained that the wrist position is only affected by the first, second, third, and fourth joints. .in, The unit vector is the third axis of rotation. Let be the angle of the fourth joint. Then, an optimization problem is constructed using this formula, and the optimal solution is obtained from this optimization problem to get the angle of the fourth joint.

[0126] Alternatively, the optimization problem can be Then, based on the third rotation axis unit vector and the third target vector, the first intermediate vector as the orthogonal basis is determined. Based on the first intermediate vector and the third rotation axis unit vector, the third matrix is ​​determined as the orthogonal projection matrix. Then, the projected coordinates are determined based on the third matrix and the fourth target vector. Finally, the angle of the fourth joint can be obtained. .

[0127] Optionally, when the third rotation axis unit vector h3 = [0,1,0], the first intermediate vector The third matrix This allows us to obtain the angle of the fourth joint. The preset conditions are met.

[0128] In some embodiments, the plurality of joints from the elbow to the wrist includes a fifth joint, a sixth joint, and a seventh joint, after step 540, as follows: Figure 8 As shown, the method further includes steps 610-640.

[0129] Step 610: If the angle of the fourth joint satisfies the preset condition, obtain the fourth rotation of the fourth joint, the intersection of the second rotation axes of the sixth and seventh joints, and the second joint axis of the fifth joint.

[0130] As an alternative approach, since the joint angles of each joint of the robotic arm must be limited within the range allowed by the mechanical structure to avoid damage, and to ensure that the robotic arm moves within a safe and efficient space, avoiding collisions with itself or the environment, after determining the fourth joint angle, it can be first determined whether the determined fourth joint angle meets preset conditions. Only if the fourth joint angle meets the preset conditions will the fifth joint angle of the elbow be further determined. The preset conditions can be that the joint angle is within the joint limit (±170°), and when the fourth joint angle meets these conditions... At that time, it is determined that the preset conditions are met.

[0131] Optionally, if it is determined that the angle of the fourth joint does not meet the preset conditions, the position of the first joint can be reselected, and the angles of the first joint and the fourth joint can be determined sequentially based on the position of the first joint. This process continues until the angles of the first joint and the fourth joint both meet the preset conditions before the angle of the fifth joint is determined.

[0132] In one alternative scenario, the fifth, sixth, and seventh joints of the robotic arm together form a wrist ball joint. The axes of the fifth, sixth, and seventh joints intersect at a single point, which is the wrist point. To avoid the influence of the sixth and seventh joints when solving for the fifth joint angle, the intersection of the rotation axes of the sixth and seventh joints can be used to eliminate the rotational influence of these two joints, simplifying the complex multi-joint equations into a problem involving only the rotation of the fifth joint. Therefore, the intersection of the second rotation axis of the sixth and seventh joints can be obtained first.

[0133] Optionally, in order to accurately determine the fifth joint angle, the second joint pivot point on the rotation axis of the fifth joint is first obtained. This allows the fifth joint angle to be calculated based on the second joint pivot point, where the second joint pivot point can be any point on the rotation axis of the fifth joint. Furthermore, to determine the fifth joint angle, the fourth screw of the fourth joint also needs to be obtained.

[0134] Step 620: Determine the third reference vector based on the intersection of the second rotation axis, the first screw, the second screw, the third screw, the fourth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the intersection of the second rotation axis, the initial pose, and the desired pose.

[0135] As an alternative approach, after determining the angles of the first to fourth joints, since the position of the robotic arm's wrist, i.e., the desired pose, is related to all joints, a formula can be derived based on this relationship. Then, perform a matrix transformation on the formula to obtain... Next, multiply both sides of the equation by the intersection of the second rotation axis to obtain... ,in, This is the intersection point of the second rotation axis. Since the intersection point of the second rotation axis is the intersection point of the rotation axes of the sixth and seventh joints, it remains unchanged under the rotation of the sixth and seventh joints, thus obtaining... and Therefore, we can obtain Finally, the third reference vector can be determined based on the intersection of the second rotation axis, the first screw, the second screw, the third screw, the fourth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the intersection of the second rotation axis, the initial pose, and the desired pose. .

[0136] Step 630: Determine the fifth target vector based on the intersection of the second rotation axis and the second joint axis point, and determine the sixth target vector based on the third reference vector and the second joint axis point.

[0137] As an alternative approach, when determining the fifth joint angle of the fifth joint, the rotation problem of a point can be transformed into a vector rotation problem. The rotation of a vector depends only on the direction and angle of the rotation axis and is independent of the position of the axis. Thus, the fifth target vector can be determined first through the intersection of the second rotation axis and the second joint axis point, and the sixth target vector can be determined based on the third reference vector and the second joint axis point. Then, the fifth joint angle of the fifth joint can be determined through the fifth target vector and the sixth target vector.

[0138] In one alternative scenario, to facilitate quick and easy determination of the fifth joint angle, the formula can be simplified. Then through the formula Determine the fifth target vector, where, The fifth target vector, The second joint pivot point; and through the formula Determine the sixth target vector, where, This is the sixth target vector.

[0139] Step 640: Determine the fourth rotation axis unit vector of the fifth joint, and determine the fifth joint angle of the fifth joint based on the fifth target vector, the sixth target vector, and the fourth rotation axis unit vector.

[0140] In one alternative approach, to accurately determine the fifth joint angle, the fifth joint angle can be calculated using screw theory and the screw exponent mapping of the fifth joint. Therefore, the fourth rotational unit vector of the fifth joint can be determined first. Alternatively, the fourth rotational axis unit vector of the fifth joint can be determined directly based on the fifth screw corresponding to the rotational axis of the fifth joint in the robotic arm.

[0141] In one alternative scenario, after determining the unit vector of the fourth rotation axis of the fifth joint, it is possible to obtain... .in, The unit vector of the fourth axis of rotation. Let be the angle of the fifth joint. Then, an optimization problem is constructed using this formula, and the optimal solution is obtained from this optimization problem to get the angle of the fifth joint.

[0142] Alternatively, the optimization problem can be Then, based on the fourth rotation axis unit vector and the fifth target vector, the second intermediate vector as an orthogonal basis is determined. Based on the second intermediate vector and the fourth rotation axis unit vector, the fourth matrix is ​​determined as the orthogonal projection matrix. Then, the projected coordinates are determined based on the fourth matrix and the sixth target vector. Finally, the fifth joint angle can be obtained. .

[0143] Optionally, when the intersection of the second rotation axis is At that time, determine the fifth joint angle of the fifth joint. .

[0144] In some embodiments, after step 640, such as Figure 9 As shown, the method further includes steps 710-740.

[0145] Step 710: When the angle of the fifth joint satisfies the preset condition, obtain the fifth rotation axis unit vector of the sixth joint, the fifth spin of the fifth joint, the third joint axis point of the sixth joint, and the first reference point, wherein the first reference point is a point located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint.

[0146] As an alternative approach, since the joint angles of each joint of the robotic arm must be limited within the range allowed by the mechanical structure to avoid damage, and to ensure that the robotic arm moves within a safe and efficient space, avoiding collisions with itself or the environment, after determining the fifth joint angle, it can be first determined whether the determined fourth joint angle meets a preset condition. Only if the fifth joint angle meets the preset condition will the sixth joint angle of the elbow be further determined. The preset condition can be that the joint angle is within the joint limit (±170°). At that time, it is determined that the preset conditions are met.

[0147] Optionally, if it is determined that the angle of the fifth joint does not meet the preset conditions, the position of the first joint can be reselected, and the angles of the first joint and the fifth joint can be determined sequentially based on the position of the first joint. This process continues until the angles of the first joint and the fifth joint all meet the preset conditions before the angle of the sixth joint is determined.

[0148] In one alternative scenario, the fifth, sixth, and seventh joints of the robotic arm together form a wrist ball joint. The axes of these three joints intersect at a single point, known as the wrist point. To avoid the influence of the seventh joint when solving for the sixth joint's angle, a point located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint can be used. This eliminates the rotational influence of the seventh joint, simplifying the complex multi-joint equations into a problem involving only the rotation of the fifth and sixth joints. Therefore, a first reference point can be obtained first.

[0149] Optionally, in order to accurately determine the sixth joint angle, the third joint pivot point of the sixth joint is first obtained. This allows the sixth joint angle to be calculated based on the third joint pivot point, where the third joint pivot point can be any point on the rotation axis of the sixth joint. Furthermore, in order to determine the sixth joint angle, the fifth screw of the fifth joint also needs to be obtained.

[0150] Step 720: Determine the fourth reference vector based on the first reference point, the first screw, the second screw, the third screw, the fourth screw, the fifth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the initial pose, and the desired pose.

[0151] As an alternative approach, after determining the angles of the first to fifth joints, since the position of the robotic arm's wrist, i.e., the desired pose, is related to all joints, a formula can be derived based on this relationship. Then, perform a matrix transformation on the formula to obtain... Next, multiply both sides of the equation by the first reference point to obtain... ,in, Let this be the first reference point. Since the first reference point is located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint (i.e., on the axis of the seventh joint), the rotation of the seventh joint will not change the position of the first reference point. Therefore, we obtain... Therefore, we can obtain Finally, based on the first reference point, the first screw quantity, the second screw quantity, the third screw quantity, the fourth screw quantity, the fifth screw quantity, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the initial pose, and the desired pose, the fourth reference vector can be determined, i.e. .

[0152] Step 730: Determine the seventh target vector based on the third joint axis point and the first reference point, and determine the eighth target vector based on the first reference point and the fourth reference vector.

[0153] As an alternative approach, when determining the sixth joint angle of the sixth joint, the rotation problem of a point can be transformed into a vector rotation problem. The rotation of a vector depends only on the direction and angle of the rotation axis and is independent of the position of the axis. Thus, the seventh target vector can be determined first through the first reference point and the second joint axis point, and the eighth target vector can be determined based on the fourth reference vector and the first reference point. Then, the sixth joint angle of the sixth joint can be determined through the seventh target vector and the eighth target vector.

[0154] In one alternative scenario, to facilitate quick and easy determination of the sixth joint angle, the formula can be simplified. Then through the formula Determine the fifth target vector, where, The seventh target vector, The pivot point of the third joint; and through the formula Determine the eighth target vector, where, This is the eighth target vector.

[0155] Step 740: Determine the fifth rotation axis unit vector of the sixth joint, and determine the sixth joint angle of the sixth joint based on the seventh target vector, the eighth target vector, and the fifth rotation axis unit vector.

[0156] In one alternative approach, to accurately determine the sixth joint angle, the sixth joint angle can be calculated using screw theory and the screw exponent mapping of the sixth joint. Therefore, the fifth rotational unit vector of the sixth joint can be determined first. Alternatively, the fifth rotational axis unit vector of the sixth joint can be determined directly based on the sixth screw corresponding to the rotational axis of the sixth joint in the robotic arm.

[0157] In one alternative scenario, after determining the unit vector of the fifth rotation axis of the sixth joint, it is possible to obtain... .in, The unit vector along the fifth axis of rotation. Let be the angle of the sixth joint. Then, an optimization problem is constructed using this formula, and the optimal solution is obtained from this optimization problem to get the angle of the sixth joint.

[0158] Alternatively, the optimization problem can be Then, based on the fifth rotation axis unit vector and the seventh target vector, the third intermediate vector, which serves as an orthogonal basis, is determined. Based on this, the fifth matrix, which serves as the orthogonal projection matrix, is determined. Then, the projected coordinates are determined based on the fifth matrix and the eighth target vector. Finally, the angle of the sixth joint can be obtained. .

[0159] Optionally, when the first reference point At that time, the angle of the sixth joint was determined to be... .

[0160] In some embodiments, after step 740, such as Figure 10 As shown, the method further includes steps 810-840.

[0161] Step 810: When the angle of the sixth joint satisfies the preset condition, obtain the sixth rotation of the sixth joint, the fourth joint axis of the seventh joint, the sixth rotation of the sixth joint, and the second reference point, wherein the second reference point is a point not located on the rotation axis of the seventh joint.

[0162] As an alternative approach, since the joint angles of each joint of the robotic arm must be limited within the range allowed by the mechanical structure to avoid damage, and to ensure that the robotic arm moves within a safe and efficient space, avoiding collisions with itself or the environment, after determining the angle of the sixth joint, it can be first determined whether the determined angle of the sixth joint meets a preset condition. Only if the angle of the sixth joint meets the preset condition will the angle of the seventh joint at the elbow be further determined. The preset condition can be that the joint angle is within the joint limit (±170°). At that time, it is determined that the preset conditions are met.

[0163] Optionally, if it is determined that the angle of the sixth joint does not meet the preset conditions, the position of the first joint can be reselected, and the angles of the first joint and the sixth joint can be determined sequentially based on the position of the first joint. This process continues until the angles of the first joint and the sixth joint both meet the preset conditions before the angle of the sixth joint of the seventh joint is determined.

[0164] In one alternative scenario, to determine the seventh joint angle, it is necessary to preserve the influence of the seventh joint on the robot arm's pose. Therefore, it is necessary to obtain a point that is not located on the rotation axis of the seventh joint so that rotation can change the position of that point, thereby providing information about the seventh joint angle. Therefore, a second reference point that is not located on the rotation axis of the seventh joint can be obtained first.

[0165] Optionally, in order to accurately determine the seventh joint angle, the fourth joint pivot point on the rotation axis of the seventh joint is first obtained. This allows the seventh joint angle to be calculated based on the fourth joint pivot point, where the fourth joint pivot point can be any point on the rotation axis of the seventh joint. Furthermore, in order to determine the seventh joint angle, the sixth spin of the sixth joint also needs to be obtained.

[0166] Step 820: Determine the fifth reference vector based on the second reference point, the first screw, the second screw, the third screw, the fourth screw, the fifth screw, the sixth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the sixth joint angle, the initial pose, and the desired pose.

[0167] As an alternative approach, after determining the angles of the first to sixth joints, since the position of the robotic arm's wrist, i.e., the desired pose, is related to all joints, a formula can be derived based on this relationship. Then, perform a matrix transformation on the formula to obtain... Next, multiply both sides of the equation by the second reference point to obtain... ,in, The first reference point is used. Based on this, the fifth reference vector can be determined according to the second reference point, the first screw quantity, the second screw quantity, the third screw quantity, the fourth screw quantity, the fifth screw quantity, the sixth screw quantity, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the sixth joint angle, the initial pose, and the desired pose. .

[0168] Step 830: Determine the ninth target vector based on the fourth joint axis point and the second reference point, and determine the tenth target vector based on the second reference point and the fifth reference vector.

[0169] As an alternative approach, when determining the seventh joint angle of the seventh joint, the problem of rotating a point can be transformed into the problem of rotating a vector. The rotation of a vector depends only on the direction and angle of the rotation axis and is independent of the position of the axis. Thus, the eighth target vector can be determined first through the second reference point and the fourth joint axis point, and the tenth target vector can be determined based on the fifth reference vector and the second reference point. Then, the seventh joint angle of the seventh joint can be determined through the ninth target vector and the tenth target vector.

[0170] In one alternative scenario, to facilitate quick and easy determination of the seventh joint angle, the formula can be simplified. Then through the formula Determine the fifth target vector, where, The ninth target vector, The fourth joint pivot point; and through the formula Determine the tenth target vector, where, This is the tenth target vector.

[0171] Step 840: Determine the sixth rotation axis unit vector of the seventh joint, and determine the seventh joint angle of the seventh joint based on the ninth target vector, the tenth target vector, and the sixth rotation axis unit vector.

[0172] In one alternative approach, to accurately determine the seventh joint angle, the seventh joint angle can be calculated based on screw theory, using the screw exponent mapping of the sixth joint. Therefore, the sixth rotational unit vector of the seventh joint can be determined first. Alternatively, the sixth rotational axis unit vector of the seventh joint can be determined directly based on the seventh screw corresponding to the rotational axis of the seventh joint in the robotic arm.

[0173] In one alternative scenario, after determining the unit vector of the seventh rotation axis of the seventh joint, it is possible to obtain... .in, The unit vector of the sixth rotation axis. Let be the angle of the seventh joint. Then, an optimization problem is constructed using this formula, and the optimal solution is obtained from this optimization problem to get the angle of the sixth joint.

[0174] Alternatively, the optimization problem can be Then, based on the sixth rotation axis unit vector and the ninth target vector, the fourth intermediate vector, which serves as an orthogonal basis, is determined. Based on the fourth intermediate vector and the sixth rotation axis unit vector, the sixth matrix is ​​determined as the orthogonal projection matrix. Then, the projected coordinates are determined based on the sixth matrix and the tenth target vector. Finally, the angle of the seventh joint can be obtained. .

[0175] Optionally, since the joint angles of each joint of the robotic arm must be limited within the range allowed by the mechanical structure to avoid damage, and to ensure that the robotic arm moves within a safe and efficient space, avoiding collisions with itself or the environment, after determining the seventh joint angle, it can be first determined whether the determined seventh joint angle meets a preset condition. Only if the seventh joint angle meets the preset condition will the robot's control parameters be determined based on the determined first joint angle minus the seventh joint angle, and the robot will be controlled based on the control parameters. The preset condition can be that the joint angle is within the joint limit range (±170°), and when the seventh joint angle meets the preset condition... At that time, it is determined that the preset conditions are met.

[0176] Optionally, if it is determined that the angle of the seventh joint does not meet the preset conditions, the position of the first joint can be reselected, and the angles of the first joint and the seventh joint can be determined sequentially based on the position of the first joint. The control parameters of the robot will be determined only after the angles of the first joint and the seventh joint all meet the preset conditions, and the robot will be controlled based on the control parameters.

[0177] Optionally, when the second reference point is At that time, the angle of the seventh joint of the seventh joint .

[0178] Please continue reading. Figure 6 Step 490: Control the robot based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist.

[0179] The specific steps of steps 410-440 and 490 can be found in steps 210-240 and 260, and will not be repeated here.

[0180] In this embodiment, after determining the joint angle of each joint, the system first verifies whether the joint angle meets the preset conditions. Only after successful verification is the joint angle of the next joint determined. This reduces the error in determining the joint angle of each joint of the robotic arm, improves the accuracy of robot control, reduces unnecessary computation, and improves the efficiency of robot control. Furthermore, by combining screw transformation with the least squares method, the position of the first joint of the elbow is accurately adapted, further improving the accuracy of robot control.

[0181] Please see Figure 11 , Figure 11 This application illustrates a robot control method according to an embodiment of the present application. The following will focus on... Figure 11 The process shown is described in detail, and the robot control method may specifically include the following steps 910-990.

[0182] Step 910: Obtain the initial pose and desired pose of the robot's robotic arm, and obtain the first distance from the shoulder to the elbow of the robotic arm and the second distance from the shoulder to the wrist of the robotic arm.

[0183] Step 920: Determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose.

[0184] Step 930: Determine the first joint angle of the first joint of the elbow based on the third distance, the first distance, and the second distance.

[0185] Step 940: If the first joint angle meets the preset conditions, determine the position of the first joint of the elbow based on the third distance, the initial pose, the desired pose, the first distance, and the second distance.

[0186] Step 950: Based on the position of the first joint, determine each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist.

[0187] The specific steps of steps 910-950 can be found in steps 210-250, and will not be repeated here.

[0188] Step 960: When the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist all satisfy the preset conditions, determine the reference pose corresponding to each value of the first joint position when there are multiple values, based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist.

[0189] As an alternative approach, after determining the joint angles of all joints of the robotic arm and ensuring that the joint angles of each joint meet the preset conditions, the joint angles of each joint can be verified first in order to ensure more accurate control of the robot.

[0190] Optionally, the reference pose corresponding to each value of the first joint position can be determined based on the first joint angle of the robotic arm, each angle of multiple joints from the shoulder to the elbow, each angle of multiple joints from the elbow to the wrist, and the joint rotation of each joint under each value when the first joint position is in multiple values.

[0191] Step 970: Determine the error based on the reference pose corresponding to each of the multiple values ​​of the first joint position and the desired pose.

[0192] As an alternative approach, to improve the control accuracy of the robot, the pose error can be determined by first identifying the reference pose and the desired pose corresponding to each of the multiple values ​​of the first joint position. This allows for the filtering of multiple values ​​of the first joint position based on the pose error, thereby determining the optimal first joint position.

[0193] Step 980: Determine the target pose based on the error from the reference pose corresponding to each of the multiple values ​​of the first joint position.

[0194] As an alternative approach, the closer the reference pose is to the desired pose, the more capable the robot is of rotating and moving to the desired pose based on the determined first joint position and the joint angles of each joint. Therefore, it can be determined that the smaller the error between the reference pose and the desired pose, the closer they are. Thus, the reference pose with the smallest error among the errors between the reference pose and the desired pose can be selected as the target pose.

[0195] As an alternative approach, after determining multiple reference poses, the joint angular velocity of each joint can be determined based on the joint angle of each joint corresponding to the multiple reference poses. Then, the sum of the joint angular velocities corresponding to each reference pose is determined. Finally, the sums of the joint angular velocities corresponding to the multiple reference poses are compared, and the reference position with the smallest sum of joint angular velocities is determined as the target pose.

[0196] Step 990: Control the robot according to the first joint angle corresponding to the target pose, the angle of each of the multiple joints from the shoulder to the elbow, and the angle of each of the multiple joints from the elbow to the wrist.

[0197] As an alternative approach, after determining the target pose, corresponding control parameters can be generated based on the first joint angle corresponding to the target pose, the angles of each joint from the shoulder to the elbow, and the angles of each joint from the elbow to the wrist. In this way, the control parameters can be sent from the control unit in the robot to the actuator in the robot's robotic arm, and then the robot's robotic arm can be controlled to rotate and move to the target pose.

[0198] In this embodiment, by traversing the elbow positions on the circular trajectory, the optimal solution is selected to ensure the accuracy of robot control. Furthermore, by traversing the circular trajectory at the elbow positions, all valid solutions that satisfy the limit can be found, improving the coverage of valid solutions and further ensuring the accuracy of robot control.

[0199] The above embodiments describe in detail the robot control method provided in this application. In other embodiments, this application also provides a robot control device. Figure 12 This is a block diagram of a robot control device according to an embodiment of this application, such as... Figure 12 As shown, the robot's control device 1000 includes: an acquisition module 1010, a third distance determination module 1020, a first angle determination module 1030, a first joint position determination module 1040, a second angle determination module 1050, and a control module 1060.

[0200] The acquisition module 1010 is used to acquire the initial pose and desired pose of the robot's robotic arm, and to acquire a first distance from the shoulder to the elbow of the robotic arm, and a second distance from the shoulder to the wrist of the robotic arm; the third distance determination module 1020 is used to determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose; the first angle determination module 1030 is used to determine the first joint angle of the first joint of the elbow based on the third distance, the first distance, and the second distance; the first joint position determination module 1040 is used to determine the position of the elbow at the first joint angle. If the degree meets the preset conditions, the first joint position of the elbow is determined according to the third distance, the initial pose, the desired pose, the first distance, and the second distance; the second angle determination module 1050 is used to determine each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist according to the first joint position; the control module 1060 is used to control the robot according to the first joint angle, each joint angle of the plurality of joints from the shoulder to the elbow, and each joint angle of the plurality of joints from the elbow to the wrist.

[0201] In some embodiments, the first joint position determination module 1040 includes: a normal vector determination unit, configured to determine a normal vector based on the initial pose and the desired pose; a target distance determination unit, configured to determine a target point position and a target distance based on the first distance, the second distance, and the third distance; and a first joint position determination unit, configured to determine the first joint position based on the normal vector, the target distance, and the target point position, wherein the first joint position is any position on a circle centered at the target point position and with the target distance as the radius.

[0202] In some embodiments, the plurality of joints from the shoulder to the elbow include a second joint between the base of the robotic arm and the shoulder and a third joint of the shoulder. The second angle determination module 1050 includes: a first acquisition unit, configured to acquire the initial position of the first joint, the first rotation of the second joint and the second rotation of the third joint, and acquire the intersection point of the first rotation axis of the second joint and the third joint; an initial position determination unit, configured to determine the first rotation axis unit vector of the second joint based on the first rotation and the second rotation axis unit vector of the third joint based on the second rotation; a target vector first determination unit, configured to determine a first target vector based on the position of the first joint and the intersection point of the rotation axis, and to determine a second target vector based on the initial position and the intersection point of the first rotation axis; and an angle first determination unit, configured to determine the second joint angle of the second joint and the third joint angle of the third joint based on the first target vector, the second target vector, the first rotation axis unit vector and the second rotation axis unit vector.

[0203] In some embodiments, the plurality of joints from the shoulder to the elbow further includes a fourth joint, and the second angle determination module 1050 further includes: a second acquisition unit, configured to acquire a first joint pivot point of the fourth joint and a third rotation of the first joint when the second joint angle and the third joint angle satisfy the preset condition; a first reference vector determination unit, configured to determine a first reference vector based on the third rotation, the first joint angle and the initial pose, and to determine a second reference vector based on the first rotation, the second rotation, the second joint angle, the third joint angle and the desired pose; a second target vector determination unit, configured to determine a third target vector based on the first reference vector and the first joint pivot point, and to determine a fourth target vector based on the second reference vector and the first joint pivot point; and a second angle determination unit, configured to determine a third rotation axis unit vector of the fourth joint, and to determine a fourth joint angle of the fourth joint based on the third rotation axis unit vector, the third target vector and the fourth target vector.

[0204] In some embodiments, the plurality of joints from the elbow to the wrist includes a fifth joint, a sixth joint, and a seventh joint. The second angle determination module 1050 further includes: a third acquisition unit, configured to acquire, when the angle of the fourth joint satisfies the preset condition, the fourth rotation of the fourth joint, the intersection of the second rotation axes of the sixth and seventh joints, and the second joint pivot point of the fifth joint; a second reference vector determination unit, configured to determine a third reference vector based on the intersection of the second rotation axes, the first rotation, the second rotation, the third rotation, the fourth rotation, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the intersection of the second rotation axes, the initial pose, and the desired pose; a third target vector determination unit, configured to determine a fifth target vector based on the intersection of the second rotation axes and the second joint pivot point, and to determine a sixth target vector based on the third reference vector and the second joint pivot point; and a third angle determination unit, configured to determine the fourth rotation axis unit vector of the fifth joint, and to determine the fifth joint angle of the fifth joint based on the fifth target vector, the sixth target vector, and the fourth rotation axis unit vector.

[0205] In some embodiments, the second angle determination module 1050 further includes: a fourth acquisition unit, configured to acquire, when the fifth joint angle satisfies the preset condition, the fifth rotation axis unit vector of the sixth joint, the fifth screw of the fifth joint, the third joint axis point of the sixth joint, and a first reference point, wherein the first reference point is a point located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint; a third reference vector determination unit, configured to determine a fourth reference vector based on the first reference point, the first screw, the second screw, the third screw, the fourth screw, the fifth screw, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the initial pose, and the desired pose; a fourth target vector determination unit, configured to determine a seventh target vector based on the third joint axis point and the first reference point, and to determine an eighth target vector based on the first reference point and the fourth reference vector; and a fourth angle determination unit, configured to determine the fifth rotation axis unit vector of the sixth joint, and to determine the sixth joint angle of the sixth joint based on the seventh target vector, the eighth target vector, and the fifth rotation axis unit vector.

[0206] In some embodiments, the second angle determination module 1050 further includes: a fifth acquisition unit, configured to acquire, when the sixth joint angle satisfies the preset condition, the sixth rotation of the sixth joint, the fourth joint axis point of the seventh joint, the sixth rotation of the sixth joint, and a second reference point, wherein the second reference point is a point not located on the rotation axis of the seventh joint; and a fourth reference vector determination unit, configured to determine the reference vector based on the second reference point, the first rotation, the second rotation, the third rotation, the fourth rotation, the fifth rotation, the sixth rotation, the first joint angle, the second joint angle, and the third joint axis point. The system comprises: a fifth reference vector determined by considering the joint angle, the fourth joint angle, the fifth joint angle, the sixth joint angle, the initial pose, and the desired pose; a fifth target vector determination unit, used to determine a ninth target vector based on the fourth joint axis point and the second reference point, and to determine a tenth target vector based on the second reference point and the fifth reference vector; and a fifth angle determination unit, used to determine the sixth rotation axis unit vector of the seventh joint, and to determine the seventh joint angle based on the ninth target vector, the tenth target vector, and the sixth rotation axis unit vector.

[0207] In some embodiments, the control module 1060 includes: a reference pose determination unit, configured to determine a reference pose corresponding to each of the multiple values ​​of the first joint position when the first joint angle, each angle of the multiple joints from the shoulder to the elbow, and each angle of the multiple joints from the elbow to the wrist all satisfy the preset conditions; an error determination unit, configured to determine an error based on the reference pose corresponding to each of the multiple values ​​of the first joint position and the desired pose; a target pose determination unit, configured to determine a target pose based on the error among the reference poses corresponding to each of the multiple values ​​of the first joint position; and a control unit, configured to control the robot based on the first joint angle corresponding to the target pose, each angle of the multiple joints from the shoulder to the elbow, and each angle of the multiple joints from the elbow to the wrist.

[0208] According to one aspect of the embodiments of this application, a robot is also provided, such as Figure 13 As shown, the robot 1100 also includes a processor 1110 and one or more memories 1120. The one or more memories 1120 are used to store computer-readable instructions executed by the processor 1110. When the processor 1110 executes the program instructions, it implements the robot control method described above.

[0209] Furthermore, the processor 1110 may include one or more processing cores. The processor 1110 runs or executes instructions, programs, code sets, or instruction sets stored in the memory 1120, and calls data stored in the memory 1120. Optionally, the processor 1110 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor and may be implemented using a separate communication chip.

[0210] According to one aspect of this application, a computer-readable storage medium is also provided, which may be included in the cloud server described in the above embodiments; or it may exist independently and not assembled into the cloud server. The aforementioned computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.

[0211] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0212] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0213] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0214] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for controlling a robot, characterized in that, The method includes: The robot obtains the initial pose and desired pose of its robotic arm, as well as the first distance from the shoulder to the elbow and the second distance from the shoulder to the wrist. Determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose; The first joint angle of the first joint of the elbow is determined based on the third distance, the first distance, and the second distance. When the first joint angle meets the preset conditions, the normal vector is determined according to the initial pose and the desired pose. The target point location and target distance are determined based on the first distance, the second distance, and the third distance; The first joint position is determined based on the normal vector, the target distance, and the target point position, wherein the first joint position is any position on a circle with the target point position as the center and the target distance as the radius; Based on the position of the first joint, determine each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist; Based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist, multiple values ​​of the first joint position are filtered to determine the target value of the first joint position. The target pose of the robot is determined based on the target value of the first joint position, and the robot is controlled based on the first joint angle corresponding to the target pose, the angle of each of the multiple joints from the shoulder to the elbow, and the angle of each of the multiple joints from the elbow to the wrist.

2. The method according to claim 1, characterized in that, The plurality of joints from the shoulder to the elbow includes a second joint between the base of the robotic arm and the shoulder and a third joint of the shoulder. Determining each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist based on the position of the first joint includes: Obtain the initial position of the first joint, the first rotation of the second joint and the second rotation of the third joint, and obtain the intersection point of the first rotation axis of the second joint and the third joint; The first rotation axis unit vector of the second joint is determined based on the first spin, and the second rotation axis unit vector of the third joint is determined based on the second spin; A first target vector is determined based on the intersection of the first joint position and the rotation axis, and a second target vector is determined based on the intersection of the initial position and the first rotation axis. Based on the first target vector, the second target vector, the first rotation axis unit vector, and the second rotation axis unit vector, determine the second joint angle of the second joint and the third joint angle of the third joint.

3. The method according to claim 2, characterized in that, The plurality of joints from the shoulder to the elbow further includes a fourth joint, and the method further includes: When the second joint angle and the third joint angle meet the preset conditions, the first joint pivot point of the fourth joint and the third rotation of the first joint are obtained. A first reference vector is determined based on the third spin, the first joint angle, and the initial pose; and a second reference vector is determined based on the first spin, the second spin, the second joint angle, the third joint angle, and the desired pose. A third target vector is determined based on the first reference vector and the first joint pivot point, and a fourth target vector is determined based on the second reference vector and the first joint pivot point; The third rotation axis unit vector of the fourth joint is determined, and the fourth joint angle of the fourth joint is determined based on the third rotation axis unit vector, the third target vector, and the fourth target vector.

4. The method according to claim 3, characterized in that, The plurality of joints from the elbow to the wrist includes a fifth joint, a sixth joint, and a seventh joint, and the method further includes: When the angle of the fourth joint satisfies the preset condition, the fourth rotation of the fourth joint, the intersection of the second rotation axes of the sixth and seventh joints, and the second joint axis of the fifth joint are obtained. A third reference vector is determined based on the intersection of the second rotation axis, the first screw quantity, the second screw quantity, the third screw quantity, the fourth screw quantity, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the intersection of the second rotation axis, the initial pose, and the desired pose. The fifth target vector is determined based on the intersection of the second rotation axis and the second joint axis point, and the sixth target vector is determined based on the third reference vector and the second joint axis point; The fourth rotation axis unit vector of the fifth joint is determined, and the fifth joint angle of the fifth joint is determined based on the fifth target vector, the sixth target vector, and the fourth rotation axis unit vector.

5. The method according to claim 4, characterized in that, The method further includes: When the angle of the fifth joint satisfies the preset condition, the fifth rotation axis unit vector of the sixth joint, the fifth spin of the fifth joint, the third joint axis point of the sixth joint, and the first reference point are obtained, wherein the first reference point is a point located on the rotation axis of the seventh joint but not on the rotation axis of the sixth joint. A fourth reference vector is determined based on the first reference point, the first screw quantity, the second screw quantity, the third screw quantity, the fourth screw quantity, the fifth screw quantity, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the initial pose, and the desired pose. The seventh target vector is determined based on the third joint axis point and the first reference point, and the eighth target vector is determined based on the first reference point and the fourth reference vector. The fifth rotation axis unit vector of the sixth joint is determined, and the sixth joint angle of the sixth joint is determined based on the seventh target vector, the eighth target vector, and the fifth rotation axis unit vector.

6. The method according to claim 5, characterized in that, The method further includes: When the angle of the sixth joint satisfies the preset condition, the sixth rotation of the sixth joint, the fourth joint axis of the seventh joint, the sixth rotation of the sixth joint, and the second reference point are obtained, wherein the second reference point is a point not located on the rotation axis of the seventh joint. The fifth reference vector is determined based on the second reference point, the first screw quantity, the second screw quantity, the third screw quantity, the fourth screw quantity, the fifth screw quantity, the sixth screw quantity, the first joint angle, the second joint angle, the third joint angle, the fourth joint angle, the fifth joint angle, the sixth joint angle, the initial pose, and the desired pose. The ninth target vector is determined based on the fourth joint axis point and the second reference point, and the tenth target vector is determined based on the second reference point and the fifth reference vector. Determine the sixth rotation axis unit vector of the seventh joint, and determine the seventh joint angle of the seventh joint based on the ninth target vector, the tenth target vector, and the sixth rotation axis unit vector.

7. The method according to any one of claims 1-6, characterized in that, The step of filtering multiple values ​​for the first joint position based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist, to determine the target value for the first joint position, includes: When the preset conditions are met for the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist, a reference pose corresponding to each value of the first joint position is determined based on the first joint angle, each angle of the plurality of joints from the shoulder to the elbow, and each angle of the plurality of joints from the elbow to the wrist. The error is determined based on the reference pose corresponding to each of the multiple values ​​of the first joint position and the desired pose. Based on the error, a target value for the first joint position is determined from among multiple values ​​for the first joint position.

8. A control device for a robot, characterized in that, The apparatus includes a module for performing the method according to any one of claims 1-7: The acquisition module is used to acquire the initial pose and desired pose of the robot's robotic arm, as well as to acquire the first distance from the shoulder to the elbow of the robotic arm and the second distance from the shoulder to the wrist of the robotic arm. The third distance determination module is used to determine the third distance from the shoulder to the wrist based on the initial pose and the desired pose; An angle first determination module is used to determine the first joint angle of the first joint of the elbow based on the third distance, the first distance and the second distance; The normal vector determination module is used to determine the normal vector based on the third distance, the initial pose, the desired pose, the first distance, and the second distance, when the first joint angle meets the preset conditions; A target distance determination module is used to determine the target point position and target distance based on the first distance, the second distance, and the third distance; The first joint position determination module is used to determine the first joint position based on the normal vector, the target distance, and the target point position, wherein the first joint position is any position on a circle with the target point position as the center and the target distance as the radius; The second angle determination module is used to determine each angle of the plurality of joints from the shoulder to the elbow and each angle of the plurality of joints from the elbow to the wrist based on the position of the first joint. The filtering module is used to filter multiple values ​​of the first joint position based on the first joint angle, the angle of each joint of the plurality of joints from the shoulder to the elbow, and the angle of each joint of the plurality of joints from the elbow to the wrist, and to determine the target value of the first joint position. The control module is used to determine the target pose of the robot based on the target value of the first joint position, and to control the robot based on the first joint angle corresponding to the target pose, the angle of each of the plurality of joints from the shoulder to the elbow, and the angle of each of the plurality of joints from the elbow to the wrist.

9. A robot, characterized in that, The robot includes: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Mechanical arm control method, mechanical arm control device, computing equipment and system

    CN113119104A

  • Arm angle parameterization inverse kinematics solving method for seven-degree-of-freedom mechanical arm

    CN116372920A