Positioning correction method and device for object, controller and storage medium
Patent Information
- Application Number
- CN202310087134.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-02-08
AI Technical Summary
[0008]本发明的目的是提供一种用于物体在可移动或固定的机器人在进行上下料、装配时的定位纠偏的方法、装置、控制器及存储介质,以解决机器人设备或物体位置经常移动后发生变化需要重新定位,以满足上下料或进行装配的引导定位精度要求,或者用于机器人使用过程中被撞击或意外导致机器人定位基准丢失,复位使用过程中会存在复位时间长,且定位精度低、功率大、容易受环境污染源影响等问题
1.算法简单:
Smart Images

Figure CN118456403B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of object positioning and correction technology, and in particular to a method, device, controller and storage medium for positioning and correction of objects during loading and unloading. Background Technology
[0002] To address the problems of high labor intensity, low production efficiency, error-proneness, and unstable product quality caused by manual operation of workpiece loading and unloading between various processes in most enterprises, existing companies are introducing composite robots (carrier carts + six-axis articulated robots) to assist in the automation of processing equipment. When introducing robots to achieve automated production, multiple machining centers are often combined to form a continuous production line, and then carrier carts are used to move robots or objects between the machining centers. Of course, other processing equipment also involves loading and unloading objects or assembling multiple parts.
[0003] During the loading, unloading, or assembly of objects, for product parts with high precision requirements and complex processing, accurate positioning between the object and the machinery is necessary. However, during the transfer of objects by transport vehicles, robots, or other means, deviations in position between the object and the machinery inevitably occur, resulting in poor consistency in object positioning during loading and unloading. Therefore, technical means are needed to recalibrate the positional relationship between the object and the machinery. Existing object positioning methods include the following: One method is image acquisition and positioning via camera. This method requires the use of an industrial camera. The camera transmits the captured image to a processor, which then converts the pixels and uses algorithms to calculate the positional deviation. This method is highly dependent on the environment, and the lens is greatly affected by adverse conditions such as moisture, oil, impurities, and varying light levels. Moreover, after the visual algorithms and pixel calculations are applied, this method introduces a significant cumulative error. In addition, the positioning accuracy is relatively low, only about 0.5mm, due to the influence of lens resolution. Furthermore, the effect is even worse when using a two-dimensional planar camera.
[0004] Secondly, there is the laser scanning positioning method. Since the accuracy of the laser scanning positioning algorithm is affected by the number of particles, a large number of particles are required to achieve industrial-grade positioning accuracy. This results in a huge computational burden, requiring mid-to-high-end CPUs to meet the real-time requirements of the algorithm. However, due to limitations in power consumption, cost, and physical size, there are situations where it is impossible to install these large CPUs and GPUs.
[0005] Thirdly, the structured light 3D scanning positioning method is used. A structured light 3D camera is used to perform structured light 3D scanning on the object to obtain the object's positioning information. The accuracy obtained by this method is only at the millimeter level, which cannot meet the positioning requirements of high precision.
[0006] Fourth, the depth-sensing camera scanning method has even lower accuracy, also at the millimeter level, and cannot meet the positioning requirements for high precision.
[0007] In view of this, how to solve the problems of long reset time, low positioning accuracy, high power consumption, susceptibility to environmental pollution sources, and low workpiece positioning accuracy during the repositioning process after the position of robot equipment or object changes after movement, has become the research topic to be solved by this invention. Summary of the Invention
[0008] The purpose of this invention is to provide a method, device, controller, and storage medium for positioning and correction of objects in movable or fixed robots during loading, unloading, and assembly. This addresses the need for repositioning of robots or objects whose positions frequently change after movement, in order to meet the guidance and positioning accuracy requirements for loading, unloading, or assembly. Alternatively, it addresses the problems of long reset times, low positioning accuracy, high power consumption, and susceptibility to environmental pollution sources when a robot loses its positioning reference due to impact or accident during use.
[0009] To achieve the above objectives, a first aspect of the present invention proposes a method for positioning and correcting an object, the innovation of which lies in that the method includes: Fix the robotic arm to the machine and mark the positional relationship between the origin of the robotic arm and the machine. Fix the rangefinder to the end effector of the robot arm, set the ranging point of the rangefinder, and calibrate the positional relationship between the ranging point of the rangefinder and the origin of the robot arm. The object to be measured is placed near the ranging point within the workspace of the robotic arm; A robotic arm drives a rangefinder to approach the object to be measured and reach the measurement point to obtain multiple distance data from the object's surface. The acquired distance data is sent to the controller, which calculates the positional deviation between the object and the machine based on the distance data. The positional deviation includes at least the rotation angle offset and the planar coordinate offset. Based on the position deviation value calculated by the controller, the relative posture between the machine and the object is adjusted to correct the deviation, thereby enabling rapid and accurate positioning and correction of at least one of the object or machine after a change in relative displacement.
[0010] The second aspect of the present invention provides a positioning and correction device for an object, used for positioning and correction in the method described in the first aspect, the innovation of which is that the device includes: a robotic arm, a rangefinder, and a controller. A robotic arm is used to drive a rangefinder to or away from a ranging point after receiving instructions. The robotic arm has a positioning base that is fixedly connected to the machine equipment, and the positioning base is used to calibrate the positional relationship with the machine equipment. The robotic arm also has an execution end that is fixedly connected to the rangefinder, and the execution end is used to calibrate the positional relationship with the rangefinder. A rangefinder is used to acquire distance data from the surface of an object at a measurement point. One or more distance data points can be acquired at a time. The controller is used to control the movement of the robotic arm according to instructions, control the rangefinder to collect distance data, calculate the positional deviation between the object and the machine after obtaining the distance data, and then control and adjust the relative posture of at least one of the machine and the object to correct the deviation.
[0011] A third aspect of the present invention provides a controller comprising a storage unit, a processing unit, and a computing program stored on the storage unit and executable on the processing unit, wherein the controller, when executing the computing program, implements the steps of the method described in the first aspect of the present invention.
[0012] A fourth aspect of the invention provides a readable storage medium on which a computationally readable storage medium stores a computational program, which, when executed by a controller, causes the processor to perform the steps of the method described in the first aspect of the invention.
[0013] The relevant content of this invention is explained as follows: 1. By implementing the above-described technical solution of this invention, if the positioning and correction device itself has a built-in controller, no additional complex logic chips and circuits are needed for data acquisition. The acquisition and calculation of distance data can be integrated into the built-in controller. The controller can also be used for calculations within the machine's controller or via a PC chip on a host computer, eliminating the need for external chips. This not only makes the structure more compact and reduces the complexity of the system design but also significantly reduces costs. The processing method proposed in this invention is also very simple and easy to implement, requiring only simple steps and calculations without any complex theoretical calculations. The error after acquisition and positioning can reach 0.01mm, greatly improving the consistency of object position and thus significantly enhancing the accuracy of object loading / unloading positioning and the assembly of object parts.
[0014] 2. In the technical solution of the first aspect above, the object has a first plane, a second plane and a third plane, the first plane is a horizontal plane, and the first plane, the second plane and the third plane are perpendicular to each other.
[0015] 3. In the technical solution of the first aspect above, in the step of acquiring multiple distance data of the object surface, the ranging point includes a first ranging point located on the second plane and the third plane, and the distance values of three points are obtained at the first ranging point, the three points are points a, b and c, and points a, b and c are on the same ranging horizontal plane. The distance values of points a, b and c are converted to establish a planar coordinate system, which are (Xa Ya), (Xb Yb) and (Xc Yc) respectively. The rotation angle offset δ and the plane coordinate offset σ of the object on the first plane are calculated by the algorithm. The rotation angle offset δ and the plane coordinate offset σ are the offsets of the relative posture that the object needs to adjust relative to the machine.
[0016] 4. In the technical solution of the first aspect mentioned above, When there is no offset in the relative position between the machine and the object, the three points measured on the object at the first ranging point are A, B and C. The point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D. The plane coordinates of point D are (XD YD). Point d is defined as the point on the object under test that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotational angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the obtained coordinates of points a, b, and c. The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the ranging horizontal plane based on the obtained coordinates (Xa Ya) and (Xb Yb) of points a and b. The three vertices of this first right-angled triangle model are points a, b, and h, with point h being the right-angle vertex. The coordinates of point h are (Xb Ya). The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. Substituting the result into the formula: ∠bah = arctan((Yb-Ya) / (Xb-Xa)); where the included angle ∠bah is the rotational angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second right-angled triangle model and a third right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xb Yb) and (Xc Yc) of points b and c. The three vertices of the second right triangle model are c, b, and i, with i being the right-angle vertex and its coordinates being (Xc Yb). The second right triangle model has an included angle ∠cbi, an included angle ∠iba between i, b, and a, and an included angle ∠icd between i, c, and b. In the third right-angled triangle model, the three vertices are c, j, and d, with j being the right-angle vertex. The coordinates of j are (Xc, Yj). In the second right-angled triangle model, there is an included angle ∠jcd. In the constructed first right-angled triangle model, second right-angled triangle model, and third right-angled triangle model, the included angle ∠cba = ∠cbi + ∠iba, and the included angle ∠iba = ∠jcd = ∠icd = ∠bah; Using the arctangent trigonometric function, we can find the included angle ∠cbi = arctan((Yc-Yb) / (Xb-Xc)) given the two legs of the right triangle. Based on the calculated included angles ∠bah and ∠cbi, we can derive ∠cba = ∠cbi + ∠iba = arctan((Yc-Yb) / (Xb-Xc)) + arctan((Yb-Ya) / (Xb-Xa)). The distance from point b to point c has a length bc. Using the Pythagorean theorem, we can find the length of the hypotenuse bc based on the two legs of a right triangle: bc = ... ; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: cd = bc sin∠cba. The distance from point c to point j has a length cj. Using the law of cosines, we can calculate the length of the adjacent straight side based on the given hypotenuse and an acute angle: cj = cd cos∠jcd. The distance from point d to point j has a length dj. Using the law of sine, the length of the opposite side can be calculated based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. After obtaining the length cj from point c to point j and the length dj from point d to point j, calculate the coordinate system (XdYd) of point d, where the X coordinate of point d is Xd=Xc+dj and the Y coordinate of point d is Yd=Yc-cj. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
[0017] 5. In the above-mentioned first aspect of the technical solution, when there is no offset between the relative position of the machine and the object, the three points measured on the object at the first ranging point are A, B and C, respectively, and the point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D, and the plane coordinates of point D are (XD YD). Point d is defined as the point on the object under test that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotational angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the obtained coordinates of points a, b, and c. The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xa Ya) and (Xb Yb) of points a and b. The three vertices of the first right-angled triangle model are points a, b, and h, with point b being the right-angle vertex. The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. The included angle ∠bah is the rotation angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second right-angled triangle model, a third right-angled triangle model, a fourth right-angled triangle model, and a fifth right-angled triangle model on the ranging horizontal plane based on the obtained coordinates (Xb Yb) and (Xc Yc) of points b and c. The three vertices of the second right triangle model are c, j, and d, with j being the right-angle vertex. The coordinates of j are (Xc, Yd). The second right triangle model has an included angle ∠jcd. The three vertices of the third right triangle model are c, e, and i, with i being the right-angle vertex. The coordinates of i are (Xc Ye), and the coordinates of e are (XO Ye). The third right triangle model has an included angle ∠cei. The four right-angled triangles have three vertices: a, m, and f. Point m is the right-angle vertex, with coordinates (Xa, YO) and (Xf, YO). The four right-angled triangles also have an included angle ∠maf. The five right-angled triangles have three vertices: k, d, and a, with k being the right-angle vertex and its coordinates being (Xd Ya). The four right-angled triangles have an included angle ∠kad. In the constructed first right-angled triangle model, second right-angled triangle model, third right-angled triangle model, fourth right-angled triangle model, and fifth right-angled triangle model, the included angles ∠bah = ∠jcd = ∠cei = ∠maf = ∠kad; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. Based on the distance values collected by the ranging mechanism, the length ce between point c and point e is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: ei = ce cos∠cei. Based on the distance values collected by the ranging mechanism, the length af from point a to point f is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: am = af cos∠maf. The distance from point a to point d has a length ad. Using the law of sines, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: kd = ad sin ∠kad. Given the lengths ei from point e to point i, dj from point d to point j, am from point a to point m, and kd from point k to point d, calculate the coordinate system (Xd Yd) of point d, where the X coordinate of point d is Xd = ei + dj, and the Y coordinate of point d is Yd = am - kd. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
[0018] 6. In the technical solution of the first aspect above, in the step of acquiring multiple distance data of the object surface, the ranging point includes a first plane close to the object and a second ranging point on the second plane. Three distance values are obtained at the second ranging point, namely two distance values of the first plane and one distance value of the second plane. A three-dimensional coordinate system is established by conversion, and the angular deviation between the robot and the object is compensated by the feedback of the values.
[0019] 7. In the technical solution of the first aspect described above, the step of acquiring multiple distance data of the object surface includes at least one of the following methods: Multiple distance values on the surface of an object are acquired multiple times using a single sensor; Multiple distance values on the surface of an object are acquired simultaneously using multiple sensors; Alternatively, you can first obtain two distance values on one of the planes of the object, calculate the rotation angle offset δ and the plane coordinate offset σ at that position, and then rotate the object according to the rotation angle offset δ and the plane coordinate offset σ. Then, measure the distance values on the other plane of the object to calculate the deviation in the other direction.
[0020] 8. In the technical solution of the first aspect described above, the step of correcting the deviation by controlling the relative posture between the machine and the object includes at least one of the following methods: Correcting the relative posture between the machine and the object by moving the object while keeping the machine stationary; Correcting the relative posture between the machine and the object by keeping the object still while the machine moves. Correcting the relative posture between machinery and objects by moving objects or machinery. The relative posture of the object and the part to be assembled is corrected by keeping the object and the machine equipment stationary.
[0021] 9. In the technical solution of the second aspect above, the rangefinder is a laser rangefinder, which is used to emit laser light and receive reflected laser light, and to collect photoelectric analog signals; The device also includes an analog-to-digital converter, which is used to convert the photoelectric analog signal from the photoelectric sensor into digital photoelectric signal data and transmit the digital photoelectric signal data to the controller.
[0022] 10. In the technical solution of the second aspect above, the rangefinder can also be other instruments that can be used for distance measurement, such as a contact displacement sensor.
[0023] 11. In this invention, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, a direct connection, or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0024] 12. In this invention, the terms “center,” “upper,” “lower,” “axial,” “bottom,” “inner,” “outer,” etc., indicate the orientation or positional relationship based on the orientation or positional assembly relationship shown in the drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0025] 13. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0026] Due to the application of the above-mentioned solution, the present invention has the following advantages and effects compared with the prior art: 1. The algorithm is simple: The detection sensor of this invention is a laser displacement sensor (which can also be replaced with a mechanical contact displacement sensor, and can be adjusted according to project requirements). It can directly calculate the distance value with millimeter-level accuracy, which simplifies many steps compared to the pixel conversion algorithm of a camera.
[0027] 2. Low hardware requirements and low cost: The algorithm required by this invention can be met by the basic algorithms that come with the robot itself. There is no need to add a controller to complete the algorithm. Moreover, the hardware cost of the laser displacement sensor is much lower than that of the camera lens light source.
[0028] 3. Low environmental requirements and high stability: This invention significantly reduces environmental requirements compared to camera-based methods, especially in the CNC machining industry, where it is minimally affected by environments such as oil stains, aluminum shavings, and water.
[0029] 4. High precision, small error, and fast speed: Compared to cameras, which do not require pixel calculations, visual algorithms, and other superposition algorithms to generate cumulative errors, this invention uses numerical conversion results directly detected by a laser displacement sensor, and the final overall accuracy can be controlled within ±0.01mm. Attached Figure Description
[0030] Appendix Figure 1 This is a schematic diagram illustrating the point selection on an object in Embodiment 1 of the present invention; Appendix Figure 2 This is a schematic diagram illustrating the establishment of each right-angled triangle model in Embodiment 1 of the present invention; Appendix Figure 3 This is a schematic diagram illustrating the point selection on an object in Embodiment 2 of the present invention; Appendix Figure 4 This is a schematic diagram illustrating the establishment of each right-angled triangle model in Embodiment 2 of the present invention; Appendix Figure 5 To be continued Figure 8 Schematic diagrams illustrating methods one through four, which involve measuring from the outside in. Appendix Figure 9 To be continued Figure 19 This is a schematic diagram of methods five through fifteen, which involve measuring from the inside out. Implementation
[0031] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application are described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below. Example
[0032] Embodiment 1 of this invention proposes a positioning and correction method for objects. The method includes: Fix the robotic arm to the machine and mark the positional relationship between the origin of the robotic arm and the machine. Fix the rangefinder to the end effector of the robot arm, set the ranging point of the rangefinder, and calibrate the positional relationship between the ranging point of the rangefinder and the origin of the robot arm. The object to be measured is placed near the ranging point within the workspace of the robotic arm; A robotic arm drives a rangefinder to approach the object to be measured and reach the measurement point to obtain multiple distance data from the object's surface. The acquired distance data is sent to the controller, which calculates the positional deviation between the object and the machine based on the distance data. The positional deviation includes at least the rotation angle offset and the planar coordinate offset. Based on the position deviation value calculated by the controller, the relative posture between the machine and the object is adjusted to correct the deviation, thereby enabling rapid and accurate positioning and correction of at least one of the object or machine after a change in relative displacement.
[0033] For details, see attached. Figure 1 Appendix Figure 2As shown, in Embodiment 1 of the present invention, for the object to be measured, the object has a first plane, a second plane, and a third plane. The first plane is a horizontal plane, and the first, second, and third planes are perpendicular to each other. In the step of acquiring multiple distance data of the object surface, the ranging point includes a first ranging point located on the second and third planes. The distance values of three points are obtained at the first ranging point, namely points a, b, and c, and points a, b, and c are on the same ranging horizontal plane. The distance values of points a, b, and c are converted to establish a planar coordinate system, namely (Xa Ya), (Xb Yb), and (Xc Yc). The rotation angle offset δ and the planar coordinate offset σ of the object on the first plane are calculated by an algorithm. The rotation angle offset δ and the planar coordinate offset σ are the offsets of the object relative to the machine equipment that need to be adjusted in attitude.
[0034] In Embodiment 1 of the present invention, as shown in the appendix Figure 1 As shown below, when there is no offset in the relative position between the machine and the object, the three points measured on the object at the first ranging point are A, B and C. The point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D. The plane coordinates of point D are (XD YD).
[0035] As attached Figure 1 As shown above, point d is the point on the object to be measured that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotation angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the coordinates of points a, b, and c.
[0036] The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xa, Ya) and (Xb, Yb) of points a and b, as shown in the attached figure. Figure 2 As shown, the three vertices of the first right-angled triangle model are points a, b, and h, with point h being the right-angle vertex. The coordinates of point h are (Xb-Ya). The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. Substituting into the formula: ∠bah = arctan((Yb-Ya) / (Xb-Xa)); where the included angle ∠bah is the rotational angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second right-angled triangle model and a third right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xb Yb) and (Xc Yc) of points b and c.
[0037] As attached Figure 2 As shown, the three vertices of the second right triangle model are point c, point b, and point i, with point i being the right-angle vertex and its coordinates being (Xc Yb). The second right triangle model has an included angle ∠cbi, an included angle ∠iba between points i, b, and a, and an included angle ∠icd between points i, c, and b.
[0038] As attached Figure 2 As shown, the three vertices of the third right-angled triangle model are point c, point j, and point d, with point j being the right-angle vertex and its coordinates being (Xc Yj); the second right-angled triangle model has an included angle ∠jcd.
[0039] In the constructed first right-angled triangle model, second right-angled triangle model, and third right-angled triangle model, the included angle ∠cba = ∠cbi + ∠iba, and the included angle ∠iba = ∠jcd = ∠icd = ∠bah.
[0040] Using the arctangent trigonometric function, we can find the included angle ∠cbi = arctan((Yc-Yb) / (Xb-Xc)) given the two legs of the right triangle. Based on the calculated included angles ∠bah and ∠cbi, we can derive ∠cba = ∠cbi + ∠iba = arctan((Yc-Yb) / (Xb-Xc)) + arctan((Yb-Ya) / (Xb-Xa)). The distance from point b to point c has a length bc. Using the Pythagorean theorem, we can find the length of the hypotenuse bc based on the two legs of a right triangle: bc = ... ; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: cd = bc sin∠cba. The distance from point c to point j has a length cj. Using the law of cosines, we can calculate the length of the adjacent straight side based on the given hypotenuse and an acute angle: cj = cd cos∠jcd. The distance from point d to point j has a length dj. Using the law of sine, the length of the opposite side can be calculated based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. After obtaining the length cj from point c to point j and the length dj from point d to point j, calculate the coordinate system (XdYd) of point d, where the X coordinate of point d is Xd=Xc+dj and the Y coordinate of point d is Yd=Yc-cj. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
[0041] In Embodiment 1 of the present invention, in the step of acquiring multiple distance data of the object surface, the ranging point includes a first plane close to the object and a second ranging point on the second plane. Three distance values are obtained at the second ranging point, namely two distance values of the first plane and one distance value of the second plane. A three-dimensional coordinate system is established by conversion, and the angle deviation between the robot and the object is compensated by the feedback of the values.
[0042] In Embodiment 1 of the present invention, there are various ways to obtain distance data. Specifically, the step of obtaining multiple distance data of the object surface includes at least one of the following methods: Multiple distance values on the surface of an object are acquired multiple times using a single sensor; Multiple distance values on the surface of an object are acquired simultaneously using multiple sensors; Alternatively, you can first obtain two distance values on one of the planes of the object, calculate the rotation angle offset δ and the plane coordinate offset σ at that position, and then rotate the object according to the rotation angle offset δ and the plane coordinate offset σ. Then, measure the distance values on the other plane of the object to calculate the deviation in the other direction.
[0043] In Embodiment 1 of the present invention, since there are situations such as mobile robots needing to be positioned each time, fixed robots or objects needing to be repositioned after movement, and both fixed and moving robots and objects can be used for workpiece positioning during assembly, the step of correcting deviations by controlling the relative posture between the machine and the object includes at least one of the following methods: Correcting the relative posture between the machine and the object by moving the object while keeping the machine stationary; Correcting the relative posture between the machine and the object by keeping the object still while the machine moves. Correcting the relative posture between machinery and objects by moving objects or machinery. The relative posture of the object and the part to be assembled is corrected by keeping the object and the machine equipment stationary. Example
[0044] In Embodiment 2 of the present invention, the other aspects are the same as in Embodiment 1, except that the following method can also be used to calculate the positional deviation value of the object: As attached Figure 3As shown, when there is no offset between the relative position of the machine and the object, the three points measured on the object at the first ranging point are A, B and C. The point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D. The plane coordinates of point D are (XD YD). Point d is defined as the point on the object under test that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotational angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the obtained coordinates of points a, b, and c. The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xa Ya) and (Xb Yb) of points a and b. The three vertices of the first right-angled triangle model are points a, b, and h, with point b being the right-angle vertex. The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. The included angle ∠bah is the rotation angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second, third, fourth, and fifth right-angled triangle model on the ranging horizontal plane based on the acquired coordinates (Xb, Yb) and (Xc, Yc) of points b and c. A schematic diagram of each right-angled triangle model is attached. Figure 4 ; The three vertices of the second right triangle model are c, j, and d, with j being the right-angle vertex. The coordinates of j are (Xc, Yd). The second right triangle model has an included angle ∠jcd. The three vertices of the third right triangle model are c, e, and i, with i being the right-angle vertex. The coordinates of i are (Xc Ye), and the coordinates of e are (XO Ye). The third right triangle model has an included angle ∠cei. The four right-angled triangles have three vertices: a, m, and f. Point m is the right-angle vertex, with coordinates (Xa, YO) and (Xf, YO). The four right-angled triangles also have an included angle ∠maf. The five right-angled triangles have three vertices: k, d, and a, with k being the right-angle vertex and its coordinates being (Xd Ya). The four right-angled triangles have an included angle ∠kad. In the constructed first right-angled triangle model, second right-angled triangle model, third right-angled triangle model, fourth right-angled triangle model, and fifth right-angled triangle model, the included angles ∠bah = ∠jcd = ∠cei = ∠maf = ∠kad; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. Based on the distance values collected by the ranging mechanism, the length ce between point c and point e is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: ei = ce cos∠cei. Based on the distance values collected by the ranging mechanism, the length af from point a to point f is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: am = af cos∠maf. The distance from point a to point d has a length ad. Using the law of sines, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: kd = ad sin ∠kad. Given the lengths ei from point e to point i, dj from point d to point j, am from point a to point m, and kd from point k to point d, calculate the coordinate system (Xd Yd) of point d, where the X coordinate of point d is Xd = ei + dj, and the Y coordinate of point d is Yd = am - kd. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
[0045] Implementation Three Embodiment 3 of the present invention discloses a positioning and correction device for an object, used for positioning and correction in the method described in Embodiment 1 of the present invention. The device includes: a robotic arm, a rangefinder, and a controller.
[0046] The robotic arm is used to drive the rangefinder to or away from the ranging point after receiving instructions. The robotic arm has a positioning base that is fixedly connected to the machine equipment, and the positioning base is used to calibrate the positional relationship with the machine equipment. The robotic arm also has an execution end that is fixedly connected to the rangefinder, and the execution end is used to calibrate the positional relationship with the rangefinder. The rangefinder is used to acquire distance data of the object surface at the measurement point, and the distance data acquired at one time is one or more. The controller is used to control the movement of the robotic arm according to instructions, control the rangefinder to collect distance data, calculate the positional deviation between the object and the machine after obtaining the distance data, and then control and adjust the relative posture of at least one of the machine and the object to correct the deviation.
[0047] In the apparatus of Embodiment 3 of the present invention, the rangefinder is a laser rangefinder, which is used to emit laser light and receive reflected laser light, and to collect photoelectric analog signals; the apparatus also includes an analog-to-digital converter, which is used to convert the photoelectric analog signals of the photoelectric sensor into digital photoelectric signal data, and to transmit the digital photoelectric signal data to the controller.
[0048] In the apparatus of Embodiment 3 of the present invention, the rangefinder may also be other instruments that can be used for distance measurement, such as a contact displacement sensor, and the embodiments of the present invention are not limited thereto.
[0049] In the apparatus of Embodiment 3 of the present invention, there are at least two major directions for the arrangement and measurement of the rangefinder: one is measurement from the outside to the inside, and the other is measurement from the inside to the outside, and these two directions have different arrangement methods.
[0050] in: For several methods of measuring from the outside in with a rangefinder, please refer to the appendix. Figure 5 To be continued Figure 8 These are Method 1, Method 2, Method 3, and Method 4, respectively. For several methods of measuring from the inside out with a rangefinder, please refer to the appendix. Figure 9 To be continued Figure 19 They are respectively Method 5, Method 6, Method 7, Method 8, Method 9, Method 10, Method 11, Method 12, Method 13, Method 14, and Method 15; It should be noted that, as shown above, regardless of the installation method, there are always two rangefinders in one direction and another in another intersecting direction, and they are not necessarily in a right-angle relationship. The corresponding offset can be calculated directly or indirectly using trigonometric functions. Example
[0051] Embodiment 4 of the present invention discloses a controller, including a storage unit, a processing unit, and a computing program stored on the storage unit and executable on the processing unit. When the controller executes the computing program, it implements the steps of the method described in Embodiment 1 of the present invention. Example
[0052] Embodiment 5 of the present invention also discloses a readable storage medium on which a computational program is stored. When the computational program is executed by a controller, it causes the processor to perform the steps of the method described in Embodiment 1 of the present invention.
[0053] This invention provides a method for calibrating robot kinematic parameters based on a laser rangefinder. The calibration tools used are a laser rangefinder and a test plate. This method is simple in structure, easy to install and operate, and low in cost. The main measuring component is the laser rangefinder, which ensures calibration accuracy. Furthermore, the test plate is placed within the robot's workspace, effectively expanding the robot's measurement range and ensuring uniform spatial distribution of sampling points, thus improving accuracy.
[0054] Furthermore, it should be understood that the present invention is not limited thereto. In addition to the trigonometric function algorithm mentioned in the above embodiments, calculation results can also be obtained through other trigonometric functions or other functions or other methods, all of which are included within the protection scope of the present invention.
[0055] In the above embodiments of the present invention, the rangefinder is a laser rangefinder, which is used to emit laser light and receive reflected laser light, and to collect photoelectric analog signals. The rangefinder can also be a contact displacement sensor, but the present invention is not limited thereto, and can also be other distance measuring instruments capable of measuring displacement data. Furthermore, the application of the rangefinder can be either conventionally mounted on the outside for outward testing, or mounted inside the instrument for outward testing.
[0056] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for positioning and correcting an object, characterized in that, The method includes: Fix the robotic arm to the machine and mark the positional relationship between the origin of the robotic arm and the machine. Fix the rangefinder to the end effector of the robot arm, set the ranging point of the rangefinder, and calibrate the positional relationship between the ranging point of the rangefinder and the origin of the robot arm. The object to be measured is placed near the ranging point within the workspace of the robotic arm; A robotic arm drives a rangefinder to approach the object to be measured and reach the measurement point to obtain multiple distance data from the object's surface. The acquired distance data is sent to the controller, which calculates the positional deviation between the object and the machine based on the distance data. The positional deviation includes at least the rotation angle offset and the planar coordinate offset. Based on the position deviation value calculated by the controller, the relative posture between the machine and the object is adjusted to correct the deviation, thereby enabling rapid and accurate positioning and correction of at least one of the object or machine after a change in relative displacement. The object has a first plane, a second plane, and a third plane. The first plane is a horizontal plane, and the first, second, and third planes are perpendicular to each other. In the step of acquiring multiple distance data of the object's surface, the ranging point includes a first ranging point located on the second and third planes. The distance values of three points are obtained at this first ranging point, which are points a, b, and c. Points a, b, and c are on the same ranging horizontal plane. The distance values of points a, b, and c are converted to establish a planar coordinate system, which are (Xa Ya), (Xb Yb), and (Xc Yc), respectively. The rotation angle offset δ and the plane coordinate offset σ of the object on the first plane are calculated by the algorithm. The rotation angle offset δ and the plane coordinate offset σ are the offsets of the relative posture that the object needs to adjust relative to the machine. When there is no offset between the relative position of the machine and the object, the three points measured on the object at the first ranging point are A, B and C. The point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D. The plane coordinates of point D are (XD YD). Point d is defined as the point on the object under test that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotational angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the obtained coordinates of points a, b, and c. The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the ranging horizontal plane based on the obtained coordinates (Xa Ya) and (Xb Yb) of points a and b. The three vertices of this first right-angled triangle model are points a, b, and h, with point h being the right-angle vertex. The coordinates of point h are (Xb Ya). The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. Substituting the result into the formula: ∠bah = arctan((Yb-Ya) / (Xb-Xa)); where the included angle ∠bah is the rotational angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second right-angled triangle model and a third right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xb Yb) and (Xc Yc) of points b and c. The three vertices of the second right triangle model are c, b, and i, with i being the right-angle vertex and its coordinates being (Xc Yb). The second right triangle model has an included angle ∠cbi, an included angle ∠iba between i, b, and a, and an included angle ∠icd between i, c, and b. The three vertices of the third right triangle model are c, j, and d, with j being the right-angle vertex. The coordinates of j are (Xc, Yj). The third right triangle model has an included angle ∠jcd. In the constructed first right-angled triangle model, second right-angled triangle model, and third right-angled triangle model, the included angle ∠cba = ∠cbi + ∠iba, and the included angle ∠iba = ∠jcd = ∠icd = ∠bah; Using the arctangent trigonometric function, we can find the included angle ∠cbi = arctan((Yc-Yb) / (Xb-Xc)) given the two legs of a right triangle. Based on the calculated included angles ∠bah and ∠cbi, we can derive ∠cba = ∠cbi + ∠iba = arctan((Yc-Yb) / (Xb-Xc)) + arctan((Yb-Ya) / (Xb-Xa)). The distance from point b to point c has a length bc. Using the Pythagorean theorem, we can find the length of the hypotenuse bc based on the two legs of a right triangle. ; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: cd = bc sin∠cba. The distance from point c to point j has a length cj. Using the law of cosines, we can calculate the length of the adjacent straight side based on the given hypotenuse and an acute angle: cj = cd cos∠jcd. The distance from point d to point j has a length dj. Using the law of sine, the length of the opposite side can be calculated based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. After obtaining the length cj from point c to point j and the length dj from point d to point j, calculate the coordinate system (Xd Yd) of point d, where the X coordinate of point d is Xd = Xc + dj and the Y coordinate of point d is Yd = Yc - cj. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
2. A method for positioning and correcting an object, characterized in that, The method includes: Fix the robotic arm to the machine and mark the positional relationship between the origin of the robotic arm and the machine. Fix the rangefinder to the end effector of the robot arm, set the ranging point of the rangefinder, and calibrate the positional relationship between the ranging point of the rangefinder and the origin of the robot arm. The object to be measured is placed near the ranging point within the workspace of the robotic arm; A robotic arm drives a rangefinder to approach the object to be measured and reach the measurement point to obtain multiple distance data from the object's surface. The acquired distance data is sent to the controller, which calculates the positional deviation between the object and the machine based on the distance data. The positional deviation includes at least the rotation angle offset and the planar coordinate offset. Based on the position deviation value calculated by the controller, the relative posture between the machine and the object is adjusted to correct the deviation, thereby enabling rapid and accurate positioning and correction of at least one of the object or machine after a change in relative displacement. The object has a first plane, a second plane, and a third plane. The first plane is a horizontal plane, and the first, second, and third planes are perpendicular to each other. In the step of acquiring multiple distance data of the object's surface, the ranging point includes a first ranging point located on the second and third planes. The distance values of three points are obtained at this first ranging point, which are points a, b, and c. Points a, b, and c are on the same ranging horizontal plane. The distance values of points a, b, and c are converted to establish a planar coordinate system, which are (Xa Ya), (Xb Yb), and (Xc Yc), respectively. The rotation angle offset δ and the plane coordinate offset σ of the object on the first plane are calculated by the algorithm. The rotation angle offset δ and the plane coordinate offset σ are the offsets of the relative posture that the object needs to adjust relative to the machine. When there is no offset in the relative position between the machine and the object, the three points measured on the object at the first ranging point are A, B and C. The point where the second plane, the third plane and the ranging horizontal plane where A, B and C are located intersect is D. The plane coordinates of point D are (XD YD). Point d is defined as the point on the object under test that intersects the second plane, the third plane, and the horizontal plane containing points a, b, and c. The controller calculates the rotational angle offset δ of the object and the planar coordinate offset σ of point d relative to point D based on the obtained coordinates of points a, b, and c. The rotational angle offset δ of the object is calculated as follows: The controller constructs a first right-angled triangle model on the distance measuring horizontal plane based on the obtained coordinates (Xa Ya) and (Xb Yb) of points a and b. The three vertices of the first right-angled triangle model are points a, b, and h, with point b being the right-angle vertex. The first right-angled triangle model has an included angle ∠bah. The included angle ∠bah is calculated using the arctangent trigonometric function based on the two right-angled sides. The included angle ∠bah is the rotation angle offset δ of the object. The planar coordinate offset σ of point d relative to point D is calculated as follows: The controller constructs a second right-angled triangle model, a third right-angled triangle model, a fourth right-angled triangle model, and a fifth right-angled triangle model on the ranging horizontal plane based on the obtained coordinates (Xb Yb) and (Xc Yc) of points b and c. The three vertices of the second right triangle model are c, j, and d, with j being the right-angle vertex. The coordinates of j are (Xc, Yd). The second right triangle model has an included angle ∠jcd. The three vertices of the third right triangle model are c, e, and i, with i being the right-angle vertex. The coordinates of i are (Xc Ye), and the coordinates of e are (XO Ye). The third right triangle model has an included angle ∠cei. The four right-angled triangles have three vertices: a, m, and f. Point m is the right-angle vertex, with coordinates (Xa, YO) and coordinates (Xf, YO). The four right-angled triangles also have an included angle ∠maf. The five right triangles have three vertices: k, d, and a. K is the right-angle vertex, and its coordinates are (Xd Ya). The five right triangles also have an included angle ∠kad. In the constructed first right-angled triangle model, second right-angled triangle model, third right-angled triangle model, fourth right-angled triangle model, and fifth right-angled triangle model, the included angles ∠bah = ∠jcd = ∠cei = ∠maf = ∠kad; The distance from point c to point d has a length cd. Using the law of sine, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: dj = cd sin∠jcd. Based on the distance values collected by the ranging mechanism, the length ce between point c and point e is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: ei = ce cos∠cei. Based on the distance values collected by the ranging mechanism, the length af from point a to point f is obtained. Using the law of cosines, the lengths of adjacent right-angled sides are calculated based on the known hypotenuse and an acute angle: am = af cos∠maf. The distance from point a to point d has a length ad. Using the law of sines, we can calculate the length of the opposite side based on the given hypotenuse and an acute angle: kd = ad sin ∠kad. Given the lengths ei from point e to point i, dj from point d to point j, am from point a to point m, and kd from point k to point d, calculate the coordinate system (Xd Yd) of point d, where the X coordinate of point d is Xd = ei + dj, and the Y coordinate of point d is Yd = am - kd. The planar coordinate offset σ of point d relative to point D includes the X coordinate offset Xσ and the Y coordinate offset Yσ, where Xσ = XD - Xd and Yσ = YD - Yd.
3. The positioning and correction method for an object according to claim 1, characterized in that, In the steps of acquiring multiple distance data on the surface of an object, the ranging points include a first plane close to the object and a second ranging point on the second plane. Three distance values are obtained at the second ranging point, namely two distance values on the first plane and one distance value on the second plane. A three-dimensional coordinate system is established by conversion, and the angular deviation between the robot and the object is compensated by the feedback of the values.
4. The positioning and correction method for an object according to any one of claims 1 to 3, characterized in that, The step of acquiring multiple distance data of an object's surface includes at least one of the following methods: Multiple distance values on the surface of an object are acquired multiple times using a single sensor; Multiple distance values on the surface of an object are acquired simultaneously using multiple sensors; Alternatively, you can first obtain two distance values on one of the planes of the object, calculate the rotation angle offset δ and the plane coordinate offset σ at that position, and then rotate the object according to the rotation angle offset δ and the plane coordinate offset σ. Then, measure the distance values on the other plane of the object to calculate the deviation in the other direction.
5. The positioning and correction method for an object according to claim 1 or 2, characterized in that, The step of correcting deviations by controlling the relative posture between the machine and the object includes at least one of the following methods: Correcting the relative posture between the machine and the object by moving the object while keeping the machine stationary; Correcting the relative posture between the machine and the object by keeping the object still while the machine moves. Correcting the relative posture between machinery and objects by moving objects or machinery. Alternatively, the relative posture of the object and the parts to be assembled can be corrected without moving the object or machinery.
6. A positioning and correction device for an object, used for positioning and correction in the method according to any one of claims 1 to 5, characterized in that, The device includes: a robotic arm, a rangefinder, and a controller; A robotic arm is used to drive a rangefinder to or away from a ranging point after receiving instructions. The robotic arm has a positioning base that is fixedly connected to the machine equipment, and the positioning base is used to calibrate the positional relationship with the machine equipment. The robotic arm also has an actuator that is fixedly connected to the rangefinder, and the actuator is used to calibrate the positional relationship with the rangefinder. A rangefinder is used to acquire distance data from the surface of an object at a measurement point. One or more distance data points can be acquired at a time. The controller is used to control the movement of the robotic arm according to instructions, control the rangefinder to collect distance data, calculate the positional deviation between the object and the machine after obtaining the distance data, and then control and adjust the relative posture of at least one of the machine and the object to correct the deviation.
7. The positioning and correction device for an object according to claim 6, characterized in that: The rangefinder is a laser rangefinder, which is used to emit laser light and receive the reflected laser light, and to collect photoelectric analog signals. The device also includes an analog-to-digital converter, which is used to convert the photoelectric analog signal from the photoelectric sensor into digital photoelectric signal data and transmit the digital photoelectric signal data to the controller.
8. A controller, comprising a storage unit, a processing unit, and a computing program stored on the storage unit and executable on the processing unit, characterized in that: When the controller executes the calculation program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computationally readable storage medium, characterized in that: The computationally readable storage medium stores a computational program, which, when executed by the controller, causes the processor to perform the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Rectangular workpiece position and angle measurement method
CN106197262A
Video-based detection and extraction device for numbers on electric power liquid crystal instrument
CN112488099A