A method for generating cutting edge paths in robot milling of thin-walled parts
By using two-dimensional line laser sensors and NURBS surface fitting technology, the workpiece profile feature points and normal information are extracted and the robot milling edge cutting path is generated, which solves the problem that the machining path of large and complex curved thin-walled parts is difficult to accurately generate, and the machining accuracy and quality are improved.
Patent Information
- Application Number
- CN202411555019.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-04
AI Technical Summary
The prior art is difficult to meet the high precision requirements of large and complex curved thin-walled parts during processing, especially due to the poor rigidity, large volume and complex shape of the workpiece, it is difficult to accurately generate the processing path.
A two-dimensional linear laser sensor is used to scan the contour edge of the workpiece, extract the contour feature points and normal information, and reconstruct the curve surface through NURBS surface fitting to generate the robot milling edge cutting path.
It realizes the accurate identification of the surface processing reference line of composite workpieces, improves the accuracy and quality of the milling edge cutting path of thin-walled parts, and meets the high-precision machining requirements.
Smart Images

Figure CN119141319B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of thin-walled parts processing, and in particular to a robot milling cutting edge path generation method for large-scale complex curved thin-walled parts. Background Art
[0002] Large, complex curved, thin-walled parts such as aircraft skins are difficult to process. On the one hand, due to their large size, complex curved structure, thin thickness and poor rigidity, it is difficult to ensure processing accuracy during the processing; on the other hand, for parts with high requirements for appearance accuracy, the edges need to be directly processed to the designed size under the zero-residue assembly solution.
[0003] Industrial robots have shown strong reliability, applicability and advancement in the field of mechanical processing due to their high processing efficiency, wide working range, high flexibility and high repeatability. Robotic processing is becoming an increasingly widespread processing method. It is a basic operation for the robot to carry a high-speed rotating tool at the end to process the workpiece. At present, in the field of robot processing control, the processing objects are mostly materials with high structural rigidity. Planning the path for the robot in advance can achieve good milling results. However, for workpieces with low structural rigidity or difficult to completely fix, the milling accuracy is often destroyed due to deformation or displacement of the workpiece caused by the milling force. Therefore, the current robot path planning technology is difficult to meet the high-precision requirements for processing large, complex curved and thin-walled parts. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a method for generating robot milling cutting paths for thin-walled parts, which solves the technical problem that the processing paths of large and complex curved thin-walled parts are difficult to accurately generate during the processing due to poor rigidity, large volume and complex shape.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for generating a cutting edge path for robot milling of thin-walled parts, the method comprising the following steps:
[0006] S1, scanning the contour edge of the workpiece according to the detection range through a two-dimensional line laser sensor fixed on the end effector of the robot to obtain a contour image;
[0007] S2, extracting corner points located on the machining reference line on the workpiece from the contour image to obtain a number of contour feature points;
[0008] S3, extract the center line of the laser stripe in the contour image, and set the coordinate values of the pixel points located on the center line of the laser stripe Convert to contour point cloud data represented by three-dimensional coordinates;
[0009] S4. Perform NURBS surface fitting on the contour point cloud data to reconstruct the curve surface , and extract curves and surfaces Go up any curve Upper contour feature points The normal information at the location includes the curve Upper contour feature points The tangent vector at , normal vector and vector ;
[0010] S5. Use the contour feature points as processing path points, fit the normal information of the surface with the contour point cloud data to determine the posture of the robot end and generate the milling and trimming path for the robot to process thin-walled parts.
[0011] Furthermore, in step S1, the detection range of the two-dimensional line laser sensor is: the overall detection range of the two-dimensional line laser sensor is a trapezoidal area, the angle between the two hypotenuses of the trapezoidal area is 12.9°, and the width of the laser beam is 25 mm when the measured contour surface is at the optimal measurement height.
[0012] Furthermore, in step S2, the specific process includes the following steps:
[0013] S21, binarizing the contour image and performing an image opening operation to obtain a clear and smooth binarized beam image;
[0014] S22, set a size and is an odd number of sliding windows, and the center of the sliding window is placed at any position in the binary beam image ;
[0015] S23, moving the sliding window in any direction on the binary beam image, and calculating the corner point response value of each pixel point in the sliding window ;
[0016] S24, response values of several corner points according to the size of the sliding window Perform non-maximum suppression and select the corner point response value with the local maximum The corresponding pixel , then the pixel is the corner point;
[0017] S25, in the sensor coordinate system The homogeneous transformation matrix is used below The pixel Convert to three-dimensional space to obtain contour feature points.
[0018] Furthermore, in S23, the corner point response value The calculation formula is:
[0019] ;
[0020] in,
[0021] ;
[0022] ;
[0023] ;
[0024] ;
[0025] ;
[0026] In the above formula, For location The gray value of the pixel at the center of the sliding window; For location The sliding window function at represents the weight of the pixel points in the sliding window, which is set to 1 in this embodiment; is the empirical coefficient, with a value of 0.04 to 0.06; All are real symmetric matrices The characteristic value of .
[0027] Furthermore, in step S3, the specific process includes the following steps:
[0028] S31, using a weighted sliding window that obeys Gaussian distribution to traverse the pixels in the contour image and update the pixel values, that is, to convert the grayscale value of the contour image With Gaussian function Convolution is performed to update the pixel value as follows:
[0029] ;
[0030] in, is the pixel point in the contour image Gray value of is the convolution symbol; Update the pixel after convolution calculation The pixel value after
[0031] S32, using a threshold method to perform binary segmentation on the contour image to obtain a laser stripe image;
[0032] S33, identifying and cutting a laser stripe region where laser stripes exist in the laser stripe image;
[0033] S34, using the grayscale centroid method to calculate the center coordinates of any column of laser stripes in the laser stripe area ;
[0034] S35. For several center coordinates Fitting is performed to obtain the center line of the laser stripe;
[0035] S36. Use homogeneous coordinate transformation matrix For all pixels located on the center line of the laser stripe The contour point cloud data is converted.
[0036] Furthermore, in step S33, the specific process includes the following steps:
[0037] S311, perform median filtering on the laser stripe image and define two one-dimensional arrays with a length of 1280 , , The initial value of the data is 1024. The initial value of the data is 0;
[0038] S312, traverse the pixel points in the laser stripe image column by column, The row values of pixels whose column grayscale values are greater than 240 are saved in a one-dimensional array In the process, continue to traverse the pixels in this column and save the row value of the last pixel with a grayscale value greater than 240 into a one-dimensional array. Repeat the above process until the traversal is completed;
[0039] S313, calculation - The maximum value of , and according to the maximum value Determine whether there are laser stripes in the laser stripe image;
[0040] like >100, there are no laser stripes in the laser stripe image, and the two-dimensional line laser sensor is judged to be out of the detection range and no subsequent operation is performed;
[0041] like ≤100, then select a one-dimensional array The minimum value in And one-dimensional array The maximum value in , and expand up and down The laser stripe image is cropped using pixels as the boundary.
[0042] Further, in step S34, the grayscale centroid method is used to calculate the laser stripe cross section. Column center coordinates The mathematical expression is:
[0043] ;
[0044] In the above formula, For image Pixel in column Gray value of the row; It is the height range of the laser stripe area after median filtering and extraction of the region of interest.
[0045] Further, in step S4, The mathematical expression of the sub-NURBS curve is:
[0046] ;
[0047] In the above formula, is the contour feature point, as the curve The number of control points is ; To attach to the corresponding control point The weight factor of Defined at the node vector on Subspline basis functions.
[0048] Furthermore, in step S5, the specific process includes the following steps:
[0049] S51, with tangent vector , normal vector and vector They are the Y-axis direction, Z-axis direction and X-axis direction of the robot end attitude coordinate system respectively;
[0050] S52, suppose the direction vectors obtained after the normalization of the rotation vectors of the X, Y, and Z axes of the robot terminal attitude coordinate system are , , ;
[0051] S53, according to the direction vector , , Calculate the rotation Euler angle, which is the posture of the robot end. The expression of the rotation Euler angle is:
[0052] ;
[0053] In the above formula, , , They are the direction vectors obtained after normalization of the rotation vectors of the X, Y, and Z axes of the robot's terminal attitude coordinate system.
[0054] By means of the above technical solution, the present invention provides a method for generating a cutting edge path for robot milling of thin-walled parts, which has at least the following beneficial effects:
[0055] 1. The present invention realizes the accurate identification of the processing reference line of the surface of the composite workpiece, completes the extraction of the coordinates and normal information of the contour feature points, and thus accurately generates the processing path for the milling and trimming of thin-walled parts, meets the high-precision requirements of the current robot path planning during milling and trimming, and improves the accuracy and quality of thin-walled parts processing.
[0056] 2. By setting the detection range of the two-dimensional line laser sensor, the present invention can successfully identify feature points when scanning the contour edge of the workpiece and then complete data collection, avoiding the loss of some features of the workpiece contour edge, thereby obtaining a more accurate contour image.
[0057] 3. When calculating the grayscale centroid, the present invention uses a weight window to perform weighted operations on the pixels around the pixel point to replace the pixel value of the point, avoiding the center point offset caused by calculating only the grayscale value of a certain direction of the stripe, thereby reducing the impact of image noise on the stripe center extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0059] Figure 1 A schematic diagram of a two-dimensional line laser sensor of the present invention scanning the contour edge of a workpiece;
[0060] Figure 2 It is a schematic diagram of the detection range of the present invention;
[0061] Figure 3 A physical picture of a workpiece having a machining reference line according to the present invention;
[0062] Figure 4 It is a locally enlarged contour image after binarization processing of the present invention;
[0063] Figure 5 The binary light beam image after the opening operation of the present invention;
[0064] Figure 6 This is a schematic diagram of the contour feature point extraction result of the present invention;
[0065] Figure 7 This is a schematic diagram of the results of extracting the center line of the laser stripe according to the present invention;
[0066] Figure 8 Schematic diagram of contour point cloud data formed by the center lines of laser stripes in the present invention;
[0067] Fig. 9 The schematic diagram of the machining path planning of the robot milling and trimming of the present invention;
[0068] Fig.10 The schematic diagram of the present invention for determining the posture of the robot end. DETAILED DESCRIPTION
[0069] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0070] In the current field of robot machining path planning, for workpieces with low structural rigidity or difficult to completely fix, the milling accuracy is often damaged due to deformation or displacement of the workpiece caused by the milling force. Therefore, when formulating the milling cutting path, the machining path generated by the existing technology is difficult to meet the high-precision requirements for machining large, complex curved and thin-walled parts. To solve this problem, please refer to Figure 1-Figure 10 , this embodiment proposes a robot milling trimming path generation method for thin-walled parts. First, according to the grayscale changes in the contour image, the position of the processing reference line is found in the contour image taken by the two-dimensional line laser sensor, and then the corner points are extracted to obtain the contour feature points; then the laser beam stripes in the contour image are refined using the grayscale centroid method to extract the contour point cloud data; after light plane calibration and coordinate conversion, the pixel point coordinates in the two-dimensional plane are converted to three-dimensional coordinates, and the contour point cloud data is reconstructed to find the normal information at the guide contour feature point, and finally the final processing path is generated according to the position of the contour feature point on the processing standard line and the normal information at the point, completing the generation of the milling trimming path.
[0071] This embodiment uses a sensor fixed to the robot end effector to scan the contour edge of the workpiece, and generates a machining trajectory after orderly extracting the contour features to complete the robot's high-precision milling processing, thereby achieving accurate recognition of the machining reference line of the composite workpiece surface and completing the extraction of the contour feature point coordinates and normal information. The robot milling cutting path generation method includes the following steps:
[0072] S1. Scan the contour edge of the workpiece according to the detection range through the two-dimensional line laser sensor fixed on the end effector of the robot to obtain the contour image. Figure 1 As shown in the figure, the robot is equipped with a two-dimensional line laser sensor and moves along the processing reference line at a speed of Move along the planned path, and the scanning frequency of the 2D line laser sensor is , scanning interval Determined by the local curvature of the machined part.
[0073] In this example, if Figure 3 As shown, the machining reference line is a kind of low-reflective material deposited on the surface to mark the design dimensions of the part during the manufacturing process. According to the triangulation principle of the two-dimensional line laser sensor, when the two-dimensional line laser sensor detects the edge contour, the laser beam is irradiated on the surface of the workpiece. Due to the different absorption rates of the laser beam on the workpiece surface and the machining reference line surface, there will be obvious interruption features on the laser stripes on the scanned contour image. Based on this feature, the position of the contour feature point can be quickly located when scanning in a beam of laser stripes. For the sake of simplicity, this example only describes one form of machining reference line. The machining reference line forms that can be detected by the two-dimensional line laser sensor include but are not limited to low-reflective material deposition, protrusions / depressions on the workpiece surface, and engraved lines on the workpiece surface.
[0074] like Figure 2 As shown, the two-dimensional line laser sensor used in this embodiment is the LLT2900-25 sensor produced by Mi-Iridium of Germany. The standard measurement range of the sensor on the X-axis is 25mm, and the resolution is 1280 points; the standard range on the Y-axis is 66mm, and the resolution is 2μm; the light source is 658nm semiconductor red light, the sampling frequency is 300Hz, and the sensor size is 96×85×33mm. The sensor is installed by mechanical fixing, connected to the special tool handle through a connector, and installed on the electric spindle of the multifunctional end effector (referred to as "end"). Driven by the robot, the sensor moves along the guide line with the end, and scans to obtain the actual position of the guide line in the processing coordinate system and the surface contour of the workpiece.
[0075] The detection range of the two-dimensional line laser sensor is: the overall detection range of the two-dimensional line laser sensor is a trapezoidal area, the angle between the two hypotenuses of the trapezoidal area is 12.9°, and the width of the laser beam is 25mm when the measured contour surface is at the optimal measurement height. The contour feature points can only be detected when they are in the trapezoidal area between the upper measurement boundary and the lower measurement boundary. By setting the detection range of the two-dimensional line laser sensor, this embodiment can successfully identify the feature points when scanning the contour edge of the workpiece and complete data collection, thereby avoiding the loss of some features of the contour edge of the workpiece, thereby obtaining a more accurate contour image.
[0076] S2. Extract the corner points on the machining reference line on the workpiece from the contour image to obtain several contour feature points. To accurately identify the corner points on the machining reference line, the influence of noise points in the contour image must be eliminated first. Therefore, the contour image is binarized. The contour image after binarization is as follows: Figure 4As shown. Observe the partially enlarged contour image, there are many "burrs" on the light stripes of the contour image after threshold processing. These protruding light spots will cause a large change in the grayscale value of the sliding window during corner point extraction, and introduce many irrelevant corner points to interfere with the selection of contour feature points. In order to optimize the accuracy of contour feature point extraction, it is necessary to perform an opening operation on the contour image before extraction. In step S2, the specific process includes the following steps:
[0077] S21, binarize the contour image and perform image opening operation to obtain a clear and smooth binarized beam image; in this embodiment, binarization and image opening operation are both conventional image processing techniques, which will not be described in detail here. Figure 5 As shown in the figure, the binary light beam image after the image opening operation is clear and smooth. At this time, because the reflected light of the laser beam is weak at the processing reference line, it is broken into two light bands after threshold processing, and the center point of the disconnected part of the two light bands is the corner point.
[0078] S22, set a size and is an odd number of sliding windows, and the center of the sliding window is placed at any position in the binary beam image In this embodiment, the corner point detection is performed on the binary beam image by selecting a sliding window of appropriate size, such as Figure 6 The figure shows the result of contour feature point extraction. The red pixels in the figure are the extracted corner points. When the sliding window is large, the two light bands tend to reflect the edge features relative to the sliding window. The grayscale value change rate is the largest when moving in only one direction on the light band. At this time, the corner point detection is only sensitive to the light band being disconnected for a section, and the detected corner points are concentrated at the break. If a smaller sliding window is selected, the light band tends to reflect local features relative to the sliding window. In addition to being concentrated at the break, the corner point detection results will also be distributed in the rough parts of the light band edge, causing the target point extraction results to deviate from the true position and reduce the detection accuracy. Through experimental verification, the parameters are adjusted to appropriate values. The corner point detection results are concentrated near the guide line. The coordinate values of these corner points are weighted averaged to find the center point as the guide line coordinate. The center point is at Figure 6 It is shown as a yellow cross above. In this embodiment, the size of the sliding window can be set according to the actual processing conditions and can be adjusted to a suitable size through experimental verification. No limitation is made here.
[0079] S23, moving the sliding window in any direction on the binary beam image, and calculating the corner point response value of each pixel point in the sliding window ; Corner point response value The calculation formula is:
[0080] ;
[0081] in,
[0082] ;
[0083] ;
[0084] ;
[0085] ;
[0086] ;
[0087] In the above formula, For location The gray value of the pixel at the center of the sliding window; For location The sliding window function at represents the weight of the pixel points in the sliding window, which is set to 1 in this embodiment; is the empirical coefficient, with a value of 0.04 to 0.06; All are real symmetric matrices The characteristic value of .
[0088] S24, response values of several corner points according to the size of the sliding window Perform non-maximum suppression and select the corner point response value with the local maximum The corresponding pixel , then the pixel is the corner point;
[0089] S25, in the sensor coordinate system The homogeneous transformation matrix is used below The pixel Converted to three-dimensional space to obtain contour feature points; in this embodiment, the homogeneous transformation matrix is the image two-dimensional coordinate system To sensor coordinate system The transformation matrix, homogeneous transformation matrix is a constant, which can be obtained by using a binocular vision camera to assist in calibration, similar to the “hand-eye relationship”, and will not be described in detail here.
[0090] After finding the corner points in the binarized beam image, the homogeneous transformation matrix The corner points on the two-dimensional plane are converted to the three-dimensional space to obtain the contour feature points, where the pixel coordinates of the two-dimensional line laser sensor are calibrated on the light plane to the homogeneous transformation matrix of the sensor coordinate system plane is known. During the scanning process of the 2D line laser sensor, the camera tracks the end effector target point in real time and records the position of the end effector coordinate system. Assume that the pixel coordinates of the feature point found in the binary beam image are , the homogeneous transformation matrix from pixel to coordinate system is , we can obtain the contour feature points detected by the two-dimensional line laser sensor in the binocular vision camera coordinate system The coordinate values are:
[0091] ;
[0092] In the above formula, is the sensor coordinate system To the robot end effector coordinate system The transformation matrix of is a constant; is the robot end effector coordinate system To the stereo vision camera coordinate system The transformation matrix of is a constant.
[0093] S3, extract the center line of the laser stripe in the contour image, and set the coordinate values of the pixel points located on the center line of the laser stripe Convert to contour point cloud data represented by three-dimensional coordinates; obtain the point cloud information of the contour edge surface of the scanned workpiece from the contour image. In the contour image collected by the two-dimensional line laser sensor, the laser stripe has a certain width. The center line of the single-pixel width laser stripe must be extracted to accurately obtain the coordinate information of the workpiece contour point cloud. The extraction of the center line of the laser stripe is crucial to the guarantee of the system processing accuracy. It directly affects the coordinate accuracy of the reconstruction of the two-dimensional contour point cloud to the three-dimensional surface, and is the basis for the subsequent robot milling and trimming trajectory planning. In step S3, the specific process includes the following steps:
[0094] S31. Due to the influence of the on-site environment and the surface features of the measured surface in the actual measurement, the laser stripe cross section in the collected contour image does not present a strict Gaussian distribution. Therefore, when extracting the center line of the laser stripe, it is easy to cause the center point offset when only calculating the grayscale value of a certain direction of the stripe, thereby affecting the accurate extraction of the center line of the laser stripe. This embodiment uses a weighted sliding window that obeys the Gaussian distribution to traverse the pixel points in the contour image and update the pixel value, that is, the grayscale value of the contour image is With Gaussian function Convolution is performed to update the pixel value as follows:
[0095] ;
[0096] in, is the pixel point in the contour image Gray value of is the convolution symbol; Update the pixel after convolution calculation The pixel value after
[0097] S32, using the threshold method to perform binary segmentation on the contour image to obtain a laser stripe image, and the image segmentation formula is:
[0098] ;
[0099] When calculating the grayscale centroid, this embodiment uses a weight window to perform weighted operations on the pixels around the pixel point to replace the pixel value of the point, so as to avoid the center point offset caused by calculating only the grayscale value of a certain direction of the stripe, thereby reducing the impact of image noise on the stripe center extraction.
[0100] S33. Identify and crop the laser stripe area where there are laser stripes in the laser stripe image; in the actual collected sensor image, the laser stripe image is only a small part of the entire camera image. The essence of the refinement algorithm is to calculate the grayscale value through mathematical methods to summarize the rules for prediction. If the entire image is processed, the blank part will be involved in the calculation although it has no features, which reduces the efficiency of the algorithm. Therefore, the laser stripes are first identified, and then the area where there are no laser stripes is cropped, and the laser stripe area containing laser stripes is retained. Although the contour image in the sensor image is not fixed in position, it is generally distributed vertically and has a small curvature. The graphics are cropped according to this feature of the image. The specific steps are as follows:
[0101] S311, performing median filtering on the laser stripe image to eliminate the influence of noise on subsequent extraction of the laser stripe center line;
[0102] S312, define two one-dimensional arrays with a length of 1280 (the width of the contour image) , , The initial value of the data is 1024. The initial value of the data is 0. The gray value of the laser stripe area is significantly greater than that of the blank area, so the area where the laser stripe is located is searched based on the gray value of the pixel. The pixels in the laser stripe image are traversed column by column, and the first The row values of pixels whose column grayscale values are greater than 240 are saved in a one-dimensional array In the process, continue to traverse the pixels in this column and save the row value of the last pixel with a grayscale value greater than 240 into a one-dimensional array. Repeat the above process until the traversal is completed;
[0103] S313, calculation - The maximum value of , and according to the maximum value Determine whether there are laser stripes in the laser stripe image;
[0104] like >100, there are no laser stripes in the laser stripe image, and the two-dimensional line laser sensor is judged to be out of the detection range and no subsequent operation is performed;
[0105] like ≤100, then select a one-dimensional array The minimum value in And one-dimensional array The maximum value in , and expand up and down Specifically, considering the projection width of the laser stripe to prevent the upper and lower expansions from being cut, pixels, Crop the laser stripe image for the boundary.
[0106] S34, using the grayscale centroid method to calculate the center coordinates of any column of laser stripes in the laser stripe area ; When the laser stripes are projected onto the surface of a simple and smooth object, the energy of the cross section usually conforms to the Gaussian distribution, that is, it tends to decrease from the middle to the two ends. This is reflected in the image as the center point of the laser stripe coincides with the point with the highest energy, so the grayscale particle of the laser stripe cross section can be used as the center point to be extracted. The grayscale centroid method is to use the centroid of the grayscale value distribution of each row / column of the laser stripe cross-section image as the midpoint of the laser stripe. The height range of the image after median filtering and extraction of the region of interest is , grayscale centroid method to calculate laser stripe cross section Column center coordinates The mathematical expression is:
[0107] ;
[0108] In the above formula, For image Pixel in column Grayscale value of the row.
[0109] S35. For several center coordinates The center line of the laser stripes is obtained by fitting. In this embodiment, for the center coordinates of multiple laser stripes on the same column, , the least binary method or other methods can be selected for fitting. Since there are multiple laser stripe center lines, each column can be fitted in turn to obtain the corresponding laser stripe center line, such as Figure 7 As shown, the red line in the figure is the center line of the extracted laser stripe.
[0110] S36. Use homogeneous coordinate transformation matrix For all pixels located on the center line of the laser stripe After the center line of the laser stripe is extracted, the coordinate value set of the pixel point on the center line of the laser stripe on the two-dimensional plane of the image is: , image two-dimensional coordinate system To sensor coordinate system The homogeneous coordinate transformation matrix It is known that a set of two-dimensional point cloud coordinates in the sensor coordinate system can be obtained through matrix operation For a two-dimensional line laser sensor, the measurement light plane is located in the XOZ plane of the coordinate system, so the Y-axis coordinate value of the point cloud can be regarded as 0. The three-dimensional coordinates of the point cloud in the sensor coordinate system can be expressed as After the pixel points on the center lines of multiple laser stripes are converted from two-dimensional coordinates to three-dimensional coordinates, the contour point cloud data formed at the edge of the workpiece is as follows: Figure 8 shown.
[0111] S4. Perform NURBS surface fitting on the contour point cloud data to reconstruct the curve surface , and extract curves and surfaces Go up any curve Upper contour feature points Normal information at the location, including curve Upper contour feature points The tangent vector at , normal vector and vector In this embodiment, for the tangent vector , normal vector The curve can be calculated by taking the derivative Upper contour feature points The slope at the point can then be used to determine the tangent vector and normal vector at that point. This can be done using conventional mathematical calculations, so we will not go into detail here.
[0112] In this embodiment, NURBS curves (non-uniform rational B-spline curves) are used as machining paths to replace the segmented small line segments in traditional trajectory planning. The NURBS surface fitting method provides a mathematical model for accurately expressing free curves. The purpose of this is to reduce the change in the robot's motion direction to avoid sudden acceleration changes and ensure the smooth operation of the robot during milling. Therefore, the curve surface obtained by using the NURBS surface fitting method to fit the contour point cloud data is like Fig. 9 As shown, The mathematical expression of the sub-NURBS curve is:
[0113] ;
[0114] In the above formula, is the contour feature point, as the curve The number of control points is ; To attach to the corresponding control point The weight factor of Defined at the node vector on Subspline basis functions, knot vectors The expression is:
[0115] ;
[0116] In the above formula, , and for all control points , , presents a non-decreasing parameter sequence, is the number of control points.
[0117] S5. Use the contour feature points as processing path points, fit the normal information of the surface with the contour point cloud data to determine the posture of the robot end to generate the milling and trimming path of the robot for processing thin-walled parts, and finally obtain the robot milling and trimming processing program, which is then post-processed to generate the robot processing file. Fig.10 As shown, in step S5, the specific process includes the following steps:
[0118] S51, with tangent vector , normal vector and vector They are the Y-axis direction, Z-axis direction and X-axis direction of the robot end attitude coordinate system respectively;
[0119] S52, suppose the direction vectors obtained after the normalization of the rotation vectors of the X, Y, and Z axes of the robot terminal attitude coordinate system are , , ;
[0120] S53, according to the direction vector , , Calculate the rotation Euler angle, which is the posture of the robot end. The expression of the rotation Euler angle is:
[0121] ;
[0122] In the above formula, , , They are the direction vectors obtained after normalization of the rotation vectors of the X, Y, and Z axes of the robot's terminal attitude coordinate system.
[0123] This embodiment uses a sensor fixed to the robot's end effector to scan the contour edge of the workpiece, and generates a processing trajectory after orderly extracting the contour features to complete the robot's high-precision milling processing, thereby achieving accurate identification of the processing reference line of the composite workpiece surface, and completing the extraction of contour feature point coordinates and normal information, thereby accurately generating a processing path for milling and trimming of thin-walled parts, meeting the current high-precision requirements of robot path planning during milling and trimming processing, and improving the accuracy and quality of thin-walled part processing.
[0124] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0125] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0126] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A robot milling cutting path generation method for thin-walled parts, characterized in that: The method comprises the following steps: S1, scanning the contour edge of the workpiece according to the detection range through a two-dimensional line laser sensor fixed on the end effector of the robot to obtain a contour image; S2. Extracting the corner points of the machining reference line on the workpiece from the contour image to obtain a number of contour feature points. The specific process includes the following steps: S21, binarizing the contour image and performing an image opening operation to obtain a clear and smooth binarized beam image; S22, setting a sliding window of size n×n where n is an odd number, and placing the center of the sliding window at an arbitrary position (x, y) in the binary beam image; S23, move the sliding window in any direction on the binary beam image, and calculate the corner point response value R of each pixel point in the sliding window i , corner point response value R i The calculation formula is: R i =detM-a(traceM) 2 in, detM=λ1*λ2 traceM=λ1+λ2 In the above formula, I(x,y) is the grayscale value of the pixel at position (x,y) located at the center of the sliding window; w(x,y) is the sliding window function at position (x,y), which represents the weight of each pixel in the sliding window and is set to 1; a is an empirical coefficient with a value of 0.04 to 0.06; λ1 and λ2 are both eigenvalues of the real symmetric matrix M; S24, according to the size of the sliding window, the response value R of several corner points i Perform non-maximum suppression and select the corner point response value R with the local maximum i The corresponding pixel point (x h ,y h ), then the pixel point (x h ,y h ) is the corner point; S25, using the homogeneous transformation matrix in the sensor coordinate system {S} The pixel point (x h ,y h ) is converted into three-dimensional space to obtain contour feature points; S3, extract the center line of the laser stripe in the contour image, and set the coordinate value of the pixel point located on the center line of the laser stripe {(u i ,v i )}Convert to contour point cloud data represented by three-dimensional coordinates; S4, perform NURBS surface fitting on the contour point cloud data to reconstruct the curve surface S, and extract the contour feature point P on any curve C on the curve surface S i The normal information at the point includes the tangent vector n at the contour feature point P on the curve C. y , normal vector n z and vector n x =n y ×n z ; S5. Use the contour feature points as processing path points, fit the normal information of the surface with the contour point cloud data to determine the posture of the robot end and generate the milling and trimming path for the robot to process thin-walled parts.
2. The robot milling cutting path generation method according to claim 1, characterized in that: In step S1, the detection range of the two-dimensional line laser sensor is: the overall detection range of the two-dimensional line laser sensor is a trapezoidal area, the angle between the two hypotenuses of the trapezoidal area is 12.9°, and the width of the laser beam is 25 mm when the measured contour surface is at the optimal measurement height.
3. The robot milling cutting path generation method according to claim 1, characterized in that: In step S3, the specific process includes the following steps: S31, using a weighted sliding window that obeys Gaussian distribution to traverse the pixel points in the contour image and update the pixel value, that is, convolving the gray value I(x, y) of the contour image with the Gaussian function g(x, y) to update the pixel value, as shown in the following formula: Where I(x,y) is the gray value of the pixel (x,y) in the contour image; is the convolution symbol; G(x,y) is the pixel value after updating the pixel point (x,y) after convolution calculation; S32, using a threshold method to perform binary segmentation on the contour image to obtain a laser stripe image; S33, identifying and cutting a laser stripe region where laser stripes exist in the laser stripe image; S34, using the grayscale centroid method to calculate the center coordinates (u i ,v i ); S35, for several center coordinates (u i ,v i ) is fitted to obtain the center line of the laser stripe; S36. Use homogeneous coordinate transformation matrix For all pixels located on the center line of the laser stripe (x s ,z s ) is converted to obtain contour point cloud data.
4. The robot milling cutting path generation method according to claim 3, characterized in that: In step S33, the specific process includes the following steps: S311, perform median filtering on the laser stripe image, and define two one-dimensional arrays H1 and H2 with a length of 1280, the initial value of the data in H1 is 1024, and the initial value of the data in H2 is 0; S312, traverse the pixels in the laser stripe image column by column, save the row values of the pixels in the i-th column whose grayscale value is greater than 240 into the one-dimensional array H1[i], continue to traverse the pixels in this column, save the row value of the last pixel whose grayscale value is greater than 240 into the one-dimensional array H2[i], and repeat the above process until the traversal is completed; S313, calculate the maximum value H of H1[i]-H2[i] S , and according to the maximum value H S Determine whether there are laser stripes in the laser stripe image; If H S >100, there are no laser stripes in the laser stripe image, and the two-dimensional line laser sensor is judged to be out of the detection range and no subsequent operation is performed; If H S ≤100, select the minimum value H1 in the one-dimensional array H1 and the maximum value H2 in the one-dimensional array H2, and expand H up and down S * The laser stripe image is cropped with 2 pixels as the boundary.
5. The robot milling cutting path generation method according to claim 4, characterized in that: In step S34, the grayscale centroid method is used to calculate the center coordinates (u i ,v i ) is: In the above formula, G j is the grayscale value of the jth row in the i-th column of the image; [h0,h] is the height interval of the laser stripe area after median filtering and extraction of the region of interest.
6. The robot milling cutting path generation method according to claim 1, characterized in that: In step S4, the mathematical expression of the p-order NURBS curve is: 0≤u≤1 In the above formula, P i is the contour feature point, which is used as the control point of curve C. The number of control points is (n+1); i is attached to the corresponding control point P i The weight factor of i,p (u) is the p-order spline basis function defined on the knot vector U; The expression of the node vector U is: In the above formula, a=0, b=1, and for all control points P i ,ω i >0, presenting a non-decreasing parameter sequence, m is the number of control points.
7. The robot milling cutting path generation method according to claim 1, characterized in that: In step S5, the specific process includes the following steps: S51, with tangent vector n y , normal vector n z and vector n x They are the Y-axis direction, Z-axis direction and X-axis direction of the robot end attitude coordinate system respectively; S52, suppose the direction vectors obtained after the normalization of the rotation vectors of the X, Y, and Z axes of the robot terminal attitude coordinate system are S53, according to the direction vector Calculate the rotation Euler angle, which is the posture of the robot end. The expression of the rotation Euler angle is: In the above formula, They are the direction vectors obtained after normalization of the rotation vectors of the X, Y, and Z axes of the robot's terminal attitude coordinate system.
Citation Information
Patent Citations
Three-dimensional point cloud real-time collecting device and robot polishing path planning method
CN107127755A
Off-line curved surface weld joint extraction and attitude estimation method
CN114571160A