Tool coordinate system calibration method, system, device and storage medium
By recording multiple position coordinates of the end tool in the visual robot and using the imitation transformation function to establish a tool coordinate system, the problem of low manual education accuracy is solved, and high -precision and high -efficiency tool coordinate systems are achieved.
Patent Information
- Application Number
- CN202210841637.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the "two-point method" of calibration method for the coordinate system of the terminal tool in existing visual robots, the position accuracy of the robot is low, which affects the efficiency and accuracy of calibration.
Through the visual robot, the end tool moves to multiple predetermined locations, record the coordinates of the center point and the flange center, and use the imitation transformation function to establish the tool coordinate system to achieve automated calibration.
This method does not require manual teaching, which improves the calibration accuracy and speed, and reduces artificial errors.
Smart Images

Figure CN115070770B_ABST
Abstract
Description
Technical Field
[0001] The present application mainly relates to the field of industrial robots, and specifically to a calibration method, system, device and storage medium for a tool coordinate system. Background Art
[0002] With the rapid development of the manufacturing industry, visual robots equipped with robot vision systems are becoming more and more common. At present, in visual robots, the common method for calibrating the end tool coordinate system is the "two-point method". The image of the end tool feature is collected by the visual sensor, and the pixel coordinate position of the robot tool feature point in the visual coordinate system is used as the tool reference point. The robot teaches two points, and the visual system takes pictures and recognizes the two corresponding positions of the tool center point (TCP) of the end tool. Through the pixel coordinates of the robot tool reference point, it is determined whether the tool center point of the robot at two different positions is in the same position. This replaces the original calibration method of observing the tool with the naked eye. However, in the calibration process, in order to achieve the purpose of keeping the pixel position of the tool center point consistent with the pixel position of the reference point, it is necessary to adjust the position of the tool center point by manually teaching the robot. Manually adjusting the position will affect the user experience and the efficiency of calibration, and the accuracy of manual teaching will also affect the final calibration result.
[0003] Therefore, there is an urgent need for a high-precision and high-efficiency calibration method for the end-tool coordinate system. Summary of the invention
[0004] The technical problem to be solved by the present application is to provide a calibration method, system, device and storage medium for a tool coordinate system to solve the problem of low position accuracy of a manual teaching robot in the "two-point method".
[0005] In order to solve the above technical problems, the present application provides a calibration method for a tool coordinate system, which is applied to a visual robot, wherein the visual robot includes a visual sensor and a mechanical arm, and the mechanical arm is provided with an end tool. The calibration method includes the following steps: moving the end tool to a first position, recording a first pixel coordinate of a tool center point in a visual coordinate system and a first position coordinate of a flange center in a base coordinate system; moving the end tool to a second position, recording a second pixel coordinate of a tool center point in the visual coordinate system and a second position coordinate of a flange center in the base coordinate system; moving the end tool in equal steps in the positive direction of the X axis, the negative direction of the X axis, the positive direction of the Y axis, and the negative direction of the Y axis in the base coordinate system to obtain four points, recording information of the four points, and obtaining an affine transformation function between the visual coordinate system and the base coordinate system according to the information of the four points; substituting the first pixel coordinate into the affine transformation function to obtain a reference position coordinate of the tool center point in the base coordinate system; and establishing a tool coordinate system according to the first position coordinate and the reference position coordinate to complete the calibration.
[0006] In one embodiment of the present application, the end tool is rotated and translated from the first position to the second position.
[0007] In one embodiment of the present application, the rotation angle from the first position to the second position is 90°~180°.
[0008] In one embodiment of the present application, the step of obtaining the affine transformation function between the visual coordinate system and the base coordinate system based on the information of the four points includes: recording the third pixel coordinates of the tool center point in the visual coordinate system and the third position coordinates of the flange center in the base coordinate system in each of the four points; and obtaining the affine transformation function between the visual coordinate system and the base coordinate system based on the third pixel coordinates and the third position coordinates of the four points.
[0009] In one embodiment of the present application, the step of obtaining the affine transformation function between the visual coordinate system and the base coordinate system according to the third pixel coordinates and the third position coordinates of the four points includes: obtaining the pixel vector of each point according to the second pixel coordinates and the third pixel coordinates in each point; obtaining the position coordinate vector of each point according to the second position coordinates and the third position coordinates in each point; and obtaining the affine transformation function between the visual coordinate system and the base coordinate system according to the pixel vector and the position coordinate vector.
[0010] In one embodiment of the present application, the step of establishing a tool coordinate system according to the first position coordinates and the reference position coordinates includes: establishing a binary linear equation system according to the first position coordinates and the reference position coordinates, wherein the binary linear equation system is expressed as:
[0011]
[0012]
[0013] in, is the x-coordinate of the reference position coordinate, is the y coordinate of the reference position coordinate, is the x-coordinate of the first position coordinate, is the y coordinate of the first position coordinate, l is the length value of the end tool, is the rotation angle of the flange coordinate system relative to the base coordinate system, is the rotation angle of the tool coordinate system relative to the flange coordinate system; and according to the two-variable linear equation group, the length value l of the end tool and the rotation angle of the tool coordinate system relative to the flange coordinate system are calculated. , establish the tool coordinate system and complete the calibration.
[0014] In one embodiment of the present application, the step of establishing the tool coordinate system includes: calculating the translation distance of the tool center point relative to the flange center along the X-axis in the flange coordinate system by the following formula: and the translation distance of the tool center point relative to the flange center along the Y axis in the flange coordinate system ,
[0015]
[0016]
[0017] Wherein, l is the length of the end tool, is the rotation angle of the tool coordinate system relative to the flange coordinate system; and establishes the tool coordinate system, which is expressed as .
[0018] In one embodiment of the present application, the end tool is mounted on a SCARA robot arm, and the tool coordinate system is expressed as .
[0019] In order to solve the above technical problems, the present application provides a calibration system of a tool coordinate system, which is applied to a visual robot, wherein the visual robot includes a visual sensor and a mechanical arm, and the mechanical arm is provided with an end tool. The calibration system includes: an execution module, which is used to move the end tool to a first position, a second position, and to move equal steps in the positive direction of the X axis, the negative direction of the X axis, the positive direction of the Y axis, and the negative direction of the Y axis in the base coordinate system in sequence, to obtain four points; a recording module, which is used to record the first pixel coordinates of the tool center point in the visual coordinate system and the first position coordinates of the flange center in the base coordinate system, record the second pixel coordinates of the tool center point in the visual coordinate system and the second position coordinates of the flange center in the base coordinate system, and record the information of the four points; a calculation module, which is used to obtain an affine transformation function between the visual coordinate system and the base coordinate system according to the information of the four points, substitute the first pixel coordinates into the affine transformation function to obtain the reference position coordinates of the tool center point in the base coordinate system, and establish a tool coordinate system according to the first position coordinates and the reference position coordinates to complete the calibration.
[0020] In order to solve the above technical problems, the present application provides a calibration device for a tool coordinate system, comprising: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement the calibration method for the tool coordinate system described above.
[0021] In order to solve the above technical problem, the present application provides a computer-readable medium storing a computer program code, and the computer program code implements the calibration method of the tool coordinate system mentioned above when executed by a processor.
[0022] The calibration method of the tool coordinate system of the present application only requires teaching and recording a robot reference point throughout the process, and through the coordinate system transformation between the robot and the vision, the tool coordinate system is automatically established by the "one-point method". The entire process does not require manual teaching, avoiding calibration errors caused by manual teaching, further effectively improving the calibration accuracy, and at the same time effectively improving the calibration speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings, wherein:
[0024] Figure 1 is a schematic diagram of the structure of a visual robot according to an embodiment of the present application;
[0025] Figure 2 It is a flowchart of a calibration method of a tool coordinate system according to an embodiment of the present application;
[0026] Figure 3is a first image of an end tool according to an embodiment of the present application;
[0027] Figure 4 is a second image of the end tool of an embodiment of the present application;
[0028] Figure 5 is a system block diagram of a calibration system for a tool coordinate system according to an embodiment of the present application;
[0029] Figure 6 It is a system block diagram of a calibration device for a tool coordinate system according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below with reference to the accompanying drawings.
[0031] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and therefore the present application is not limited to the specific embodiments disclosed below.
[0032] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously. At the same time, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0033] Figure 1 Schematic diagram of the structure of a visual robot according to an embodiment of the present application. Figure 1 As shown, the visual robot 100 includes a robot arm 10, an end tool 11 and a visual sensor 12. The robot arm 10 includes a base 101 and a flange 102. The end tool 11 is arranged on the flange 102. The end tool 11 includes but is not limited to a gripper, a suction cup, a syringe, etc. The relative position relationship between the visual sensor 12 and the robot arm 10 is eye-to-hand. The visual sensor 12 is fixed above the robot arm 10 and is used to collect images of the end tool 11. The visual sensor 12 includes but is not limited to a camera, a three-dimensional scanner, etc. The base 101 of the robot arm 10 is fixed, and an X-ray diffraction image is established with the center point of the base 101 as the origin and a surface parallel to the base 101. B Y B plane through the origin and perpendicular to X B Y B The center axis of the plane base is Z BAxis, get the base coordinate system B. Take the center point 103 of the end face of the flange 102 (hereinafter referred to as the flange center) as the origin, establish the X axis on the end face of the flange 102 E Y E plane, passing through the flange center 103 and perpendicular to X E Y E The center axis of the flat flange is Z E Axis, establish flange coordinate system E. Take the optical center of the visual sensor 12 as the origin and the optical axis as the Z S The visual coordinate system S is established by the axis, where the X S Axis and Y S The axis is parallel to the plane of the captured image. For the end tool 11, the tool center point 111 of the end tool 11 is taken as the origin, and the straight line passing through the tool center point 111 and coinciding with the tool axis is taken as Z. T Axis, X T Axis and Y T The axis only needs to be aligned with the Z T The axes are perpendicular to each other to obtain the tool coordinate system T.
[0034] In some embodiments, before calibration, a mark is set at the tool center point 111 of the end tool 11 to be calibrated to facilitate detection by the visual sensor 12. The mark generally has high reflectivity or a color feature different from the working space, for example, a circular marker with a color feature can be used.
[0035] Figure 2 FIG. 2 is a schematic diagram of an exemplary process of a calibration method 200 for a tool coordinate system according to an embodiment of the present application. The calibration method 200 for an end tool coordinate system includes:
[0036] Step S21: Move the end tool to a first position, and record the first pixel coordinates of the tool center point in the visual coordinate system and the first position coordinates of the flange center in the base coordinate system.
[0037] Step S22: Move the end tool to a second position, and record the second pixel coordinates of the tool center point in the visual coordinate system and the second position coordinates of the flange center in the base coordinate system.
[0038] Step S23: Move the end tool in equal steps in the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis in the base coordinate system to obtain four points, record the information of the four points, and obtain the affine transformation function between the visual coordinate system and the base coordinate system based on the information of the four points.
[0039] Step S24: Substitute the first pixel coordinate into the affine transformation function to obtain the reference position coordinate of the tool center point in the base coordinate system.
[0040] Step S25: Establish a tool coordinate system according to the reference position coordinates and the first position coordinates to complete the calibration.
[0041] Combine the following Figure 1-4 The above steps S21 to S25 are described in detail.
[0042] In step S21, Figure 1 As shown, the robot arm 10 of the teaching robot 100 moves so that the end tool 11 is in the shooting area of the visual sensor 12, which is used as the first position of the end tool 11. The visual sensor 12 is used to capture the first image of the end tool 11, and the pixel coordinates of the tool center point 111 in the visual coordinate system S are obtained, and the controller of the robot arm 10 directly reads the position coordinates of the flange center 103 in the base coordinate system B. Figure 3 is a first image 30 of the end tool in one embodiment of the present application. Figure 3 As shown, in the first image 30, the pixel coordinates of the tool center point 111 on the end tool 11 are the first pixel coordinates The position coordinates of the flange center 103 in the base coordinate system at this time are recorded as the first position coordinates .
[0043] In step S22, the robot arm 10 is rotated and translated so that the end tool 11 moves to the second position. Taking the SCARA robot arm as an example, the fourth axis of the SCARA robot arm is taught to rotate a certain angle, and then the X axis of the robot is translated in the base coordinate system B. B , Y B The position of the end tool 11 is ensured to be in the field of view of the visual sensor 12, which is used as the second position of the end tool 11. The visual sensor 12 is used to collect the second image of the end tool 11, and the pixel coordinates of the tool center point 111 in the visual coordinate system S are obtained, and the position coordinates of the flange center 103 in the base coordinate system B are directly read by the controller of the robot 10. Figure 4 is a second image 40 of the end tool according to an embodiment of the present application. Figure 4 As shown, in the second image 40, the pixel coordinates of the tool center point 111 on the end tool 11 are the second pixel coordinates At this time, the position coordinates of the flange center 103 in the base coordinate system B are the second position coordinates .
[0044] In some embodiments, the rotation angle from the first position to the second position is 90°~180°.
[0045] In step S23, the robot arm 10 is made to move in the X direction according to the base coordinate system B. BThe axis moves a certain step in the positive direction to obtain point P1. The pixel coordinates of the tool center point 111 in the visual coordinate system S at point P1 are recorded. and the position coordinates of the flange center 103 in the base coordinate system B Then return to the starting point and continue to move X down to the base coordinate system B. B The axis moves in the negative direction by an equal step length to obtain point P2. The pixel coordinates of the tool center point 111 in the visual coordinate system S at point P2 are recorded. and the position coordinates of flange center 103 in the base coordinate system Then return to the starting point and continue to move Y down to the base coordinate system B. B The axis moves in the positive direction by an equal step length to obtain point P3. The pixel coordinates of the tool center point 111 in the visual coordinate system S at point P3 are recorded. and the position coordinates of flange center 103 in the base coordinate system Then return to the starting point and continue to move Y down to the base coordinate system B. B The axis moves in the negative direction with the same step length to obtain point P4. The pixel coordinates of the tool center point 111 in the visual coordinate system S at point P4 are recorded. and the position coordinates of flange center 103 in the base coordinate system According to the pixel coordinates and position coordinates of the four points P1, P2, P3, and P4, the affine transformation function between the visual coordinate system S and the base coordinate system B is obtained.
[0046] In some embodiments, according to the pixel coordinates and position coordinates of the four points P1, P2, P3, and P4, obtaining the affine transformation function between the visual coordinate system and the base coordinate system includes: first, obtaining the pixel vector of each point according to the second pixel coordinate and the pixel coordinate of each point. For example, according to the pixel coordinate of P1 With the second pixel coordinate Get the pixel vector of P1 , according to the pixel coordinates of P2 With the second pixel coordinate Get the pixel vector of P2 , and so on, to obtain four pixel vectors. Then, according to the second position coordinates and the position coordinates of each point, the position coordinate vector of each point is obtained. For example, according to the position coordinates of P1 With the second position coordinates Get the position coordinate vector of P1 , according to the position coordinates of P2 With the second position coordinates Get the position coordinate vector of P2 , and so on, to obtain four position coordinate vectors. Finally, the affine transformation function between the visual coordinate system and the base coordinate system is obtained based on the pixel vector and the position coordinate vector. Each point has a set of pixel vectors and position coordinate vectors. Through the mapping relationship between the above four sets of pixel vectors and position coordinate vectors, the affine transformation function between the visual coordinate system and the base coordinate system can be obtained: ,in Indicates that the visual coordinate system is composed of the base coordinate system Through the rotation matrix R and the three-dimensional translation vector t and matrix transposition The transformation relationship is calculated.
[0047] In step S24, the first pixel coordinates Substitute into the affine transformation function to obtain the reference position coordinates of the tool center point in the base coordinate system .
[0048] In step S25, establishing a tool coordinate system according to the reference position coordinates and the first position coordinates includes:
[0049] According to the reference position coordinates and the first position coordinates Establish a system of linear equations with two variables, which can be expressed as:
[0050]
[0051]
[0052] in, is the x-coordinate of the reference position, is the y coordinate of the reference position, is the x coordinate of the first position, is the y coordinate of the first position, l is the length of the end tool, is the rotation angle of the flange coordinate system relative to the base coordinate system, is the rotation angle of the tool coordinate system relative to the flange coordinate system.
[0053] Since the rotation angle of the flange coordinate system relative to the base coordinate system has been determined during the manufacture of the robot arm , in other words, the rotation angle is a known value. According to the set of two-variable linear equations, the length l of the end tool and the rotation angle of the tool coordinate system relative to the flange coordinate system are calculated. , establish the tool coordinate system and complete the calibration.
[0054] In some embodiments, establishing the tool coordinate system includes calculating the tool center point relative to the flange center along the X axis of the flange coordinate system E by the following formula:E Axis translation distance The tool center point is relative to the flange center in the flange coordinate system E along the Y E Axis translation distance ,
[0055]
[0056]
[0057] Where l is the length of the end tool, The tool coordinate system is established by the rotation angle of the tool coordinate system relative to the flange coordinate system. The tool coordinate system is expressed as .
[0058] Because the SCARA robot arm has only four degrees of freedom, there is no need to calculate when establishing the tool coordinate system. angle, so The default is 0°. The tool coordinate system established by the SCARA robot can be expressed as .
[0059] The tool coordinate system calibration method of the present invention only needs to teach and record one robot reference point throughout the process. Through the coordinate system transformation between the robot and the vision, the "one-point method" is used to automatically establish the tool coordinate system. The entire process does not require manual teaching, avoiding calibration errors caused by manual teaching, further effectively improving the calibration accuracy, and at the same time effectively improving the calibration speed.
[0060] Figure 5 FIG. 5 is a schematic diagram of a calibration system 500 of a tool coordinate system according to an embodiment of the present application. Figure 5 As shown, the calibration system 500 of the tool coordinate system includes: an execution module 51, a recording module 52 and a calculation module 53. The execution module 51 is used to move the end tool to the first position, the second position and to move in equal steps in the positive direction of the X axis, the negative direction of the X axis, the positive direction of the Y axis and the negative direction of the Y axis in the base coordinate system in order to obtain four points. The recording module 52 is used to record the first pixel coordinates of the tool center point in the visual coordinate system and the first position coordinates of the flange center in the base coordinate system when the end tool is in the first position, record the second pixel coordinates of the tool center point in the visual coordinate system and the second position coordinates of the flange center in the base coordinate system when the end tool is in the second position, and record the information of the four points. The calculation module 53 is used to obtain the affine transformation function between the visual coordinate system and the base coordinate system according to the information of the four points, substitute the first pixel coordinates into the affine transformation function to obtain the reference position coordinates of the tool center point in the base coordinate system, and establish the tool coordinate system according to the first position coordinates and the reference position coordinates to complete the calibration.
[0061] The implementation process of the functions and effects of each module in the above system is specifically described in the implementation process of the corresponding steps in the calibration method of the tool coordinate system, which will not be repeated here.
[0062] The present application also includes a calibration device for a tool coordinate system, including a memory and a processor. The memory is used to store instructions executable by the processor; the processor is used to execute the instructions to implement the calibration method of the tool coordinate system described above. An embodiment of the calibration device for the tool coordinate system of the present application can be referred to Figure 6 , Figure 6 is a system block diagram of a calibration device for a tool coordinate system according to an embodiment of the present application. Figure 6 As shown, the calibration device 600 of the tool coordinate system may include an internal communication bus 601, a processor 602, a read-only memory (ROM) 603, a random access memory (RAM) 604, and a communication port 605. When applied on a personal computer, the calibration device 600 of the tool coordinate system may also include a hard disk 606. The internal communication bus 601 can realize data communication between the components of the calibration device 600 of the tool coordinate system. The processor 602 can make judgments and issue prompts. In some embodiments, the processor 602 can be composed of one or more processors. The communication port 605 can realize data communication between the calibration device 600 and the outside. In some embodiments, the calibration device 600 of the tool coordinate system can send and receive information and data from the network through the communication port 605. The calibration device 600 of the tool coordinate system may also include different forms of program storage units and data storage units, such as a hard disk 606, a read-only memory (ROM) 603 and a random access memory (RAM) 604, which can store various data files used for computer processing and / or communication, and possible program instructions executed by the processor 602. The processor executes these instructions to implement the main part of the method. The results processed by the processor are transmitted to the user device through the communication port and displayed on the user interface.
[0063] The above-mentioned text classification method can be implemented as a computer program, stored in the hard disk 606, and loaded into the processor 602 for execution to implement the calibration method of the present application.
[0064] The present application also includes a computer-readable medium storing a computer program code, which, when executed by a processor, implements the tool coordinate system calibration method described above.
[0065] When the calibration method of the tool coordinate system is implemented as a computer program, it can also be stored in a computer-readable storage medium as a product. For example, a computer-readable storage medium may include, but is not limited to, a magnetic storage device (e.g., a hard disk, a floppy disk, a magnetic strip), an optical disk (e.g., a compact disk (CD), a digital versatile disk (DVD)), a smart card, and a flash memory device (e.g., an electrically erasable programmable read-only memory (EPROM), a card, a stick, a key drive). In addition, the various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media (and / or storage media) that can store, contain and / or carry code and / or instructions and / or data.
[0066] It should be understood that the embodiments described above are only illustrative. The embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For hardware implementation, the processor may be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, and / or other electronic units designed to perform the functions described herein, or a combination thereof.
[0067] Some aspects of the present application may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". The processor may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DAPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or combinations thereof. In addition, various aspects of the present application may be represented as computer products located in one or more computer-readable media, which include computer-readable program codes. For example, computer-readable media may include, but are not limited to, magnetic storage devices (e.g., hard disks, floppy disks, tapes ...), optical disks (e.g., compact disks CDs, digital versatile disks DVDs ...), smart cards, and flash memory devices (e.g., cards, sticks, key drives ...).
[0068] A computer-readable medium may include a propagated data signal containing computer program code, such as in baseband or as part of a carrier wave. The propagated signal may have a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. A computer-readable medium may be any computer-readable medium other than a computer-readable storage medium, which may be connected to an instruction execution system, device or apparatus to communicate, propagate or transmit a program for use. The program code on the computer-readable medium may be propagated via any suitable medium, including radio, cable, fiber optic cable, radio frequency signal, or similar medium, or any combination of the above mediums.
[0069] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0070] Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values of the parts and steps set forth in these embodiments do not limit the scope of the present application. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the accompanying drawings are not drawn according to the actual proportional relationship. The technology, methods and equipment known to those of ordinary skill in the relevant art may not be discussed in detail, but in appropriate cases, the technology, methods and equipment should be considered as a part of the authorization specification. In all examples shown and discussed here, any specific value should be interpreted as being merely exemplary, rather than as a limitation. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and therefore, once a certain item is defined in an accompanying drawing, it does not need to be further discussed in subsequent drawings.
[0071] In addition, although the terms used in this application are selected from well-known and commonly used terms, some of the terms mentioned in this application specification may be selected by the applicant at his or her discretion, and their detailed meanings are explained in the relevant parts of the description of this article. In addition, it is required to understand this application not only by the actual terms used, but also by the meaning implied by each term.
[0072] At the same time, the present application uses specific words to describe the embodiments of the present application. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different positions in this specification does not necessarily refer to the same embodiment. In addition, some features, structures or characteristics in one or more embodiments of the present application can be appropriately combined.
[0073] The basic concepts have been described above. Obviously, for those skilled in the art, the above application disclosure is only an example and does not constitute a limitation of the present application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and amendments to the present application. Such modifications, improvements and amendments are suggested in the present application, so such modifications, improvements and amendments still belong to the spirit and scope of the exemplary embodiments of the present application.
Claims
1. A calibration method for a tool coordinate system, applied to a visual robot, wherein the visual robot comprises a visual sensor and a mechanical arm, wherein the mechanical arm is provided with an end tool, wherein: include: Move the end tool to a first position, and record a first pixel coordinate of a center point of the tool in a visual coordinate system and a first position coordinate of a center point of the flange in a base coordinate system; Move the end tool to a second position, and record a second pixel coordinate of the tool center point in the visual coordinate system and a second position coordinate of the flange center in the base coordinate system; The end tool is moved in equal steps in the positive direction of the X-axis, the negative direction of the X-axis, the positive direction of the Y-axis, and the negative direction of the Y-axis in the base coordinate system to obtain four points, and information of the four points is recorded. An affine transformation function between the visual coordinate system and the base coordinate system is obtained according to the information of the four points; Substituting the first pixel coordinate into the affine transformation function to obtain the reference position coordinate of the tool center point in the base coordinate system; as well as Establishing a tool coordinate system according to the first position coordinates and the reference position coordinates to complete calibration; Among them, the step of establishing a tool coordinate system based on the first position coordinates and the reference position coordinates includes: establishing a set of two-variable linear equations based on the first position coordinates and the reference position coordinates, and calculating the length value of the end tool and the rotation angle of the tool coordinate system relative to the flange coordinate system based on the set of two-variable linear equations to establish the tool coordinate system.
2. The calibration method of the tool coordinate system according to claim 1, characterized in that: The end tool is rotated and translated from the first position to the second position.
3. The calibration method of the tool coordinate system according to claim 2, characterized in that: The rotation angle from the first position to the second position is 90° to 180°.
4. The calibration method of the tool coordinate system according to claim 1, characterized in that: The step of obtaining the affine transformation function between the visual coordinate system and the base coordinate system according to the information of the four points comprises: Recording the third pixel coordinate of the tool center point in the visual coordinate system and the third position coordinate of the flange center in the base coordinate system in each of the four points; and An affine transformation function between the visual coordinate system and the base coordinate system is obtained according to the third pixel coordinates and the third position coordinates of the four points.
5. The calibration method of the tool coordinate system according to claim 4, characterized in that: The step of obtaining an affine transformation function between the visual coordinate system and the base coordinate system according to the third pixel coordinates and the third position coordinates of the four points comprises: Obtaining a pixel vector for each point according to the second pixel coordinates and the third pixel coordinates in each point; Obtaining a position coordinate vector of each point according to the second position coordinate and the third position coordinate in each point; and An affine transformation function between the visual coordinate system and the base coordinate system is obtained according to the pixel vector and the position coordinate vector.
6. The calibration method of the tool coordinate system according to claim 1, characterized in that: The system of two-variable linear equations is expressed as: x3=x1+lcos(α+θ) y3=y1+lsin(α+θ) Among them, x3 is the x-coordinate of the reference position coordinate, y3 is the y-coordinate of the reference position coordinate, x1 is the x-coordinate of the first position coordinate, y1 is the y-coordinate of the first position coordinate, l is the length value of the end tool, α is the rotation angle of the flange coordinate system relative to the base coordinate system, and θ is the rotation angle of the tool coordinate system relative to the flange coordinate system.
7. The calibration method of the tool coordinate system according to claim 6, characterized in that: The steps to establish the tool coordinate system include: The translation distance X of the tool center point relative to the flange center along the X axis in the flange coordinate system is calculated by the following formula: t and the translation distance Y of the tool center point relative to the flange center along the Y axis in the flange coordinate system t , X t =l cosθ AND t =l sinθ Wherein, l is the length of the end tool, θ is the rotation angle of the tool coordinate system relative to the flange coordinate system; and Establish the tool coordinate system, which is represented by T(X t , Y t , θ).
8. The calibration method of the tool coordinate system according to claim 7, characterized in that: The end tool is installed on the SCARA robot arm, and the tool coordinate system is expressed as T(X t , Y t , 0).
9. A tool coordinate system calibration system, applied to a visual robot, the visual robot comprising a visual sensor and a mechanical arm, the mechanical arm being provided with an end tool, characterized in that: include: An execution module is used to move the end tool to the first position, the second position in sequence, and to obtain four points by moving equal steps in the positive direction of the X axis, the negative direction of the X axis, the positive direction of the Y axis, and the negative direction of the Y axis in the base coordinate system; A recording module, used to record a first pixel coordinate of the tool center point in the visual coordinate system and a first position coordinate of the flange center in the base coordinate system, record a second pixel coordinate of the tool center point in the visual coordinate system and a second position coordinate of the flange center in the base coordinate system, and record information of the four points; a calculation module, configured to obtain an affine transformation function between the visual coordinate system and the base coordinate system according to information of the four points, substitute the first pixel coordinate into the affine transformation function to obtain a reference position coordinate of the tool center point in the base coordinate system, and establish a tool coordinate system according to the first position coordinate and the reference position coordinate to complete calibration; Among them, the step of establishing a tool coordinate system based on the first position coordinates and the reference position coordinates includes: establishing a set of two-variable linear equations based on the first position coordinates and the reference position coordinates, and calculating the length value of the end tool and the rotation angle of the tool coordinate system relative to the flange coordinate system based on the set of two-variable linear equations to establish the tool coordinate system.
10. A calibration device for a tool coordinate system, comprising: a memory for storing instructions executable by a processor; A processor, configured to execute the instructions to implement the method according to any one of claims 1 to 8.
11. A computer readable medium storing computer program code, wherein the computer program code implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Vision-based robot automatic calibration method, equipment and storage medium
CN110640745A