A method, device and computer readable storage medium for position calibration

By sampling and processing the workpiece surface, and updating the simulation sampling points using the simulation closest point and the real closest point, the problem of workpieces in the prior art requiring cutting-edge to be calibrated is solved, and the accurate workpiece calibration and offline programming in the absence of tips is achieved.

CN114329881BActive Publication Date: 2025-05-09PEITIAN ROBOTICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011073599.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-09
Publication Date
2025-05-09
Estimated Expiration
2040-10-09

AI Technical Summary

Technical Problem

The prior art requires the workpiece to have three tips when calibrating the workpiece, otherwise the accuracy of the position data cannot be guaranteed, resulting in a large position difference between the simulation environment and the real environment, which in turn causes large errors in the program run in offline programming software.

Method used

By sampling the surface of the simulated workpiece in offline simulation software and the surface of the real workpiece in the real environment, multiple simulation sampling points and multiple real sampling points are obtained. These sampling points are processed to obtain the simulation closest point and the real closest point. These points are used to update the simulation sampling points, adjust the position of the simulation workpiece, and make the location of the simulation sampling points consistent with the update point.

Benefits of technology

In the absence of any tip on the workpiece surface, workpiece calibration is accurately completed, improving the accuracy of offline programming, and ensuring that the workpiece position in the simulation environment is consistent with the workpiece position in the real environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329881B_ABST
    Figure CN114329881B_ABST
Patent Text Reader

Abstract

The present application discloses a position calibration method, device and computer-readable storage medium, the position calibration method comprising: first, sampling the surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment respectively, to obtain multiple simulated sampling points and multiple real sampling points; then, processing all the simulated sampling points and the real sampling points respectively, to obtain at least one simulated closest point and at least one real closest point; then, using at least one simulated closest point, at least one real closest point, multiple simulated sampling points and multiple real sampling points, multiple simulated sampling points are updated to obtain corresponding updated points; finally, the position of the simulated workpiece is adjusted so that the position of the simulated sampling point is the same as the position of the corresponding updated point. In the above manner, the present application can accurately complete the workpiece calibration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a position calibration method, device and computer-readable storage medium. Background Art

[0002] Generally, before performing offline programming on the robot offline programming software, it is necessary to calibrate the tool and the workpiece first to ensure that the position relationship of the workpiece and the tool relative to the robot in the simulation environment is consistent with that in the real environment. Only in this way can it be guaranteed that the program generated on the offline programming software can be used in the real environment. Currently, when calibrating the workpiece, the three tips of the workpiece are used to calibrate the workpiece. In the real environment, the tool center point (TCP, Tool Center Point) of the robot is pointed to the three tips of the workpiece for workpiece calibration. However, when using the tip of the workpiece for calibration, it is necessary to ensure that the workpiece has three tips. Otherwise, the accuracy of the collected position data cannot be guaranteed regardless of whether it is in the real environment or the simulation environment, and the position of the workpiece relative to the robot in the simulation environment is greatly different from that in the real environment, which ultimately causes the program generated in the offline programming software to have a large error when running in the real environment. Summary of the invention

[0003] The present application provides a position calibration method, device and computer-readable storage medium, which can accurately complete workpiece calibration.

[0004] In order to solve the above technical problems, the technical solution adopted in the present application is to provide a position calibration method, which includes: sampling the surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment respectively to obtain multiple simulation sampling points and multiple real sampling points; processing all the simulation sampling points and the real sampling points respectively to obtain at least one simulation closest point and at least one real closest point; using at least one simulation closest point, at least one real closest point, multiple simulation sampling points and multiple real sampling points, multiple simulation sampling points are updated to obtain corresponding update points; the position of the simulated workpiece is adjusted so that the position of the simulation sampling point is the same as the position of the corresponding update point.

[0005] To solve the above technical problems, another technical solution adopted in the present application is to provide a position calibration device, which includes a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the above position calibration method.

[0006] In order to solve the above technical problems, another technical solution adopted in the present application is to provide a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, it is used to implement the above position calibration method.

[0007] Through the above scheme, the beneficial effects of the present application are: first, the surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment are sampled respectively to obtain multiple simulation sampling points and multiple real sampling points; then, all the simulation sampling points are processed to obtain at least one simulation closest point, and all the real sampling points are processed to obtain at least one real closest point; then, multiple simulation sampling points are updated using at least one simulation closest point, at least one real closest point, multiple simulation sampling points and multiple real sampling points to obtain corresponding update points, and the position of the simulated workpiece is adjusted according to the update points so that the position of the simulation sampling points is the same as the position of the corresponding update points, so that the position of the workpiece in the simulation environment is consistent with the position of the workpiece in the real environment; the present application uses the sampling points on the surface of the workpiece as a reference to complete the position calibration of the simulated workpiece, uses the simulation closest point and the real closest point as a reference to update the simulation sampling points, and uses the sampling points to calibrate the workpiece, which can accurately complete the workpiece calibration without any sharp points on the workpiece surface, which helps to improve the accuracy of offline programming. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0009] Figure 1 It is a flow chart of an embodiment of a position calibration method provided by the present application;

[0010] Figure 2(a) is Figure 1 A schematic diagram of the structure of the sampling point and the closest point in the embodiment shown;

[0011] Figure 2(b) is Figure 1 Another structural schematic diagram of the sampling point and the nearest point in the embodiment shown;

[0012] Figure 2(c) is Figure 1 Another structural schematic diagram of the sampling point and the nearest point in the embodiment shown;

[0013] Figure 3 is a flow chart of another embodiment of the position calibration method provided by the present application;

[0014] Figure 4(a) is Figure 3 A schematic diagram of the structure of a simulated workpiece and sampling points on the simulated workpiece in the embodiment shown;

[0015] Figure 4(b) is Figure 3 A schematic diagram of the structure of a real workpiece and sampling points on the real workpiece in the embodiment shown;

[0016] Figure 5(a) is Figure 3 A schematic diagram of the structure of the sampling points on the simulation workpiece in the embodiment shown;

[0017] Figure 5(b) is Figure 3 A schematic diagram of the structure of sampling points on a real workpiece in the embodiment shown;

[0018] Figure 6 It is a structural schematic diagram of an embodiment of a position calibration device provided by the present application;

[0019] Figure 7 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] See also Figure 1 , Figure 1 : is a flow chart of an embodiment of a position calibration method provided by the present application, the method comprising:

[0022] Step 11: Sample the surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment respectively to obtain a plurality of simulated sampling points and a plurality of real sampling points.

[0023] Offline simulation software is software that uses a simulated robot to process a simulated workpiece. The simulated workpiece has the same shape and size as the real workpiece, and the simulated sampling points correspond to the real sampling points one by one, that is, the sides where the simulated sampling points are located are consistent with the sides where the real sampling points are located; for example, the shapes of the simulated workpiece and the real workpiece are triangular pyramids, the edges on the simulated workpiece are denoted as AB, and the edges at the same position on the real workpiece are denoted as A'B'. AB is sampled to obtain the simulated sampling point C, and A'B' is sampled to obtain the real sampling point C'. The specific positions of C and C' may be different, but the line segments they are located on are the same.

[0024] Furthermore, the number of simulated sampling points is consistent with the number of real sampling points. The number of sampling points (including simulated sampling points and real sampling points) can be four, eight, twelve or more. The specific number can be selected according to the regularity of the specific workpiece shape. The more irregular the workpiece shape is, the more simulated sampling points and real sampling points are selected.

[0025] Step 12: Process all simulated sampling points and real sampling points respectively to obtain at least one simulated closest point and at least one real closest point.

[0026] After obtaining multiple simulated sampling points and multiple real sampling points, the corresponding simulated sampling points and the real closest points can be determined by using the line segments where the simulated sampling points and the real sampling points are located. The simulated closest point is the point closest to the sum of distances to each simulated line segment, and the real closest point is the point closest to the sum of distances to each real line segment; or the point closest to the sum of distances to at least some of the simulated sampling points is taken as the simulated closest point, and the point closest to the sum of distances to at least some of the real sampling points is taken as the real closest point; or other reasonable methods can be used to obtain the simulated closest point and the real closest point.

[0027] In a specific embodiment, the sampling point and the nearest point (including the simulated nearest point and the real nearest point) are taken as space points, and each line segment has two sampling points as an example for explanation. The number of the nearest points can be fixed, for example, 1. Assuming that the number of the real sampling points is 4, and the two real line segments where the four real sampling points are located intersect, then the nearest point is the intersection point of the two real line segments. If the two real line segments do not intersect at one point, a point closest to the sum of the distances of the two real line segments is calculated and used as the real nearest point. If the number of the real sampling points is 6, as shown in FIG2(a), C is the real sampling point, and the three real line segments L1, L2 and L3 formed by the six real sampling points are not parallel to each other and intersect at one point E. At this time, the real nearest point is the intersection point E, and the number is still one. It can be understood that the real line segments formed by more real sampling points may intersect at one point. At this time, the number of the real nearest points remains unchanged and is still one.

[0028] The number of true closest points can change with the number of true sampling points. Generally speaking, the more true sampling points there are, the more true closest points there are. As shown in FIG2(b), the three true line segments L1, L2, and L3 formed by the six true sampling points are not parallel and do not intersect at one point. At this time, there are two points with the smallest sum of distances from the true line segments. The point E1 with the smallest sum of distances from the line segments L1 and L2 and the point E2 with the smallest sum of distances from the line segments L2 and L3 are calculated respectively. Similarly, if the four true line segments formed by the eight true sampling points do not intersect, there are three true closest points, and so on.

[0029] In addition, there is a special case, as shown in Figure 2(c), where the number of true closest points is determined by the intersection points of the true line segments and the number of remaining non-intersecting true line segments; taking eight true sampling points forming four true line segments L1, L2, L3 and L4 as an example, line segments L1, L2 and L3 intersect at a point E1, and line segment L4 is not parallel to line segments L1, L2 and L3 and has no intersection. At this time, the number of true closest points is two, one is the intersection point E1 of line segments L1, L2 and L3, and the other is the point E2 with the smallest sum of distances from line segment L4 to any line segment of line segments L1-L3 obtained by calculation.

[0030] It can be understood that the simulation sampling points are similar to the real sampling points, and will not be described in detail here.

[0031] Step 13: using at least one simulated closest point, at least one real closest point, multiple simulated sampling points and multiple real sampling points, update multiple simulated sampling points to obtain corresponding updated points.

[0032] By performing relevant coordinate position calculations based on the position coordinate relationship between the simulated closest point, the real closest point, the simulated sampling point and the real sampling point, the update point corresponding to the simulated sampling point can be calculated, and then the simulated sampling point in the simulation environment can be updated through the update point.

[0033] Step 14: Adjust the position of the simulated workpiece so that the position of the simulation sampling point is the same as the position of the corresponding update point.

[0034] The position of the simulated workpiece is adjusted by assigning the position coordinates of the calculated update points to the simulation sampling points to update the position of the simulated workpiece, so that the position of the simulation sampling points corresponds to the position of the corresponding update points, thereby achieving accurate workpiece calibration.

[0035] The present embodiment provides a position calibration method, which obtains a plurality of simulation sampling points and a plurality of real sampling points by sampling the surface of a simulated workpiece in an offline simulation software and the surface of a real workpiece in a real environment; then all the simulation sampling points are processed to obtain at least one simulation closest point, and all the real sampling points are processed to obtain at least one real closest point; then the plurality of simulation sampling points are updated using at least one simulation closest point, at least one real closest point, a plurality of simulation sampling points, and a plurality of real sampling points to obtain corresponding update points; finally, the position coordinates of the calculated update points are assigned to the simulation sampling points to update the position of the simulated workpiece, so that the position of the simulation sampling points is the same as the position of the corresponding update points, thereby keeping the position of the workpiece in the simulation environment consistent with that in the real environment; the workpiece is calibrated using the sampling points, the simulation closest point and the real closest point are calculated using the sampling points, and then the update points are calculated using the simulation closest point and the real closest point, thereby updating the simulation sampling points, so that the workpiece calibration can be completed accurately without any sharp points on the workpiece surface, thereby improving the accuracy of offline programming.

[0036] See also Figure 3 , Figure 3 : is a flow chart of another embodiment of the position calibration method provided by the present application, the method comprising:

[0037] Step 31: Sampling the surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment respectively to obtain a plurality of simulated sampling points and a plurality of real sampling points.

[0038] The number of multiple simulation sampling points is a preset number, the multiple simulation sampling points form multiple simulation line segments, and the multiple simulation line segments are not parallel; the number of multiple real sampling points is a preset number, the multiple real sampling points form multiple real line segments, and the multiple real line segments are not parallel.

[0039] Furthermore, before sampling, a preset number of sampling points can be set and obtained, and sampling can be performed according to this preset number. The preset number is determined by the regularity of the workpiece shape, and the sampled multiple sampling points form multiple line segments (including simulated line segments and real line segments), and the line segments are not parallel to each other.

[0040] In a specific embodiment, assuming that the workpiece is an irregular prism, if only four simulated sampling points and four real sampling points are selected, and two simulated line segments and two real line segments are used for calibration in the simulated environment and the real environment respectively, the positional relationship between the sampling points and the line segments cannot correspond to each other, and thus the shape of the prism cannot be determined. In this case, more sampling points need to be selected to form more line segments to make the shape of the simulated workpiece correspond to that of the real workpiece. For example, twelve simulated sampling points, twelve real sampling points, six simulated line segments, and six real line segments are selected.

[0041] In this embodiment, taking the case where the shape of the workpiece is a regular rectangle and the preset number of simulation sampling points and real sampling points is four as an example, the multiple simulation sampling points include four simulation sampling points, two of which are recorded as a first simulation sampling point and a second simulation sampling point, and a simulation line segment where the first simulation sampling point is located intersects with a simulation line segment where the second simulation sampling point is located; the multiple real sampling points include four real sampling points, two of which are recorded as a first real sampling point and a second real sampling point, and a simulation line segment where the first real sampling point is located intersects with a simulation line segment where the second real sampling point is located.

[0042] like Figure 4(a)-Figure 4(b) and Figure 5(a)-5(b) As shown, FIG4(a) is a schematic diagram of the structure of the sampling points on the simulated workpiece, FIG4(b) is a schematic diagram of the structure of the sampling points on the real workpiece, FIG5(a) is a schematic diagram of the structure of the sampling points in the simulation environment, and FIG5(b) is a schematic diagram of the structure of the sampling points in the real environment. Four sampling points are respectively taken in the simulation environment and the real environment, and the spatial point coordinates of the four sampling points in the simulation environment and the real environment relative to the robot base coordinate system are respectively collected. The four simulation sampling points are respectively recorded as AD, and the four real sampling points are respectively recorded as A*-D*. The two points determine a straight line. The simulation sampling point A and the simulation sampling point B form a first simulation line segment L1, and the simulation sampling point C and the simulation sampling point D form a second simulation line segment L2. The first simulation line segment L1 and the second simulation line segment L2 are not parallel; similarly, the real sampling point A* and the real sampling point B* form a first real line segment L1*, and the real sampling point C* and the real sampling point D* form a second real line segment L2*, and the first real line segment L1* and the second real line segment L2* are not parallel.

[0043] In this embodiment, the simulated sampling point A is recorded as the first simulated sampling point, the simulated sampling point D is recorded as the second simulated sampling point, the simulated sampling point B is recorded as the third simulated sampling point, and the simulated sampling point C is recorded as the fourth simulated sampling point; the real sampling point A* is recorded as the first real sampling point, the real sampling point D* is recorded as the second real sampling point, the real sampling point B* is recorded as the third real sampling point, and the real sampling point C* is recorded as the fourth real sampling point; the first simulated sampling point A and the third simulated sampling point B form a first simulated line segment L1, the second simulated sampling point D and the fourth simulated sampling point C form a second simulated line segment L2; the first real sampling point A* and the third real sampling point B* forms a first real line segment L1*, and the second real sampling point D* and the fourth real sampling point C* form a second real line segment L2*; the first simulated line segment L1 where the first simulated sampling point A is located is not parallel to the second simulated line segment L2 where the second simulated sampling point D is located, and the first real line segment L1* where the first real sampling point A* is located is not parallel to the second real line segment L2* where the second real sampling point D* is located; it can be understood that the first simulated sampling point can also be selected as B, the second simulated sampling point can also be selected as C, the first real sampling point can also be selected as B*, and the second real sampling point can also be selected as C*, as long as the line segments where the two sampling points are located are not parallel.

[0044] Step 32: Process all simulated sampling points and real sampling points respectively to obtain at least one simulated closest point and at least one real closest point.

[0045] The simulated closest point is the point with the smallest sum of distances to multiple simulated line segments, and the real closest point is the point with the smallest sum of distances to multiple real line segments. In general, because the line segments where the sampling points are located are not parallel and theoretically will intersect, the simulated closest point is the intersection of all simulated line segments, and the real closest point is the intersection of all real line segments. However, in the case of actual acquisition, there may be accidental errors in the position data of the collected sampling points, which may cause the two straight lines to not intersect. At this time, the point with the smallest sum of distances to multiple simulated line segments can be calculated in the simulation environment and taken as the simulated closest point. Similarly, the point with the smallest sum of distances to multiple real line segments can be calculated in the real environment and taken as the real closest point to reduce acquisition errors and improve the accuracy of calibration.

[0046] In this embodiment, as shown in Figures 4(a) to 4(b) and Figure 5(a)-5(b) As shown, the shape of the sampled workpiece is a regular rectangle, four sampling points are taken in the simulation environment and the real environment respectively, there are two simulation line segments and two real line segments respectively, then there is only one simulation closest point and one real closest point respectively, at this time the first simulation line segment L1 and the second simulation line segment L2 intersect at point E. In this embodiment, point E is taken as the simulation closest point, the first real line segment L1* and the second real line segment L2* intersect at point E*, and point E* is taken as the real closest point.

[0047] The position of the first simulated sampling point A is updated using the coordinate value of the first real sampling point A* and the coordinate value of the real nearest point E* to obtain a first updated point; the position of the second simulated sampling point D is updated using the coordinate value of the second real sampling point D* and the coordinate value of the real nearest point E* to obtain a second updated point.

[0048] Step 33: Calculate the distances between the simulated closest point and the first simulated sampling point and the second simulated sampling point respectively to obtain the first simulated distance and the second simulated distance; calculate the distances between the real closest point and the first real sampling point and the second real sampling point respectively to obtain the first real distance and the second real distance.

[0049] As shown in Figure 5(a), according to the distance formula between two points, the distance between the simulated nearest point E and the first simulated sampling point A is calculated to obtain the first simulation distance EA, and the distance between the simulated nearest point E and the second simulation sampling point D is calculated to obtain the second simulation distance ED; as shown in Figure 5(b), the distance between the real nearest point E* and the first real sampling point A* is calculated to obtain the first real distance E*A*, and the distance between the real nearest point E* and the second real sampling point D* is calculated to obtain the second real distance E*D*.

[0050] Step 34: Calculate the ratio between the first simulation distance and the first real distance and the ratio between the second simulation distance and the second real distance respectively to obtain a first ratio and a second ratio.

[0051] In this embodiment, the length ratio of the first simulation distance EA to the first real distance E*A* is EA / E*A*, recorded as the first ratio S1, and the length ratio of the second simulation distance ED to the second real distance E*D* is ED / E*D*, recorded as the second ratio S2.

[0052] Step 35: Record the coordinate difference between the first real sampling point and the real closest point as the first coordinate difference; record the coordinate difference between the second real sampling point and the real closest point as the second coordinate difference.

[0053] In this embodiment, the coordinates of the first real sampling point A* are assumed to be (x1, y1), the coordinates of the second real sampling point D* are assumed to be (x2, y2), and the coordinates of the real closest point E* are assumed to be (x0, y0).

[0054] The first coordinate difference is denoted as Y1, the coordinate difference between the first real sampling point A* and the real nearest point E* is Y1=(x1-x0, y1-y0); the second coordinate difference is denoted as Y2, the coordinate difference between the second real sampling point D* and the real nearest point E* is Y2=(x2-x0, y2-y0).

[0055] Step 36: superimpose the product of the first coordinate difference and the first ratio with the coordinate value of the first real sampling point to obtain the coordinate value of the first update point; superimpose the product of the second coordinate difference and the second ratio with the coordinate value of the second real sampling point to obtain the coordinate value of the second update point.

[0056] In this embodiment, the first update point is denoted as A', and its calculation formula is the product of the first coordinate difference Y1 and the first ratio S1 plus the coordinate value of the first real sampling point A*, then A'=Y1×S1+A*=(x1-x0, y1-y0)×S1+A*=(x1-x0, y1-y0)×EA / E*A*+(x1, y1); the second update point is denoted as D', and its calculation formula is the product of the second coordinate difference Y2 and the second ratio S2 plus the coordinate value of the second real sampling point D*, then D'=Y2×S2+D*=(x2-x0, y2-y0)×S2+D*=(x2-x0, y2-y0)×ED / E*D*+(x2, y2).

[0057] Further, the first coordinate difference Y1 is multiplied by the first ratio S1 and then added to the position coordinate of the first real sampling point A*, and the position coordinate corresponding to the first simulated sampling point A in the real environment is obtained in the same coordinate system; similarly, the second coordinate difference Y2 is multiplied by the second ratio S2 and then added to the position coordinate of the second real sampling point D*, and the position coordinate corresponding to the second simulated sampling point D in the real environment is obtained in the same coordinate system.

[0058] Step 37: Adjust the position of the simulated workpiece so that the position of the simulation sampling point is the same as the position of the corresponding update point.

[0059] Assign the coordinate value of the real closest point E* to the simulated closest point E, assign the coordinate value of the first updated point A' to the first simulated sampling point A, and assign the coordinate value of the second updated point D' to the second simulated sampling point D, that is:

[0060] E=E*=(x0,y0)

[0061] A=A'=(x1-x0,y1-y0)×EA / E*A*+(x1,y1)

[0062] D=D'=(x2-x0,y2-y0)×ED / E*D*+(x2,y2)

[0063] By calculating the position coordinates of the first update point A' and the second update point D', and assigning their position coordinate values ​​to the corresponding first simulation sampling point A and second simulation sampling point D in the simulation environment, the position relationship between the workpiece and the robot in the simulation environment is unified with the position coordinates of the workpiece and the robot in the real environment, thereby completing the position calibration of the workpiece.

[0064] In this embodiment, the surface of the simulated workpiece in the offline software and the surface of the real workpiece in the real environment are sampled respectively to obtain four simulated sampling points and four real sampling points; then the first simulated distance and the second simulated distance and the first real distance and the second real distance are obtained by calculation respectively; then the ratio of the first simulated distance to the first real distance and the ratio between the second simulated distance and the second real distance are calculated to obtain the first ratio and the second ratio; then the coordinate value of the first update point and the coordinate value of the second update point can be obtained by using the first ratio, the second ratio, the first real sampling point, the real nearest point, the second real sampling point or the real nearest point; finally, the coordinate value of the real nearest point is assigned to the simulated nearest point, the coordinate value of the first update point is assigned to the first simulated sampling point, and the coordinate value of the second update point is assigned to the second simulated sampling point, so as to adjust the position of the simulated workpiece so that the position of the simulated sampling point is the same as the position of the corresponding update point; in this embodiment, by sampling four sampling points on the workpiece and using these sampling points to calculate the coordinates of the update point, the acquisition error in actual operation can be reduced, and the workpiece calibration can be accurately completed without any sharp tip on the workpiece surface.

[0065] See also Figure 6 , Figure 6 It is a structural diagram of an embodiment of a position calibration device provided in the present application. The position calibration device 60 includes a memory 61 and a processor 62 connected to each other. The memory 61 is used to store a computer program. When the computer program is executed by the processor 62, it is used to implement the position calibration method in the above embodiment.

[0066] See also Figure 7 , Figure 7 It is a structural diagram of an embodiment of a computer-readable storage medium provided in the present application. The computer-readable storage medium 70 is used to store a computer program 71. When the computer program 71 is executed by a processor, it is used to implement the position calibration method in the above embodiment.

[0067] The computer-readable storage medium 70 may be a server, a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other media that can store program codes.

[0068] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of modules or units is only a logical function division, and 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.

[0069] 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 present embodiment.

[0070] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0071] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A position calibration method, characterized in that: include: The surface of the simulated workpiece in the offline simulation software and the surface of the real workpiece in the real environment are sampled respectively to obtain a plurality of simulated sampling points and a plurality of real sampling points; Processing all the simulated sampling points and the real sampling points respectively to obtain at least one simulated closest point and at least one real closest point; Using the at least one simulated closest point, the at least one real closest point, the multiple simulated sampling points and the multiple real sampling points, the multiple simulated sampling points are updated to obtain corresponding updated points; Adjusting the position of the simulation workpiece so that the position of the simulation sampling point is the same as the position of the corresponding update point; The multiple simulated sampling points include a first simulated sampling point and a second simulated sampling point, the multiple real sampling points include a first real sampling point and a second real sampling point, and the step of updating the multiple simulated sampling points by using the at least one simulated closest point, the at least one real closest point, the multiple simulated sampling points and the multiple real sampling points to obtain corresponding updated points includes: Using the coordinate value of the first real sampling point and the coordinate value of the real closest point to update the position of the first simulation sampling point, to obtain a first updated point; Using the coordinate value of the second real sampling point and the coordinate value of the real closest point to update the position of the second simulation sampling point, to obtain a second updated point; Calculating the distances between the simulated closest point and the first simulated sampling point and the second simulated sampling point respectively to obtain a first simulated distance and a second simulated distance; Calculating the distances between the real closest point and the first real sampling point and the second real sampling point respectively to obtain a first real distance and a second real distance; Calculate the coordinate value of the first update point by using the first simulated distance, the first real distance, the coordinate value of the first real sampling point and the coordinate value of the real closest point; Calculate the coordinate value of the second update point by using the second simulated distance, the second real distance, the coordinate value of the second real sampling point and the coordinate value of the real nearest point; Respectively calculating a ratio between the first simulated distance and the first real distance and a ratio between the second simulated distance and the second real distance to obtain a first ratio and a second ratio; Generate the coordinate value of the first update point by using the first ratio, the coordinate value of the first real sampling point and the coordinate value of the real closest point; Generate the coordinate value of the second update point by using the second ratio, the coordinate value of the second real sampling point and the coordinate value of the real nearest point; Record the coordinate difference between the first real sampling point and the real closest point as the first coordinate difference; Calculate the coordinate value of the first update point by using the first coordinate difference, the first ratio and the coordinate value of the actual closest point; Record the coordinate difference between the second real sampling point and the real closest point as the second coordinate difference; Calculate the coordinate value of the second update point by using the second coordinate difference, the second ratio and the coordinate value of the true nearest point; Superimposing the product of the first coordinate difference and the first ratio with the coordinate value of the first real sampling point to obtain the coordinate value of the first update point; The coordinate value of the second update point is obtained by superimposing the product of the second coordinate difference and the second ratio with the coordinate value of the second real sampling point.

2. The position calibration method according to claim 1, characterized in that: The number of the plurality of simulation sampling points is a preset number, the plurality of simulation sampling points form a plurality of simulation line segments, and the plurality of simulation line segments are not parallel; the number of the plurality of real sampling points is the preset number, the plurality of real sampling points form a plurality of real line segments, and the plurality of real line segments are not parallel; The simulated closest point is a point whose sum of distances to the multiple simulated line segments is the smallest, and the real closest point is a point whose sum of distances to the multiple real line segments is the smallest.

3. The position calibration method according to claim 2, characterized in that: The simulation line segment where the first simulation sampling point is located intersects with the simulation line segment where the second simulation sampling point is located; the simulation line segment where the first real sampling point is located intersects with the simulation line segment where the second real sampling point is located.

4. A position calibration device, characterized in that: It comprises a memory and a processor connected to each other, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, it is used to implement the position calibration method according to any one of claims 1 to 3.

5. A computer-readable storage medium for storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the position calibration method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Position calibration method, device, apparatus and storage medium for dynamic obstacle

    CN109146938A

  • Calibration method and device for control program

    CN109814434A