Calibration method of user coordinate system, robot and storage medium
By installing a laser displacement sensor on the robot robot hand and combining the grooves on the calibration plate, the origin and coordinate axis of the user coordinate system are quickly determined, which solves the problems of low efficiency and high cost of calibration of user coordinate system in the prior art.
Patent Information
- Application Number
- CN202311139984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is inefficient and costly when establishing a user coordinate system.
By installing a laser displacement sensor on the robot robot hand, combining multiple grooves on the calibration plate, the laser displacement sensor collects candidate height values, determines the target height values and calibration points, and then determines the origin and coordinate axis of the user coordinate system.
It realizes rapid and accurate calibration of user coordinate systems, reduces calibration costs, and avoids errors caused by manual calibration.
Smart Images

Figure CN119610083A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of coordinate system calibration, and in particular to a user coordinate system calibration method, a robot and a storage medium. Background Art
[0002] In order to better adjust the position of the product during the robot's operation, it is necessary to use the user coordinate system to assist in the adjustment. At present, on the one hand, the user coordinate system is established by manual calibration, which has a slow teaching speed, low efficiency and large errors. On the other hand, the user coordinate system is established by computer vision, which requires cameras and corresponding computer vision software to assist in calibration, which is costly. Summary of the invention
[0003] The embodiments of the present application disclose a user coordinate system calibration method, a robot and a storage medium, which solve the technical problems of low efficiency and high cost when establishing a user coordinate system during product calibration.
[0004] The present application provides a method for calibrating a user coordinate system, which is applied to a robot. A laser displacement sensor is installed on a manipulator of the robot. A calibration plate is placed below the manipulator. A plurality of grooves are arranged on the calibration plate. The plurality of grooves form a rectangle. A center circle is arranged in the rectangle. The method comprises: determining an initial reference point according to an initial position of the laser displacement sensor, wherein the initial position represents an arbitrary position when a light spot of a laser emitted by the laser displacement sensor falls within the center circle; determining a target circle on a target plane parallel to the calibration plate according to the initial reference point and a preset radius; controlling the manipulator to move along the circumference of the target circle, determining a plurality of target height values from a plurality of candidate height values collected by the laser displacement sensor, wherein the plurality of target height values represent the distance between the laser displacement sensor and the bottom of the plurality of grooves; using the position where the laser displacement sensor collects the plurality of target height values as a plurality of calibration points; and determining the origin and coordinate axes of the user coordinate system according to the plurality of calibration points.
[0005] In some optional embodiments, before determining the target circle on the target plane parallel to the calibration plate, the method further includes: obtaining an initial value collected by the laser displacement sensor at the initial position, the initial value representing the distance between the laser displacement sensor and the calibration plate; after controlling the manipulator to move a preset distance along a preset first horizontal direction, if a first candidate value collected by the laser displacement sensor is the same as the initial value, using the first candidate value as a first reference value; using the position of the laser displacement sensor when collecting the first reference value as a first reference point; after controlling the manipulator to move a preset distance along a preset second horizontal direction, if a second candidate value collected by the laser displacement sensor is the same as the initial value, using the second candidate value as a second reference value, and the angle between the first horizontal direction and the second horizontal direction is a right angle; using the position of the laser displacement sensor when collecting the second reference value as a second reference point; and determining the target plane according to the initial reference point, the first reference point, and the second reference point.
[0006] In some optional embodiments, after controlling the manipulator to move a preset distance along a preset first horizontal direction, the method further includes: if the first candidate value collected by the laser displacement sensor is greater than the initial value, controlling the manipulator to move along a downward vertical direction until the first candidate value collected by the laser displacement sensor is the same as the initial value; or if the first candidate value collected by the laser displacement sensor is less than the initial value, controlling the manipulator to move along an upward vertical direction until the first candidate value collected by the laser displacement sensor is the same as the initial value.
[0007] In some optional embodiments, after controlling the manipulator to move a preset distance along a preset second horizontal direction, the method further includes: if the second candidate value collected by the laser displacement sensor is greater than the initial value, controlling the manipulator to move along a downward vertical direction until the second candidate value collected by the laser displacement sensor is the same as the initial value; or if the second candidate value collected by the laser displacement sensor is less than the initial value, controlling the manipulator to move along an upward vertical direction until the second candidate value collected by the laser displacement sensor is the same as the initial value.
[0008] In some optional embodiments, determining multiple target height values from multiple candidate height values collected by the laser displacement sensor includes: eliminating candidate height values that are the same as the initial value from the multiple candidate height values to obtain the multiple target height values.
[0009] In some optional embodiments, the multiple grooves correspond to different groove depths, and the position at which the laser displacement sensor collects the multiple target height values is used as multiple calibration points, including: determining two minimum and identical height values from the multiple target height values as the first height value and the second height value, determining the first calibration point according to the position at which the laser displacement sensor collects the first height value, and determining the second calibration point according to the position at which the laser position sensor collects the second height value; determining a third height value collected adjacent to the second height value from the multiple target height values according to a collection order determined according to the collection time of the multiple target height values, and determining a third calibration point according to the position at which the laser position sensor collects the third height value; determining a fourth height value that is the same as the third height value from the target height values, and determining a fourth calibration point according to the position at which the laser position sensor collects the fourth height value.
[0010] In some optional embodiments, determining the origin and coordinate axes of the user coordinate system based on the multiple calibration points includes: connecting the first calibration point and the second calibration point to obtain a first straight line; connecting the third calibration point and the fourth calibration point to obtain a second straight line; using the intersection of the first straight line and the second straight line as the origin; using the first straight line as the Y axis of the user coordinate system, and using the second straight line as the X axis of the user coordinate system.
[0011] In some optional embodiments, the method further includes: obtaining the side length of the rectangle and the radius of the center circle; calculating a setting range of the preset radius based on the side length and the radius of the center circle; and determining the preset radius from within the setting range of the preset radius.
[0012] The present application also provides a robot, which includes a manipulator, a laser displacement sensor installed on the manipulator, a processor and a memory, wherein the processor is used to implement the user coordinate system calibration method when executing a computer program stored in the memory.
[0013] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the user coordinate system calibration method is implemented.
[0014] In the calibration method of the user coordinate system provided by the present application, the initial reference point is determined according to the initial position detected by the laser displacement sensor, wherein the initial position represents any position when the spot of the laser emitted by the laser displacement sensor falls within the center circle. According to the initial reference point and the preset radius, the target circle is determined on the target plane parallel to the calibration plate, the robot controls the manipulator to move along the circumference of the target circle, and multiple target height values are determined from multiple candidate height values collected by the laser displacement sensor. The target height value represents the distance between the laser displacement sensor and the bottom of the groove of multiple grooves. The position where the laser displacement sensor collects multiple target height values is used as multiple calibration points, and the origin and coordinate axis of the user coordinate system can be determined according to the multiple calibration points. The present application can avoid the errors caused by manual marking by the user, and the use of the calibration plate and the laser displacement sensor auxiliary marking method can achieve the purpose of rapid calibration, while reducing the calibration cost of the user coordinate system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of an application scenario of the user coordinate system calibration method provided in an embodiment of the present application.
[0016] Figure 2 It is a flow chart of the method for calibrating the user coordinate system provided in an embodiment of the present application.
[0017] Figure 3 It is a schematic diagram of constructing the target plane provided in the embodiment of the present application.
[0018] Figure 4 It is a schematic diagram of constructing a target circle provided in an embodiment of the present application.
[0019] Figure 5 It is a schematic diagram of a target circle provided in an embodiment of the present application.
[0020] Figure 6 It is a schematic diagram of the calibration points provided in the embodiment of the present application.
[0021] Figure 7 It is a schematic diagram of constructing a user coordinate system provided in an embodiment of the present application.
[0022] Figure 8 It is a schematic diagram of the structure of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION
[0023] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given by way of example for reference.
[0024] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0025] In order to better adjust the position of the product during the robot's operation, it is necessary to use the user coordinate system to assist in the adjustment. At present, on the one hand, the user coordinate system is established by manual calibration, which has a slow teaching speed, low efficiency and large errors. On the other hand, the user coordinate system is established by computer vision, which requires cameras and corresponding computer vision software to assist in calibration, which is costly.
[0026] In order to better understand the user coordinate system calibration method, robot and storage medium provided in the embodiments of the present application, the application scenario of the user coordinate system calibration method of the present application is first described below.
[0027] Figure 1 Schematic diagram of the application scenario of the calibration method of the user coordinate system provided in the embodiment of the present application. The calibration method of the user coordinate system provided in the embodiment of the present application is applied to the robot 10, and the robot 10 includes, but is not limited to, a manipulator 110 and a laser displacement sensor 120. Among them, the laser displacement sensor 120 is installed on the manipulator 110. When the manipulator 110 moves, the laser displacement sensor 120 can obtain data for the robot 10. For example, the laser displacement sensor 120 can collect the distance value (such as the initial value, the candidate height value, etc.) between the robot 10 and the calibration plate 20.
[0028] The robot 10 may be a curved arm robot having a manipulator for performing a grasping operation on a workpiece table.
[0029] The calibration plate 20 may be a panel of any shape, and is used to assist the robot 10 in determining the user coordinate system, thereby reducing the calibration cost of the user coordinate system.
[0030] The laser displacement sensor 120 may be a non-contact displacement sensor based on various optical principles such as a laser interferometer and a spectral confocal displacement sensor, or may be a non-contact displacement sensor based on other non-optical principles, which is not limited in the present application.
[0031] In some embodiments of the present application, the calibration plate 20 can be placed on the workpiece table, the calibration plate 20 is located below the manipulator 110, and a plurality of grooves 210 are provided on the calibration plate 20. Each groove 210 can be in the shape of a bar, and each groove 210 has a different groove depth ( Figure 1 In the figure, different thicknesses of lines represent different groove depths), and the plurality of grooves 210 form a rectangle. When the manipulator 110 moves, the laser displacement sensor 120 can collect different distance values (such as target height values) between the laser displacement sensor 120 and the plurality of grooves 210. A center circle ( Figure 1 (not shown), the center of the center circle may be located at the center of the rectangle, the center circle may be a circle surrounded by grooves, or a circle formed by drawing, and the present application does not limit this.
[0032] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the robot 10. In other embodiments of the present application, the robot 10 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0033] To solve the above problems, see Figure 2 As shown, Figure 2 is a flow chart of a method for calibrating a user coordinate system provided in an embodiment of the present application, which is applied to a robot (e.g. Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0034] Step S201, determining an initial reference point according to an initial position of the laser displacement sensor.
[0035] In some embodiments of the present application, the laser displacement sensor 120 is a sensor that uses laser technology for measurement, and is composed of a laser, a laser detector, and a measurement circuit. The laser displacement sensor 120 can accurately measure the position, displacement, distance and other change information of a non-contact object, and can also independently measure displacement, thickness, vibration, distance, diameter and other precise geometric measurements of an object.
[0036] In one example, the calibration plate 20 is a non-contact object of the robot 10. During the process of the robot 10 controlling the movement of the manipulator 110, the laser displacement sensor 120 on the manipulator 110 can collect data for the robot 10. For example, the laser displacement sensor 120 collects the distance between the laser displacement sensor 120 and the calibration plate 20.
[0037] In some embodiments of the present application, the manipulator 110 is located above the calibration plate 20. The calibration plate 20 is provided with a rectangle surrounded by a plurality of grooves, and a center circle is provided inside the rectangle. The user can set an initial position for the manipulator 110. The user controls the movement of the manipulator 110 so that the laser spot emitted by the laser displacement sensor 120 falls on any position within the center circle of the calibration plate 20. The current position of the manipulator 110 is determined as the initial position. According to the initial position of the laser sensor 120, the initial reference point can be determined to provide the center of the target circle for subsequent calibration (e.g., step S202).
[0038] Step S202: determining a target circle on a target plane parallel to the calibration plate according to an initial reference point and a preset radius.
[0039] In some embodiments of the present application, after determining the initial reference point, the robot 10 can obtain the initial value collected by the laser displacement sensor 120 at the initial position, and the initial value represents the distance between the laser displacement sensor 120 and the non-groove area on the calibration plate 20, that is, no groove may be set at the center position of the calibration plate 20.
[0040] In some embodiments of the present application, in order to construct a target plane parallel to the calibration plate 20 , the robot 10 controls the manipulator 110 to start moving.
[0041] Figure 3 is a schematic diagram of constructing a target plane provided in an embodiment of the present application, such as Figure 3 As shown, the robot 10 controls the manipulator 110 to move a preset distance along a preset first horizontal direction, wherein a tool coordinate system is provided in the robot 10, the first horizontal direction may be the Y axis of the tool coordinate system, and the preset distance may be a length set according to actual needs (such as Figure 3 The distance between point P1 and point P2 shown in the figure is not limited in the present application. The tool of the robot 10 is installed at the end of the manipulator 110 of the robot 10. The tool is, for example, a welding gun, a clamp, a laser cutting head, an electric spindle or a grinding head. The tool coordinate system is determined according to the position of the tool.
[0042] In some embodiments of the present application, after the robot 10 controls the manipulator 110 to move a preset distance along a preset first horizontal direction, the robot 10 obtains a first candidate value collected by the laser displacement sensor 120. If the first candidate value is different from the initial value, and the first candidate value is greater than the initial value, it means that the position of the laser displacement sensor 120 at this time is not on the same plane as the position when the initial value is collected, and is located above the plane. The robot 10 controls the manipulator 110 to move in a downward vertical direction until the first candidate value collected by the laser displacement sensor 120 is the same as the initial value.
[0043] In one example, if the initial value is equal to 10 cm, after the laser displacement sensor 120 moves a preset distance along the Y-axis of the tool coordinate system, the robot 10 obtains that the first candidate value collected by the laser displacement sensor 120 is 12 cm, then the robot 10 controls the manipulator 110 to move in a downward vertical direction until the first candidate value collected by the laser displacement sensor 120 is 10 cm.
[0044] In some embodiments of the present application, if the first candidate value is smaller than the initial value, indicating that the position of the laser displacement sensor 120 at this time is not on the same plane as the position when the initial value was collected, and is located below the plane, the robot 10 is controlled to move in an upward vertical direction until the first candidate value collected by the laser displacement sensor 120 is the same as the initial value.
[0045] In one example, if the initial value is equal to 10 cm, after the laser displacement sensor 120 moves a preset distance along the Y-axis of the tool coordinate system, the robot 10 obtains that the first candidate value collected by the laser displacement sensor 120 is 8 cm, then the robot 10 controls the manipulator 110 to move in an upward vertical direction until the first candidate value collected by the laser displacement sensor 120 is 10 cm.
[0046] In some embodiments of the present application, if the first candidate value collected by the laser displacement sensor 120 is the same as the initial value, the first candidate value is used as the first reference point, such as Figure 3 Point P2 is shown.
[0047] In some embodiments of the present application, when the robot 10 controls the manipulator 110 to move along a preset first horizontal direction (such as Figure 3 After moving a preset distance in the Y-axis direction in the figure and recording the point P2, the robot 10 can control the manipulator 110 to move along the second horizontal direction (such as Figure 3 The robot 110 moves a preset distance along the X-axis direction and the preset distance along the Y-axis direction, wherein the robot 110 can be different from or the same as the preset distance along the Y-axis direction, and the present application does not limit this. The angle between the first horizontal direction and the second horizontal direction is a right angle.
[0048] In some embodiments of the present application, after the robot 10 controls the manipulator 110 to move a preset distance along a preset second horizontal direction, the robot 10 obtains a second candidate value collected by the laser displacement sensor 120. If the second candidate value is different from the initial value, and the second candidate value is greater than the initial value, it means that the position of the laser displacement sensor 120 at this time is not on the same plane as the position when the initial value is collected, and is located above the plane. The robot 10 controls the manipulator 110 to move in a downward vertical direction until the second candidate value collected by the laser displacement sensor 120 is the same as the initial value.
[0049] In one example, if the initial value is equal to 10 cm, after the laser displacement sensor 120 moves a preset distance along the X-axis of the tool coordinate system, the robot 10 obtains that the second candidate value collected by the laser displacement sensor 120 is 12 cm, then the robot 10 controls the manipulator 110 to move in a downward vertical direction until the second candidate value collected by the laser displacement sensor 120 is 10 cm.
[0050] In some embodiments of the present application, if the second candidate value is smaller than the initial value, indicating that the position of the laser displacement sensor 120 at this time is not on the same plane as the position when the initial value was collected, and is located below the plane, the robot 10 controls the manipulator 110 to move in an upward vertical direction until the second candidate value collected by the laser displacement sensor 120 is the same as the initial value.
[0051] In one example, if the initial value is equal to 10 cm, after the laser displacement sensor 120 moves a preset distance along the X-axis of the tool coordinate system, the robot 10 obtains that the second candidate value collected by the laser displacement sensor 120 is 8 cm, then the robot 10 controls the manipulator 110 to move in an upward vertical direction until the second candidate value collected by the laser displacement sensor 120 is 10 cm.
[0052] In some embodiments of the present application, if the second candidate value collected by the laser displacement sensor 120 is the same as the initial value, the second candidate value is used as the second reference point, such as Figure 3 Point P3 is shown.
[0053] In some embodiments of the present application, after obtaining the initial reference point P1, the first reference point P2 and the second reference point P3, since the lines connecting the three points P1, P2 and P3 are not on the same straight line, the three points that are not on the same straight line can form a triangle, and the surface that passes through the three vertices of the triangle at the same time is used as the target plane. The distance values collected by the laser displacement sensor 120 at points P1, P2 and P3 are the same (for example, the initial value is the same as the first reference value and the second reference value), so the target plane is parallel to the calibration plate 20.
[0054] In some embodiments of the present application, after the target plane is determined, in order to form a target circle with the initial reference point as the center on the target plane, the robot 10 first determines a preset radius of the target circle. The robot 10 can calculate the distance and angle that the manipulator 110 needs to move based on the preset radius and the center, so that the robot 10 forms the target circle after moving according to the distance and angle.
[0055] Figure 4 is a schematic diagram of constructing a target circle provided in an embodiment of the present application, such as Figure 4As shown, there is a center circle on the calibration plate 20, the radius of the center circle is R0, and the side length of the rectangle on the calibration plate 20 is L. The user can measure the radius R0 of the center circle and the side length L of the rectangle in advance, and input R0 and L into the robot 10 so that the robot 10 can calculate the setting range of the preset radius. The setting range of the preset radius can be calculated according to the radius R0 of the center circle and the side length L of the rectangle, as shown below:
[0056]
[0057] Figure 5 is a schematic diagram of a target circle provided in an embodiment of the present application, such as Figure 5 As shown in FIG. 1 , after determining the setting range of the preset radius, the preset radius R can be determined from the setting range of the preset radius, so that the target circle formed according to the preset radius R and the initial reference point P1 can generate an intersection with the rectangle when projected on the calibration plate 20. The intersection is shown in FIG. Figure 5 Point M shown (other intersection points Figure 5 not shown).
[0058] Step S203, controlling the manipulator to move along the circumference of the target circle, and determining a plurality of target height values from a plurality of candidate height values collected by the laser displacement sensor.
[0059] In some embodiments of the present application, after the target circle is determined, the robot 10 controls the manipulator 110 to move to any point on the target circle, takes the point as the starting point, controls the manipulator 110 to move along the circumference for one circle, and obtains multiple candidate height values collected by the laser sensor 120 during the movement of the manipulator 110. The multiple candidate height values represent the distance between the laser displacement sensor 120 and the calibration plate 20 collected by the laser displacement sensor 120 during the movement.
[0060] In some embodiments of the present application, since there is an intersection when the target circle is projected onto the rectangle on the calibration plate 20, and the sides of the rectangle are composed of grooves of different groove depths, the multiple candidate height values include the candidate height value when the laser displacement sensor 120 moves above the groove, and the candidate height value when the laser displacement sensor 120 does not move above the groove.
[0061] In some embodiments of the present application, the candidate height value collected when the laser displacement sensor 120 has not moved to the top of the groove is the same as the initial value. Therefore, the candidate height value obtained after eliminating the candidate height value that is the same as the initial value is the candidate height value collected when the laser displacement sensor 120 moves to the top of the groove. The candidate height value collected when the laser displacement sensor 120 moves to the top of the groove is used as the target height value.
[0062] Step S204: The positions where the laser displacement sensor collects multiple target height values are used as multiple calibration points.
[0063] In some embodiments of the present application, after the target height value is determined, the positions of the laser displacement sensor 120 when collecting multiple target height values are obtained as multiple calibration points.
[0064] Figure 6 is a schematic diagram of the calibration points provided in the embodiment of the present application, such as Figure 6 As shown, point N1 to point N8 are multiple calibration points marked on the target circle.
[0065] In some embodiments of the present application, since the groove depths of the sides of the rectangle are different, the target height values collected when different sides are detected are different, and the target height values collected when the same side is detected are the same. Figure 5 As shown, when the target circle is mapped onto the calibration plate 20 , there is an intersection between the target circle and the rectangle, and the groove depths of the same side of the rectangle are the same. Therefore, there are at least two identical height values among the multiple target height values.
[0066] In some embodiments of the present application, the sizes of multiple target height values are compared, and the smallest and identical height value is selected from the multiple target height values as the first height value and the second height value, such as Figure 6 As shown, assuming that the height values collected when the laser displacement sensor 120 moves to point N1 and point N2 are the smallest and the same, the height value collected when moving to point N1 is used as the first height value, and the height value collected when moving to point N2 is used as the second height value.
[0067] In some embodiments of the present application, since the movement operation of the robot 10 is continuous in the process of controlling the movement of the manipulator 110, the collection time of the height value when moving from point N1 to point N8 is also continuous. Therefore, the collection order can be determined by the collection time.
[0068] In one example, the robot 110 starts to move from point N1, and the collection time of point N1 is the first moment. When it moves to point N2, the collection time is the second moment. When it moves to point N3, the collection time is the third moment. Assuming that the first moment is earlier than the second moment, and the second moment is earlier than the third moment, the adjacent collection times of the second moment are the first moment and the third moment, and the collection order is from point N1 to point N3.
[0069] In some embodiments of the present application, after determining the acquisition order, the adjacent acquired height values of the first height value and the adjacent acquired height values of the second height value can be determined. Assuming that the first height value is the height value acquired during the initial movement, the adjacent acquired height value of the first height value is the second height value, and the adjacent acquired height value of the second height value is the first height value and the third height value among the multiple target height values.
[0070] In one example, if Figure 6 As shown, assuming that the first height value is collected at point N1 and the second height value is collected at point N2, point N2 is an adjacent collection point of point N1, point N1 and point N3 are adjacent collection points of point N2, and the height value collected at point N3 is the third height value.
[0071] In some embodiments of the present application, after the third height value is determined, since the target height values collected when the same rectangular edge is detected are the same, a fourth height value that is the same as the third height value can be determined from multiple target height values (such as the height value collected at point N4).
[0072] In some embodiments of the present application, after determining the first height value, the second height value, the third height value, and the fourth height value, a first calibration point among the multiple calibration points is determined according to the position of the laser displacement sensor 120 when collecting the first height value, that is, the robot 10 uses the first calibration point to mark the position of the laser displacement sensor 120 when collecting the first height value on the target plane. A second calibration point among the multiple calibration points is determined according to the position of the laser displacement sensor 120 when collecting the second height value, that is, the robot 10 uses the second calibration point to mark the position of the laser displacement sensor 120 when collecting the second height value on the target plane. A third calibration point among the multiple calibration points is determined according to the position of the laser displacement sensor 120 when collecting the third height value, that is, the robot 10 uses the third calibration point to mark the position of the laser displacement sensor 120 when collecting the third height value on the target plane. A fourth calibration point among the multiple calibration points is determined according to the position of the laser displacement sensor 120 when collecting the fourth height value, that is, the robot 10 uses the fourth calibration point to mark the position of the laser displacement sensor 120 when collecting the fourth height value on the target plane.
[0073] In one example, if Figure 6As shown, the robot 10 uses the first calibration point N1 to mark the position of the laser displacement sensor 120 when it collects the first height value on the target plane, the robot 10 uses the second calibration point N2 to mark the position of the laser displacement sensor 120 when it collects the second height value on the target plane, the robot 10 uses the third calibration point N3 to mark the position of the laser displacement sensor 120 when it collects the third height value on the target plane, and the robot 10 uses the fourth calibration point N4 to mark the position of the laser displacement sensor 120 when it collects the fourth height value on the target plane.
[0074] In addition to the above-described embodiment of determining the minimum and identical height value from multiple target height values as the first height value and the second height value, in other embodiments of the present application, the maximum and identical height value can also be determined from multiple target height values as the first height value and the second height value, and the acquisition time of the first height value is earlier than the acquisition time of the second height value, then according to the acquisition order determined by the acquisition time of the multiple target height values, a third height value adjacent to the first height value is determined from the multiple height values, and the acquisition time of the second height value is earlier than the acquisition time of the third height value. The present application does not limit the determination of the same first height value and the second height value.
[0075] Step S205: determining the origin and coordinate axes of the user coordinate system according to the multiple calibration points.
[0076] In some embodiments of the present application, after a plurality of calibration points are determined, calibration points with the same height value are connected. For example, the first calibration point is connected to the second calibration point, and the third calibration point is connected to the fourth calibration point. The first straight line is obtained by connecting the first calibration point to the second calibration point, the second straight line is obtained by connecting the third calibration point to the fourth calibration point, and the origin of the user coordinate system is obtained according to the intersection of the first straight line and the second straight line. The first straight line is used as the Y axis of the user coordinate system, and the second straight line is used as the X axis of the user coordinate system. Among them, the origin coordinates can be obtained according to the coordinates of the first calibration point, the second calibration point, the third calibration point, the fourth calibration point and the center point of the circle in the tool coordinate system of the robot 10.
[0077] In one example, Figure 7 is a schematic diagram of constructing a user coordinate system provided in an embodiment of the present application, such as Figure 7 As shown in FIG. 1 , since points N1 to N4 are all on the target plane parallel to the calibration plate 20, the coordinates of points N1 to N4 in the Z-axis direction are consistent. According to the tool coordinate system provided by the robot 10, the coordinates (x p1 ,y p1 ,z p1 ), the coordinates of point N1 (x n1 ,y n1 ,z p1), the coordinates of point N2 (x n2 ,y n2 ,z p1 ), the coordinates of point N3 (x n3 ,y n3 ,z p1 ), the coordinates of point N4 (x n4 ,y n4 ,z p1 ).
[0078] In some embodiments of the present application, according to the coordinates of point N1 and point N2, the straight line equation of the first straight line can be obtained as follows:
[0079]
[0080] According to the coordinates of point N3 and point N4, the linear equation of the second straight line can be obtained as follows:
[0081]
[0082] According to the equation of the first straight line and the equation of the second straight line, the coordinates of the origin o (x o ,y o ,z p1 ), wherein the coordinate of the Z axis can be obtained according to the tool coordinate system of the robot 10, so only the coordinate of the X axis and the coordinate of the Y axis need to be calculated, as follows:
[0083]
[0084]
[0085] According to the determined origin coordinates and coordinate axes, the user coordinate system can be constructed.
[0086] In the embodiment of the present application, the initial reference point is determined according to the initial position detected by the laser displacement sensor 120, wherein the initial position indicates any position when the spot of the laser emitted by the laser displacement sensor 120 falls within the center circle of the calibration plate 20, and the position of the laser displacement sensor 120 located above the center circle is determined as the initial position, which can ensure that the projection circle of the target circle formed subsequently on the calibration plate 20 can have an intersection with the rectangle, and the embodiment does not need to control the initial position to be aligned with the center of the center circle, which can improve the calibration efficiency to a certain extent. According to the initial reference point and the preset radius, the target circle is determined on the target plane parallel to the calibration plate 20, the robot 10 controls the manipulator 110 to move along the circumference of the target circle, and multiple target height values are determined from the multiple candidate height values collected by the laser displacement sensor 120, the target height value indicates the distance between the laser displacement sensor 120 and the bottom of the groove of the multiple grooves, and the position where the laser displacement sensor 120 collects the multiple target height values is used as multiple calibration points, and the origin and coordinate axis of the user coordinate system can be determined according to the multiple calibration points. The present application can avoid errors caused by manual marking by the user, and the use of the calibration plate 20 and the laser displacement sensor 120 for auxiliary marking can achieve the purpose of rapid calibration, while reducing the calibration cost of the user coordinate system.
[0087] Figure 8 Schematic diagram of the structure of the robot provided in the embodiment of the present application. Figure 1 The structure of the robot 10 is shown as a part of the structure. The robot 10 may also include Figure 8 The structure shown. Figure 8 As shown, the robot 10 may include, but is not limited to: a memory 140 and at least one processor 150 connected via a communication bus 130 .
[0088] The memory 140 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 150, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0089] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 150. The non-volatile memory may include a disk storage device and a flash memory.
[0090] The memory 140 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 150. The one or more computer programs include a plurality of instructions, and when the plurality of instructions are executed by the processor 150, a calibration method of a user coordinate system executed on the robot 10 can be implemented.
[0091] In other embodiments, the robot 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the robot 10 .
[0092] The processor 150 may include one or more processing units, for example, the processor 150 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0093] The processor 150 provides computing and control capabilities. For example, the processor 150 is used to execute a computer program stored in the memory 140 to implement the above-mentioned method for calibrating the user coordinate system.
[0094] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the calibration method of the user coordinate system in the above-mentioned embodiments of the present application.
[0095] The computer-readable storage medium may be the internal memory of the robot described in the above embodiment, such as the hard disk or memory of the robot. The computer-readable storage medium may also be an external storage device of the robot, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the robot.
[0096] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the robot, etc.
[0097] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0098] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0099] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0101] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for calibrating a user coordinate system, applied to a robot, characterized in that: A laser displacement sensor is installed on the manipulator of the robot, a calibration plate is placed below the manipulator, a plurality of grooves are arranged on the calibration plate, the plurality of grooves form a rectangle, a center circle is arranged in the rectangle, and the method comprises: Determine an initial reference point according to an initial position of the laser displacement sensor, wherein the initial position represents an arbitrary position when the spot of the laser emitted by the laser displacement sensor falls within the center circle; Determining a target circle on a target plane parallel to the calibration plate according to the initial reference point and the preset radius; Controlling the manipulator to move along the circumference of the target circle, determining a plurality of target height values from a plurality of candidate height values collected by the laser displacement sensor, the plurality of target height values representing the distance between the laser displacement sensor and the groove bottoms of the plurality of grooves; The positions where the laser displacement sensor collects the multiple target height values are used as multiple calibration points; The origin and coordinate axes of the user coordinate system are determined according to the multiple calibration points.
2. The method for calibrating a user coordinate system according to claim 1, characterized in that: Before determining the target circle on the target plane parallel to the calibration plate, the method further includes: Acquire an initial value collected by the laser displacement sensor at the initial position, wherein the initial value represents the distance between the laser displacement sensor and the calibration plate; After controlling the manipulator to move a preset distance along a preset first horizontal direction, if the first candidate value collected by the laser displacement sensor is the same as the initial value, taking the first candidate value as a first reference value; The position of the laser displacement sensor when collecting the first reference value is used as a first reference point; After controlling the manipulator to move a preset distance along a preset second horizontal direction, if the second candidate value collected by the laser displacement sensor is the same as the initial value, the second candidate value is used as a second reference value, and the angle between the first horizontal direction and the second horizontal direction is a right angle; The position at which the laser displacement sensor collects the second reference value is used as a second reference point; The target plane is determined according to the initial reference point, the first reference point and the second reference point.
3. The method for calibrating a user coordinate system according to claim 2, characterized in that: After controlling the manipulator to move a preset distance along a preset first horizontal direction, the method further includes: If the first candidate value collected by the laser displacement sensor is greater than the initial value, control the manipulator to move in a downward vertical direction until the first candidate value collected by the laser displacement sensor is the same as the initial value; or If the first candidate value collected by the laser displacement sensor is smaller than the initial value, the manipulator is controlled to move in an upward vertical direction until the first candidate value collected by the laser displacement sensor is the same as the initial value.
4. The method for calibrating a user coordinate system according to claim 2, characterized in that: After controlling the manipulator to move a preset distance along a preset second horizontal direction, the method further includes: If the second candidate value collected by the laser displacement sensor is greater than the initial value, control the manipulator to move in a downward vertical direction until the second candidate value collected by the laser displacement sensor is the same as the initial value; or If the second candidate value collected by the laser displacement sensor is smaller than the initial value, the manipulator is controlled to move in an upward vertical direction until the second candidate value collected by the laser displacement sensor is the same as the initial value.
5. The method for calibrating a user coordinate system according to claim 1, characterized in that: The step of determining a plurality of target height values from a plurality of candidate height values collected by the laser displacement sensor comprises: After eliminating the candidate height values that are the same as the initial value from the multiple candidate height values, the multiple target height values are obtained.
6. The method for calibrating a user coordinate system according to claim 1, characterized in that: The multiple grooves correspond to different groove depths, and the positions where the laser displacement sensor collects the multiple target height values are used as multiple calibration points, including: Determine two minimum and identical height values from the multiple target height values as a first height value and a second height value, determine a first calibration point according to a position when the laser displacement sensor collects the first height value, and determine a second calibration point according to a position when the laser position sensor collects the second height value; Determine a third height value collected adjacent to the second height value from the multiple target height values according to a collection order determined by collection time of the multiple target height values, and determine a third calibration point according to a position of the laser position sensor when collecting the third height value; A fourth height value which is the same as the third height value is determined from the target height value, and a fourth calibration point is determined according to the position of the laser position sensor when collecting the fourth height value.
7. The method for calibrating a user coordinate system according to claim 6, characterized in that: Determining the origin and coordinate axes of the user coordinate system according to the multiple calibration points includes: Connecting the first calibration point and the second calibration point to obtain a first straight line; Connecting the third calibration point and the fourth calibration point to obtain a second straight line; Taking the intersection of the first straight line and the second straight line as the origin; The first straight line is used as the Y axis of the user coordinate system, and the second straight line is used as the X axis of the user coordinate system.
8. The method for calibrating a user coordinate system according to claim 1, characterized in that: The method further comprises: Obtain the side length of the rectangle and the radius of the center circle; Calculating a setting range of the preset radius according to the side length and the radius of the center circle; The preset radius is determined from within a set range of the preset radius.
9. A robot, characterized in that: The robot includes a manipulator, a laser displacement sensor mounted on the manipulator, a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the user coordinate system calibration method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for calibrating a user coordinate system according to any one of claims 1 to 8 is implemented.