Method and device for automatically aligning tcp posture, computer device and storage medium
By using computer equipment and methods, the robot's TCP posture is automatically aligned, solving the problems of time-consuming, laborious, and inaccurate manual alignment in existing technologies, and achieving efficient and accurate posture alignment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ADTECH SHENZHEN TECH
- Filing Date
- 2023-08-09
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, automatic alignment of robot TCP postures is time-consuming, laborious, and lacks precision, while manual adjustment is difficult to achieve efficient and accurate alignment.
Automatic attitude alignment is achieved by transforming the TCP attitude in any given first coordinate system into a first rotation matrix, determining the unit direction vector, and calculating the rotation matrix of the aligned attitude using an incremental rotation matrix.
It improves the efficiency and accuracy of TCP attitude alignment, and can automatically align the TCP attitude z-direction in any user coordinate system to the specified axis direction in the specified user coordinate system.
Smart Images

Figure CN117260703B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of path planning and control technology, and in particular relates to a method, apparatus, computer equipment and storage medium for automatic TCP attitude alignment. Background Technology
[0002] In robotic applications, it's often necessary to move the Tool Center Point (TCP) in linear or rotational directions along axes specified in a user-defined coordinate system, oriented in the x, y, or z directions. Understandably, usually only the z-direction of the TCP orientation is considered, as it's the easiest and most intuitive to determine relative to the x and y directions for the user. Typically, the robot's end effector z-direction is perpendicular to the flange and points outwards, while the TCP orientation z-direction is determined by the user.
[0003] The common practice in existing technologies is to manually adjust the robot's TCP pose z-axis and visually align it with a specified axis in the user's coordinate system. This manual pose alignment is time-consuming, labor-intensive, and lacks precision. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, computer device, and storage medium for automatic TCP attitude alignment, which can solve the problems of the time-consuming and laborious manual attitude alignment method and low attitude alignment accuracy in the prior art.
[0005] To address the aforementioned technical problems, this application provides a method for automatic TCP pose alignment. The automatic alignment method includes: converting the TCP pose in an arbitrary first coordinate system into a first rotation matrix, and determining a first unit direction vector of the TCP pose in the Z direction; converting a second coordinate system to be aligned into a pose in an arbitrary first coordinate system, and obtaining a second rotation matrix; determining a second unit direction vector based on the axis direction of the second coordinate system to be aligned and the second rotation matrix; determining a unit rotation direction vector and the angle between the first and second unit direction vectors based on the first and second unit direction vectors; determining an incremental rotation matrix based on the angle and the unit rotation direction vector; and automatically aligning the TCP pose based on the incremental rotation matrix.
[0006] Wherein, the first rotation matrix is:
[0007]
[0008] Wherein, (a, b, c) represents the attitude of the TCP in the first coordinate system, and the first unit direction vector v1 of the TCP attitude in the Z direction is the third column of the first rotation matrix R1.
[0009] The step of converting the second coordinate system to be aligned into an pose in any given first coordinate system and obtaining the second rotation matrix includes:
[0010] Obtain the third rotation matrix of any given first coordinate system in the robot coordinate system; obtain the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system; determine the second rotation matrix of the second coordinate system in the first coordinate system based on the third rotation matrix and the fourth rotation matrix.
[0011] The second rotation matrix is:
[0012]
[0013] Among them, the Let be any given third rotation matrix of the first coordinate system in the robot coordinate system. This is the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system.
[0014] The automatic alignment of the TCP pose based on the incremental rotation matrix includes: obtaining a rotation matrix of the aligned TCP pose based on the incremental rotation matrix and the first rotation matrix; and converting the rotation matrix into a pose RPY to complete the automatic alignment of the TCP pose.
[0015] Wherein, the unit rotation direction vector is:
[0016]
[0017] The angle between the first unit direction vector and the second unit direction vector is:
[0018] θ=arccos(v0·v1) (4)
[0019] Wherein, v1 is the first unit direction vector, and v0 is the second unit direction vector.
[0020] The incremental rotation matrix is:
[0021]
[0022] The rotation matrix of the TCP pose after alignment is:
[0023] R = R2R1 (6)
[0024] Wherein, R1 is the first rotation matrix.
[0025] To address the aforementioned technical problems, this application provides an apparatus for automatic TCP attitude alignment. The apparatus includes: a first transformation module, configured to transform the TCP attitude in an arbitrary given first coordinate system into a first rotation matrix and determine a first unit direction vector of the TCP attitude in the Z direction; a transformation and acquisition module, configured to transform a second coordinate system to be aligned into an attitude in an arbitrary given first coordinate system and acquire a second rotation matrix; a first determination module, configured to determine a second unit direction vector based on the axis direction of the second coordinate system to be aligned and the second rotation matrix; a second determination module, configured to determine a unit rotation direction vector and the angle between the first unit direction vector and the second unit direction vector based on the first unit direction vector and the second unit direction vector; a third determination module, configured to determine the incremental rotation matrix based on the angle and the unit rotation direction vector; and an alignment module, configured to automatically align the TCP attitude based on the incremental rotation matrix.
[0026] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores computer-readable instructions, and the processor, when executing the computer-readable instructions, implements the steps of the TCP attitude automatic alignment method as described in any of the preceding claims.
[0027] To address the aforementioned technical problems, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the TCP attitude automatic alignment method described above.
[0028] Compared with the prior art, the embodiments of this application have the following main advantages:
[0029] This application provides a method, apparatus, computer device, and storage medium for automatic TCP attitude alignment. It involves performing coordinate transformation and calculation on the TCP attitude in any given user coordinate system and the attitude in the user coordinate system to be aligned to obtain an incremental rotation matrix. Based on the incremental rotation matrix, an aligned rotation matrix is calculated, and the aligned rotation matrix is converted into an attitude RPY to achieve automatic TCP attitude alignment. Furthermore, this application can automatically align the TCP attitude in the z-direction of any user coordinate system to a specified axis direction in a specified user coordinate system, improving the efficiency and accuracy of TCP attitude alignment. Attached Figure Description
[0030] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating one implementation method of the TCP attitude automatic alignment method of this application;
[0032] Figure 2 This is a schematic diagram of a previous implementation method of TCP attitude alignment in this application;
[0033] Figure 3 This is a flowchart illustrating one embodiment of step S200 of this application;
[0034] Figure 4 This is a schematic diagram of the rotation direction vector of the unit in this application;
[0035] Figure 5 This is a flowchart illustrating an embodiment of step S600 of this application;
[0036] Figure 6 This is a schematic diagram of one implementation method of TCP attitude alignment in this application;
[0037] Figure 7 This is a schematic diagram of one embodiment of the TCP attitude automatic alignment device of this application;
[0038] Figure 8 This is a schematic diagram of a computer device according to an embodiment of the present application. Detailed Implementation
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The terms “comprising” and “having,” and any variations thereof, in the specification, claims, and foregoing drawings, are intended to cover non-exclusive inclusion. The terms “first,” “second,” etc., in the specification, claims, or foregoing drawings are used to distinguish different objects and not to describe a particular order.
[0040] Based on the above description in this specification, those skilled in the art will also understand that terms used, such as "upper," "lower," "front," "rear," "left," "right," "length," "width," "thickness," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," "circumferential," "center," "longitudinal," "transverse," "clockwise," or "counterclockwise," are terms indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings of this specification. They are only for the purpose of facilitating the explanation of the present invention and simplifying the description, and do not imply that the devices or elements involved must have the specific orientation, or be constructed and operated in a specific orientation. Therefore, the above-mentioned orientation or positional relationship terms should not be understood or interpreted as limitations on the present invention.
[0041] In the foregoing description of this specification, unless otherwise expressly specified and limited, the terms "fixed," "installed," "connected," or "linked" should be interpreted broadly. For example, the term "linked" can refer to a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; or it can refer to the internal communication of two components or the interaction between two components. Therefore, unless otherwise expressly limited in this specification, those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0042] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0043] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the TCP attitude automatic alignment method of this application. The TCP attitude automatic alignment method provided by this application includes the following steps:
[0044] S100 transforms the TCP attitude in any given first coordinate system into the first rotation matrix and determines the first unit direction vector of the TCP attitude in the Z direction.
[0045] Please combine further Figure 2 , Figure 2 This is a schematic diagram of a previous implementation of TCP attitude alignment in this application, as shown below. Figure 2As shown, the TCP attitude is given in any user coordinate system u1 (i.e., the first coordinate system of this application). In this application, attitude is represented by rotation around the RPY z-axis as Roll, rotation around the y-axis as Pitch, and rotation around the x-axis as Yaw. The automatic alignment scheme for TCP attitude in this application is illustrated using this example. Furthermore, this application specifies the user coordinate system u2 to be aligned (i.e., the second coordinate system to be aligned in this application) and the axis directions, as follows: Figure 2 The second coordinate system to be aligned is u2, which includes three axes: the first axis is the x-axis, the second axis is the y-axis, and the third axis is the z-axis.
[0046] Optionally, this application transforms the TCP pose in any given first coordinate system u1 into a first rotation matrix R1, wherein the expression of the first rotation matrix R1 is as follows:
[0047]
[0048] Wherein, (a, b, c) are the attitudes of TCP in the first coordinate system, and the first unit direction vector v1 of the TCP attitude in the Z direction is the third column in the first rotation matrix R1.
[0049] S200, transform the second coordinate system to be aligned into the pose under any given first coordinate system, and obtain the second rotation matrix.
[0050] Please combine further Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of step S200 of this application, as shown below. Figure 3 Step S200 further includes the following sub-steps:
[0051] S210, obtain the third rotation matrix of any given first coordinate system in the robot coordinate system.
[0052] It is understandable that in this application, the user coordinate system is typically represented by RPY, and RPY angles can be converted into rotation matrices. The poses of all points are not transformed; only the poses of the TCP points need to be aligned. Furthermore, the third rotation matrix of any given first coordinate system u1 in the robot coordinate system u0 is obtained.
[0053] S220, obtain the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system.
[0054] Furthermore, obtain the fourth rotation matrix of the second coordinate system u2 to be aligned in the robot coordinate system u0.
[0055] S230, determine the second rotation matrix of the second coordinate system in the first coordinate system based on the third rotation matrix and the fourth rotation matrix.
[0056] Furthermore, according to the third rotation matrix and the fourth rotation matrix The coordinate transformation relationship between the two coordinate systems is determined, and the second rotation matrix R0 of the second coordinate system u2 under the first coordinate system u1 is determined. That is, step S200 is to transform the user coordinate system to be aligned into any given user coordinate system, and represent it by the second rotation matrix R0, where the second rotation matrix is:
[0057]
[0058] Among them, the Let be the third rotation matrix of any given first coordinate system in the robot coordinate system. Let be the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system.
[0059] S300, determine the second unit direction vector based on the axis direction of the second coordinate system to be aligned and the second rotation matrix.
[0060] Furthermore, this application takes the positive X-axis direction of the second coordinate system u2 to be aligned as an example, and determines the second unit direction vector v0. It can be understood that if the axis direction to be aligned is specified as the positive X-axis, then the second unit direction vector v0 is the first column of the second rotation matrix R0; if the axis direction to be aligned is specified as the negative X-axis, then the second unit direction vector v0 is the negative first column of the second rotation matrix R0. Similarly, if the axis direction to be aligned is specified as the positive Y-axis, then the second unit direction vector v0 is the second column of the second rotation matrix R0; if the axis direction to be aligned is specified as the negative Y-axis, then the second unit direction vector v0 is the negative second column of the second rotation matrix R0. If the axis direction to be aligned is specified as the positive Z-axis, then the second unit direction vector v0 is the third column of the second rotation matrix R0; if the axis direction to be aligned is specified as the negative Z-axis, then the second unit direction vector v0 is the negative third column of the second rotation matrix R0.
[0061] S400, determine the unit rotation direction vector and the angle between the first unit direction vector and the second unit direction vector based on the first unit direction vector and the second unit direction vector.
[0062] Please combine further Figure 4 , Figure 4 This is a schematic diagram of the unit rotation direction vector in this application. The unit rotation direction vector v2 in this application can be obtained by calculating the cross product of the first unit direction vector v1 and the second unit direction vector v0, and then normalizing it. Its expression is as follows:
[0063]
[0064] And the angle between the first unit direction vector v1 and the second unit direction vector v0 is:
[0065] θ=arccos(v0·v1) (4)
[0066] Wherein, v1 is the first unit direction vector, and v0 is the second unit direction vector.
[0067] It is understood that the attitude in this application can be represented by a rotation matrix or an axis-angle representation. When represented by an axis-angle representation, the axis here is the rotation axis direction vector of this application, which must be a unit vector. The purpose of normalization is to convert a non-unit vector into a unit vector. Thus, with the included angle and the unit rotation axis direction vector, the axis-angle representation can be converted into a rotation matrix.
[0068] S500, the incremental rotation matrix is determined based on the included angle and the unit rotation direction vector.
[0069] Furthermore, the incremental rotation matrix R2 is determined based on the included angle θ and the unit rotation direction vector v2. The incremental rotation matrix is as follows:
[0070]
[0071] Wherein, R1 is the first rotation matrix.
[0072] S600 automatically aligns the TCP attitude based on the incremental rotation matrix.
[0073] Please combine further Figure 5 , Figure 5 This is a flowchart illustrating an embodiment of step S600 of this application, as shown below. Figure 5 Step S600 further includes the following sub-steps:
[0074] S610, the rotation matrix of the aligned TCP posture is obtained based on the incremental rotation matrix and the first rotation matrix.
[0075] Optionally, in this application, the incremental rotation matrix R2 is multiplied by the first rotation matrix R1 to obtain the rotation matrix R of the aligned TCP pose. The rotation matrix R of the aligned TCP pose is:
[0076] R = R2R1 (6)
[0077] The S620 converts the rotation matrix into attitude RPY to complete the automatic alignment of TCP attitude.
[0078] Further integration Figure 6 , Figure 6This is a schematic diagram of a later implementation of TCP pose alignment according to this application. Optionally, the rotation matrix R is converted into pose RPY to complete the automatic alignment of TCP pose.
[0079] It should be noted that the attitude representation method in this application adopts RPY, and Euler angles, unit quaternions, etc. can also be used in other embodiments, which are not specifically limited here.
[0080] The above implementation method involves performing coordinate transformation and calculation on the TCP attitude in any given user coordinate system and the attitude in the user coordinate system to be aligned to obtain an incremental rotation matrix. Based on the incremental rotation matrix, the aligned rotation matrix is calculated, and the aligned rotation matrix is converted into the attitude RPY to achieve automatic TCP attitude alignment. Furthermore, this application can automatically align the TCP attitude z-direction in any user coordinate system to the specified axis direction in the specified user coordinate system, thereby improving the efficiency and accuracy of TCP attitude alignment.
[0081] To address the aforementioned technical problems, this application also provides an apparatus for automatic TCP attitude alignment. Please refer to [link / reference needed] for details. Figure 7 , Figure 7 This is a schematic diagram of one embodiment of the TCP attitude automatic alignment device of this application, as shown below. Figure 7 The TCP attitude automatic alignment device 200 provided in this application includes a first conversion module 210, a conversion and acquisition module 220, a first determination module 230, a second determination module 240, a third determination module 250, and an alignment module 260.
[0082] The first transformation module 210 is used to transform the TCP attitude in any given first coordinate system into a first rotation matrix and determine the first unit direction vector of the TCP attitude in the Z direction.
[0083] The transformation and acquisition module 220 is used to transform the second coordinate system to be aligned into an attitude under any given first coordinate system, and to acquire the second rotation matrix.
[0084] The first determining module 230 is used to determine the second unit direction vector based on the axis direction of the second coordinate system to be aligned and the second rotation matrix.
[0085] The second determining module 240 is used to determine the unit rotation direction vector and the angle between the first unit direction vector and the second unit direction vector based on the first unit direction vector and the second unit direction vector.
[0086] The third determining module 250 is used to determine the incremental rotation matrix based on the included angle and the unit rotation direction vector.
[0087] The alignment module 260 is used to automatically align the TCP pose according to the incremental rotation matrix.
[0088] It is understood that the various modules of the TCP attitude automatic alignment device in this application are used to execute the steps in the above-described TCP attitude automatic alignment method implementation, and will not be repeated here.
[0089] The above implementation method involves performing coordinate transformation and calculation on the TCP attitude in any given user coordinate system and the attitude in the user coordinate system to be aligned to obtain an incremental rotation matrix. Based on the incremental rotation matrix, the aligned rotation matrix is calculated, and the aligned rotation matrix is converted into the attitude RPY to achieve automatic TCP attitude alignment. Furthermore, this application can automatically align the TCP attitude z-direction in any user coordinate system to the specified axis direction in the specified user coordinate system, thereby improving the efficiency and accuracy of TCP attitude alignment.
[0090] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.
[0091] The computer device 300 includes a memory 301, a processor 302, and a network interface 303 that are interconnected via a system bus. It should be noted that... Figure 8 Only a computer device 300 with components 301-303 is shown in this document; however, it should be understood that implementation of all shown components is not required, and more or fewer components may be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0092] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0093] The memory 301 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 301 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 301 may also be an external storage device of the computer device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 300. Of course, the memory 301 may also include both the internal storage unit and the external storage device of the computer device 300. In this embodiment, the memory 301 is typically used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions for interface calling methods. Furthermore, the memory 301 can also be used to temporarily store various types of data that have been output or will be output.
[0094] In some embodiments, the processor 302 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 302 is typically used to control the overall operation of the computer device 300. In this embodiment, the processor 302 is used to execute computer-readable instructions stored in the memory 301 or to process data, such as executing computer-readable instructions for the TCP attitude auto-alignment method.
[0095] The network interface 303 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 300 and other electronic devices.
[0096] The above implementation method involves performing coordinate transformation and calculation on the TCP attitude in any given user coordinate system and the attitude in the user coordinate system to be aligned to obtain an incremental rotation matrix. Based on the incremental rotation matrix, the aligned rotation matrix is calculated, and the aligned rotation matrix is converted into the attitude RPY to achieve automatic TCP attitude alignment. Furthermore, this application can automatically align the TCP attitude z-direction in any user coordinate system to the specified axis direction in the specified user coordinate system, thereby improving the efficiency and accuracy of TCP attitude alignment.
[0097] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the TCP attitude auto-alignment method as described above.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of the various embodiments of this application.
[0099] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A method for automatic TCP attitude alignment, characterized in that, The automatic alignment method includes: Transform the TCP pose in any given first coordinate system into a first rotation matrix, and determine the first unit direction vector of the TCP pose in the Z direction; The second coordinate system to be aligned is transformed into an attitude in any given first coordinate system, and the second rotation matrix is obtained; The second unit direction vector is determined based on the axis direction of the second coordinate system to be aligned and the second rotation matrix; The unit rotation direction vector and the angle between the first unit direction vector and the second unit direction vector are determined based on the first unit direction vector and the second unit direction vector. The incremental rotation matrix is determined based on the included angle and the unit rotation direction vector. The incremental rotation matrix is as follows: (5); Where θ is the angle between the first unit direction vector and the second unit direction vector, and kx, ky, and kz are the three components of the unit rotation direction vector; The TCP pose is automatically aligned based on the incremental rotation matrix. The rotation matrix of the aligned TCP pose is as follows: (6) Among them, the This is the first rotation matrix.
2. The method for automatic TCP attitude alignment according to claim 1, characterized in that, The first rotation matrix is as follows: (1) Wherein, (a, b, c) are the attitude angles of the TCP in the first coordinate system, and the first unit direction vector of the TCP attitude in the Z direction. This is the third column in the first rotation matrix R1.
3. The method for automatic TCP attitude alignment according to claim 1, characterized in that, The step of converting the second coordinate system to be aligned into an pose in any given first coordinate system and obtaining the second rotation matrix includes: Obtain the third rotation matrix of any given first coordinate system in the robot coordinate system; Obtain the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system; The second rotation matrix of the second coordinate system in the first coordinate system is determined based on the third rotation matrix and the fourth rotation matrix.
4. The method for automatic TCP attitude alignment according to claim 3, characterized in that, The second rotation matrix is: (2) Among them, the Let be any given third rotation matrix of the first coordinate system in the robot coordinate system. This is the fourth rotation matrix of the second coordinate system to be aligned in the robot coordinate system.
5. The method for automatic TCP attitude alignment according to claim 1, characterized in that, The automatic alignment of the TCP pose based on the incremental rotation matrix includes: The rotation matrix of the aligned TCP posture is obtained based on the incremental rotation matrix and the first rotation matrix; The rotation matrix is converted into pose RPY to complete the automatic alignment of the TCP pose.
6. The method for automatic TCP attitude alignment according to claim 5, characterized in that, The unit rotation direction vector is: (3) The angle between the first unit direction vector and the second unit direction vector is: (4) Among them, the Let the first unit direction vector be the vector. This is the second unit direction vector.
7. A device for automatic TCP attitude alignment, characterized in that, The device for automatic TCP attitude alignment includes: The first transformation module is used to transform the TCP attitude in any given first coordinate system into a first rotation matrix, and to determine the first unit direction vector of the TCP attitude in the Z direction. The transformation and acquisition module is used to transform the second coordinate system to be aligned into an attitude under any given first coordinate system, and to acquire the second rotation matrix; The first determining module is used to determine the second unit direction vector based on the axis direction of the second coordinate system to be aligned and the second rotation matrix; The second determining module is used to determine the unit rotation direction vector and the angle between the first unit direction vector and the second unit direction vector based on the first unit direction vector and the second unit direction vector. The third determining module is used to determine the incremental rotation matrix based on the included angle and the unit rotation direction vector, wherein the incremental rotation matrix is: ; Where θ is the angle between the first unit direction vector and the second unit direction vector, and kx, ky, and kz are the three components of the unit rotation direction vector; The alignment module is used to automatically align the TCP pose according to the incremental rotation matrix. After alignment, the rotation matrix of the TCP pose is: Among them, the This is the first rotation matrix.
8. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the method for automatic TCP attitude alignment as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for automatic TCP attitude alignment as described in any one of claims 1 to 6.