A method and device for calibrating a robotic arm
The robot arm end tool automatically moves to collect the coordinate system posture of multiple position points, and uses the least square method to calculate the TCP point position, which solves the problem of low calibration accuracy caused by manual operation dependence in the existing technology, and realizes the automatic control of the robot arm. Calibration and accuracy improvements.
Patent Information
- Application Number
- CN202111593352.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-12-23
AI Technical Summary
Existing robotic arm calibration methods rely on manual operation, resulting in waste of manpower and low calibration accuracy.
By automatically moving the end tool of the manipulator to multiple position points, the end tool coordinate system pose in the vision sensor space and the flange coordinate system pose in the manipulator coordinate system are collected, and the least squares method is used to calculate the position of the end tool TCP point on the flange The position under the coordinate system realizes automatic calibration.
Save labor costs, improve calibration accuracy, avoid manual operation errors, and achieve high-precision automatic calibration of the robotic arm.
Smart Images

Figure CN114310880B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a robotic arm calibration method and device. Background Art
[0002] With the development of science and technology, the application fields of robotic arms are becoming more and more extensive. For robotic arms in the two application fields of high-precision processing and surgery, the tasks they need to complete have very high requirements for accuracy. Before the robotic arm is put into operation, the relative relationship between the end tool coordinate system installed at the end of the robotic arm and the flange coordinate system at the end of the robotic arm must be determined in order to accurately control the robotic arm so that it can smoothly perform the task. This process of determining the relative relationship between the end tool coordinate system at the end of the robotic arm and the flange coordinate system at the end of the robotic arm is called the calibration of the robotic arm.
[0003] The commonly used robot arm calibration method at present is the four-point method, that is, after finding a very precise fixed point as a reference point within the robot's motion range, a tool center point, namely TCP (the origin of the end tool coordinate system at the end of the robot arm, Tool Center Point, TCP) is determined on the tool, and then the robot is manually manipulated to move the TCP so that the TCP point just hits the fixed point in four different tool postures. Since the robot arm is manually moved during the calibration process, whether the robot arm's TCP point hits the fixed point is determined by the human eye, so calibration by this method is a waste of manpower and does not obtain a calibration result with good accuracy. Summary of the invention
[0004] The present invention provides a robot arm calibration method and device, which are used to solve the defects of the prior art that the robot arm is calibrated by manual teaching, which wastes manpower and fails to obtain a calibration result with good accuracy. By collecting the postures of the end tool of the robot arm automatically moving to a plurality of different positions, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained, thereby realizing automatic calibration of the robot arm and saving manpower costs.
[0005] The present invention provides a robot arm calibration method, comprising:
[0006] At a plurality of different positions to which the end tool of the robot arm automatically moves, a first pose and a second pose are respectively collected; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system;
[0007] According to the first posture and the second posture, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained.
[0008] According to the robot arm calibration method of the present invention, the first pose and the second pose are respectively collected at multiple different positions to which the end tool of the robot arm automatically moves, including:
[0009] At a plurality of different positions within the identifiable range of the visual sensor to which the marking component automatically moves, respectively collecting a first pose and a second pose;
[0010] The marking component is a marking component with its own coordinate system that is fixed at the end tool of the robot arm and can be identified by a visual sensor, and the origin of the coordinate system of the marking component is the TCP point of the end tool.
[0011] According to the robot arm calibration method of the present invention, obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm according to the first posture and the second posture includes:
[0012] According to the second posture and the preset value of the TCP point, the coordinates of the TCP point in the robot arm coordinate system are obtained;
[0013] Obtaining a first spatial transformation matrix between the robotic arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding first posture;
[0014] Calculate, according to the first spatial transformation matrix, a registration error between the coordinates of the TCP point at the position point and the coordinates of the TCP point in the robot arm coordinate system obtained by the second posture and the preset value of the TCP point;
[0015] Based on the least square method, the value of the TCP point is obtained so that the registration error at all the position points is less than a preset error threshold;
[0016] The value of the TCP point is used as the position value of the TCP point of the end tool in the flange coordinate system.
[0017] According to the robot arm calibration method of the present invention, obtaining a first space transformation matrix between the robot arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding second pose includes:
[0018] Dividing the coordinates of the TCP points at some of the position points and the corresponding coordinates of the origin into a plurality of groups according to a preset number of coordinates, so as to serve as a plurality of groups of registration points;
[0019] Based on each group of registration points, the first spatial transformation matrix is obtained through spatial registration using the coordinates of the TCP points of the registration points and the coordinates of the corresponding origins.
[0020] According to the robot arm calibration method of the present invention, the least square method is used to obtain the value of the TCP point that makes the registration error at all the position points less than a preset error threshold, including:
[0021] Based on the registration error, the value of the TCP point is continuously adjusted and iterated until the obtained value of the TCP point makes the registration errors of all the position points smaller than a preset error threshold.
[0022] According to the robot arm calibration method described in the present invention, the marking component with its own coordinate system is a marking plate with its own coordinate system; the direction perpendicular to the marking plate is the z-axis direction of the coordinate system of the end tool.
[0023] According to the robot arm calibration method of the present invention, after obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm, the method further includes:
[0024] According to the position of the TCP point of the end tool in the flange coordinate system and the second posture, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
[0025] According to the robot arm calibration method of the present invention, obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the position of the TCP point of the end tool in the flange coordinate system and the second posture includes:
[0026] Obtaining coordinates of the TCP point of the end tool in the robot arm coordinate system according to the position of the TCP point of the end tool in the flange coordinate system and the second posture;
[0027] Obtaining a second space transformation matrix between the robot arm and the visual sensor according to the coordinates of the TCP point of the end tool in the robot arm coordinate system and the coordinates of the origin in the first posture;
[0028] According to the first posture, the second posture and the second space conversion matrix, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
[0029] According to the robot arm calibration method of the present invention, obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the first posture, the second posture and the second space transformation matrix includes:
[0030] Based on each of the position points, according to the first posture, the second posture and the second space transformation matrix, obtain the posture of the coordinate system of the end tool at each of the position points relative to the flange coordinate system of the robot arm;
[0031] Sum the postures of the coordinate system of the end tool at all the position points relative to the flange coordinate system of the robot arm and calculate the average value;
[0032] The average value is used as the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm.
[0033] The present invention also provides a mechanical arm calibration device, comprising:
[0034] An acquisition module, used to respectively acquire a first pose and a second pose at a plurality of different positions to which the end tool of the robot arm automatically moves; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system;
[0035] A processing module is used to obtain the position of the TCP point of the end tool in the flange coordinate system of the robot arm according to the first posture and the second posture.
[0036] A robot arm calibration method and device provided by the present invention respectively collects the pose of the coordinate system of the end tool in the visual sensor space as a first pose, and the pose of the flange coordinate system of the robot arm in the robot arm coordinate system as a second pose, at a plurality of different position points to which the end tool of the robot arm automatically moves. Then, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained through the first pose and the second pose. This not only realizes the automatic calibration of the robot arm and saves labor costs, but also improves the calibration accuracy after avoiding manual operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is a schematic flow chart of a robot arm calibration method provided by the present invention;
[0039] Figure 2 It is a schematic diagram of the positions of various coordinate systems in a robot arm calibration method provided by the present invention;
[0040] Figure 3 It is a structural schematic diagram of the mechanical arm calibration device provided by the present invention;
[0041] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention.
[0042] Reference numerals:
[0043] 1: Robotic arm; 2: Vision sensor; 3: Marking parts. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Combine the following Figure 1 and Figure 2 A robot arm calibration method of the present invention is described, which is executed based on a computer or a combination of software and / or hardware therein; Figure 1 As shown, the method specifically comprises the following steps:
[0046] 101. At a plurality of different positions to which the end tool of the robot arm automatically moves, a first pose and a second pose are respectively collected; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system;
[0047] 102. According to the first posture and the second posture, obtain the position of the TCP point of the end tool in the flange coordinate system of the robot arm.
[0048] Specifically, the posture refers to the position and posture of the robot's end effector in a specified coordinate system. Therefore, the first posture and the second posture respectively include the position of the end tool coordinate system in the visual sensor space and the position of the flange coordinate system in the robot arm space, and there is a relative positional relationship between the two positions. Therefore, in the above-mentioned embodiment of the present invention, the end tool of the robot arm is automatically moved to multiple different positions, and then the posture of the end tool coordinate system in the visual sensor space and the posture of the flange coordinate system in the robot arm space are collected at multiple positions at the same time, that is, the first posture and the second posture. After that, the position of the TCP point of the end tool in the flange coordinate system of the robot arm can be calculated through the first posture and the second position, thereby realizing the calibration of the robot arm.
[0049] This calibration process is completely based on the automatic movement of the robot's end tool to multiple different position points. It not only realizes the automatic calibration of the robot arm and saves labor costs, but also improves the calibration accuracy by avoiding manual operation.
[0050] As an embodiment of the present invention, the end tool of the robot arm automatically moves to a plurality of different positions to respectively collect the first pose and the second pose, including:
[0051] At a plurality of different positions within the identifiable range of the visual sensor to which the marking component automatically moves, respectively collecting a first pose and a second pose;
[0052] The marking component is a marking component with its own coordinate system that is fixed at the end tool of the robot arm and can be identified by a visual sensor, and the origin of the coordinate system of the marking component is the TCP point of the end tool.
[0053] Specifically, Figure 2 As shown, by fixing a marking component 3 with its own coordinate system that can be recognized by the visual sensor 2 at the end tool of the robot arm 1, the end tool automatically moves to different positions instead of automatically moving to different positions, which facilitates the collection of the first posture and the second posture, and the origin of the coordinate system of the marking component is the TCP point of the end tool, which can facilitate the position of the fixed point to be obtained from the first posture.
[0054] More specifically, in actual applications, the marking component can be a calibration block, a calibration plate, a calibration ball, etc. with a tracking and positioning marker. Furthermore, a pattern composed of a black and white checkerboard can be set on it, and the black and white checkerboard will constitute a Marker coordinate system. At the same time, the origin of the Marker coordinate system is the TCP point of the end tool, that is, the origin of the Marker coordinate system is the working point of the tool.
[0055] As an embodiment of the present invention, obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm according to the first posture and the second posture includes:
[0056] According to the second posture and the preset value of the TCP point, the coordinates of the TCP point in the robot arm coordinate system are obtained;
[0057] Obtaining a first spatial transformation matrix between the robotic arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding first posture;
[0058] Calculate, according to the first spatial transformation matrix, a registration error between the coordinates of the TCP point at the position point and the coordinates of the TCP point in the robot arm coordinate system obtained by the second posture and the preset value of the TCP point;
[0059] Based on the least square method, the value of the TCP point is obtained so that the registration error at all the position points is less than a preset error threshold;
[0060] The value of the TCP point is used as the position value of the TCP point of the end tool in the flange coordinate system.
[0061] Specifically, for the convenience of description, Denote the first posture at position point i, with Denote the second posture at position point i, using represents the coordinates of the origin of the coordinate system of the marking component in the first posture at position j; and then assigns an initial value t to the TCP point 0 , that is, the preset value of the TCP point, then the coordinates of the TCP point at position j in the robot arm coordinate system are: By coordinates and The first spatial transformation matrix between the robot arm and the visual sensor at position j can be calculated
[0062] More specifically, the registration error between the coordinates of the TCP point and the corresponding coordinates of the origin can be calculated based on Formula 1:
[0063]
[0064] Based on the above formula 1, the first space transformation matrix at position j can be calculated using The coordinates of the TCP point at position i in the robot arm coordinate system are calculated and compared with the second pose acquired and the preset initial value t 0 The calculated difference between the coordinates of the TCP point in the robot coordinate system, then, based on the least squares method, the value of the TCP point that makes the registration error at all the position points less than the preset error threshold can be obtained, that is, the most accurate TCP point t of the coordinate system of the end tool relative to the flange coordinate system tcp .
[0065] As an embodiment of the present invention, obtaining a first space transformation matrix between the robotic arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding second pose includes:
[0066] Dividing the coordinates of the TCP points at some of the position points and the corresponding coordinates of the origin into a plurality of groups according to a preset number of coordinates, so as to serve as a plurality of groups of registration points;
[0067] Based on each group of registration points, the first spatial transformation matrix is obtained through spatial registration using the coordinates of the TCP points of the registration points and the coordinates of the corresponding origins.
[0068] Specifically, based on the needs of practical applications, a corresponding number of the first poses and the second poses collected at all the position points can be selected to calculate the first space conversion matrix, that is, when a higher calibration accuracy is required, a larger number of coordinate points are selected to calculate the first space conversion matrix, and when a relatively lower calibration accuracy is required, a smaller number of coordinate points are selected to calculate the first space conversion matrix. Then, the value of the final TCP point is calibrated by error analysis between the obtained first space conversion matrix and the coordinates obtained at all position points.
[0069] More specifically, in order to obtain the value of the TCP point of the coordinate system of the end tool relative to the flange coordinate system, the coordinates of some position points can be used as registration points by presetting the number of coordinates, and the coordinates obtained at all position points can be used as verification points; wherein the preset number of coordinates can be flexibly set according to needs, for example, each group of registration points is set to include the coordinates of 10 TCP points and the corresponding coordinates of the origin, and then the coordinates of the registration points are used. and Calculate the spatial transformation matrix between the robot and the visual sensor through spatial registration methods, such as the SVD algorithm
[0070] Furthermore, in order to facilitate the composition of the registration points, it is possible to select the initial TCP coordinates of every ten robot arm spaces starting from the first point collected, that is, the first position point to which the calibration component moves. And the coordinates of the marker point in the corresponding visual sensor space As a set of registration points, we get n sets of registration points, and then set the initial TCP points of all robot arms in the space including the registration points. And the corresponding origin coordinates in the visual sensor space As verification point. Use the coordinates of the registration point and Through spatial registration, for example, the SVD algorithm calculates the spatial transformation matrix between the robot arm and the visual sensor
[0071] As an embodiment of the present invention, the method of obtaining the value of the TCP point that makes the registration errors of all the position points smaller than a preset error threshold based on the least squares method includes:
[0072] Based on the registration error, the value of the TCP point is continuously adjusted and iterated until the obtained value of the TCP point makes the registration errors of all the position points smaller than a preset error threshold.
[0073] Specifically, in the application of the least squares method, the initial value of the TCP point t 0Initially, the value of the TCP point can be automatically adjusted according to the value of the registration error, and then the registration error is calculated. After that, the TCP point value is readjusted through a continuous iterative cycle based on the newly calculated value of the registration error, so as to finally obtain the value of the TCP point that makes the registration errors at all the said position points less than the preset error threshold.
[0074] As an embodiment of the present invention, the marking component with its own coordinate system is a marking plate with its own coordinate system; the direction perpendicular to the marking plate is the z-axis direction of the coordinate system of the end tool.
[0075] Specifically, by taking the center of the calibration plate as the TCP point of the robot's end tool, and the direction perpendicular to the calibration plate as the Z-axis direction of the robot's end tool coordinate system, the origin of the Marker coordinate system is made the TCP point of the end tool coordinate system, and the Z-axis of the Marker coordinate system is made the Z-axis of the end tool coordinate system. Therefore, the Marker coordinate system and the end tool coordinate system can be regarded as having the same posture in the robot space, so that the Marker coordinate system of the calibration plate can be used to mark the posture of the robot's end tool coordinate system relative to the robot's end flange coordinate system, that is, TCF (Tool Coordinate Frame, TCF) calibration.
[0076] As an embodiment of the present invention, after obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm, the method further includes:
[0077] According to the position of the coordinate system of the end tool relative to the flange coordinate system and the second posture, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
[0078] Specifically, combined with the calculated t tcp With the second posture, the posture TCF of the coordinate system of the end tool relative to the flange coordinate system of the robot arm can be obtained.
[0079] As an embodiment of the present invention, obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the position of the TCP point of the end tool in the flange coordinate system and the second posture includes:
[0080] Obtaining coordinates of the TCP point of the end tool in the robot arm coordinate system according to the position of the TCP point of the end tool in the flange coordinate system and the second posture;
[0081] Obtaining a second space transformation matrix between the robot arm and the visual sensor according to the coordinates of the TCP point of the end tool in the robot arm coordinate system and the coordinates of the origin in the first posture;
[0082] According to the first posture, the second posture and the second space conversion matrix, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
[0083] Specifically, combined with the calculated t tcp And the position of the flange coordinate system in the robot coordinate system According to formula 2, we can get t tcp Coordinates of the robot arm at position i
[0084]
[0085] Afterwards, through and Calculate the second space transformation matrix between the robot arm and the visual sensor pass The posture of the coordinate system of the end tool at position point i relative to the flange coordinate system of the robot arm can be calculated.
[0086] Furthermore, let the pose matrix of TCP in the robot flange coordinate system be Assume that the pose matrix of TCP in the robot coordinate system is Therefore Yes
[0087] The position of the Marker coordinate system in the visual sensor space And the space transformation matrix between the robot space and the visual sensor The position of the Marker coordinate system in the robotic arm space can be calculated
[0088] More specifically, the Marker coordinate system and the end tool coordinate system have the same posture in the robot arm space.
[0089] Set the Marker coordinate system to the position in the robot space The pose matrix of TCP in the robot coordinate system is Respectively expressed in matrix form, as shown in the following formulas 3 and 4:
[0090]
[0091]
[0092] in, kind Respectively represent the posture, p i and t tcp Respectively represent the position, then through The following formula 5 can be obtained:
[0093]
[0094] Therefore, the pose of the end tool coordinate system in the end flange coordinate system can be calculated:
[0095]
[0096] Then That is the TCF of the robot at position i.
[0097] As an embodiment of the present invention, obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the first posture, the second posture and the second space transformation matrix includes:
[0098] Based on each of the position points, according to the first posture, the second posture and the second space transformation matrix, obtain the posture of the coordinate system of the end tool at each of the position points relative to the flange coordinate system of the robot arm;
[0099] Sum the postures of the coordinate system of the end tool at all the position points relative to the flange coordinate system of the robot arm and calculate the average value;
[0100] The average value is used as the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm.
[0101] Specifically, by traversing all position points, summing up the obtained postures and taking the average value, the average value is regarded as the final TCF of the robot arm, thereby achieving high-precision TCF calibration.
[0102] The calibration accuracy of the UR5e robotic arm is verified by using the robotic arm calibration method described in the above embodiment of the present invention.
[0103] Specifically, after the TCP calibration of the UR5e robot arm, the end tool of the robot arm is controlled to automatically move to 50 positions within the field of view of the visual sensor. The positioning error at each position point is calculated based on the obtained TCP. The results are shown in Table 1.
[0104] Table 1 Positioning error
[0105]
[0106]
[0107] It can be seen from Table 1 that by using the robot arm calibration method described in the above embodiment of the present invention to calibrate TCP, a high-precision TCP can be obtained.
[0108] The present invention fixes a calibration plate with a self-contained coordinate system that can be recognized by a visual sensor on the end tool of the manipulator, takes the origin of the calibration plate coordinate system as the tool TCP, and takes the Z axis of the calibration plate coordinate system as the Z axis of the tool coordinate system. At the same time, the position of the calibration plate coordinate system in the visual sensor space and the position of the flange coordinate system in the manipulator space are collected at multiple positions, and the manipulator TCP is calculated using the least squares method, and then the manipulator TCP is calculated based on the spatial conversion relationship between the visual sensor space and the manipulator space. Compared with the existing technology, it saves labor costs, improves calibration accuracy, and realizes dual calibration of TCP and TCF, which helps the manipulator to complete tasks with higher accuracy.
[0109] Combine the following Figure 3 A robot arm calibration device provided by the present invention is described. The robot arm calibration device described below and the robot arm calibration method described above can correspond to each other.
[0110] like Figure 3 As shown, the device includes a collection module 310 and a processing module 320;
[0111] The acquisition module 310 is used to respectively acquire a first pose and a second pose at a plurality of different positions to which the end tool of the robot arm automatically moves; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system;
[0112] The processing module 320 is used to obtain the position of the TCP point of the end tool in the flange coordinate system of the robot arm according to the first posture and the second posture.
[0113] It should be noted that a robot arm calibration device provided by the present invention collects the pose of the coordinate system of the end tool in the visual sensor space as the first pose, and the pose of the flange coordinate system of the robot arm in the robot arm coordinate system as the second pose, at multiple different position points to which the end tool of the robot arm automatically moves. Then, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained through the first pose and the second pose. This not only realizes the automatic calibration of the robot arm and saves labor costs, but also improves the calibration accuracy after avoiding manual operation.
[0114] The robot arm calibration device provided in the embodiment of the present invention is used to sign a robot arm calibration method of each embodiment. The specific methods and processes of each module included in the robot arm calibration device to implement corresponding functions are detailed in the embodiment of the robot arm calibration method above, which will not be repeated here.
[0115] The robot arm calibration device of the present invention is used in a robot arm calibration method in the above embodiments. Therefore, the description and definition in a robot arm calibration method in the above embodiments can be used to understand each execution module in the embodiments of the present invention.
[0116] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a robot arm calibration method, the method comprising: collecting a first pose and a second pose respectively at a plurality of different positions to which the end tool of the robot arm automatically moves; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system; according to the first pose and the second pose, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained.
[0117] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0118] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a robot arm calibration method provided by the above methods, the method including: at multiple different position points to which the end tool of the robot arm automatically moves, respectively collecting a first pose and a second pose; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system; according to the first pose and the second pose, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained.
[0119] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a robot arm calibration method provided by the above methods is implemented, the method comprising: at a plurality of different position points to which the end tool of the robot arm automatically moves, respectively collecting a first pose and a second pose; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system; based on the first pose and the second pose, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained.
[0120] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot arm calibration method, characterized in that: include: At a plurality of different positions to which the end tool of the robot arm automatically moves, a first pose and a second pose are respectively collected; the first pose is the pose of the coordinate system of the end tool in the visual sensor space, and the second pose is the pose of the flange coordinate system of the robot arm in the robot arm coordinate system; According to the first posture and the second posture, the position of the TCP point of the end tool in the flange coordinate system of the robot arm is obtained; The end tool of the robot arm automatically moves to a plurality of different positions to collect the first pose and the second pose respectively, including: The first posture and the second posture are respectively collected at a plurality of different position points; the different position points are position points to which the marking component automatically moves; the plurality of different position points are within the identifiable range of the visual sensor; Wherein, the marking component is a marking component with its own coordinate system that is fixed at the end tool of the robot arm and can be recognized by a visual sensor, and the origin of the coordinate system of the marking component is the TCP point of the end tool; The obtaining, according to the first posture and the second posture, a position of the TCP point of the end tool in the flange coordinate system of the robot arm includes: According to the second posture and the preset value of the TCP point, the coordinates of the TCP point in the robot arm coordinate system are obtained; Obtaining a first spatial transformation matrix between the robotic arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding first posture; Calculate, according to the first spatial transformation matrix, a registration error between the coordinates of the TCP point at the position point and the coordinates of the TCP point in the robot arm coordinate system obtained by the second posture and the preset value of the TCP point; Based on the least square method, the value of the TCP point is obtained so that the registration error at all the position points is less than a preset error threshold; The value of the TCP point is used as the position value of the TCP point of the end tool in the flange coordinate system.
2. The robot arm calibration method according to claim 1, characterized in that: The obtaining of a first space transformation matrix between the robot arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding second posture includes: Dividing the coordinates of the TCP points at some of the position points and the corresponding coordinates of the origin into a plurality of groups according to a preset number of coordinates, so as to serve as a plurality of groups of registration points; Based on each group of registration points, the first spatial transformation matrix is obtained through spatial registration using the coordinates of the TCP points of the registration points and the coordinates of the corresponding origins.
3. The robot arm calibration method according to claim 1, characterized in that: The method of obtaining the value of the TCP point that makes the registration errors of all the position points smaller than a preset error threshold based on the least squares method includes: Based on the registration error, the value of the TCP point is continuously adjusted and iterated until the obtained value of the TCP point makes the registration errors of all the position points smaller than a preset error threshold.
4. The robot arm calibration method according to claim 1, characterized in that: The marking component with its own coordinate system is a marking plate with its own coordinate system; the direction perpendicular to the marking plate is the z-axis direction of the coordinate system of the end tool.
5. The robot arm calibration method according to claim 4, characterized in that: After obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm, the method further includes: According to the position of the TCP point of the end tool in the flange coordinate system and the second posture, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
6. The robot arm calibration method according to claim 5, characterized in that: The step of obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the position of the TCP point of the end tool in the flange coordinate system and the second posture comprises: Obtaining coordinates of the TCP point of the end tool in the robot arm coordinate system according to the position of the TCP point of the end tool in the flange coordinate system and the second posture; Obtaining a second space transformation matrix between the robot arm and the visual sensor according to the coordinates of the TCP point of the end tool in the robot arm coordinate system and the coordinates of the origin in the first posture; According to the first posture, the second posture and the second space conversion matrix, the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm is obtained.
7. The robot arm calibration method according to claim 6, characterized in that: The step of obtaining the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm according to the first posture, the second posture and the second space transformation matrix includes: Based on each of the position points, according to the first posture, the second posture and the second space transformation matrix, obtain the posture of the coordinate system of the end tool at each of the position points relative to the flange coordinate system of the robot arm; Sum the postures of the coordinate system of the end tool at all the position points relative to the flange coordinate system of the robot arm and calculate the average value; The average value is used as the posture of the coordinate system of the end tool relative to the flange coordinate system of the robot arm.
8. A robot arm calibration device, characterized in that: include: A collection module is used to collect the first pose and the second pose respectively at a plurality of different positions to which the end tool of the robot arm automatically moves; The first posture is the posture of the coordinate system of the end tool in the visual sensor space, and the second posture is the posture of the flange coordinate system of the robot arm in the robot arm coordinate system; A processing module, used for obtaining the position of the TCP point of the end tool in the flange coordinate system of the robot arm according to the first posture and the second posture; The end tool of the robot arm automatically moves to a plurality of different positions to collect the first pose and the second pose respectively, including: The first posture and the second posture are respectively collected at a plurality of different position points; the different position points are position points to which the marking component automatically moves; the plurality of different position points are within the identifiable range of the visual sensor; Wherein, the marking component is a marking component with its own coordinate system that is fixed at the end tool of the robot arm and can be recognized by a visual sensor, and the origin of the coordinate system of the marking component is the TCP point of the end tool; The obtaining, according to the first posture and the second posture, a position of the TCP point of the end tool in the flange coordinate system of the robot arm includes: According to the second posture and the preset value of the TCP point, the coordinates of the TCP point in the robot arm coordinate system are obtained; Obtaining a first spatial transformation matrix between the robotic arm and the visual sensor according to the coordinates of the TCP point and the coordinates of the origin in the corresponding first posture; Calculate, according to the first spatial transformation matrix, a registration error between the coordinates of the TCP point at the position point and the coordinates of the TCP point in the robot arm coordinate system obtained by the second posture and the preset value of the TCP point; Based on the least square method, the value of the TCP point is obtained so that the registration error at all the position points is less than a preset error threshold; The value of the TCP point is used as the position value of the TCP point of the end tool in the flange coordinate system.
