End ring pasting point position planning method based on linear structured light scanning
Through the end ring pasting point planning method based on line structure light scanning, the problems of low end ring processing accuracy and large radius fluctuations are solved, and high-precision equal-pitch pasting point planning is achieved, which is suitable for industrial production needs.
Patent Information
- Application Number
- CN202411604397.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-11
AI Technical Summary
It is difficult to realize high-precision end-ring adhesion point planning in the prior art, especially when the end-ring processing accuracy is low and the radius fluctuates greatly.
Using a method based on line structure light scanning, the end ring contour data is scanned through a line structure light sensor, the RANSAC algorithm is used to fit the center of the end circle, the angle value of the contour point is calculated, the gap position is positioned, and the pasted points are iteratively optimized based on equal angle planning to ensure that the points are spaced equally.
It realizes high-precision end-circle point planning, which is suitable for production needs, has good system flexibility, and can ensure equal spacing pasting effect when processing accuracy requirements are low.
Smart Images

Figure CN119598620A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer vision, and in particular is a method for planning end ring pasting points based on line structured light scanning. Background Art
[0002] With the rapid development of science and technology in my country and the continuous improvement of industrial automation level, intelligent and flexible production has gradually become the trend of the future. As the "eyes" of the machine, machine vision plays an important role in improving the robustness and flexibility of the system, so it has received widespread attention and application. As a high-precision active 3D vision, structured light has more high-level information than traditional 2D vision and can cope with more application scenarios. Structured light has been widely used in projects such as robot handling, gluing, and polishing.
[0003] The structured light measurement method is an active optical measurement technology. Its basic principle is to project controllable light spots, light strips or light surface structures onto the surface of the object to be measured through a structured light projector, and the image sensor (such as a camera) obtains the image, and then the three-dimensional coordinates of the object are calculated by the triangulation principle through the system geometric relationship. According to the structured light projector projecting controllable light spots, light strips or light surface structures onto the surface of the object to be measured, structured light can be divided into point structured light, line structured light and surface structured light. Since the main function of the structured light device in the end ring pasting planning application is to measure and extract the two boundary points of the inner contour and the outer contour of the end ring, and the point structured light measurement method requires scanning the end ring radial direction point by point for measurement, as the object to be measured increases, the image acquisition and image processing time will increase sharply, making it difficult to achieve real-time measurement; the amount of three-dimensional coordinate point data obtained by surface structured light is large, and contains a large amount of redundant data, resulting in a waste of calculation time. Therefore, line structured light has become the first choice in end ring measurement applications.
[0004] However, in the above method, due to the low processing accuracy of the end ring, the radius and amplitude of the end ring are different from the design value, and the placement position on the turntable fluctuates within a certain range. The accuracy of general measurement and planning methods is difficult to meet the requirements of actual pad pasting. Summary of the invention
[0005] In order to solve the problem that low-processing precision end rings present irregular near-circular contours and specific application industries require equally spaced pasting points to be planned, the present invention provides an end ring pasting point planning method based on line structured light scanning, which iteratively optimizes the points on the basis of equal-angle planning to achieve high-precision equally spaced end ring point planning.
[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: a method for planning end ring pasting points based on line structured light scanning, comprising the following steps:
[0007] 1) Scan the end ring profile data through the line structured light sensor;
[0008] 2) Use the RANSAC algorithm to fit the center of the end circle to the outer contour data and calculate the angle values of all contour points relative to the center of the circle;
[0009] 3) Locate the starting point and the ending point of the end ring gap in the contour data;
[0010] 4) Plan the pad sticking points symmetrically and at equal angles relative to the center line of the notch;
[0011] 5) Calculate the chord length between adjacent pasting points, iteratively optimize the planned points on the contour data to ensure that the point spacing is equal, and complete the end ring pasting point planning.
[0012] The line structured light scanning end ring profile data is specifically:
[0013] The target end ring is placed on the turntable plane and rotated one circle. The line structured light sensor is fixed above the turntable to complete the scanning of the end ring contour. The laser line is irradiated on the turntable plane and the upper surface of the end ring. The left and right endpoints of the laser line on the upper surface of the end ring are extracted, which are the inner contour points and outer contour points of the end ring. After the turntable rotates one circle, a set of complete inner contour data InData and outer contour data OutData of the end ring are collected.
[0014] The method of fitting the end circle center using the RANSAC algorithm to the outer contour data OutData includes the following steps:
[0015] 2-1) Randomly select three points from the outer contour data OutData as the hypothesized inner point subset s;
[0016] 2-2) Estimate the circle parameters based on the inner point subset s, where the circle parameters include: the coordinates of the center p o (x o ,y o) , radius R;
[0017] 2-3) Traverse all data except the inner point subset s in the outer contour data OutData. If the data point is within the given error e, it is marked as an inner point, otherwise it is marked as an outer point;
[0018] 2-4) All the interior points form a consistent set. If the number of points in the consistent set meets the given threshold T, all the interior points in the consistent set are used to re-estimate the circle parameters, and then the algorithm ends;
[0019] 2-5) If the number of internal points in the consistent set is less than the threshold T, a new subset s is selected and steps 2-1) to 2-4) are repeated;
[0020] 2-6) After K iterations, select a consistent set with the largest number of inliers, use all the inliers in the consistent set to re-estimate the circle parameters, and then terminate the algorithm.
[0021] The angle values of all contour points relative to the center of the circle are calculated as follows:
[0022] After fitting the coordinates of the center of the end circle, calculate the angles of all inner and outer contour data relative to the center of the circle. i (x i ,y i ) Calculate the corresponding angle value a i ,Right now:
[0023]
[0024] Among them, (x i ,y i ) is any contour point data, i is a positive integer, (x o ,y o ) are the coordinates of the circle center.
[0025] The starting point and the ending point of locating the end ring gap in the contour data are specifically:
[0026] There are different types of notches on the annular end ring, including: full notch, inner notch, outer notch, and no notch;
[0027] Locate the gap position from the contour data and find the angle a between the gap center and the start and end points relative to the center of the circle mid 、a e1 、a e2 ; According to the a priori design value openWidth of the known end ring gap width, determine whether the current end ring has a gap, that is:
[0028] If openWidth is 0, then there is no gap in the current end circle, a mid 、a e1 、a e2 Set to 0; if openWidth is not 0, first locate the gap position from the inner contour data. If the gap is found, the end circle is in the form of an inner gap or a full gap. If the gap is not located in the inner contour, locate the gap position from the outer contour data, and the end circle is in the form of an outer gap.
[0029] The positioning of the notch position comprises the following steps:
[0030] 3-1) Radius filtering: traverse the contour data, for each point data p i To the center p o The distance r i Make a judgment, when r i When the difference between the prior design value of the end circle radius and the end circle radius exceeds the set threshold thdR, the point data is set to an invalid point nan;
[0031] 3-2) Seed point selection: Traverse the contour data again to search for the starting and ending seed points at both ends of the gap. Assume that the data point p i is the starting seed point. If it is a nan invalid point, skip it and continue to traverse p i downward; if it is valid, start from p i and traverse the data points p j downward in sequence. If p j is invalid, skip the point and continue to traverse p j downward until an effective p j is found; at this time, if the distance dst between p i and p j is greater than 0.9 times of openWidth, it is considered that the starting and ending seed points of the gap are found. p i is the starting seed point s1, and p j is the ending seed point s2; if dst is less than 0.9 times of openWidth, skip this p i and continue to traverse p i downward; if no starting and ending seed points are found after the traversal, end the algorithm;
[0032] 3-3) Gap starting point positioning: Traverse the data points p 1i forward from the seed point s1 to find the starting point of the gap. If p 1i is a nan invalid point, skip it and continue to traverse p 1i downward; if it is valid, set the neighborhood accumulator numNeigh to 0, and start from p 1i and traverse the data points p 1j forward in sequence as neighborhood points. If p 1j is invalid, skip it and continue to traverse p 1j forward. If p 1j is valid, calculate the angle angle between the line connecting p 1j and p 1i and the line connecting p o and p 1i by the following method;
[0033]
[0034] angle = cos -1 (v1·v2)
[0035] where p ni is the base point, p nj is the neighborhood point, and angle is the angle between v1 and v2;
[0036] If the condition 45 < angle < 135 is satisfied, the neighborhood accumulator numNeigh is incremented by 1, and continue to traverse p 1j forward. If the condition is not satisfied, skip this p1i Point, continue to traverse p forward 1i ; when numNeigh is greater than or equal to 5, it is considered that the starting point e1(x e1 , y e1 ) of the notch is found, and this step is ended; if the starting point of the notch is not found after the traversal ends, the algorithm is ended;
[0037] 3-4) Notch end point positioning: Traverse the data point p backward from the seed point s2 2i as the base point to find the end point of the notch. If p 2i is a nan invalid point, skip it and continue to traverse p downward 2i ; if it is valid, set the neighborhood accumulator numNeigh to 0, and traverse the data point p forward in turn with p 2i as the starting point. If p 2j is invalid, skip it and continue to traverse p forward 2j , if p 2j is valid, calculate the included angle angle between the line connecting p 2j and p 2j and the line connecting p 2i and p o and p 2i as described above; if the condition 45 < angle < 135 is satisfied, the neighborhood accumulator numNeigh is incremented by 1, and continue to traverse p forward 2j , if the condition is not satisfied, skip this p 2i point and continue to traverse p forward 2i ; when numNeigh is greater than or equal to 5, it is considered that the end point e2(x e2 , y e2 ) of the notch is found, and this step is ended; if the end point of the notch is not found after the traversal ends, the algorithm is ended;
[0038] 3-5) Notch center point calculation: Obtain the center point coordinates p of the notch by averaging the coordinates of the starting point and the end point of the notch mid (x mid , y mid );
[0039] 3-6) Angle calculation: Calculate the angles a mid , a e1 , a e2 of the notch center and the starting and ending points relative to the center of the circle respectively, and then end.
[0040] The method of symmetrically and equally angling the pasting points of the pads relative to the notch center line on the inner contour data includes the following steps:
[0041] 4-1) According to the prior design value N of the equal division of the current end ring pasting, the angular difference pStep between the pads during equal-spacing division, that is:
[0042] pStep=360 / N
[0043] 4-2) Plan the angle of the pad with the notch center angle as the symmetry center. The angle pAngle of the center of the nth pad relative to the center of the circle n ,Right now:
[0044] pAngle n =a mid +0.5*pStep+(n-1)*pStep(0 <n≤N)
[0045] 4-3) According to the a priori design value of the pad width bWidth, and the a priori design value of the inner diameter of the end ring inR, the angle range of the pad width relative to the center of the circle bAngle is:
[0046] bAngle=2*sin -1 (0.5*bWidth / inR)
[0047] 4-4) For each pad n, if the judgment condition is met, it means that its angle range overlaps with the gap range, and the planned point is marked as an invalid interference point;
[0048] The determination conditions are:
[0049] a e1 ≤pAngle n -0.5*bAngle≤a e2
[0050] a e1 ≤pAngle n +0.5*bAngle≤a e2 .
[0051] The step of calculating the chord length between adjacent pasting points and iteratively optimizing the planning points on the contour data to ensure that the point spacing is equal includes the following steps:
[0052] 5-1) Calculate the coordinates of the planned center points of all pads:
[0053] For the nth pad, the angle value a of each point calculated from the previous inner contour data is i Find the angle pAngle from the center of the pad n The two nearest inner contour data points p f and p r , calculate the distance R between the two points and the center of the circle f and R r , the distance between the center point of the pad and the center of the circle is R b For R f and R rThe average value of the pad center point coordinate p_b n (x_b n , y_b n ) is calculated based on the angle and distance relative to the center of the circle, as follows:
[0054] x_b n =x o +R b *cos(pAngle i )
[0055] y_b n =y o +R b *sin(pAngle i )
[0056] 5-2) Calculate p_b for each pad n With the next pad p_b n+1 The distance between the center points is taken as the chord length n If there is an invalid interference point, the chord length before and after the point is not calculated. If it is a non-interference point, the following formula is used to obtain it:
[0057]
[0058] 5-3) Find the average length of all chords m ;
[0059] 5-4) Take the N / 2th planning point as the reference point, and adjust the chord length of each point in sequence until the Nth point is adjusted. In the process of adjustment, skip the invalid interference points; for the nth pad planning point, if the chord length between it and the n+1th pad planning point is less than chord m Then p_b n+1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n+1th pad planning point is greater than or equal to chord m Then p_b n+1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m , then record p tmp For the new p_b n+1 , and recalculate the chord n and chord n+1 , and then continue to adjust the remaining planning points backward;
[0060] 5-5) Take the N / 2th planning point as the reference point, and adjust the chord length of each point forward in sequence until the first point is adjusted. In the process of adjustment, skip the invalid interference points; for the nth pad planning point, if the chord length between it and the n-1th pad planning point is less than chord m Then p_b n-1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n-1th pad planning point is greater than or equal to chord m Then p_b n-1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m , then record p tmp For the new p_b n-1 , and recalculate the chord n and chord n-1 , and then continue to adjust the remaining planning points forward;
[0061] 5-6) If the number of iterations is equal to K or the difference between the maximum and minimum values of all chord lengths is less than the threshold T, no further adjustment is made and step 5-7) is continued; otherwise, return to step 5-3) to continue iterative optimization;
[0062] 5-7) For each adjusted pad center point coordinate p_b n (x_b n , y_b n ) Calculate the corresponding angle pAngle n If the adjusted pad angle range overlaps with the gap range, the planned point is marked as an invalid interference point, and the coordinates of all points obtained are p_b n And the corresponding angle pAngle n This is the result of pasting planning points at equal intervals on the end circle.
[0063] The present invention has the following beneficial effects and advantages:
[0064] 1. The present invention uses a linear structured light sensor and a PC to achieve measurement and planning of nearly circular objects, and has the characteristics of simple equipment and high measurement accuracy;
[0065] 2. The present invention can realize online, automatic, non-contact measurement of nearly circular objects;
[0066] 3. The present invention can plan equally spaced operation points on the contour of a nearly circular object, with high planning accuracy, which is more suitable for production needs;
[0067] 4. The present invention has low requirements on the processing accuracy of the object to be measured and has good system flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a schematic diagram of the end ring pasting points of the present invention;
[0069] Figure 2 It is a schematic diagram of the laser image extraction endpoint of the present invention;
[0070] Figure 3 This is a schematic diagram of the end ring gap form of the present invention;
[0071] Figure 4 This is a schematic diagram of the positioning of the end ring notch of the present invention;
[0072] Figure 5 It is a schematic diagram of equal-angle planning of the end ring of the present invention. DETAILED DESCRIPTION
[0073] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0074] like Figure 1 As shown, a schematic diagram of the end ring pasting point of the present invention is a method for planning the end ring pasting position based on line structured light scanning of the present invention, which uses a line structured light sensor to scan the end ring contour data, and then locates the notch position of the end ring based on the contour data and plans the initial pasting point of the pad on the inner contour, and finally iteratively optimizes the initial pasting point position to obtain an equally spaced pasting effect when the end ring has a processing deviation.
[0075] The specific steps are as follows:
[0076] 1. Line structured light scanning end ring profile data
[0077] The target end ring is placed on the turntable and rotated for one circle. The line structured light sensor is fixed on the turntable to complete the scanning of the end ring profile. The laser line hits the turntable plane and the upper surface of the end ring. Each frame image is as follows: Figure 2 As shown, the left and right endpoints of the laser line on the upper surface of the end ring are extracted, which are the inner contour points and outer contour points of the end ring. After the turntable rotates one circle, a set of inner contour data InData and outer contour data OutData of a complete end ring can be collected.
[0078] 2 Calculation of the center and contour point angles of the fitting end circle
[0079] The RANSAC algorithm is used to fit the center of the end circle to the outer contour data OutData, and then the angle values of all inner and outer contour points relative to the center of the circle are calculated.
[0080] The RANSAC algorithm is an iterative method for estimating mathematical model parameters from observed data containing outliers. The specific steps for fitting the center of the circle are as follows:
[0081] (1) Randomly select three points from OutData as the hypothesized inlier subset s;
[0082] (2) Estimate the circle parameters (center coordinates p) based on subset s o (x o ,y o) , radius R);
[0083] (3) Traverse all data in OutData except the subset s. If the data point is within the given error e, it is marked as an internal point, otherwise it is marked as an external point;
[0084] (4) All the interior points form a consistent set. If the number of points in the consistent set meets the given threshold T, all the interior points in the consistent set are used to re-estimate the circle parameters, and then the algorithm ends.
[0085] (5) If the number of inliers in the consistent set is less than the threshold T, a new subset s is selected and steps (1) to (4) are repeated;
[0086] (6) After K iterations, a consistent set with the largest number of inliers is selected, and the circle parameters are re-estimated using all the inliers in the consistent set, and then the algorithm ends.
[0087] After fitting the coordinates of the center of the end circle, calculate the angles of all inner and outer contour data relative to the center of the circle. i (x i ,y i ) Calculate the corresponding angle value a by the following formula i :
[0088]
[0089] 3. Locate the gap in the contour data
[0090] There are different types of notches on the annular end ring (full notch, inner notch, outer notch, no notch), such as Figure 3 It is necessary to locate the gap position from the contour data and find the angle a between the gap center and the start and end points relative to the circle center. mid 、a e1 、a e2 The system knows the a priori design value of the end ring gap width openWidth. If openWidth is 0, then there is no gap in the current end ring. mid 、a e1 、a e2Set to 0. If openWidth is not 0, first locate the gap position from the inner contour data. If a gap is found, the end circle is in the form of an inner gap or a full gap. If no gap is found in the inner contour, locate the gap position from the outer contour data, and the end circle is in the form of an outer gap. The schematic diagram of the steps for locating the gap position from a single set of contour data (inner or outer) is as follows Figure 4 As shown, the details are as follows:
[0091] (1) Radius filtering: traverse the contour data and filter each point p i To the center p o The distance r i Make a judgment, when r i When the difference between the prior design value of the end circle radius and the end circle radius exceeds the set threshold thdR, the point data is set to an invalid point nan;
[0092] (2) Seed point selection: traverse the contour data again to search for the start and end seed points at both ends of the gap. Assume that the data point p i is the starting seed point. If it is a nan invalid point, skip it and continue to traverse p i If it is valid, p i Traverse the data point p from the starting point downwards j , if p j If invalid, skip the point and continue to traverse p j Until a valid p is found j ; At this time, if p i With p j If the distance dst is greater than 0.9 times openWidth, it is considered that the gap start and end seed points are found, p i is the starting seed point s1, p j The end seed point s2; if dst is less than 0.9 times openWidth, skip this p i , continue to traverse down p i ; If the starting and ending seed points are not found at the end of the traversal, the algorithm ends;
[0093] (3) Locating the starting point of the gap: Starting from the seed point s1, traverse the data point p 1i As a base point to find the starting point of the gap, if p 1i If it is nan, it will be skipped and the traversal will continue downward. 1i ; If it is valid, set the neighborhood accumulator numNeigh to 0, with p 1i Take the starting point as the starting point and traverse the data point p in sequence 1j As a neighborhood point, if p 1j If invalid, skip and continue to traverse p 1j , if p 1j If it is valid, calculate p by using equations (2)-(4) 1j and p1i The connection line with p o and p 1i The included angle angle between the connection lines; if the condition 45 < angle < 135 is satisfied, the neighborhood accumulator numNeigh is incremented by 1, and continue to traverse p forward 1j , if the condition is not satisfied, skip this p 1i point and continue to traverse p forward 1i ; when numNeigh is greater than or equal to 5, it is considered that the starting point e1(x of the notch is found e1 , y e1 ), and end this step; if the starting point of the notch is not found after the traversal ends, end the algorithm;
[0094]
[0095] angle = cos -1 (v1·v2)(4)
[0096] where p ni is the base point, p nj is the neighborhood point, and angle is the included angle between v1 and v2.
[0097] (4) Notch end point positioning: Traverse the data points p backward from the seed point s2 2i as the base point to find the end point of the notch. If p 2i is a nan invalid point, skip it and continue to traverse p downward 2i ; if it is valid, set the neighborhood accumulator numNeigh to 0, and traverse the data points p forward in sequence with p 2i as the starting point. If p 2j is invalid, skip it and continue to traverse p forward 2j , if p 2j is valid, calculate the included angle angle between the connection line of p 2j and p 2j and the connection line of p 2i and p o and p 2i as in formulas (2)-(4); if the condition 45 < angle < 135 is satisfied, the neighborhood accumulator numNeigh is incremented by 1, and continue to traverse p forward 2j , if the condition is not satisfied, skip this p 2i point and continue to traverse p forward 2i ; when numNeigh is greater than or equal to 5, it is considered that the end point e2(x of the notch is found e2 , y e2 ), and end this step; if the end point of the notch is not found after the traversal ends, end the algorithm;
[0098] (5) Calculation of the center point of the gap: The coordinates of the center point of the gap are obtained by averaging the coordinates of the starting point and the end point of the gap. mid (x mid ,y mid ).
[0099] (6) Angle calculation: According to formula (1), calculate the angle a of the notch center and the starting and ending points relative to the center of the circle. mid 、a e1 、a e2 , and then the algorithm ends.
[0100] 4. Plan the pasting points symmetrically and at equal angles
[0101] Take the notch center angle as the symmetry center and plan the points where the pads are to be pasted at equal angles on the inner contour data, such as Figure 5 As shown, the specific steps are as follows:
[0102] (1) The system knows that when the a priori design value of the number of equal-interval pastings of the current end ring is N, the angle difference pStep between the pads when the spacing is evenly divided is calculated by the following formula:
[0103] pStep=360 / N (5)
[0104] (2) Plan the angle of the pad with the notch center angle as the symmetry center. The angle pAngle of the center of the nth pad relative to the center of the circle n Calculated by the following formula:
[0105] pAngle n =a mid +0.5*pStep+(n-1)*pStep(0 <n≤N)(6)
[0106] (3) The system knows that the a priori design value of the pad width is bWidth, and the a priori design value of the inner diameter of the end ring is inR. The angle range bAngle of the pad width relative to the center of the circle is calculated by the following formula:
[0107] bAngle=2*sin -1 (0.5*bWidth / inR) (7)
[0108] (4) For each pad n, if the following two equations are satisfied, it means that its angle range overlaps with the gap range, and the planned point is marked as an invalid interference point.
[0109] a e1 ≤pAngle n -0.5*bAngle≤a e2 (8)
[0110] a e1 ≤pAnglen +0.5*bAngle≤a e2 (9)
[0111] 5. Iterative optimization of planning point spacing
[0112] Iteratively adjust the distance between the planned points so that even when the end ring has processing deviation, the pasting effect of equal spacing can still be obtained. The specific iterative adjustment method is as follows:
[0113] (1) Calculate the coordinates of the center points of all pad planning: For the nth pad, according to the angle value a of each point calculated in the previous inner contour data i Find the angle pAngle from the center of the pad n The two nearest inner contour data points p f and p r , calculate the distance R between the two points and the center of the circle f and R r , the distance between the center point of the pad and the center of the circle is R b For R f and R r The average value of the pad center point coordinate p_b n (x_b n , y_b n ) can be calculated based on the angle and distance relative to the center of the circle. The calculation method is as follows
[0114] x_b n = x o + R b * cos(pAngle i ) (10)
[0115] y_b n = y o + R b * sin(pAngle i ) (11)
[0116] (2) Calculate p_b for each pad n With the next pad p_b n+1 The distance between the center points is taken as the chord length n If there is an invalid interference point, the chord length before and after the point will not be calculated. The calculation method for non-interference points is as follows:
[0117]
[0118] (3) Find the average length of all chords m .
[0119] (4) Take the N / 2th planning point as the reference point and adjust the chord length of each point in sequence until the Nth point is adjusted. Invalid interference points are skipped during the adjustment process. For the nth pad planning point, if the chord length between it and the n+1th pad planning point is less than chord m Then p_b n+1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n+1th pad planning point is greater than or equal to chord m Then p_b n+1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m At this time, record p tmp For the new p_b n+1 , and recalculate chord according to formula (12) n and chord n+1 , and then continue to adjust the remaining planning points backwards.
[0120] (5) Take the N / 2th planning point as the reference point and adjust the chord length of each point forward in sequence until the first point is adjusted. Invalid interference points are skipped during the adjustment process. For the nth pad planning point, if the chord length between it and the n-1th pad planning point is less than chord m Then p_b n-1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n-1th pad planning point is greater than or equal to chord m Then p_b n-1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m At this time, record p tmp For the new p_b n-1 , and recalculate chord according to formula (12) n and chord n-1 , and then continue to adjust the remaining planning points forward.
[0121] (6) If the number of iterations is equal to K or the difference between the maximum and minimum values of all chord lengths is less than the threshold T, no further adjustment is made and step (7) is continued; otherwise, the process returns to step (3) and continues iterative optimization.
[0122] (7) For each adjusted pad center point coordinate p_b n (x_b n , y_b n ) Calculate the corresponding angle pAngle using formula (1) n If the angle satisfies formulas (8) and (9), it means that the adjusted pad angle range overlaps with the gap range, and the planned point is marked as an invalid interference point.
[0123] At this point, the chord length difference between each planned pad and the adjacent pad is less than the threshold, completing the planning of pad equal chord length pasting points on the nearly circular end ring contour.
[0124] In summary, the present invention can realize online, automatic, non-contact measurement of nearly circular objects; can realize equal spacing operations on the contour, with high planning accuracy; has low requirements for object processing accuracy, and has good system flexibility. The present invention can realize equal chord length planning of pad bonding positions on the contour line when the processing accuracy of the annular end ring is not high and the radius at different positions varies, ensuring production needs, and has important significance in actual industrial production.
[0125] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, expansion, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for planning end ring pasting points based on line structured light scanning, characterized in that: The following steps are involved: 1) Scan the end ring profile data through the line structured light sensor; 2) Use the RANSAC algorithm to fit the center of the end circle to the outer contour data and calculate the angle values of all contour points relative to the center of the circle; 3) Locate the starting point and the ending point of the end ring gap in the contour data; 4) Plan the pad sticking points symmetrically and at equal angles relative to the center line of the notch; 5) Calculate the chord length between adjacent pasting points, iteratively optimize the planned points on the contour data to ensure that the point spacing is equal, and complete the end ring pasting point planning.
2. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The line structured light scanning end ring profile data is specifically: The target end ring is placed on the turntable plane and rotated one circle. The line structured light sensor is fixed above the turntable to complete the scanning of the end ring contour. The laser line is irradiated on the turntable plane and the upper surface of the end ring. The left and right endpoints of the laser line on the upper surface of the end ring are extracted, which are the inner contour points and outer contour points of the end ring. After the turntable rotates one circle, a set of complete inner contour data InData and outer contour data OutData of the end ring are collected.
3. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The method of fitting the end circle center using the RANSAC algorithm to the outer contour data OutData includes the following steps: 2-1) Randomly select three points from the outer contour data OutData as the hypothesized inner point subset s; 2-2) Estimate the circle parameters based on the inner point subset s, where the circle parameters include: the coordinates of the center p o (x o ,y o) , radius R; 2-3) Traverse all data except the inner point subset s in the outer contour data OutData. If the data point is within the given error e, it is marked as an inner point, otherwise it is marked as an outer point; 2-4) All the interior points form a consistent set. If the number of points in the consistent set meets the given threshold T, all the interior points in the consistent set are used to re-estimate the circle parameters, and then the algorithm ends; 2-5) If the number of internal points in the consistent set is less than the threshold T, a new subset s is selected and steps 2-1) to 2-4) are repeated; 2-6) After K iterations, select a consistent set with the largest number of inliers, use all the inliers in the consistent set to re-estimate the circle parameters, and then terminate the algorithm.
4. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The angle values of all contour points relative to the center of the circle are calculated as follows: After fitting the coordinates of the center of the end circle, calculate the angles of all inner and outer contour data relative to the center of the circle. i (x i ,y i ) Calculate the corresponding angle value a i ,Right now: Among them, (x i ,y i ) is any contour point data, i is a positive integer, (x o ,y o ) are the coordinates of the circle center.
5. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The starting point and the ending point of locating the end ring gap in the contour data are specifically: There are different types of notches on the annular end ring, including: full notch, inner notch, outer notch, and no notch; Locate the gap position from the contour data and find the angle a between the gap center and the start and end points relative to the center of the circle mid 、a e1 、a e2 ; According to the a priori design value openWidth of the known end ring gap width, determine whether the current end ring has a gap, that is: If openWidth is 0, then there is no gap in the current end circle, a mid 、a e1 、a e2 Set to 0; if openWidth is not 0, first locate the gap position from the inner contour data. If the gap is found, the end circle is in the form of an inner gap or a full gap. If the gap is not located in the inner contour, locate the gap position from the outer contour data, and the end circle is in the form of an outer gap.
6. The method for planning end ring pasting points based on line structured light scanning according to claim 5, characterized in that: The positioning of the notch position comprises the following steps: 3-1) Radius filtering: traverse the contour data, for each point data p i To the center p o The distance r i Make a judgment, when r i When the difference between the prior design value of the end circle radius and the end circle radius exceeds the set threshold thdR, the point data is set to an invalid point nan; 3-2) Seed point selection: traverse the contour data again to search for the start and end seed points at both ends of the gap. Assume that the data point p i is the starting seed point. If it is a nan invalid point, skip it and continue to traverse p i If it is valid, p i Traverse the data point p from the starting point downwards j , if p j If invalid, skip the point and continue to traverse p j Until a valid p is found j ; At this time, if p i With p j If the distance dst is greater than 0.9 times openWidth, it is considered that the gap start and end seed points are found, p i is the starting seed point s1, p j The end seed point s2; if dst is less than 0.9 times openWidth, skip this p i , continue to traverse down p i ; If the starting and ending seed points are not found at the end of the traversal, the algorithm ends; 3-3) Locating the starting point of the gap: traverse the data point p from the seed point s1 forward 1i As a base point to find the starting point of the gap, if p 1i If it is nan, it will be skipped and the traversal will continue downward. 1i ; If it is valid, set the neighborhood accumulator numNeigh to 0, with p 1i Traverse the data point p in sequence from the starting point forward 1j As a neighborhood point, if p 1j If invalid, skip and continue to traverse p 1j , if p 1j If it is valid, p is calculated by the following method 1j and p 1i The connection line and p o and p 1i The angle angle of the connecting line; angle=cos -1 (v1·v2) Among them, p ni As the base point, p nj is the neighborhood point, angle is the angle between v1 and v2; If the condition 45 < angle < 135 is satisfied, the neighborhood accumulator numNeigh is incremented by 1, and continue to traverse p forward 1j , if the condition is not satisfied, skip this p 1i point, and continue to traverse p forward 1i ; when numNeigh is greater than or equal to 5, it is considered that the starting point e1(x e1 , y e1 ) of the notch is found, and this step is ended; if the starting point of the notch is not found at the end of the traversal, the algorithm is ended; 3 - 4) Notch end positioning: Traverse the data points p backward from the seed point s2 2i Use the base point to find the notch end. If p 2i is a nan invalid point, skip it and continue to traverse p downward 2i ; If it is valid, set the neighborhood accumulator numNeigh to 0, and traverse the data points p forward in turn with p 2i as the starting point. If p 2j is invalid, skip it and continue to traverse p forward 2j , if p 2j is valid, calculate the angle angle between the line connecting p 2j and p 2j and the line connecting p 2i and p o and p 2i as described above; If the condition 45 < angle < 135 is satisfied, increment the neighborhood accumulator numNeigh by 1 and continue to traverse p forward 2j , if the condition is not satisfied, skip this p 2i point and continue to traverse p forward 2i ; When numNeigh is greater than or equal to 5, it is considered that the notch end e2(x e2 , y e2 ) is found, and this step is ended; If the notch end is not found after the traversal ends, the algorithm is ended; 3-5) Calculation of the center point of the gap: The coordinates of the center point of the gap are obtained by averaging the coordinates of the starting point and the end point of the gap. mid (x mid ,y mid ); 3-6) Angle calculation: Calculate the angle a of the gap center and the starting and ending points relative to the center of the circle mid 、a e1 、a e2 Then it ends.
7. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The method of planning the gluing points of the pads at equal angles symmetrically relative to the center line of the notch on the inner contour data comprises the following steps: 4-1) According to the a priori design value N of the current end ring pasting equal number of points, the angle difference pStep between the pads when divided at equal intervals is: pStep=360 / N 4-2) Plan the angle of the pad with the notch center angle as the symmetry center. The angle pAngle of the center of the nth pad relative to the center of the circle n ,Right now: pAngle n =a mid +0.5*pStep+(n-1)*pStep(0<n≤N) 4-3) According to the a priori design value of the pad width bWidth, and the a priori design value of the inner diameter of the end ring inR, the angle range of the pad width relative to the center of the circle bAngle is: bAngle=2*sin -1 (0.5*bWidth / inR) 4-4) For each pad n, if the judgment condition is met, it means that its angle range overlaps with the gap range, and the planned point is marked as an invalid interference point; The determination conditions are: a e1 ≤pAngle n -0.5*bAngle≤a e2 a e1 ≤pAngle n +0.5*bAngle≤a e2 。 8. The method for planning end ring pasting points based on line structured light scanning according to claim 1, characterized in that: The step of calculating the chord length between adjacent pasting points and iteratively optimizing the planning points on the contour data to ensure that the point spacing is equal includes the following steps: 5-1) Calculate the coordinates of the planned center points of all pads: For the nth pad, the angle value a of each point calculated from the previous inner contour data is i Find the angle pAngle from the center of the pad n The two nearest inner contour data points p f and p r , calculate the distance R between the two points and the center of the circle f and R r , the distance between the center point of the pad and the center of the circle is R b For R f and R r The average value of the pad center point coordinate p_b n (x_b n , y_b n ) is calculated based on the angle and distance relative to the center of the circle, as follows: x_b n =x o +R b *cos(pAngle i ) y_b n =and o +R b *sin(pAngle i ) 5-2) Calculate p_b for each pad n With the next pad p_b n+1 The distance between the center points is taken as the chord length n If there is an invalid interference point, the chord length before and after the point is not calculated. For non-interference points, the following formula is used to obtain it: 5-3) Find the average length of all chords m ; 5-4) Take the N / 2th planning point as the reference point, and adjust the chord length of each point in sequence until the Nth point is adjusted. In the process of adjustment, skip the invalid interference points; for the nth pad planning point, if the chord length between it and the n+1th pad planning point is less than chord m Then p_b n+1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n+1th pad planning point is greater than or equal to chord m Then p_b n+1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m , then record p tmp For the new p_b n+1 , and recalculate the chord n and chord n+1 , and then continue to adjust the remaining planning points backward; 5-5) Take the N / 2th planning point as the reference point, and adjust the chord length of each point forward in sequence until the first point is adjusted. In the process of adjustment, skip the invalid interference points; for the nth pad planning point, if the chord length between it and the n-1th pad planning point is less than chord m Then p_b n-1 As the starting point, traverse backwards on the inner contour data p tmp , until p_b n With p tmp The distance is greater than chord m ; If the chord length between it and the n-1th pad planning point is greater than or equal to chord m Then p_b n-1 As the starting point, traverse forward p on the inner contour data one by one tmp , until p_b n With p tmp The distance is less than or equal to chord m , then record p tmp For the new p_b n-1 , and recalculate the chord n and chord n-1 , and then continue to adjust the remaining planning points forward; 5-6) If the number of iterations is equal to K or the difference between the maximum and minimum values of all chord lengths is less than the threshold T, no further adjustment is made and step 5-7) is continued; otherwise, return to step 5-3) to continue iterative optimization; 5-7) For each adjusted pad center point coordinate p_b n (x_b n , y_b n ) Calculate the corresponding angle pAngle n If the adjusted pad angle range overlaps with the gap range, the planned point is marked as an invalid interference point, and the coordinates of all points obtained are p_b n And the corresponding angle pAngle n This is the result of pasting planning points at equal intervals on the end circle.