WO2019114631A1 - Method and device for acquiring tcp coordinates of robot - Google Patents

Method and device for acquiring tcp coordinates of robot Download PDF

Info

Publication number
WO2019114631A1
WO2019114631A1 PCT/CN2018/119789 CN2018119789W WO2019114631A1 WO 2019114631 A1 WO2019114631 A1 WO 2019114631A1 CN 2018119789 W CN2018119789 W CN 2018119789W WO 2019114631 A1 WO2019114631 A1 WO 2019114631A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinates
coordinate
tcp
coordinate system
robot arm
Prior art date
Application number
PCT/CN2018/119789
Other languages
French (fr)
Chinese (zh)
Inventor
宫明波
刘达
Original Assignee
北京柏惠维康科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京柏惠维康科技有限公司 filed Critical 北京柏惠维康科技有限公司
Publication of WO2019114631A1 publication Critical patent/WO2019114631A1/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J19/00Accessories fitted to manipulators, e.g. for monitoring, for viewing; Safety devices combined with or specially adapted for use in connection with manipulators
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls

Definitions

  • Embodiments of the present invention relate to the field of artificial intelligence, and in particular, to a method and apparatus for acquiring TCP coordinates of a robot.
  • the coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the arm can be calculated by the DH parameter, and the error is small, how to accurately obtain the tool's own coordinate system origin (Tool Center Point, TCP) in the machine
  • TCP Tool Center Point
  • the coordinates in the arm end coordinate system are the key factors that affect the accuracy of its work.
  • the coordinates of TCP in the end coordinate system of the robot arm can be calculated or measured by the theoretical size of the robot arm end coordinate system in combination with the tool itself, which is called the theoretical coordinate of TCP. That is to say, when the tool is assembled to the end of the robot arm, the theoretical coordinates of TCP can only be used to perform the work task.
  • dimensional errors usually occur during the processing of the tool according to the design drawings. Assembly errors may occur during the assembly of the tool to the end of the robot arm. The tool may be affected by the environment and may also cause deformation errors. The measurement process may also occur. Generate measurement errors, etc. These errors will cause the actual coordinates of TCP in the end coordinate system of the arm to deviate from the theoretical coordinates of TCP. If the TCP is calibrated with the theoretical coordinates of TCP, it will inevitably result in the position of the calibrated TCP. There is an error between the actual TCP positions, which affects the working accuracy of the robot.
  • One of the technical problems solved by the embodiments of the present application is to provide a method and device for acquiring the TCP coordinates of a robot.
  • the theoretical coordinates of the TCP are adjusted multiple times, and The adjustment coordinate that produces the minimum conversion error or the most stable error fluctuation is taken as the actual coordinate of TCP, which reduces the range of errors generated by the robot during the execution of the work task, thereby improving the working precision of the robot.
  • an embodiment of the present application provides a method for acquiring a TCP coordinate of a robot, including:
  • a point on the tool marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of TCP; where k is an integer and k ⁇ 1;
  • the adjustment coordinate TCP k corresponding to the minimum of the k maximum conversion errors and/or the minimum of the k average errors is set as the actual coordinates of the TCP.
  • the robot arm coordinate system and the sensor coordinates are established according to the coordinate transformation relationship between the k coordinate adjustment TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system.
  • k coordinate transformation relationships between systems The steps include:
  • each coordinate transformation relationship is obtained according to the m locations of the marked points within the sensor identification range.
  • the steps of the maximum conversion error in the conversion errors of the m locations include:
  • the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system. Conversion error at each position of m j err j;
  • the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ⁇ 1 , 1 ⁇ j ⁇ m.
  • the step of obtaining the k adjustment coordinates TCP k from the theoretical coordinates of the TCP is: setting the theoretical coordinate of the TCP as the first item, and setting the constant difference to the tolerance series of the tolerance to the k adjustment coordinates TCP k , or ,
  • a point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
  • the embodiment of the present application further provides an apparatus for acquiring a TCP coordinate of a robot, where the apparatus includes:
  • Marking and adjusting the coordinate module a point on the tool for marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of the TCP; wherein k is an integer and k ⁇ 1;
  • a coordinate transformation relationship establishing module is configured to establish a robot arm coordinate according to k coordinate adjustment TCP k and a coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system, and coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationships between the system and the sensor coordinate system
  • a deviation obtaining module configured to obtain each coordinate conversion relationship according to m positions of the marked points within the sensor identification range Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions The average error of the conversion error at the m locations; where m is an integer and m ⁇ 1;
  • the actual coordinate determination module of the TCP is configured to set the adjustment coordinate TCP k corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors to the actual coordinates of the TCP.
  • the coordinate transformation relationship establishing module is specifically configured to:
  • the deviation obtaining module is specifically configured to:
  • the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system. Conversion error at each position of m j err j;
  • the conversion error err j at each position m j gives each coordinate transformation relationship a maximum conversion error among the conversion errors of the m positions; wherein the conversion error err j is a conversion of the coordinate Rm j of the marked point in the robot coordinate system and the coordinate Sm j in the sensor coordinate system to the same
  • the Euclidean distance after the coordinate system, m is an integer and m ⁇ 1,1 ⁇ j ⁇ m.
  • the marking and adjusting coordinate module is specifically configured to:
  • an arithmetic constant with the adjustment constant to the tolerance is set to k adjustment coordinates TCP k , or,
  • a point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
  • the embodiment of the present application further provides a system for acquiring TCP coordinates of a robot, including a memory, a processor, an external communication interface, a bus, and a computer program stored on the memory and operable on the processor.
  • the memory, the processor and the external communication interface are connected by the bus, and the processor executes the computer program to perform the acquisition of the TCP coordinates of the robot according to any one of claims 1 to 4. The steps of the method.
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement claims 1 to 4.
  • the method and device for acquiring the TCP coordinates of the robot, the system and the computer readable storage medium provided by the embodiment of the present application first mark a point on the tool at the end of the robot arm that can be recognized by the sensor as TCP.
  • the marked points are obtained at the robot arm coordinates.
  • the coordinates in the system combined with the coordinates of the marked points in the sensor coordinate system, establish k coordinate transformation relationships between the robot arm coordinate system and the sensor coordinate system, and further move the marked points to m within the sensor recognition range.
  • Position obtain the maximum conversion error and/or average error of the conversion error of each coordinate transformation relationship at m positions, and finally the minimum of the k maximum conversion errors and/or the minimum of k average errors
  • the corresponding adjustment coordinates are set to the actual coordinates of the TCP, which reduces the range of errors that the robot generates when performing tasks. The accuracy of the robot work.
  • FIG. 1 is a flowchart of a method for acquiring a TCP coordinate of a robot according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for acquiring a TCP coordinate of a robot according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a mechanical arm and a sensor according to an embodiment of the present application.
  • the coordinates of the tool's own coordinate system origin (Tool Center Point, TCP) in the end coordinate system of the arm and the actual coordinates of the TCP are calculated or measured by the theoretical coordinate of the robot arm end coordinate system and the tool itself.
  • TCP Tool Center Point
  • the embodiment of the present application provides a method for acquiring the TCP coordinates of the robot. As shown in FIG. 1 , the method includes steps S100-S400, specifically:
  • TCP A point on the tool marking the end of the robot arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of the TCP; wherein k is an integer and k ⁇ 1.
  • the dot is marked as TCP.
  • the marked point can be set as an optical marker point; when the sensor is an electromagnetic sensor, the marked point can be set as an electromagnetic marker point; when the sensor is an ultrasound probe, it can be set The marked points are ultrasonic marking points; when the sensor is an infrared sensor, the marked points can be set as infrared marking points, or other sensors and corresponding marking points.
  • the actual coordinates of the TCP in the robot arm end coordinate system are not determined in step S100. The embodiment of the present application determines the actual coordinates of the TCP according to the marked points.
  • the theoretical coordinates of TCP are calculated by the measuring tool or according to the coarse calibration algorithm, and the calculated theoretical coordinates are adjusted to obtain k adjustment coordinates, where k is an integer and k ⁇ 1. It should be noted that the adjustment coordinate TCP k can be equal to the theoretical coordinate of TCP.
  • an adjustment value can be set, and then based on the theoretical coordinates of TCP, the coordinates of the TCP are adjusted successively according to the adjustment value to obtain TCP k .
  • the theoretical coordinate of TCP is taken as the first item, and the arithmetic constant with the constant is the tolerance is set to k adjustment coordinates TCP k .
  • the theoretical coordinate of TCP can be set to (x, y, z).
  • the tolerance is the adjustment constant d
  • the adjustment coordinate TCP k is: TCP k (x+(k-1)d, y+(k-1)d, z+(k-1)d).
  • the value of k can be taken as 1. If the adjustment coordinate TCP k is not equal to the theoretical coordinate of TCP, k can be a value greater than or equal to 2.
  • the coordinates of the points in the adjustment range are used as the adjustment coordinates TCP k .
  • the coordinates of the partial points within the adjustment range centered on the theoretical coordinates of the TCP can be used.
  • the coordinates of all points are set to k adjustment coordinates TCP k .
  • the coordinate of the partial point in the circular range with the radius of r (r>0) or the coordinates of all the points with the theoretical coordinate of TCP as the center of the circle can be used as the adjustment coordinate TCP k , or The theoretical coordinate of TCP is the center.
  • the coordinates of the partial points in the square range with D (D>0) as the side length or the coordinates of all the points are used as the adjustment coordinates TCP k . It is also possible to center on the theoretical coordinate of TCP.
  • the coordinates of the partial points in the range of the irregular pattern or the coordinates of all the points are used as the adjustment coordinates TCP k , and may not be centered on the theoretical coordinates of the TCP, but will be bounded by the theoretical coordinates of the TCP, on the tool at the end of the arm.
  • the other points are the coordinates of the partial points in the graphic range of the center or the coordinates of all the points as the adjustment coordinate TCP k , which is not specifically limited here, as long as k adjustment coordinates TCP k can be obtained by the theoretical coordinates of TCP, it is necessary to explain In this adjustment mode, the adjustment coordinate TCP k can also be equal to the theoretical coordinate of TCP.
  • the adjustment coordinate TCP k can also be obtained by random adjustment.
  • the manner in which the coordinate TCP k is adjusted is various, and the present application will not be described in detail herein.
  • the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system may be firstly obtained according to the movement of the marked point (ie, TCP in S100) within the sensor recognition range.
  • At least three non-collinear spatial reference points and then combined with k adjustment coordinates TCP k according to the coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system corresponding to the position of each of the spatial reference points Obtaining k coordinates of each of the spatial reference points in the robot arm coordinate system; finally, k coordinates in the robot arm coordinate system according to each of the spatial reference points, and each spatial reference point in the sensor coordinate system
  • the coordinate in the middle, the k coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system is obtained.
  • the moving point of the robot arm can be used to move the marked point on the tool at the end of the arm to at least three non-collinear positions, and at least a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system can be obtained.
  • the coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the robot arm can be calculated by the DH parameter.
  • the coordinate system between the end of the arm and the coordinate system of the arm is obtained.
  • the coordinate conversion relationship, combined with the k adjustment coordinates TCP k can obtain k coordinates of the marked point in the robot arm coordinate system; in the embodiment of the present application, the marked point is recorded as TCP and is marked by The position of the point in the real space to obtain the spatial reference point, so the coordinates of the marked point in the robot arm coordinate system can be used as the coordinates of the spatial reference point in the robot arm coordinate system, and since the marked point moves to At least three non-collinear positions obtain at least three non-collinear spatial reference points, and at least three non-zero can be obtained by using the obtained k-coordinates of the marked points in the robot arm coordinate system.
  • the k coordinate of each of the spatial reference points in the collinear spatial reference point in the robot arm coordinate system can obtain k coordinates of the marked point in the robot arm coordinate system; in the embodiment of the present application, the marked point is recorded as TCP and is marked by The position of the point in the real space to obtain the spatial reference point, so the coordinates of the marked point in the
  • the coordinates of each of the at least three non-collinear spatial reference points in the sensor coordinate system can be obtained, and then the mechanical reference point is in the mechanical
  • the k coordinate transformations between the arm coordinate system and the sensor coordinate system can be obtained from the k coordinates in the arm coordinate system and the coordinates of each spatial reference point in the sensor coordinate system.
  • the robot arm When the mobile robot arm obtains three non-collinear spatial reference points, the robot arm is in three poses of position 1, position 2, and position 3.
  • the DH parameter can be used to obtain the coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the arm when the current arm is in the pose 1, and the origin of the end coordinate of the arm is in the machine.
  • the coordinate p1 in the arm coordinate system can be used to obtain the coordinate t1 of TCP in the end coordinate system of the robot arm through the machining drawing of the tool. Therefore, the coordinates of the current TCP in the robot arm coordinate system are represented by p1+t1 (note that The coordinates of the current TCP in the robot arm coordinate system are not the sum of the coordinates of p1 and the coordinates of t1.
  • p1+t1 is used to present the current TCP when the arm is in pose 1.
  • the coordinates in the robot arm coordinate system are explained, as in the similar description below, so that the coordinates p1+t1 of the point marked by the manipulator in the pose 1 in the robot arm coordinate system can be obtained.
  • By identifying the marked point by the sensor it is also possible to obtain the coordinate s1 of the point marked by the robot arm in the pose 1 in the sensor coordinate system.
  • the DH parameter can be used to obtain the coordinate conversion relationship between the arm end coordinate system and the arm coordinate system when the current arm is in the pose 2, and the origin of the arm end coordinate system is in the machine.
  • the coordinate p2 in the arm coordinate system because the obtained TCP coordinates t1 in the end coordinate system of the arm, the coordinates of the current TCP in the robot arm coordinate system are represented by p2+t1, that is, the robot arm is in the posture.
  • the point marked at 2 o'clock is the coordinate p2+t1 in the robot arm coordinate system.
  • the DH parameter can be used to obtain the coordinate conversion relationship between the arm end coordinate system and the arm coordinate system when the current arm is in the pose 3, and the origin of the arm end coordinate system is in the machine.
  • the point marked in pose 3 is the coordinate p3+t1 in the robot coordinate system.
  • p1+t1 and s1, p2+t1 and s2, p3+t1 and s3 can be utilized, that is, the coordinates of the three non-collinear spatial reference points in the robot arm coordinate system and the sensor coordinate system are respectively used.
  • the coordinates below establish the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system
  • p1+t2 and s1, p2+t2 and s2, p3+t2 and s3 can be utilized, that is, the coordinates of the three non-collinear spatial reference points in the robot arm coordinate system and the sensor coordinate system are respectively used.
  • the coordinates below establish the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system
  • k coordinate transformation relationships between the robot arm coordinate system and the sensor coordinate system can be obtained. It should be noted that when the adjusted coordinate of TCP is not equal to the theoretical coordinate of TCP, the coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system may be calculated without using the theoretical coordinate of TCP; when the adjusted coordinate of TCP can be equal to TCP In theoretical coordinates, the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system can be calculated using the theoretical coordinates of TCP.
  • each coordinate transformation relationship is obtained.
  • the steps of the maximum conversion error in the conversion errors of the m locations are:
  • the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system. Conversion error at each position of m j err j;
  • the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ⁇ 1 , 1 ⁇ j ⁇ m.
  • the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system. Conversion error at each position of m j err j;
  • the marked point moves to 10 positions within the sensor's identification range, ie m equals 10.
  • TCP 1 the corresponding coordinate conversion relationship is
  • the robot arm coordinates Rm j of the marked points at the 10 positions can be obtained by the conversion relationship of the joints of the robot arm, and the marked points and the movement of the marked points can be recognized by the sensor to obtain the marked Point the sensor coordinates Sm j at these 10 positions, where 1 ⁇ j ⁇ 10.
  • the maximum conversion error can be selected as err Max_1
  • the average error of the conversion errors at these 10 positions can be calculated as err aver_1 .
  • the conversion error of these 10 same positions can be obtained. or From these 10 conversion errors, the largest conversion error can be selected as err Max_2 , and the average error of the conversion errors at these 10 positions can be calculated as err aver_2 .
  • a movement program may be set for the robot arm, so that the robot arm automatically moves to m positions within the sensor recognition range, and the number of movements, the movement path, and the movement distance can be Implemented using existing methods, and is looking for each coordinate transformation relationship In the case of conversion errors at m positions, the same m positions are utilized.
  • each coordinate conversion relationship is obtained except for m positions within the sensor identification range according to the marked points.
  • each coordinate conversion relationship obtained according to the m positions within the sensor identification range of the marked points may be obtained.
  • the standard deviation of the conversion errors at the m positions is used as a reference for setting the actual coordinates of the TCP, or both the obtained average error and the standard deviation are used as references for setting the actual coordinates of the TCP.
  • TCP 1 , TCP 2 and TCP 3 there are still three adjustment coordinates TCP 1 , TCP 2 and TCP 3 as an example. Specifically, since three maximum conversion errors err Max_1 , err Max_2 , err Max_3 have been obtained, one of the three maximum conversion errors is selected.
  • the minimum value if err Max_1 is the minimum value, set the TCP adjustment coordinate TCP 1 corresponding to err Max_1 to the actual coordinate of TCP; if err Max_2 is the minimum value, set the TCP adjustment coordinate TCP 2 corresponding to err Max_2 to The actual coordinate of TCP; if err Max_3 is the minimum value, the adjusted coordinate TCP 3 of TCP corresponding to err Max_3 is set to the actual coordinate of TCP.
  • a minimum value is selected from the three average errors err aver_1 , err aver_2 , err aver_3 that have been obtained, and the adjusted coordinate TCP k of the TCP corresponding to the minimum value of the average error is set as the actual coordinate of the TCP.
  • TCP adjustment coordinate TCP 1 corresponding to err Max_1 and err aver_1 is taken as the actual coordinate of TCP.
  • the adjustment coordinate TCP k corresponding to the minimum value of k standard deviations may be set as the actual coordinates of the TCP; the average error and standard to be obtained When the difference is used as a reference for setting the actual coordinates of the TCP, the adjustment coordinate TCP k corresponding to the minimum value of the obtained average error and/or the minimum value of the standard deviation may be set as the actual coordinate of the TCP, or when the plurality of adjustment coordinates are TCP When the average error of k is the same, the adjustment coordinate corresponding to the minimum value of the standard deviation is taken as the actual coordinate of TCP.
  • TCP 1 , TCP 2 , TCP 3 ... TCP 10 are obtained according to the theoretical coordinates of TCP 10 adjustment coordinates, and the average error of the 10 adjustment coordinates are the same, and the standard deviation of the conversion error corresponding to TCP 3 is the smallest, then TCP 3 is set as the actual coordinate of TCP.
  • a point on the tool at the end of the robot arm that can be recognized by the sensor is marked as TCP.
  • the theoretical coordinate of the TCP can be obtained by the design drawing of the tool combined with the coordinate system of the end of the arm, but the TCP The actual coordinates are not determined.
  • k adjustment coordinates are obtained by adjusting the theoretical coordinates of TCP, and k adjustment coordinates and the coordinate system between the end of the arm and the coordinate system of the robot arm are used.
  • Coordinate transformation relationship obtain the coordinates of the marked point in the robot arm coordinate system, and combine the coordinates of the marked point in the sensor coordinate system to establish k coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system, further By moving the marked points to m positions within the sensor recognition range, the maximum conversion error and/or the average error of the conversion errors of each coordinate transformation relationship at m positions are obtained, that is, each adjustment coordinate is obtained through the coordinate conversion relationship.
  • the maximum range of errors between the converted arm coordinates and the corresponding sensor coordinates and/or the level of error The average level, and finally the adjustment coordinate corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors is set as the actual coordinate of the TCP, thereby reducing the range of errors generated by the robot when performing the task, and improving The working precision of the robot.
  • the embodiment of the present application further provides an apparatus for acquiring TCP coordinates of a robot, including:
  • the marking and adjusting coordinate module 201 is configured to mark a point on the tool end of the robot arm that can be recognized by the sensor as TCP, and obtain k adjustment coordinates TCP k from the theoretical coordinates of the TCP; wherein k is an integer and k ⁇ 1;
  • the coordinate transformation relationship establishing module 202 is configured to establish a mechanical arm according to the coordinate transformation relationship between the k coordinate adjustment TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system.
  • k coordinate transformation relationship between coordinate system and sensor coordinate system is configured to establish a mechanical arm according to the coordinate transformation relationship between the k coordinate adjustment TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system.
  • the deviation obtaining module 203 is configured to obtain each coordinate transformation relationship according to the m positions in the sensor identification range of the marked points. Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions The average error of the conversion error at the m locations; where m is an integer and m ⁇ 1;
  • the actual coordinate determination module 204 of the TCP is configured to set the adjustment coordinate TCP k corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors to the actual coordinates of the TCP.
  • the marking and adjusting coordinate module 201, the coordinate conversion relationship establishing module 202, the deviation obtaining module 203, and the actual coordinate determining module 204 of the TCP may perform corresponding preferred steps in the foregoing method embodiments.
  • the coordinate transformation relationship establishing module 202 is specifically configured to:
  • each of the spatial reference points is obtained on the robot arm k coordinates in the coordinate system;
  • the deviation obtaining module 203 is specifically configured to:
  • the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system. Conversion error at each position of m j err j;
  • the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ⁇ 1 , 1 ⁇ j ⁇ m.
  • the marking and adjusting coordinate module 201 is specifically configured to:
  • an arithmetic constant with the adjustment constant to the tolerance is set to k adjustment coordinates TCP k , or,
  • a point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
  • the embodiment of the present application further provides a system for acquiring TCP coordinates of a robot, including a memory, a processor, an external communication interface, a bus, and being stored on the memory and operable on the processor. a computer program, wherein the memory, the processor and the external communication interface are connected by the bus, and when the processor runs the computer program, the step of implementing the method for acquiring the TCP coordinates of the robot in the above method embodiment is performed .
  • the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the method is obtained in the foregoing method embodiment.
  • the steps of the method of robot TCP coordinates.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of cells is only a logical function division.
  • multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be processed separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, and the program code can be stored. Medium.

Abstract

An embodiment of the present application provides a method for acquiring TCP coordinates of a robot, comprising the following steps: marking a point, which can be recognized by a sensor, on a tool at an end of a robot arm as a TCP, and obtaining k adjustment coordinates from the theoretical coordinates of the TCP; utilizing the coordinates of the marked point in a robot arm coordinate system and in a sensor coordinate system to establish k coordinate conversion relationships between the robot arm coordinate system and the sensor coordinate system; in accordance with m positions, in a sensor recognition range, of the marked point, obtaining the maximum conversion error in the conversion errors of each coordinate conversion relationship at the m positions and/or the average error of the conversion errors of each coordinate conversion relationship at the m positions; and setting the adjustment coordinates corresponding to the minimum of the obtained k maximum conversion errors and/or the minimum of k average errors as the actual coordinates of the TCP. Said method reduces the range of error generated during the operation task of the robot, improving the operation precision of the robot.

Description

一种获取机器人TCP坐标的方法和装置Method and device for acquiring robot TCP coordinates 技术领域Technical field
本发明实施例涉及人工智能领域,尤其涉及一种获取机器人TCP坐标的方法和装置。Embodiments of the present invention relate to the field of artificial intelligence, and in particular, to a method and apparatus for acquiring TCP coordinates of a robot.
背景技术Background technique
随着科技的发展,机器人的应用领域越来越广泛。对于高精度加工领域和手术领域这两个应用领域中的机器人来说,其需要完成的工作任务对精度有很高的要求。With the development of technology, the field of application of robots has become more and more extensive. For the robots in the two application fields of high-precision machining and surgery, the tasks that need to be completed have high requirements for precision.
一般来说,高精度加工机器人和手术机器人在执行工作任务时,均需要在其自身机械臂上加装工具才能完成相关工作。由于机械臂末端坐标系与机械臂坐标系之间的坐标转换关系可以通过DH参数计算得出,其中的误差很小,那么,如何准确得到工具自身坐标系原点(Tool Center Point,TCP)在机械臂末端坐标系中的坐标是影响其工作精度的关键因素。目前,TCP在机械臂末端坐标系中的坐标可以通过机械臂末端坐标系结合工具自身的理论尺寸计算或测量得到,其称作TCP的理论坐标。也就是说,当工具装配到机械臂末端后,只能利用TCP的理论坐标来执行工作任务。In general, high-precision machining robots and surgical robots need to add tools to their own robotic arms to perform related tasks when performing work tasks. Since the coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the arm can be calculated by the DH parameter, and the error is small, how to accurately obtain the tool's own coordinate system origin (Tool Center Point, TCP) in the machine The coordinates in the arm end coordinate system are the key factors that affect the accuracy of its work. At present, the coordinates of TCP in the end coordinate system of the robot arm can be calculated or measured by the theoretical size of the robot arm end coordinate system in combination with the tool itself, which is called the theoretical coordinate of TCP. That is to say, when the tool is assembled to the end of the robot arm, the theoretical coordinates of TCP can only be used to perform the work task.
但是在根据设计图纸对工具进行加工的过程中一般会产生尺寸误差,将工具装配到机械臂末端的过程中可能会产生装配误差,工具受环境的影响也可能产生形变误差,测量过程中也可能产生测量误差等,这些误差均会使TCP在机械臂末端坐标系中的实际坐标与TCP的理论坐标 产生偏差,若以TCP的理论坐标对TCP进行标定,那么必然造成所标定的TCP的位置和实际的TCP位置之间产生误差,从而影响机器人的工作精度。However, dimensional errors usually occur during the processing of the tool according to the design drawings. Assembly errors may occur during the assembly of the tool to the end of the robot arm. The tool may be affected by the environment and may also cause deformation errors. The measurement process may also occur. Generate measurement errors, etc. These errors will cause the actual coordinates of TCP in the end coordinate system of the arm to deviate from the theoretical coordinates of TCP. If the TCP is calibrated with the theoretical coordinates of TCP, it will inevitably result in the position of the calibrated TCP. There is an error between the actual TCP positions, which affects the working accuracy of the robot.
发明内容Summary of the invention
本申请实施例解决的技术问题之一在于提供一种获取机器人TCP坐标的方法和装置,在测量或计算TCP在机械臂末端坐标系中的坐标时,对TCP的理论坐标进行多次调整,并将产生最小转换误差或者产生的误差波动最稳定的调整坐标作为TCP的实际坐标,缩小了机器人在执行工作任务过程中产生误差的范围,进而提高了机器人的工作精度。One of the technical problems solved by the embodiments of the present application is to provide a method and device for acquiring the TCP coordinates of a robot. When measuring or calculating the coordinates of the TCP in the coordinate system of the end of the arm, the theoretical coordinates of the TCP are adjusted multiple times, and The adjustment coordinate that produces the minimum conversion error or the most stable error fluctuation is taken as the actual coordinate of TCP, which reduces the range of errors generated by the robot during the execution of the work task, thereby improving the working precision of the robot.
第一方面,本申请实施例提供了一种获取机器人TCP坐标的方法,包括:In a first aspect, an embodiment of the present application provides a method for acquiring a TCP coordinate of a robot, including:
标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1; A point on the tool marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of TCP; where k is an integer and k ≧ 1;
根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000001
According to the k coordinate adjustment TCP k and the coordinate transformation relationship between the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system, the relationship between the robot arm coordinate system and the sensor coordinate system is established. k coordinate transformation relationships
Figure PCTCN2018119789-appb-000001
根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000002
在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
Figure PCTCN2018119789-appb-000003
在所述m个位置的转换误差的平均误差;其中m为整数且m≧1;
Obtaining each coordinate transformation relationship according to the m positions in the identified range of the marked points
Figure PCTCN2018119789-appb-000002
Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
Figure PCTCN2018119789-appb-000003
The average error of the conversion error at the m locations; where m is an integer and m ≧ 1;
将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 The adjustment coordinate TCP k corresponding to the minimum of the k maximum conversion errors and/or the minimum of the k average errors is set as the actual coordinates of the TCP.
可选地,根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000004
的步骤包括:
Optionally, the robot arm coordinate system and the sensor coordinates are established according to the coordinate transformation relationship between the k coordinate adjustment TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationships between systems
Figure PCTCN2018119789-appb-000004
The steps include:
根据所标记的点在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点;Obtaining at least three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system according to the movement of the marked point within the sensor recognition range;
将每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合,得到每个所述空间参考点在机械臂坐标系中的k个坐标; Converting a coordinate relationship between a robot arm end coordinate system corresponding to a position of each of the spatial reference points and a robot arm coordinate system, and combining with k adjustment coordinates TCP k to obtain each of the spatial reference points on the robot arm k coordinates in the coordinate system;
根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个所述空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000005
Obtaining k coordinates between the robot arm coordinate system and the sensor coordinate system according to k coordinates of each of the spatial reference points in the robot arm coordinate system and coordinates of each of the spatial reference points in the sensor coordinate system Conversion relationship
Figure PCTCN2018119789-appb-000005
可选地,根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000006
在所述m个位置的转换误差中的最大转换误差的步骤包括:
Optionally, each coordinate transformation relationship is obtained according to the m locations of the marked points within the sensor identification range.
Figure PCTCN2018119789-appb-000006
The steps of the maximum conversion error in the conversion errors of the m locations include:
根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
Figure PCTCN2018119789-appb-000007
在每个 位置m j下的转换误差err j
According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
Figure PCTCN2018119789-appb-000007
Conversion error at each position of m j err j;
根据坐标转换关系
Figure PCTCN2018119789-appb-000008
在每个位置m j下的转换误差err j,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000009
在所述m个位置的转换误差中的最大转换误差;
Conversion relationship according to coordinates
Figure PCTCN2018119789-appb-000008
The conversion error err j at each position m j gives each coordinate transformation relationship
Figure PCTCN2018119789-appb-000009
The maximum conversion error in the conversion errors of the m locations;
其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m≧1,1≦j≦m。 Wherein, the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ≧ 1 , 1≦j≦m.
可选地,所述由TCP的理论坐标得到k个调整坐标TCP k的步骤为:将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,或者, Optionally, the step of obtaining the k adjustment coordinates TCP k from the theoretical coordinates of the TCP is: setting the theoretical coordinate of the TCP as the first item, and setting the constant difference to the tolerance series of the tolerance to the k adjustment coordinates TCP k , or ,
将以TCP的理论坐标为中心的坐标范围内的点设置为k个调整坐标TCP kA point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
第二方面,本申请实施例还提供了一种获取机器人TCP坐标的装置,所述装置包括:In a second aspect, the embodiment of the present application further provides an apparatus for acquiring a TCP coordinate of a robot, where the apparatus includes:
标记和调整坐标模块,用于标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1; Marking and adjusting the coordinate module, a point on the tool for marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of the TCP; wherein k is an integer and k ≧ 1;
坐标转换关系建立模块,用于根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转 换关系
Figure PCTCN2018119789-appb-000010
A coordinate transformation relationship establishing module is configured to establish a robot arm coordinate according to k coordinate adjustment TCP k and a coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system, and coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationships between the system and the sensor coordinate system
Figure PCTCN2018119789-appb-000010
偏差获取模块,用于根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000011
在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
Figure PCTCN2018119789-appb-000012
在所述m个位置的转换误差的平均误差;其中m为整数且m≧1;
a deviation obtaining module, configured to obtain each coordinate conversion relationship according to m positions of the marked points within the sensor identification range
Figure PCTCN2018119789-appb-000011
Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
Figure PCTCN2018119789-appb-000012
The average error of the conversion error at the m locations; where m is an integer and m ≧ 1;
TCP的实际坐标确定模块,用于将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 The actual coordinate determination module of the TCP is configured to set the adjustment coordinate TCP k corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors to the actual coordinates of the TCP.
可选地,所述坐标转换关系建立模块具体用于:Optionally, the coordinate transformation relationship establishing module is specifically configured to:
根据所标记的点在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点;Obtaining at least three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system according to the movement of the marked point within the sensor recognition range;
将每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合,得到每个所述空间参考点在机械臂坐标系中的k个坐标; Converting a coordinate relationship between a robot arm end coordinate system corresponding to a position of each of the spatial reference points and a robot arm coordinate system, and combining with k adjustment coordinates TCP k to obtain each of the spatial reference points on the robot arm k coordinates in the coordinate system;
根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个所述空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000013
可选地,所述偏差获取模块具体用于:
Obtaining k coordinates between the robot arm coordinate system and the sensor coordinate system according to k coordinates of each of the spatial reference points in the robot arm coordinate system and coordinates of each of the spatial reference points in the sensor coordinate system Conversion relationship
Figure PCTCN2018119789-appb-000013
Optionally, the deviation obtaining module is specifically configured to:
根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标 Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
Figure PCTCN2018119789-appb-000014
在每个位置m j下的转换误差err j
According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
Figure PCTCN2018119789-appb-000014
Conversion error at each position of m j err j;
根据坐标转换关系
Figure PCTCN2018119789-appb-000015
在每个位置m j下的转换误差err j,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000016
在所述m个位置的转换误差中的最大转换误差;其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m≧1,1≦j≦m。
Conversion relationship according to coordinates
Figure PCTCN2018119789-appb-000015
The conversion error err j at each position m j gives each coordinate transformation relationship
Figure PCTCN2018119789-appb-000016
a maximum conversion error among the conversion errors of the m positions; wherein the conversion error err j is a conversion of the coordinate Rm j of the marked point in the robot coordinate system and the coordinate Sm j in the sensor coordinate system to the same The Euclidean distance after the coordinate system, m is an integer and m≧1,1≦j≦m.
可选地,所述标记和调整坐标模块具体用于:Optionally, the marking and adjusting coordinate module is specifically configured to:
将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,或者, Taking the theoretical coordinate of TCP as the first item, an arithmetic constant with the adjustment constant to the tolerance is set to k adjustment coordinates TCP k , or,
将以TCP的理论坐标为中心的坐标范围内的点设置为k个调整坐标TCP kA point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
第三方面,本申请实施例还提供了一种获取机器人TCP坐标的系统,包括存储器,处理器,外部通信接口,总线以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述存储器,所述处理器和所述外部通信接口通过所述总线连接,所述处理器运行所述计算机程序时执行实现权利要求1至4任一项所述获取机器人TCP坐标的方法的步骤。In a third aspect, the embodiment of the present application further provides a system for acquiring TCP coordinates of a robot, including a memory, a processor, an external communication interface, a bus, and a computer program stored on the memory and operable on the processor. The memory, the processor and the external communication interface are connected by the bus, and the processor executes the computer program to perform the acquisition of the TCP coordinates of the robot according to any one of claims 1 to 4. The steps of the method.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述 计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至4任一项所述获取机器人TCP坐标的方法的步骤。In a fourth aspect, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement claims 1 to 4. The step of the method of acquiring the TCP coordinates of the robot.
由以上技术方案可见,本申请实施例提供的一种获取机器人TCP坐标的方法和装置,系统以及计算机可读存储介质,首先将机械臂末端的工具上能够被传感器识别到的一个点标记为TCP,通过对计算得到的TCP的理论坐标进行调整得到k个调整坐标,并利用k个调整坐标和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系得到所标记的点在机械臂坐标系中的坐标,结合所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系,进一步通过在传感器识别范围内移动所标记的点到m个位置,得到每个坐标转换关系在m个位置的转换误差的最大转换误差和/或平均误差,最后将得到的k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标设置为TCP的实际坐标,缩小了机器人在执行任务时产生误差的范围,提高了机器人的工作精度。It can be seen from the above technical solution that the method and device for acquiring the TCP coordinates of the robot, the system and the computer readable storage medium provided by the embodiment of the present application first mark a point on the tool at the end of the robot arm that can be recognized by the sensor as TCP. By adjusting the theoretical coordinates of the calculated TCP to obtain k adjustment coordinates, and using k coordinate adjustment coordinates and the coordinate transformation relationship between the robot arm end coordinate system and the robot arm coordinate system, the marked points are obtained at the robot arm coordinates. The coordinates in the system, combined with the coordinates of the marked points in the sensor coordinate system, establish k coordinate transformation relationships between the robot arm coordinate system and the sensor coordinate system, and further move the marked points to m within the sensor recognition range. Position, obtain the maximum conversion error and/or average error of the conversion error of each coordinate transformation relationship at m positions, and finally the minimum of the k maximum conversion errors and/or the minimum of k average errors The corresponding adjustment coordinates are set to the actual coordinates of the TCP, which reduces the range of errors that the robot generates when performing tasks. The accuracy of the robot work.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a few embodiments described in the embodiments of the present invention, and other drawings can be obtained according to the drawings for those skilled in the art.
图1为本申请实施例提供的获取机器人TCP坐标的方法步骤流程图;FIG. 1 is a flowchart of a method for acquiring a TCP coordinate of a robot according to an embodiment of the present application;
图2为本申请实施例提供的获取机器人TCP坐标的装置结构示意 图;2 is a schematic structural diagram of an apparatus for acquiring a TCP coordinate of a robot according to an embodiment of the present application;
图3为本申请实施例提供的机械臂和传感器的示意图。FIG. 3 is a schematic diagram of a mechanical arm and a sensor according to an embodiment of the present application.
具体实施方式Detailed ways
当然,实施本发明实施例的任一技术方案不一定需要同时达到以上的所有优点。Of course, implementing any of the technical solutions of the embodiments of the present invention does not necessarily require all the above advantages to be achieved at the same time.
为了使本领域的人员更好地理解本发明实施例中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明实施例一部分实施例,而不是全部的实施例。基于本发明实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本发明实施例保护的范围。For a better understanding of the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments are only a part of the embodiments of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art should be within the scope of protection of the embodiments of the present invention based on the embodiments in the embodiments of the present invention.
针对已有技术中,利用机械臂末端坐标系结合工具自身的理论尺寸计算或者测量得到的工具自身坐标系原点(Tool Center Point,TCP)在机械臂末端坐标系中的坐标与TCP的实际坐标之间可能存在较大误差的问题,本申请实施例提供了一种获取机器人TCP坐标的方法,如图1所示,包括步骤S100-S400,具体地:For the prior art, the coordinates of the tool's own coordinate system origin (Tool Center Point, TCP) in the end coordinate system of the arm and the actual coordinates of the TCP are calculated or measured by the theoretical coordinate of the robot arm end coordinate system and the tool itself. There may be a problem that a large error may occur. The embodiment of the present application provides a method for acquiring the TCP coordinates of the robot. As shown in FIG. 1 , the method includes steps S100-S400, specifically:
S100:标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1。 S100: A point on the tool marking the end of the robot arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of the TCP; wherein k is an integer and k ≧ 1.
在实际操作过程中,在机器人末端的工具上找到一个可被传感器识别到的点,或者从机械臂末端的工具上很多可被传感器识别到的点中选择一个点,并将找到或者选择的这个点标记为TCP。需要说明的是,当传感器为摄像头时,可以将所标记的点设置为光学标记点;当传感器为电磁传感器时,可设置所标记的点为电磁标记点;当传感器为超声探头 时,可设置所标记的点为超声标记点;当传感器为红外传感器时,可设置所标记的点为红外标记点,亦或是其他传感器及相应的标记点。且这里TCP在机械臂末端坐标系中的实际坐标在步骤S100中并没有确定,本申请实施例根据该所标记的点来确定TCP的实际坐标。In the actual operation, find a point on the tool at the end of the robot that can be recognized by the sensor, or select a point from the points on the tool at the end of the arm that can be recognized by the sensor, and will find or select this The dot is marked as TCP. It should be noted that when the sensor is a camera, the marked point can be set as an optical marker point; when the sensor is an electromagnetic sensor, the marked point can be set as an electromagnetic marker point; when the sensor is an ultrasound probe, it can be set The marked points are ultrasonic marking points; when the sensor is an infrared sensor, the marked points can be set as infrared marking points, or other sensors and corresponding marking points. The actual coordinates of the TCP in the robot arm end coordinate system are not determined in step S100. The embodiment of the present application determines the actual coordinates of the TCP according to the marked points.
根据工具自身的理论尺寸和机械臂末端坐标系,利用测量工具或者根据粗标定算法计算出TCP的理论坐标,并对计算出的理论坐标进行调整,得到k个调整坐标,其中k为整数且k≧1。需要说明的是,调整坐标TCP k可以等于TCP的理论坐标。 According to the theoretical size of the tool itself and the end coordinate system of the arm, the theoretical coordinates of TCP are calculated by the measuring tool or according to the coarse calibration algorithm, and the calculated theoretical coordinates are adjusted to obtain k adjustment coordinates, where k is an integer and k ≧1. It should be noted that the adjustment coordinate TCP k can be equal to the theoretical coordinate of TCP.
在实际操作过程中,由TCP的理论坐标调整得到k个调整坐标的方式可以有多种,这里具体说明两种调整方式。In the actual operation process, there are various ways to obtain k adjustment coordinates by adjusting the theoretical coordinates of TCP. Here, two adjustment methods are specifically described.
一方面,可以设置一个调整数值,然后以TCP的理论坐标为基础,逐次按照该调整数值对TCP的坐标进行调整得到TCP k。具体地,将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,在实际操作过程中,可以设置TCP的理论坐标为(x,y,z),公差为调整常量d,则调整坐标TCP k为:TCP k(x+(k-1)d,y+(k-1)d,z+(k-1)d)。 On the one hand, an adjustment value can be set, and then based on the theoretical coordinates of TCP, the coordinates of the TCP are adjusted successively according to the adjustment value to obtain TCP k . Specifically, the theoretical coordinate of TCP is taken as the first item, and the arithmetic constant with the constant is the tolerance is set to k adjustment coordinates TCP k . In the actual operation, the theoretical coordinate of TCP can be set to (x, y, z). The tolerance is the adjustment constant d, then the adjustment coordinate TCP k is: TCP k (x+(k-1)d, y+(k-1)d, z+(k-1)d).
若要使得调整坐标TCP k等于TCP的理论坐标,可以将k的值取1,若要使得调整坐标TCP k不等于TCP的理论坐标,可以将k取大于等于2的数值。 To make the adjustment coordinate TCP k equal to the theoretical coordinate of TCP, the value of k can be taken as 1. If the adjustment coordinate TCP k is not equal to the theoretical coordinate of TCP, k can be a value greater than or equal to 2.
另一方面,也可以限定一个坐标值的调整范围,将这个调整范围内的点的坐标作为调整坐标TCP k,具体地,可以将以TCP的理论坐标为中心的调整范围内的部分点的坐标或者所有点的坐标设置为k个调整坐标 TCP k。在实际操作过程中,可以将以TCP的理论坐标为圆心,以r(r>0)为半径的圆形范围内的部分点的坐标或者所有点的坐标作为调整坐标TCP k,也可以将以TCP的理论坐标为中心,以D(D>0)为边长的正方形范围内的部分点的坐标或者所有点的坐标作为调整坐标TCP k,也可以将以TCP的理论坐标为中心,某一不规则图形范围内的部分点的坐标或者所有点的坐标作为调整坐标TCP k,也可以不以TCP的理论坐标为中心,而是将以TCP的理论坐标为边界,以机械臂末端的工具上其他的点为中心的图形范围内的部分点的坐标或者所有点的坐标作为调整坐标TCP k,此处不作具体限定,只要能够通过TCP的理论坐标得到k个调整坐标TCP k即可,需要说明的是,在该调整方式下,调整坐标TCP k同样可以等于TCP的理论坐标。 On the other hand, it is also possible to define an adjustment range of coordinate values, and the coordinates of the points in the adjustment range are used as the adjustment coordinates TCP k . Specifically, the coordinates of the partial points within the adjustment range centered on the theoretical coordinates of the TCP can be used. Or the coordinates of all points are set to k adjustment coordinates TCP k . In the actual operation process, the coordinate of the partial point in the circular range with the radius of r (r>0) or the coordinates of all the points with the theoretical coordinate of TCP as the center of the circle can be used as the adjustment coordinate TCP k , or The theoretical coordinate of TCP is the center. The coordinates of the partial points in the square range with D (D>0) as the side length or the coordinates of all the points are used as the adjustment coordinates TCP k . It is also possible to center on the theoretical coordinate of TCP. The coordinates of the partial points in the range of the irregular pattern or the coordinates of all the points are used as the adjustment coordinates TCP k , and may not be centered on the theoretical coordinates of the TCP, but will be bounded by the theoretical coordinates of the TCP, on the tool at the end of the arm. The other points are the coordinates of the partial points in the graphic range of the center or the coordinates of all the points as the adjustment coordinate TCP k , which is not specifically limited here, as long as k adjustment coordinates TCP k can be obtained by the theoretical coordinates of TCP, it is necessary to explain In this adjustment mode, the adjustment coordinate TCP k can also be equal to the theoretical coordinate of TCP.
除了上述两种调整方式,还可以通过随机调整得到调整坐标TCP k。总而言之,得到调整坐标TCP k的方式多种多样,本申请在此不再做详细介绍。 In addition to the above two adjustment methods, the adjustment coordinate TCP k can also be obtained by random adjustment. In summary, the manner in which the coordinate TCP k is adjusted is various, and the present application will not be described in detail herein.
S200:根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000017
S200: establishing a robot arm coordinate system and a sensor coordinate system according to k coordinate adjustment coordinates TCP k and a coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system, and coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationship
Figure PCTCN2018119789-appb-000017
利用同一点在两个坐标系中的坐标来建立两个坐标系之间的坐标转换关系的方式很多,下面介绍一种优选的方案。There are many ways to establish the coordinate transformation relationship between two coordinate systems by using the coordinates of the same point in two coordinate systems. A preferred solution is described below.
在实际操作中,执行步骤S200时,可以首先根据所标记的点(即S100中的TCP)在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点; 然后根据每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合,得到每个所述空间参考点在机械臂坐标系中的k个坐标;最后根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000018
In actual operation, when step S200 is performed, the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system may be firstly obtained according to the movement of the marked point (ie, TCP in S100) within the sensor recognition range. At least three non-collinear spatial reference points; and then combined with k adjustment coordinates TCP k according to the coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system corresponding to the position of each of the spatial reference points Obtaining k coordinates of each of the spatial reference points in the robot arm coordinate system; finally, k coordinates in the robot arm coordinate system according to each of the spatial reference points, and each spatial reference point in the sensor coordinate system The coordinate in the middle, the k coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system is obtained.
Figure PCTCN2018119789-appb-000018
具体地,可以通过移动机械臂来带动机械臂末端的工具上所标记的点移动到至少三个非共线的位置,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点。Specifically, the moving point of the robot arm can be used to move the marked point on the tool at the end of the arm to at least three non-collinear positions, and at least a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system can be obtained. Three non-collinear spatial reference points.
机械臂末端坐标系与机械臂坐标系之间的坐标转换关系可以通过DH参数计算得出,按照图3所示的机械臂和传感器的示意图,将机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k结合,就可以得到所标记的点在机械臂坐标系中的k个坐标;本申请实施例中将所标记的点记为TCP,并通过所标记的点在实际空间中的位置来得到空间参考点,因此可将所标记的点在机械臂坐标系中的坐标作为空间参考点在机械臂坐标系中的坐标,而由于所标记的点移动到了至少三个非共线的位置,也就得到了至少三个非共线空间参考点,利用得到的所标记的点在机械臂坐标系中的k个坐标的方法,就可以得到至少三个非共线的空间参考点中每个所述空间参考点在机械臂坐标系中的k个坐标。 The coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the robot arm can be calculated by the DH parameter. According to the schematic diagram of the robot arm and the sensor shown in FIG. 3, the coordinate system between the end of the arm and the coordinate system of the arm is obtained. The coordinate conversion relationship, combined with the k adjustment coordinates TCP k , can obtain k coordinates of the marked point in the robot arm coordinate system; in the embodiment of the present application, the marked point is recorded as TCP and is marked by The position of the point in the real space to obtain the spatial reference point, so the coordinates of the marked point in the robot arm coordinate system can be used as the coordinates of the spatial reference point in the robot arm coordinate system, and since the marked point moves to At least three non-collinear positions obtain at least three non-collinear spatial reference points, and at least three non-zero can be obtained by using the obtained k-coordinates of the marked points in the robot arm coordinate system. The k coordinate of each of the spatial reference points in the collinear spatial reference point in the robot arm coordinate system.
由于所标记的点能够被传感器识别到,因此可以得到上述至少三个非共线的空间参考点中,每个空间参考点在传感器坐标系中的坐标,进 而根据每个空间参考点在在机械臂坐标系中的k个坐标,以及每个空间参考点在传感器坐标系中的坐标,便可以得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000019
Since the marked points can be recognized by the sensor, the coordinates of each of the at least three non-collinear spatial reference points in the sensor coordinate system can be obtained, and then the mechanical reference point is in the mechanical The k coordinate transformations between the arm coordinate system and the sensor coordinate system can be obtained from the k coordinates in the arm coordinate system and the coordinates of each spatial reference point in the sensor coordinate system.
Figure PCTCN2018119789-appb-000019
以根据所标记的点在传感器识别范围内移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的三个非共线的空间参考点为例,对建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000020
进行说明。
Taking three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system as an example to obtain a robot arm coordinate system and moving in the sensor recognition range according to the marked points. k coordinate transformation relationship between sensor coordinate systems
Figure PCTCN2018119789-appb-000020
Be explained.
移动机械臂得到三个非共线的空间参考点时,机械臂处于位姿1,位姿2,位姿3这三个位姿。When the mobile robot arm obtains three non-collinear spatial reference points, the robot arm is in three poses of position 1, position 2, and position 3.
当机械臂移动到位姿1下时,通过DH参数能够得到当前机械臂位于位姿1时,机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,及机械臂末端坐标系原点在机械臂坐标系下的坐标p1,通过工具的加工图纸可以得到TCP在机械臂末端坐标系中的坐标t1,因此这里以p1+t1来表示当前TCP在机械臂坐标系下的坐标(需要说明的是,当前TCP在机械臂坐标系下的坐标,并不是将p1的坐标与t1的坐标进行相加,此处仅仅是利用“p1+t1”这个表现形式来对机械臂位于位姿1时当前TCP在机械臂坐标系下的坐标进行解释说明,下面类似描述中同样如此),即可以得到机械臂位于位姿1时所标记的点在机械臂坐标系下的坐标p1+t1。通过传感器识别所标记的点,还能够得到机械臂位于位姿1时所标记的点在传感器坐标系下的坐标s1。When the arm moves to the posture 1, the DH parameter can be used to obtain the coordinate conversion relationship between the end coordinate system of the arm and the coordinate system of the arm when the current arm is in the pose 1, and the origin of the end coordinate of the arm is in the machine. The coordinate p1 in the arm coordinate system can be used to obtain the coordinate t1 of TCP in the end coordinate system of the robot arm through the machining drawing of the tool. Therefore, the coordinates of the current TCP in the robot arm coordinate system are represented by p1+t1 (note that The coordinates of the current TCP in the robot arm coordinate system are not the sum of the coordinates of p1 and the coordinates of t1. Here, only the expression "p1+t1" is used to present the current TCP when the arm is in pose 1. The coordinates in the robot arm coordinate system are explained, as in the similar description below, so that the coordinates p1+t1 of the point marked by the manipulator in the pose 1 in the robot arm coordinate system can be obtained. By identifying the marked point by the sensor, it is also possible to obtain the coordinate s1 of the point marked by the robot arm in the pose 1 in the sensor coordinate system.
当机械臂移动到位姿2下时,通过DH参数能够得到当前机械臂位于位姿2时,机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,及机械臂末端坐标系原点在机械臂坐标系下的坐标p2,由于已经得到的TCP在机械臂末端坐标系中的坐标t1,因此这里以p2+t1来表示当前TCP在机械臂坐标系下的坐标,即得到机械臂位于位姿2时所标记的点在机械臂坐标系下的坐标p2+t1。通过传感器识别所标记的点,还能够得到机械臂位于位姿2时所标记的点在传感器坐标系下的坐标s2。When the arm moves to the posture 2, the DH parameter can be used to obtain the coordinate conversion relationship between the arm end coordinate system and the arm coordinate system when the current arm is in the pose 2, and the origin of the arm end coordinate system is in the machine. The coordinate p2 in the arm coordinate system, because the obtained TCP coordinates t1 in the end coordinate system of the arm, the coordinates of the current TCP in the robot arm coordinate system are represented by p2+t1, that is, the robot arm is in the posture. The point marked at 2 o'clock is the coordinate p2+t1 in the robot arm coordinate system. By identifying the marked point by the sensor, it is also possible to obtain the coordinate s2 of the point marked by the robot arm in the pose 2 in the sensor coordinate system.
当机械臂移动到位姿3下时,通过DH参数能够得到当前机械臂位于位姿3时,机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,及机械臂末端坐标系原点在机械臂坐标系下的坐标p3,加之已经得到的TCP在机械臂末端坐标系中的坐标t1,因此这里以p3+t1来表示当前TCP在机械臂坐标系下的坐标p3+t1,即得到机械臂位于位姿3时所标记的点在机械臂坐标系下的坐标p3+t1。通过传感器识别所标记的点,还能够得到机械臂位于位姿3时所标记的点在传感器坐标系下的坐标s3。When the arm moves to the posture 3, the DH parameter can be used to obtain the coordinate conversion relationship between the arm end coordinate system and the arm coordinate system when the current arm is in the pose 3, and the origin of the arm end coordinate system is in the machine. The coordinate p3 in the arm coordinate system, plus the obtained coordinate t1 of the TCP in the end coordinate system of the arm, so here the p3+t1 is used to represent the current coordinate p3+t1 of the TCP in the robot arm coordinate system, that is, the robot arm is obtained. The point marked in pose 3 is the coordinate p3+t1 in the robot coordinate system. By identifying the marked point by the sensor, it is also possible to obtain the coordinate s3 of the point marked by the robot arm in the pose 3 in the sensor coordinate system.
本申请实施例中可利用p1+t1与s1,p2+t1与s2,p3+t1与s3,即这三个非共线的空间参考点分别在机械臂坐标系下的坐标与在传感器坐标系下的坐标建立机械臂坐标系和传感器坐标系之间的坐标转换关系
Figure PCTCN2018119789-appb-000021
In the embodiment of the present application, p1+t1 and s1, p2+t1 and s2, p3+t1 and s3 can be utilized, that is, the coordinates of the three non-collinear spatial reference points in the robot arm coordinate system and the sensor coordinate system are respectively used. The coordinates below establish the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system
Figure PCTCN2018119789-appb-000021
同样地,当对TCP在机械臂末端坐标系中的坐标t1进行调整得到TCP在机械臂末端坐标系中的坐标t2后,建立机械臂坐标系和传感器坐标系之间的坐标转换关系
Figure PCTCN2018119789-appb-000022
的过程为:
Similarly, when the coordinate t1 of the TCP in the end coordinate system of the arm is adjusted to obtain the coordinate t2 of the TCP in the end coordinate system of the arm, the coordinate conversion relationship between the robot coordinate system and the sensor coordinate system is established.
Figure PCTCN2018119789-appb-000022
The process is:
当机械臂移动到位姿1下,得到所标记的点在机械臂坐标系下的坐标p1+t2,以及所标记的点在传感器坐标系下的坐标s1。When the robot arm moves to the posture 1, the coordinates p1+t2 of the marked point in the robot arm coordinate system and the coordinate s1 of the marked point in the sensor coordinate system are obtained.
当机械臂移动到位姿2下,得到所标记的点在机械臂坐标系下的坐标p2+t2,以及所标记的点在传感器坐标系下的坐标s2。When the robot arm moves to the pose 2, the coordinates p2+t2 of the marked point in the robot arm coordinate system and the coordinate s2 of the marked point in the sensor coordinate system are obtained.
当机械臂移动到位姿3下,得到所标记的点在机械臂坐标系下的坐标p3+t2,以及所标记的点在传感器坐标系下的坐标s3。When the robot arm moves to the pose 3, the coordinates p3+t2 of the marked point in the robot arm coordinate system and the coordinate s3 of the marked point in the sensor coordinate system are obtained.
本申请实施例中可利用p1+t2与s1,p2+t2与s2,p3+t2与s3,即这三个非共线的空间参考点分别在机械臂坐标系下的坐标与在传感器坐标系下的坐标建立机械臂坐标系和传感器坐标系之间的坐标转换关系
Figure PCTCN2018119789-appb-000023
In the embodiment of the present application, p1+t2 and s1, p2+t2 and s2, p3+t2 and s3 can be utilized, that is, the coordinates of the three non-collinear spatial reference points in the robot arm coordinate system and the sensor coordinate system are respectively used. The coordinates below establish the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system
Figure PCTCN2018119789-appb-000023
依此类推,可得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系。需要说明的是,当TCP的调整坐标不等于TCP的理论坐标时,可以不利用TCP的理论坐标计算机械臂坐标系和传感器坐标系之间的坐标转换关系;当TCP的调整坐标可以等于TCP的理论坐标时,可利用TCP的理论坐标计算机械臂坐标系和传感器坐标系之间的坐标转换关系。By analogy, k coordinate transformation relationships between the robot arm coordinate system and the sensor coordinate system can be obtained. It should be noted that when the adjusted coordinate of TCP is not equal to the theoretical coordinate of TCP, the coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system may be calculated without using the theoretical coordinate of TCP; when the adjusted coordinate of TCP can be equal to TCP In theoretical coordinates, the coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system can be calculated using the theoretical coordinates of TCP.
S300:根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000024
在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
Figure PCTCN2018119789-appb-000025
在所述m个位置的转换误差的平均误差;其中m为整数且m≧1。
S300: obtaining each coordinate conversion relationship according to the m positions in the range of the sensor identification
Figure PCTCN2018119789-appb-000024
Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
Figure PCTCN2018119789-appb-000025
The average error of the conversion error at the m locations; where m is an integer and m ≧ 1.
具体地,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000026
在所述m个位置的转换误差中的最大转换误差的步骤为:
Specifically, each coordinate transformation relationship is obtained.
Figure PCTCN2018119789-appb-000026
The steps of the maximum conversion error in the conversion errors of the m locations are:
根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
Figure PCTCN2018119789-appb-000027
在每个位置m j下的转换误差err j
According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
Figure PCTCN2018119789-appb-000027
Conversion error at each position of m j err j;
根据坐标转换关系
Figure PCTCN2018119789-appb-000028
在每个位置m j下的转换误差err j,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000029
在所述m个位置的转换误差中的最大转换误差;
Conversion relationship according to coordinates
Figure PCTCN2018119789-appb-000028
The conversion error err j at each position m j gives each coordinate transformation relationship
Figure PCTCN2018119789-appb-000029
The maximum conversion error in the conversion errors of the m locations;
其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m≧1,1≦j≦m。 Wherein, the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ≧ 1 , 1≦j≦m.
得到每个坐标转换关系
Figure PCTCN2018119789-appb-000030
在所述m个位置的转换误差的平均误差的步骤为:
Get each coordinate transformation relationship
Figure PCTCN2018119789-appb-000030
The steps of the average error of the conversion errors at the m locations are:
根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
Figure PCTCN2018119789-appb-000031
在每个位置m j下的转换误差err j
According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
Figure PCTCN2018119789-appb-000031
Conversion error at each position of m j err j;
根据坐标转换关系
Figure PCTCN2018119789-appb-000032
在每个位置m j下的转换误差err j,根据平 均误差的计算公式得到坐标转换关系
Figure PCTCN2018119789-appb-000033
在所述m个位置的转换误差的平均误差。
Conversion relationship according to coordinates
Figure PCTCN2018119789-appb-000032
The conversion error err j at each position m j , the coordinate conversion relationship is obtained according to the calculation formula of the average error
Figure PCTCN2018119789-appb-000033
The average error of the conversion error at the m locations.
举例来说,假设所标记的点在传感器的识别范围内移动到了10个位置,即m等于10。当TCP的调整坐标为TCP 1,对应坐标转换关系为
Figure PCTCN2018119789-appb-000034
时,能够通过机械臂各个关节的转换关系得到所标记的点在这10个位置上的机械臂坐标Rm j,且能够通过传感器识别所标记的点以及所标记的点的移动,得到所标记的点在这10个位置上的传感器坐标Sm j,其中1≦j≦10。进而通过之前建立的坐标转换关系
Figure PCTCN2018119789-appb-000035
可以求得这10个位置上的转换误差
Figure PCTCN2018119789-appb-000036
或者
Figure PCTCN2018119789-appb-000037
从这10个转换误差err 1、err 2、err 3…err 10中可以选出最大的转换误差记作err Max_1,且可以算出这10个位置上的转换误差的平均误差记作err aver_1
For example, assume that the marked point moves to 10 positions within the sensor's identification range, ie m equals 10. When the adjusted coordinate of TCP is TCP 1 , the corresponding coordinate conversion relationship is
Figure PCTCN2018119789-appb-000034
At the time, the robot arm coordinates Rm j of the marked points at the 10 positions can be obtained by the conversion relationship of the joints of the robot arm, and the marked points and the movement of the marked points can be recognized by the sensor to obtain the marked Point the sensor coordinates Sm j at these 10 positions, where 1≦j≦10. Further through the previously established coordinate transformation relationship
Figure PCTCN2018119789-appb-000035
You can find the conversion error at these 10 positions.
Figure PCTCN2018119789-appb-000036
or
Figure PCTCN2018119789-appb-000037
From these 10 conversion errors err 1 , err 2 , err 3 ... err 10 , the maximum conversion error can be selected as err Max_1 , and the average error of the conversion errors at these 10 positions can be calculated as err aver_1 .
同样地,通过之前建立的坐标转换关系
Figure PCTCN2018119789-appb-000038
及TCP的调整坐标为TCP 2可以求得这10个相同位置上的转换误差
Figure PCTCN2018119789-appb-000039
或者
Figure PCTCN2018119789-appb-000040
从这10个转换误差中可以选出最大的转换误差记作err Max_2,且可以算出这10个位置上的转换误差的平均误差记作 err aver_2
Similarly, through the previously established coordinate transformation relationship
Figure PCTCN2018119789-appb-000038
And the adjustment coordinate of TCP is TCP 2 , the conversion error of these 10 same positions can be obtained.
Figure PCTCN2018119789-appb-000039
or
Figure PCTCN2018119789-appb-000040
From these 10 conversion errors, the largest conversion error can be selected as err Max_2 , and the average error of the conversion errors at these 10 positions can be calculated as err aver_2 .
如果共有3个调整坐标TCP 1、TCP 2及TCP 3,及对应的坐标转换关系
Figure PCTCN2018119789-appb-000041
那么,依据上述求取最大转换误差和平均误差的方法,可以得到三个最大转换误差err Max_1,err Max_2,err Max_3和三个平均误差err aver_1,err aver_2,err aver_3
If there are 3 adjustment coordinates TCP 1 , TCP 2 and TCP 3 , and the corresponding coordinate conversion relationship
Figure PCTCN2018119789-appb-000041
Then, according to the above method of obtaining the maximum conversion error and the average error, three maximum conversion errors err Max_1 , err Max_2 , err Max_3 and three average errors err aver_1 , err aver_2 , err aver_3 can be obtained .
需要说明的是,在本申请实施例中,还可以为机械臂设定移动程序,让机械臂自动在传感器识别范围内移动到m个位置,移动次数,移动路径以及每次的移动距离均可以采用已有方法实现,并且在求取每个坐标转换关系
Figure PCTCN2018119789-appb-000042
在m个位置上的转换误差时,所利用的是相同的m个位置。
It should be noted that, in the embodiment of the present application, a movement program may be set for the robot arm, so that the robot arm automatically moves to m positions within the sensor recognition range, and the number of movements, the movement path, and the movement distance can be Implemented using existing methods, and is looking for each coordinate transformation relationship
Figure PCTCN2018119789-appb-000042
In the case of conversion errors at m positions, the same m positions are utilized.
还需要说明的是,在本申请实施例中,除了根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000043
在所述m个位置的转换误差的平均误差作为设置TCP的实际坐标的参考之外,还可以将根据所标记的点在传感器识别范围内的m个位置,得到的每个坐标转换关系
Figure PCTCN2018119789-appb-000044
在所述m个位置的转换误差的标准差作为设置TCP的实际坐标的参考,或者将得到的平均误差和标准差都作为设置TCP的实际坐标的参考。
It should be noted that, in the embodiment of the present application, each coordinate conversion relationship is obtained except for m positions within the sensor identification range according to the marked points.
Figure PCTCN2018119789-appb-000043
In addition to the average error of the conversion errors of the m positions as a reference for setting the actual coordinates of the TCP, each coordinate conversion relationship obtained according to the m positions within the sensor identification range of the marked points may be obtained.
Figure PCTCN2018119789-appb-000044
The standard deviation of the conversion errors at the m positions is used as a reference for setting the actual coordinates of the TCP, or both the obtained average error and the standard deviation are used as references for setting the actual coordinates of the TCP.
S400:将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 S400: The minimum value of the k largest error in the conversion and / or adjustment of the k corresponding to the minimum average error of coordinate k TCP TCP is set to the actual coordinates.
依然以共有3个调整坐标TCP 1、TCP 2及TCP 3为例,具体地,因为已经得到了三个最大转换误差err Max_1,err Max_2,err Max_3,从这三个最大转换误差中选出一个最小值,若err Max_1为最小值,则将err Max_1对应的TCP的调整坐标TCP 1设置为TCP的实际坐标;若err Max_2为最小值,则将err Max_2对应的TCP的调整坐标TCP 2设置为TCP的实际坐标;若err Max_3为最小值,则将err Max_3对应的TCP的调整坐标TCP 3设置为TCP的实际坐标。 There are still three adjustment coordinates TCP 1 , TCP 2 and TCP 3 as an example. Specifically, since three maximum conversion errors err Max_1 , err Max_2 , err Max_3 have been obtained, one of the three maximum conversion errors is selected. The minimum value, if err Max_1 is the minimum value, set the TCP adjustment coordinate TCP 1 corresponding to err Max_1 to the actual coordinate of TCP; if err Max_2 is the minimum value, set the TCP adjustment coordinate TCP 2 corresponding to err Max_2 to The actual coordinate of TCP; if err Max_3 is the minimum value, the adjusted coordinate TCP 3 of TCP corresponding to err Max_3 is set to the actual coordinate of TCP.
或者,从已经得到的三个平均误差err aver_1,err aver_2,err aver_3中选择一个最小值,将平均误差的最小值对应的TCP的调整坐标TCP k设置为TCP的实际坐标。 Alternatively, a minimum value is selected from the three average errors err aver_1 , err aver_2 , err aver_3 that have been obtained, and the adjusted coordinate TCP k of the TCP corresponding to the minimum value of the average error is set as the actual coordinate of the TCP.
亦或者当err Max_1为最小的最大转换误差时,对应的平均误差err aver_1也为最小的平均误差,则将err Max_1和err aver_1对应的TCP的调整坐标TCP 1作为TCP的实际坐标。 Or when err Max_1 is the minimum maximum conversion error, the corresponding average error err aver_1 is also the smallest average error, and the TCP adjustment coordinate TCP 1 corresponding to err Max_1 and err aver_1 is taken as the actual coordinate of TCP.
当将根据所标记的点在传感器识别范围内的m个位置,得到的每个坐标转换关系
Figure PCTCN2018119789-appb-000045
在所述m个位置的转换误差的标准差作为设置TCP实际坐标的参考时,可以将k个标准差的最小值对应的调整坐标TCP k设置为TCP的实际坐标;将得到的平均误差和标准差都作为设置TCP的实际坐标的参考时,可以将得到的平均误差的最小值和/或标准差的最小值 对应的调整坐标TCP k设置为TCP的实际坐标,或者是当多个调整坐标TCP k的平均误差的相同时,取其中标准差的最小值对应的调整坐标作为TCP的实际坐标,举例来说,如果根据TCP的理论坐标得到了TCP 1,TCP 2,TCP 3……TCP 10共10个调整坐标,且这10个调整坐标的平均误差都相同,而TCP 3对应的转换误差的标准差最小,那么就设置TCP 3为TCP的实际坐标。
Each coordinate transformation relationship obtained when m points will be within the sensor identification range according to the marked points
Figure PCTCN2018119789-appb-000045
When the standard deviation of the conversion errors at the m positions is used as a reference for setting the actual coordinates of the TCP, the adjustment coordinate TCP k corresponding to the minimum value of k standard deviations may be set as the actual coordinates of the TCP; the average error and standard to be obtained When the difference is used as a reference for setting the actual coordinates of the TCP, the adjustment coordinate TCP k corresponding to the minimum value of the obtained average error and/or the minimum value of the standard deviation may be set as the actual coordinate of the TCP, or when the plurality of adjustment coordinates are TCP When the average error of k is the same, the adjustment coordinate corresponding to the minimum value of the standard deviation is taken as the actual coordinate of TCP. For example, if TCP 1 , TCP 2 , TCP 3 ... TCP 10 are obtained according to the theoretical coordinates of TCP 10 adjustment coordinates, and the average error of the 10 adjustment coordinates are the same, and the standard deviation of the conversion error corresponding to TCP 3 is the smallest, then TCP 3 is set as the actual coordinate of TCP.
在本申请实施例中,首先将机械臂末端的工具上能够被传感器识别到的一个点标记为TCP,此时可通过工具的设计图纸结合机械臂末端坐标系得到TCP的理论坐标,但是TCP的实际坐标并没有确定,在确定TCP的实际坐标的过程中,通过对TCP的理论坐标进行调整得到k个调整坐标,并利用k个调整坐标和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,得到所标记的点在机械臂坐标系下的坐标,结合所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系,进一步通过在传感器识别范围内移动所标记的点到m个位置,得到每个坐标转换关系在m个位置的转换误差的最大转换误差和/或平均误差,即得到了每个调整坐标经由坐标转换关系转换后的机械臂坐标和对应的传感器坐标之间产生误差的最大范围和/或产生误差的平均水平,最后将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标设置为TCP的实际坐标,进而缩小了机器人在执行任务时产生误差的范围,提高了机器人的工作精度。In the embodiment of the present application, first, a point on the tool at the end of the robot arm that can be recognized by the sensor is marked as TCP. At this time, the theoretical coordinate of the TCP can be obtained by the design drawing of the tool combined with the coordinate system of the end of the arm, but the TCP The actual coordinates are not determined. In the process of determining the actual coordinates of TCP, k adjustment coordinates are obtained by adjusting the theoretical coordinates of TCP, and k adjustment coordinates and the coordinate system between the end of the arm and the coordinate system of the robot arm are used. Coordinate transformation relationship, obtain the coordinates of the marked point in the robot arm coordinate system, and combine the coordinates of the marked point in the sensor coordinate system to establish k coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system, further By moving the marked points to m positions within the sensor recognition range, the maximum conversion error and/or the average error of the conversion errors of each coordinate transformation relationship at m positions are obtained, that is, each adjustment coordinate is obtained through the coordinate conversion relationship. The maximum range of errors between the converted arm coordinates and the corresponding sensor coordinates and/or the level of error The average level, and finally the adjustment coordinate corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors is set as the actual coordinate of the TCP, thereby reducing the range of errors generated by the robot when performing the task, and improving The working precision of the robot.
基于相同的发明构思,如图2所示,本申请实施例还提供了一种获取机器人TCP坐标的装置,包括:Based on the same inventive concept, as shown in FIG. 2, the embodiment of the present application further provides an apparatus for acquiring TCP coordinates of a robot, including:
标记和调整坐标模块201,用于标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1; The marking and adjusting coordinate module 201 is configured to mark a point on the tool end of the robot arm that can be recognized by the sensor as TCP, and obtain k adjustment coordinates TCP k from the theoretical coordinates of the TCP; wherein k is an integer and k ≧ 1;
坐标转换关系建立模块202,用于根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000046
The coordinate transformation relationship establishing module 202 is configured to establish a mechanical arm according to the coordinate transformation relationship between the k coordinate adjustment TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationship between coordinate system and sensor coordinate system
Figure PCTCN2018119789-appb-000046
偏差获取模块203,用于根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000047
在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
Figure PCTCN2018119789-appb-000048
在所述m个位置的转换误差的平均误差;其中m为整数且m≧1;
The deviation obtaining module 203 is configured to obtain each coordinate transformation relationship according to the m positions in the sensor identification range of the marked points.
Figure PCTCN2018119789-appb-000047
Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
Figure PCTCN2018119789-appb-000048
The average error of the conversion error at the m locations; where m is an integer and m ≧ 1;
TCP的实际坐标确定模块204,用于将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 The actual coordinate determination module 204 of the TCP is configured to set the adjustment coordinate TCP k corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors to the actual coordinates of the TCP.
本申请实施例中,标记和调整坐标模块201,坐标转换关系建立模块202,偏差获取模块203,TCP的实际坐标确定模块204,可以执行上述方法实施例中对应的优选步骤。In the embodiment of the present application, the marking and adjusting coordinate module 201, the coordinate conversion relationship establishing module 202, the deviation obtaining module 203, and the actual coordinate determining module 204 of the TCP may perform corresponding preferred steps in the foregoing method embodiments.
可选地,坐标转换关系建立模块202具体用于:Optionally, the coordinate transformation relationship establishing module 202 is specifically configured to:
根据所标记的点在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点;Obtaining at least three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system according to the movement of the marked point within the sensor recognition range;
根据每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合,得到每个所述空间参考点在机械臂坐标系中的k个坐标; According to the coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system corresponding to the position of each of the spatial reference points, combined with k adjustment coordinates TCP k , each of the spatial reference points is obtained on the robot arm k coordinates in the coordinate system;
根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个所述空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
Figure PCTCN2018119789-appb-000049
Obtaining k coordinates between the robot arm coordinate system and the sensor coordinate system according to k coordinates of each of the spatial reference points in the robot arm coordinate system and coordinates of each of the spatial reference points in the sensor coordinate system Conversion relationship
Figure PCTCN2018119789-appb-000049
.
可选地,偏差获取模块203具体用于:Optionally, the deviation obtaining module 203 is specifically configured to:
根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
Figure PCTCN2018119789-appb-000050
在每个位置m j下的转换误差err j
According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
Figure PCTCN2018119789-appb-000050
Conversion error at each position of m j err j;
根据坐标转换关系
Figure PCTCN2018119789-appb-000051
在每个位置m j下的转换误差err j,得到每个坐标转换关系
Figure PCTCN2018119789-appb-000052
在所述m个位置的转换误差中的最大转换误差;
Conversion relationship according to coordinates
Figure PCTCN2018119789-appb-000051
The conversion error err j at each position m j gives each coordinate transformation relationship
Figure PCTCN2018119789-appb-000052
The maximum conversion error in the conversion errors of the m locations;
其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m≧1,1≦j≦m。 Wherein, the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ≧ 1 , 1≦j≦m.
可选地,标记和调整坐标模块201具体用于:Optionally, the marking and adjusting coordinate module 201 is specifically configured to:
将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,或者, Taking the theoretical coordinate of TCP as the first item, an arithmetic constant with the adjustment constant to the tolerance is set to k adjustment coordinates TCP k , or,
将以TCP的理论坐标为中心的坐标范围内的点设置为k个调整坐标TCP kA point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
基于相同的发明构思,本申请实施例还提供了一种获取机器人TCP坐标的系统,包括存储器,处理器,外部通信接口,总线以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述存储器,所述处理器和所述外部通信接口通过所述总线连接,所述处理器运行所述计算机程序时执行实现上述方法实施例中获取机器人TCP坐标的方法的步骤。Based on the same inventive concept, the embodiment of the present application further provides a system for acquiring TCP coordinates of a robot, including a memory, a processor, an external communication interface, a bus, and being stored on the memory and operable on the processor. a computer program, wherein the memory, the processor and the external communication interface are connected by the bus, and when the processor runs the computer program, the step of implementing the method for acquiring the TCP coordinates of the robot in the above method embodiment is performed .
同样基于相同的发明构思,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述方法实施例中获取机器人TCP坐标的方法的步骤。Based on the same inventive concept, the embodiment of the present application further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, the method is obtained in the foregoing method embodiment. The steps of the method of robot TCP coordinates.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of cells is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated. Go to another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一 个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独处理,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be processed separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium. The software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, and the program code can be stored. Medium.
最后应说明的是:以上实施例仅用以说明本申请实施例的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to explain the technical solutions of the embodiments of the present application, and are not limited thereto; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the spirit of the technical solutions of the embodiments of the present application. range.

Claims (10)

  1. 一种获取机器人TCP坐标的方法,其特征在于,包括以下步骤:A method for acquiring TCP coordinates of a robot, comprising the steps of:
    标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1; A point on the tool marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of TCP; where k is an integer and k ≧ 1;
    根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
    Figure PCTCN2018119789-appb-100001
    According to the k coordinate adjustment TCP k and the coordinate transformation relationship between the robot arm end coordinate system and the robot arm coordinate system, and the coordinates of the marked point in the sensor coordinate system, the relationship between the robot arm coordinate system and the sensor coordinate system is established. k coordinate transformation relationships
    Figure PCTCN2018119789-appb-100001
    根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
    Figure PCTCN2018119789-appb-100002
    在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
    Figure PCTCN2018119789-appb-100003
    在所述m个位置的转换误差的平均误差;其中m为整数且m≧1;
    Obtaining each coordinate transformation relationship according to the m positions in the identified range of the marked points
    Figure PCTCN2018119789-appb-100002
    Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
    Figure PCTCN2018119789-appb-100003
    The average error of the conversion error at the m locations; where m is an integer and m ≧ 1;
    将k个最大转换误差中的最小值和/或k个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 The adjustment coordinate TCP k corresponding to the minimum of the k maximum conversion errors and/or the minimum of the k average errors is set as the actual coordinates of the TCP.
  2. 根据权利要求1所述的一种获取机器人TCP坐标的方法,其特征在于,根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
    Figure PCTCN2018119789-appb-100004
    的步骤包括:
    The method for acquiring TCP coordinates of a robot according to claim 1, wherein the coordinate conversion relationship between the k coordinate adjustment coordinates TCP k and the robot arm end coordinate system and the robot arm coordinate system, and the marked points are K coordinate transformation relationship between the robot arm coordinate system and the sensor coordinate system is established in the coordinates of the sensor coordinate system
    Figure PCTCN2018119789-appb-100004
    The steps include:
    根据所标记的点在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点; 将每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合,得到每个所述空间参考点在机械臂坐标系中的k个坐标; Obtaining at least three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system according to the movement of the marked point within the sensor recognition range; each of the spatial reference points is The coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system corresponding to the position is combined with k adjustment coordinates TCP k to obtain k coordinates of each of the spatial reference points in the robot arm coordinate system;
    根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个所述空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
    Figure PCTCN2018119789-appb-100005
    Obtaining k coordinates between the robot arm coordinate system and the sensor coordinate system according to k coordinates of each of the spatial reference points in the robot arm coordinate system and coordinates of each of the spatial reference points in the sensor coordinate system Conversion relationship
    Figure PCTCN2018119789-appb-100005
  3. 根据权利要求1所述的一种获取机器人TCP坐标的方法,其特征在于,所述根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
    Figure PCTCN2018119789-appb-100006
    在所述m个位置的转换误差中的最大转换误差的步骤包括:
    The method for acquiring TCP coordinates of a robot according to claim 1, wherein the coordinate conversion relationship is obtained according to m positions in the sensor recognition range of the marked points.
    Figure PCTCN2018119789-appb-100006
    The steps of the maximum conversion error in the conversion errors of the m locations include:
    根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
    Figure PCTCN2018119789-appb-100007
    在每个位置m j下的转换误差err j
    According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
    Figure PCTCN2018119789-appb-100007
    Conversion error at each position of m j err j;
    根据坐标转换关系
    Figure PCTCN2018119789-appb-100008
    在每个位置m j下的转换误差err j,得到每个坐标转换关系
    Figure PCTCN2018119789-appb-100009
    在所述m个位置的转换误差中的最大转换误差;
    Conversion relationship according to coordinates
    Figure PCTCN2018119789-appb-100008
    The conversion error err j at each position m j gives each coordinate transformation relationship
    Figure PCTCN2018119789-appb-100009
    The maximum conversion error in the conversion errors of the m locations;
    其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m ≧1,1≦j≦m。 Wherein, the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ≧ 1 , 1≦j≦m.
  4. 根据权利要求1或2或3所述的一种获取机器人TCP坐标的方法,其特征在于,所述由TCP的理论坐标得到k个调整坐标TCP k的步骤为:将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,或者, A method for acquiring TCP coordinates of a robot according to claim 1 or 2 or 3, wherein the step of obtaining k adjustment coordinates TCP k from the theoretical coordinates of TCP is: taking the theoretical coordinates of TCP as the first item , an adjustment constant is the tolerance difference of the number of columns set to k adjustment coordinates TCP k , or,
    将以TCP的理论坐标为中心的坐标范围内的点设置为k个调整坐标TCP kA point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
  5. 一种获取机器人TCP坐标的装置,其特征在于,所述装置包括:A device for acquiring TCP coordinates of a robot, characterized in that the device comprises:
    标记和调整坐标模块,用于标记机械臂末端的工具上能够被传感器识别的一个点为TCP,并由TCP的理论坐标得到k个调整坐标TCP k;其中k为整数且k≧1; Marking and adjusting the coordinate module, a point on the tool for marking the end of the arm that can be recognized by the sensor is TCP, and k adjustment coordinates TCP k are obtained from the theoretical coordinates of the TCP; wherein k is an integer and k ≧ 1;
    坐标转换关系建立模块,用于根据k个调整坐标TCP k和机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,以及所标记的点在传感器坐标系中的坐标,建立机械臂坐标系和传感器坐标系之间的k个坐标转换关系
    Figure PCTCN2018119789-appb-100010
    A coordinate transformation relationship establishing module is configured to establish a robot arm coordinate according to k coordinate adjustment TCP k and a coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system, and coordinates of the marked point in the sensor coordinate system. k coordinate transformation relationships between the system and the sensor coordinate system
    Figure PCTCN2018119789-appb-100010
    偏差获取模块,用于根据所标记的点在传感器识别范围内的m个位置,得到每个坐标转换关系
    Figure PCTCN2018119789-appb-100011
    在所述m个位置的转换误差中的最大转换误差和/或每个坐标转换关系
    Figure PCTCN2018119789-appb-100012
    在所述m个位置的转换误差的平均误差;其中m为整数且m≧1;
    a deviation obtaining module, configured to obtain each coordinate conversion relationship according to m positions of the marked points within the sensor identification range
    Figure PCTCN2018119789-appb-100011
    Maximum conversion error and/or each coordinate conversion relationship among the conversion errors of the m positions
    Figure PCTCN2018119789-appb-100012
    The average error of the conversion error at the m locations; where m is an integer and m ≧ 1;
    TCP的实际坐标确定模块,用于将k个最大转换误差中的最小值和/或k 个平均误差中的最小值对应的调整坐标TCP k设置为TCP的实际坐标。 The actual coordinate determination module of the TCP is configured to set the adjustment coordinate TCP k corresponding to the minimum value of the k maximum conversion errors and/or the minimum value of the k average errors to the actual coordinates of the TCP.
  6. 根据权利要求5所述的一种获取机器人TCP坐标的装置,其特征在于,所述坐标转换关系建立模块具体用于:The apparatus for acquiring the TCP coordinates of the robot according to claim 5, wherein the coordinate transformation relationship establishing module is specifically configured to:
    根据所标记的点在传感器识别范围内的移动,得到用于建立机械臂坐标系和传感器坐标系之间坐标转换关系的至少三个非共线的空间参考点;将每个所述空间参考点所在位置对应的机械臂末端坐标系与机械臂坐标系之间的坐标转换关系,与k个调整坐标TCP k相结合得到每个所述空间参考点在机械臂坐标系中的k个坐标; Obtaining at least three non-collinear spatial reference points for establishing a coordinate conversion relationship between the robot arm coordinate system and the sensor coordinate system according to the movement of the marked point within the sensor recognition range; each of the spatial reference points is The coordinate conversion relationship between the robot arm end coordinate system and the robot arm coordinate system corresponding to the position, combined with the k adjustment coordinates TCP k to obtain k coordinates of each of the spatial reference points in the robot arm coordinate system;
    根据每个所述空间参考点在机械臂坐标系中的k个坐标,以及每个所述空间参考点在传感器坐标系中的坐标,得到机械臂坐标系和传感器坐标系之间的k个坐标转换关系
    Figure PCTCN2018119789-appb-100013
    Obtaining k coordinates between the robot arm coordinate system and the sensor coordinate system according to k coordinates of each of the spatial reference points in the robot arm coordinate system and coordinates of each of the spatial reference points in the sensor coordinate system Conversion relationship
    Figure PCTCN2018119789-appb-100013
  7. 根据权利要求5所述的一种获取机器人TCP坐标的装置,其特征在于,所述最大转换误差和/或平均误差获取模块具体用于:The apparatus for acquiring TCP coordinates of a robot according to claim 5, wherein the maximum conversion error and/or average error acquisition module is specifically configured to:
    根据m个位置中每个位置m j下所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j,得到坐标转换关系
    Figure PCTCN2018119789-appb-100014
    在每个位置m j下的转换误差err j
    According to the coordinates Rm j in the robot arm coordinate system and the coordinates Sm j in the sensor coordinate system, the coordinate conversion relationship is obtained according to the coordinates of the points marked under each position m j in the m positions and the coordinates Sm j in the sensor coordinate system.
    Figure PCTCN2018119789-appb-100014
    Conversion error at each position of m j err j;
    根据坐标转换关系
    Figure PCTCN2018119789-appb-100015
    在每个位置m j下的转换误差err j,得到每个坐 标转换关系
    Figure PCTCN2018119789-appb-100016
    在所述m个位置的转换误差中的最大转换误差;
    Conversion relationship according to coordinates
    Figure PCTCN2018119789-appb-100015
    The conversion error err j at each position m j gives each coordinate transformation relationship
    Figure PCTCN2018119789-appb-100016
    The maximum conversion error in the conversion errors of the m locations;
    其中,转换误差err j为将所标记的点在机械臂坐标系中的坐标Rm j和在传感器坐标系中的坐标Sm j转换到同一坐标系后的欧氏距离,m为整数且m≧1,1≦j≦m。 Wherein, the conversion error err j is the Euclidean distance after converting the coordinate Rm j of the marked point in the robot arm coordinate system and the coordinate Sm j in the sensor coordinate system to the same coordinate system, where m is an integer and m ≧ 1 , 1≦j≦m.
  8. 根据权利要求5或6或7所述的一种机器人工具标定中的误差补偿装置,其特征在于,所述标记和调整坐标模块具体用于:The error compensation device in the calibration of a robot tool according to claim 5 or 6 or 7, wherein the marking and adjusting coordinate module is specifically used for:
    将以TCP的理论坐标为首项,一调整常量为公差的等差数列设置为k个调整坐标TCP k,或者, Taking the theoretical coordinate of TCP as the first item, an arithmetic constant with the adjustment constant to the tolerance is set to k adjustment coordinates TCP k , or,
    将以TCP的理论坐标为中心的坐标范围内的点设置为k个调整坐标TCP kA point in the coordinate range centered on the theoretical coordinate of TCP is set as k adjustment coordinates TCP k .
  9. 一种获取机器人TCP坐标的系统,其特征在于,所述系统包括存储器,处理器,外部通信接口,总线以及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述存储器,所述处理器和所述外部通信接口通过所述总线连接,所述处理器运行所述计算机程序时执行实现权利要求1至4任一项所述获取机器人TCP坐标的方法的步骤。A system for acquiring TCP coordinates of a robot, the system comprising a memory, a processor, an external communication interface, a bus, and a computer program stored on the memory and operable on the processor, wherein The memory, the processor and the external communication interface are connected by the bus, and when the processor runs the computer program, the step of implementing the method for acquiring the TCP coordinates of the robot according to any one of claims 1 to 4 is performed.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至4任一项所述获取机器人TCP坐标的方法的步骤。A computer readable storage medium storing a computer program, wherein the computer program is executed by a processor, and the method for acquiring a TCP coordinate of the robot according to any one of claims 1 to 4 A step of.
PCT/CN2018/119789 2017-12-13 2018-12-07 Method and device for acquiring tcp coordinates of robot WO2019114631A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711331796.9A CN109909999B (en) 2017-12-13 2017-12-13 Method and device for acquiring TCP (Transmission control protocol) coordinates of robot
CN201711331796.9 2017-12-13

Publications (1)

Publication Number Publication Date
WO2019114631A1 true WO2019114631A1 (en) 2019-06-20

Family

ID=66818977

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/119789 WO2019114631A1 (en) 2017-12-13 2018-12-07 Method and device for acquiring tcp coordinates of robot

Country Status (2)

Country Link
CN (1) CN109909999B (en)
WO (1) WO2019114631A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111530670A (en) * 2020-04-30 2020-08-14 重庆见芒信息技术咨询服务有限公司 Part position error compensation method and system applied to robot spraying field
CN114310881A (en) * 2021-12-23 2022-04-12 中国科学院自动化研究所 Calibration method and system for mechanical arm quick-change device and electronic equipment
CN114571507B (en) * 2022-05-07 2022-07-19 北京长木谷医疗科技有限公司 Method and device for detecting error of end tool of orthopaedic surgical robot

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130045557A (en) * 2011-10-26 2013-05-06 현대중공업 주식회사 Method of calibrating coordinate system in laser vision sensor
JP2013082032A (en) * 2011-10-11 2013-05-09 Ihi Corp Tool center point setting method for articulated robot, and mounting structure for tool center point setting jig
CN103101060A (en) * 2011-11-11 2013-05-15 鸿富锦精密工业(深圳)有限公司 Sensing calibration method for robot tool center point
CN104061888A (en) * 2014-06-19 2014-09-24 深圳市大族激光科技股份有限公司 Robot three-dimensional laser machining head TCP coordinate correcting method and device
CN105945948A (en) * 2016-05-25 2016-09-21 南京工程学院 TCP online quick calibration method and device applied to industrial robot
CN106502208A (en) * 2016-09-23 2017-03-15 佛山华数机器人有限公司 A kind of industrial robot TCP scaling methods

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005048136B4 (en) * 2005-10-06 2010-01-21 Kuka Roboter Gmbh A method for determining a virtual tool center point
CN102909728B (en) * 2011-08-05 2015-11-25 鸿富锦精密工业(深圳)有限公司 The vision correction methods of robot tooling center points
CN106462140B (en) * 2014-04-30 2019-04-26 Abb瑞士股份有限公司 Method for demarcating the tool center point of industrial robot system
GB2547200B (en) * 2016-02-09 2019-10-02 Honda Motor Co Ltd Tool center point setting method for articulated robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013082032A (en) * 2011-10-11 2013-05-09 Ihi Corp Tool center point setting method for articulated robot, and mounting structure for tool center point setting jig
KR20130045557A (en) * 2011-10-26 2013-05-06 현대중공업 주식회사 Method of calibrating coordinate system in laser vision sensor
CN103101060A (en) * 2011-11-11 2013-05-15 鸿富锦精密工业(深圳)有限公司 Sensing calibration method for robot tool center point
CN104061888A (en) * 2014-06-19 2014-09-24 深圳市大族激光科技股份有限公司 Robot three-dimensional laser machining head TCP coordinate correcting method and device
CN105945948A (en) * 2016-05-25 2016-09-21 南京工程学院 TCP online quick calibration method and device applied to industrial robot
CN106502208A (en) * 2016-09-23 2017-03-15 佛山华数机器人有限公司 A kind of industrial robot TCP scaling methods

Also Published As

Publication number Publication date
CN109909999A (en) 2019-06-21
CN109909999B (en) 2020-08-28

Similar Documents

Publication Publication Date Title
WO2018090323A1 (en) Method, system, and device for calibrating coordinate system
JP5627325B2 (en) Position / orientation measuring apparatus, position / orientation measuring method, and program
JP5924862B2 (en) Information processing apparatus, information processing method, and program
WO2019114631A1 (en) Method and device for acquiring tcp coordinates of robot
CN110553600B (en) Method for generating simulated laser line of structured light sensor for workpiece detection
JP2018136896A (en) Information processor, system, information processing method, and manufacturing method of article
CN116277035B (en) Robot control method and device, processor and electronic equipment
JP2016170050A (en) Position attitude measurement device, position attitude measurement method and computer program
CN113211445B (en) Robot parameter calibration method, device, equipment and storage medium
JP2017144498A (en) Information processor, control method of information processor, and program
WO2019114629A1 (en) Method and device for acquiring tcp coordinates of robot
US20220383547A1 (en) Hand-eye calibration of camera-guided apparatuses
CN115284292A (en) Mechanical arm hand-eye calibration method and device based on laser camera
US20220152818A1 (en) Apparatus and method for training a machine learning model to recognize an object topology of an object from an image of the object
CN105574884B (en) A kind of medical robot DH parameter calibration methods
CN114886567A (en) Method for calibrating hands and eyes of surgical robot with telecentric motionless point constraint
WO2019114630A1 (en) Method and device for obtaining coordinates of tcp of robot
CN109397293B (en) Ground level error modeling and compensating method based on mobile robot
WO2020010625A1 (en) Method and system for optimizing kinematic model of robot, and storage device.
US20220402141A1 (en) Method and apparatus for calibrating position of robot using 3d scanner
CN114387352A (en) External parameter calibration method, device, equipment and storage medium
CN112847441B (en) Six-axis robot coordinate offset detection method and device based on gradient descent method
TWI793044B (en) Eye-hand calibration method and eye-hand calibration device for robot arm
CN116859920B (en) Precision compensation method and device, electronic equipment and punching system
Wang et al. Robust Calibration Approach for Robot Base Coordinate System Based on RANSAC-SVD

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18889598

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18889598

Country of ref document: EP

Kind code of ref document: A1