Workpiece automatic grinding device and method
By generating point cloud data through the image collector, calculating the defect trajectory points and converting them into the grinding trajectory in the robot end coordinate system, and combining with force sensor control, it solves the problem of low automation level of traditional robot grinding and realizes high-precision automated grinding.
Patent Information
- Application Number
- CN202311093934.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-08-29
AI Technical Summary
Traditional robotic grinding methods are cumbersome to operate, have a low degree of automation, and are difficult to achieve precise control of force and speed.
An image collector is used to generate point cloud data, and the defect trajectory points on the workpiece surface are calculated through the point cloud data. The surface segmentation and straight line fitting algorithms are combined to generate precise grinding trajectories. The robot end coordinate system conversion is used to achieve automated grinding, and a force sensor is equipped for constant force control.
It realizes automatic and precise grinding trajectory generation and constant force control, and improves the automation degree and precision of the grinding process.
Smart Images

Figure CN117226655B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of processing and manufacturing, and in particular relates to an automatic workpiece grinding device and method. Background Art
[0002] Robotic processing technology integrates multiple technologies such as mechanics, control, communication, computer software and hardware. Compared with traditional manual production and manufacturing methods, it not only improves production efficiency but also has higher stability.
[0003] In the field of robotic grinding, the traditional method is to perform grinding through robot teaching programming, but this method is cumbersome to operate, has a low degree of automation, and is difficult to control force and speed. Summary of the Invention
[0004] In response to the above problems, the present invention proposes an automatic workpiece grinding device and method, which can automatically generate a grinding trajectory with high precision and realize automated grinding.
[0005] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:
[0006] In a first aspect, the present invention provides an automatic workpiece grinding device, comprising:
[0007] robot;
[0008] a polishing piece, provided on the robot;
[0009] An image collector is provided on the robot and is used to photograph the surface of the workpiece from different angles to form point cloud data, and send the point cloud data to the controller;
[0010] The controller is used to generate a point cloud surface model based on the received point cloud data, calculate the defect trajectory points on the workpiece surface based on the point cloud surface model, and then generate a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, convert the first grinding trajectory into a second grinding trajectory in the robot end coordinate system; control the robot to move according to the second grinding trajectory, and drive the grinding part to grind the workpiece.
[0011] Optionally, the controller is configured to sequentially perform the following steps:
[0012] After sequentially performing coarse registration and fine registration on the received point cloud data, spliced point cloud data is obtained, wherein the spliced point cloud data contains overall feature information of the workpiece;
[0013] The spliced point cloud data is subjected to surface segmentation to obtain a point cloud surface model.
[0014] Optionally, the stitched point cloud data is obtained by the following processing:
[0015] Repeat the preset point cloud stitching steps until all frame point clouds are stitched together to obtain the stitched point cloud data P containing the overall feature information of the workpiece. b ;
[0016] The preset point cloud stitching steps include:
[0017] The adjacent frame point cloud P1 and frame point cloud P2 are coarsely and finely registered in sequence to obtain the corresponding transformation matrix;
[0018] Based on the transformation matrix, the frame point cloud P1 is linearly transformed to obtain the frame point cloud P in the frame point cloud P2 coordinate system. 1b ;
[0019] The frame point cloud P 1b Merge with the frame point cloud P2 to obtain the spliced frame point cloud P a ;
[0020] The transformation matrix is calculated with the goal of minimizing the distance between the source point cloud and the target point cloud after coarse registration. The expression of the transformation matrix is: T = T0 + ΔT, where T0 represents the homogeneous transformation matrix corresponding to the coarse registration; ΔT represents the homogeneous transformation matrix corresponding to the fine registration. p ai represents the source point cloud after coarse registration, p bi represents the target point cloud, t represents the translation vector, and R represents the rotation matrix.
[0021] Optionally, the coarse registration comprises the following steps:
[0022] Input the frame point cloud P1 and the frame point cloud P2 into the preset PCRnet improved model network to obtain the homogeneous transformation matrix corresponding to the coarse registration, where the frame point cloud P1 is used as the source point cloud and the frame point cloud P2 is used as the target point cloud;
[0023] The PCRnet improved model network includes an ISS key point feature extraction layer, a multi-layer perceptron layer, a maximum pooling layer, and a fully connected layer;
[0024] The ISS key point feature extraction layer extracts the source ISS key points and the target ISS key points of the frame point cloud P1 and the frame point cloud P2 respectively;
[0025] The multi-layer perceptron layer expands the received source ISS key points and target ISS key points to a preset dimension to obtain a source vector and a target vector of the preset dimension;
[0026] The maximum pooling layer merges the source vector and the target vector and sends them to the fully connected layer. The fully connected layer outputs a homogeneous transformation matrix. The homogeneous transformation matrix is a seven-dimensional vector, where the first three dimensions represent the translation vector and the last four dimensions represent the rotation vector.
[0027] Optionally, the surface segmentation is performed on the spliced point cloud data, and the specific process is as follows:
[0028] Randomly select three points from the spliced point cloud data and calculate the initial plane based on the plane equation Ax+By+Cz=D. A, B, C are the coefficients of the plane equation, and D is a preset constant.
[0029] Calculate the Euclidean distance e between each remaining point cloud data and the initial plane i ;
[0030] If the Euclidean distance e i <ε1, where ε1 is the preset threshold, the point is added to the interior point set and the number of interior points under the current plane equation parameters is counted;
[0031] If the current number of inliers is greater than the preset number of inliers, the plane equation parameters are updated based on all the current inliers. The plane equation with the largest number of inliers is found through continuous iterative fitting, and the corresponding plane equation parameters are selected as the final fitting result. All the inliers contained in the plane are eliminated, and what remains is the point cloud surface model.
[0032] Optionally, the calculation process of the defect trajectory points on the workpiece surface is:
[0033] Calculating normal vector information of each point according to the point cloud surface model;
[0034] According to the region growing segmentation algorithm, the points are sorted based on the curvature, the point with the minimum curvature is selected as the seed point, the neighboring points are searched by the KD_Tree algorithm, and the normal vector angle and curvature value between the neighboring point and the seed point are calculated. If the curvature c i Angle α with the normal vector i If the value of a point is less than the corresponding threshold c and α, it will be added to the seed point set to obtain a discrete point cluster;
[0035] generating a straight line point cloud cluster based on the discrete point cluster;
[0036] The optimal moving squares method is used to smooth the line point cloud cluster to obtain the defect trajectory points on the workpiece surface.
[0037] Optionally, the generation process of the straight line point cloud cluster is:
[0038] Randomly select two points from a discrete cluster of points and combine them with the equation of the line Calculate the initial straight line, m, n, p, are the coefficients of the straight line equation;
[0039] Calculate the Euclidean distance e between each remaining point cloud data and the initial plane j ;
[0040] If the Euclidean distance e j <ε2, where ε2 is the preset threshold, then the point is added to the interior point set and the number of interior points under the current plane equation parameters is counted;
[0041] If the current number of inliers is greater than the preset number of inliers, the line equation parameters are updated based on all the current inliers. The maximum number of inliers contained in the line equation is found through continuous iterative fitting, and the corresponding line equation parameters are selected as the final fitting result. The fitting result is a line point cloud cluster.
[0042] Optionally, the coordinate transformation matrix between the workpiece coordinate system and the robot end coordinate system is expressed as:
[0043] T end_to_workpiece =T end_to_camera *T workpiece_to_camera
[0044] T end_to_camera =T ibase *T base_to_board *T icam
[0045] Among them, T end_to_workpiece is the coordinate transformation matrix between the workpiece coordinate system and the robot end coordinate system, T end_to_camera is the transformation matrix between the image collector coordinate system and the robot end coordinate system, T workpiece_to_camera is the transformation matrix between the workpiece coordinate system and the image acquisition coordinate system, T ibase is the coordinate transformation matrix between the robot end coordinate system and the robot base coordinate system, T icam is the coordinate transformation matrix between the calibration plate coordinate system and the image collector coordinate system, T base_to_board is the coordinate transformation matrix between the calibration plate coordinate system and the robot base coordinate system.
[0046] Optionally, a force sensor is provided on the grinding piece, and the force sensor is connected to the controller. The controller controls the grinding piece to grind the workpiece with a constant force according to output data of the force sensor.
[0047] In a second aspect, the present invention provides a method for automatically grinding a workpiece, comprising:
[0048] Using an image collector located at the end of the robot, the surface of the workpiece is photographed from different angles to form point cloud data, and the point cloud data is sent to the controller;
[0049] A controller is used to generate a point cloud surface model based on the received point cloud data, and the defect trajectory points on the workpiece surface are calculated based on the point cloud surface model, thereby generating a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, the first grinding trajectory is converted into a second grinding trajectory in the robot end coordinate system; and the robot is controlled to perform grinding movement on the workpiece using the grinding piece according to the second grinding trajectory.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present invention uses an image collector to photograph the workpiece surface and obtain point cloud data. The point cloud data is a discrete point with spatial flexibility, which can fully record the spatial information, texture features and contour features of the workpiece surface. Then, a controller is used to calculate a point cloud surface model based on the point cloud data, and the defect trajectory points on the workpiece surface are calculated according to the point cloud surface model, thereby generating a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, the first grinding trajectory is converted into a second grinding trajectory in the robot end coordinate system; the robot is controlled to move according to the second grinding trajectory, driving the grinding part to grind the workpiece. The whole process is automated, and a high-precision grinding trajectory can be automatically generated to achieve automated grinding.
[0052] More specifically, in the process of generating defect trajectory points, the present invention adopts algorithms such as splicing registration (coarse registration combined with fine registration), surface segmentation, straight line fitting, and smoothing processing, thereby accurately fitting the defect trajectory points for realizing precise grinding of the robot.
[0053] The automatic workpiece grinding device of the present invention provides a force sensor on the grinding piece, and the force sensor cooperates with a controller to enable the grinding piece to grind the workpiece with a constant force. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0055] Figure 1 This is a schematic diagram of the principle of an automatic workpiece grinding device in one embodiment of the present invention;
[0056] Figure 2 is a schematic diagram of point cloud registration results in one embodiment of the present invention;
[0057] Figure 3 2. It is a schematic diagram of point cloud segmentation results in one embodiment of the present invention;
[0058] Figure 4 is a schematic diagram of a discrete point cluster in one embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of a straight line point cloud cluster in one embodiment of the present invention;
[0060] Figure 6 is a schematic diagram of a second grinding trajectory in one embodiment of the present invention;
[0061] Figure 7 This is a diagram of the data processing process of the PCRnet improved model network in one embodiment of the present invention;
[0062] Figure 8 It is a schematic flow chart of a method for automatically grinding a workpiece in one embodiment of the present invention. DETAILED DESCRIPTION
[0063] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0064] Unless otherwise specifically stated, the relative arrangement of the parts and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that, for ease of description, the sizes of the various parts shown in the drawings are not drawn according to actual proportional relationships. The techniques, methods and equipment known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods and equipment should be considered as part of the authorization specification. In all examples shown and discussed here, any specific values should be interpreted as being merely exemplary, not as limitations. Therefore, other examples of the exemplary embodiments may also include different values. It should be noted that similar numbers and letters represent similar items in the following figures, and therefore, once an item is defined in one figure, it does not need to be further discussed in subsequent figures.
[0065] In the description of the present invention, "several" means more than one, "plurality" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, while "above," "below," and "within" are understood to include the number itself. The use of "first" and "second" in the description is solely for the purpose of distinguishing technical features and should not be construed as indicating or implying relative importance, implicitly specifying the number of the indicated technical features, or implicitly specifying the order of the indicated technical features.
[0066] In the description of the present invention, reference to terms such as "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the exemplary expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0067] The application principle of the present invention is described in detail below with reference to the accompanying drawings.
[0068] Example 1
[0069] An embodiment of the present invention provides an automatic workpiece grinding device, such as Figure 1 As shown, the workpiece automatic grinding device includes a robot and an image collector installed on the robot, as well as a grinding piece and a controller;
[0070] During the specific implementation process, the robot can use a multi-degree-of-freedom robotic arm. For example, the robot can be a six-degree-of-freedom robotic arm. Of course, it can also be a robotic arm with other degrees of freedom, such as a three-axis seven-degree-of-freedom robotic arm; the image collector can use a 3D camera to capture the workpiece surface from different angles to form point cloud data and send it to the controller; the polishing part can use common polishing tools, such as polishing rods, belt grinders, etc.
[0071] The workpiece can be a rotating part, and the workpiece is polished in a rotational manner. That is, when the workpiece is polished, the workpiece can be driven by a machine tool or the like to rotate, and the workpiece contacts the polishing part to polish the workpiece.
[0072] The controller can control the robot and make the end of the robot be in different positions; specifically, the controller is used to generate a point cloud surface model based on the received point cloud data, calculate the defect trajectory points on the workpiece surface based on the point cloud surface model, and then generate a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, the first grinding trajectory is converted into a second grinding trajectory in the robot end coordinate system; the robot is controlled to move according to the second grinding trajectory, driving the grinding part to grind the workpiece.
[0073] In a specific implementation process, the automatic workpiece grinding device may further include a host computer, which is used to communicate with the controller and send control instructions to the controller. The controller controls the robot to perform corresponding actions according to the control instructions of the host computer.
[0074] The specific working process of the automatic workpiece grinding device in the embodiment of the present invention is described in detail below.
[0075] 102. Calibrate the automatic workpiece grinding device using a hand-eye calibration method to obtain a coordinate conversion matrix between the robot coordinate system and the image collector coordinate system, and use the image collector coordinate system to align the workpiece coordinate system and the robot coordinate system to obtain a coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system;
[0076] 104. Using an image collector to photograph the workpiece surface from different angles to generate point cloud data, and sending the point cloud data to a controller, which generates a point cloud surface model based on the received point cloud data;
[0077] 106. Obtaining defect trajectory points on the workpiece surface according to the point cloud surface model described in 104 using a controller;
[0078] And 108. Use the controller to generate a first grinding trajectory in the workpiece coordinate system according to the defect trajectory points; convert the first grinding trajectory into a second grinding trajectory in the robot end coordinate system according to the conversion matrix between the workpiece coordinate system and the robot end coordinate system; control the robot to move according to the second grinding trajectory, drive the grinding part to grind the workpiece, and perform constant force control during the grinding process.
[0079] The above steps will be described in detail below in combination with specific implementation forms.
[0080] In step 102, the automatic workpiece grinding device is calibrated using the hand-eye calibration method to obtain a coordinate conversion matrix between the robot coordinate system and the image acquisition device coordinate system. The image acquisition device coordinate system is used to align the workpiece coordinate system and the robot coordinate system, respectively, to obtain a coordinate conversion matrix between the workpiece coordinate system and the robot terminal coordinate system. This can be achieved in the following ways:
[0081] The coordinate transformation matrix between the image acquisition device coordinate system and the robot end coordinate system is obtained through the hand-eye calibration method. In actual operation, the image acquisition device (such as a 3D camera) fixed on the robot end is used to keep the calibration plate stationary and fixed in position with the robot base coordinate system. The relative position of the robot end and the camera is kept fixed, so that the robot continuously changes its position and posture. 12 groups of pictures of the calibration plate are taken at different positions. For the i-th group of pictures, the coordinate transformation matrix T between the calibration plate coordinate system and the image acquisition device coordinate system can be calculated according to Zhang Zhengyou's calibration method. icam , according to the posture obtained by the controller, the transformation matrix T from the robot end coordinate system to the robot base coordinate system is obtained ibase Since the relative pose of the calibration plate coordinate system and the robot base coordinate system remains fixed, the transformation matrix T for each set of images is base_to_board are the same. Since the relative positions of the robot end coordinate system and the image collector coordinate system are fixed, the transformation matrix T for each set of images is end_to_camera are the same, according to the coordinate system transformation operation rules:
[0082] T end_to_camera =T ibase *T base_to_board *T icam
[0083] Therefore, according to the coordinate system transformation operation rules, the hand-eye calibration equation can be obtained:
[0084]
[0085] 12 pictures can be used to obtain 11 sets of equations, which are the hand-eye calibration equations.
[0086] Use the least squares method to solve the hand-eye calibration equation and obtain the hand-eye calibration matrix T end_to_camera The hand-eye calibration matrix is the coordinate transformation matrix between the robot end coordinate system and the image collector coordinate system.
[0087] An image collector is used to align the workpiece coordinate system to the robot coordinate system. The workpiece coordinate system can collect point cloud data of the workpiece through the image collector. The earth coordinate system corresponding to the point cloud data is the workpiece coordinate system. The image and depth information are calibrated using the image collector calibration method to obtain the transformation matrix between the workpiece coordinate system and the image collector coordinate system. Furthermore, the transformation relationship between the image collector coordinate system and the robot terminal coordinate system is obtained through hand-eye calibration, and the transformation matrix between the image collector coordinate system and the robot coordinate system is multiplied by the transformation matrix between the workpiece coordinate system and the image collector coordinate system to obtain the coordinate conversion matrix between the workpiece coordinate system and the robot terminal coordinate system.
[0088] On the other hand, the workpiece coordinate system can also be obtained through a three-dimensional model of the workpiece, for example, in some 3D software.
[0089] When the calibration is completed (ie, after step 102 is completed), step 104 is executed.
[0090] In step 104, the surface of the workpiece is photographed from different angles using an image collector to generate point cloud data, specifically:
[0091] By changing the robot's position, the robot drives the image collector to collect point cloud data from multiple angles of the workpiece to be processed. After the acquisition is completed, the point cloud data is pre-processed. For example, the robot can drive the image collector to move within the working range of the workpiece; the image collector collects point cloud data from multiple angles and captures the point cloud image.
[0092] Among them, the preprocessing includes: using statistical filtering and pass-through filtering to remove excessive noise points; replacing all points with a small number of useful points of the original features, that is, point cloud compression, to complete the downsampling (compression) of the point cloud data. Specifically, voxel filtering based on neighborhood points can be used to achieve downsampling to obtain preprocessed point cloud data.
[0093] The workpiece's overall feature information is restored from the preprocessed point cloud data, and the point cloud data (3D point information) is converted into a surface model (overall feature information) through a point cloud data registration, splicing, and segmentation algorithm. In the specific implementation process, converting point cloud data into a point cloud surface model includes: point cloud registration, splicing, and point cloud surface segmentation.
[0094] The point cloud registration and splicing includes coarse registration and fine registration. The coarse registration includes: extracting ISS key points from the pre-processed source point cloud data and target point cloud data, and obtaining the transformation matrix of the two sets of point cloud data through a deep learning method, thus completing the coarse registration of the point cloud. The extraction of ISS key points is based on the PCA method to reduce the dimension and describe the geometric feature information of the local point cloud. The seed point p is randomly selected. i , and search for neighboring points p according to Kd-treej , specify the distance threshold r, through the formula:
[0095]
[0096] Calculate the Euclidean distance weights between the seed point and each point, and calculate the covariance matrix of each point based on the point weights:
[0097]
[0098] According to the covariance matrix, the eigenvalues λ1, λ2 and λ3 are obtained, and by setting the thresholds ε1 and ε2, according to the formula:
[0099]
[0100] The ISS key point is satisfied with the above formula; the deep learning method is to establish a PCRnet improved model network, and the network structure diagram of the PCRnet improved model network is as follows Figure 7 As shown in FIG, the PCRnet improved model network includes an ISS key point feature extraction layer, a multi-layer perceptron layer, a maximum pooling layer, and a fully connected layer; the network first uses the ISS key point feature extraction layer to extract m source point cloud ISS key points (i.e., source ISS key points) and m target point cloud ISS key points (i.e., target ISS key points); then, the multi-layer perceptron layer (i.e., Figure 7 In the MLP in the specific implementation process, the Pointnet network can be used to expand the ISS key points of the m source point clouds and the m target point clouds into m*1024-dimensional vectors. The two m*1024-dimensional vectors are then merged and concatenated into a 1*2048-dimensional vector through the maximum pooling layer. Finally, the 2048-dimensional vector is input to the fully connected layer, which outputs a seven-dimensional vector. The first three dimensions represent the translation vector and the last four dimensions represent the rotation vector. In actual application, two sets of point cloud data can be input into the PCRnet improved model network, the trained model parameters are loaded, and the homogeneous transformation matrix corresponding to the coarse registration is calculated through feedforward calculation.
[0101] The coarse registration is based on the m ISS key points of the source point cloud and the target point cloud being input into the PCRnet model network, and the network outputs the homogeneous transformation matrix T c , the source point cloud is transformed by the matrix T c The transformed point cloud cluster is the coarse registration point cloud P ai .
[0102] The fine registration includes: ai Calculate the precise registration transformation matrix based on the ICP point-to-point algorithm according to the formula p biis the target point cloud, R is the rotation matrix, and t is the translation vector (R and t are combined into a rigid body transformation matrix). The formula represents the source point cloud p ai After the transformation by the rotation matrix R and the translation vector t, the target point cloud p bi The rotation matrix R and translation vector t when the norm is minimum, that is, the calculation of the target point cloud p bi The transformation matrix ΔT at the minimum distance is terminated if the number of iterations or the threshold condition is met, that is, the transformation matrix is T=T0+ΔT, and the registration result is as follows Figure 2 shown.
[0103] The surface segmentation includes: performing surface segmentation on the spliced point cloud data, specifically: randomly selecting three points from the spliced point cloud data, combining the plane equation Ax+By+Cz=D, calculating the initial plane, A, B, C, are all coefficients of the plane equation, D is a preset constant; respectively calculating the Euclidean distance e between each remaining point cloud data and the initial plane i ; If the Euclidean distance e i <ε1, ε1 is the preset threshold, then the point is added to the inlier set, and the number of inliers under the current plane equation parameters is counted; if the current number of inliers is greater than the preset number of inliers, the plane equation parameters are updated based on all the current inliers, and the plane equation with the largest number of inliers is found through continuous iterative fitting, and the corresponding plane equation parameters are selected as the final fitting result. All inliers contained in the plane are eliminated, and the remaining is the point cloud surface model. The segmentation result is as follows Figure 3 shown.
[0104] In 106 (obtaining defect trajectory points on the workpiece surface according to the point cloud surface model), according to the point cloud surface model obtained in 104, the normal vector information of each point is calculated according to the point cloud surface model; according to the region growing segmentation algorithm, the points are sorted based on the curvature, the point with the minimum curvature is selected as the seed point, the neighboring points are searched by the KD_Tree algorithm, and the normal vector angle and curvature value of the neighboring point and the seed point are calculated. If the curvature c i Angle α with the normal vector i If the points are smaller than the corresponding thresholds c and α, they will be added to the seed point set to obtain discrete point clusters. The results are as follows: Figure 4 shown.
[0105] Based on the discrete point clusters, a straight line point cloud cluster is generated, such as Figure 5 As shown;
[0106] The optimal moving squares method is used to smooth the line point cloud cluster to obtain the defect trajectory points on the workpiece surface. The generation process of the line point cloud cluster is as follows:
[0107] Randomly select two points from a discrete cluster of points and combine them with the equation of the line Calculate the initial straight line, m, n, p, are the coefficients of the straight line equation;
[0108] Calculate the Euclidean distance e between each remaining point cloud data and the initial plane j ;
[0109] If the Euclidean distance e j <ε2, where ε2 is the preset threshold, then the point is added to the interior point set and the number of interior points under the current plane equation parameters is counted;
[0110] If the current number of inliers is greater than the preset number of inliers, the line equation parameters are updated based on all the current inliers. The maximum number of inliers contained in the line equation is found through continuous iterative fitting, and the corresponding line equation parameters are selected as the final fitting result. The fitting result is the line point cloud cluster P. L .
[0111] The method uses the optimal moving square method to smooth the line point cloud cluster to obtain the defect trajectory points on the workpiece surface. Specifically, the method includes: smoothing the line point cloud cluster P obtained by the optimal moving square method. L Perform smoothing operations and introduce the concept of tight support. It is believed that the value of a point in a plane is only affected by its neighboring points. Therefore, the value of a point in a plane can be calculated based on the fitting function. u(x node ) is x node Nearest neighbor fitting function, a j (x node ) is used to define the spatial node coordinate x node A set of coefficients of the fitting curve, p j (x) is the basis function, representing the dimensional function of the set of points to be fitted, and x represents x node The coordinates of the neighboring points, in order to optimize the fitting function, it is necessary to obtain a j (x node ), so it is necessary to establish the objective function J, introduce the idea of optimal moving square method, and establish the weight function ||x node -x i ||, represents x node and a neighboring point x i The Euclidean distance of When J takes the minimum value, the fitting curve near the node node can be obtained, that is, Obtain the corresponding linear equations, find the fitting function near the node x, and filter outliers after segmented fitting to make the point cloud continuous and complete, forming a complete processing trajectory, that is, the defect trajectory point, such as Figure 6 shown.
[0112] The continuity and integrity of the defective trajectory points are determined. If the defective trajectory points are complete and continuous, these defective trajectory points are used as grinding path points for the robot, and a grinding path is generated. The robot is controlled to move along the grinding path to grind the workpiece. Based on the transformation matrix between the workpiece coordinate system and the robot coordinate system obtained in step 102, the coordinates of the defective trajectory points in the workpiece coordinate system are converted to the coordinates of the grinding path points in the robot coordinate system. The robot TCP end moves according to the coordinates of the grinding path points.
[0113] In an embodiment of the present invention, force control is also required during the grinding process. For this purpose, a force sensor is provided on the grinding piece, and the force sensor is connected to the controller. The controller controls the grinding piece to grind the workpiece with a constant force according to the output data of the force sensor. Specifically: grinding is performed according to the force sensor at the end of the robot, and adjustments are made according to the PID algorithm to set the proportional parameter Kp, differential parameter Ki, and integral parameter Kd. The required speed of the end robot arm is calculated according to the error e between the value read by the end force sensor and the set constant force value. The calculation formula is v=Kp*e t +Ki*e sum +Kd*(e t -e t-1 ), e t is the current force error value, e t-1 is the force error value at the previous moment, so that the speed is continuously adjusted according to the magnitude of the force to achieve the effect of constant force grinding.
[0114] Example 2
[0115] An embodiment of the present invention provides a method for automatically grinding a workpiece, such as Figure 8 As shown, the following steps are included:
[0116] (1) using an image collector provided at the end of the robot to photograph the surface of the workpiece from different angles to form point cloud data, and sending the point cloud data to a controller;
[0117] (2) Using a controller to generate a point cloud surface model based on the received point cloud data, calculating the defect trajectory points on the workpiece surface based on the point cloud surface model, and then generating a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, converting the first grinding trajectory into a second grinding trajectory in the robot end coordinate system; controlling the robot to perform grinding movement on the workpiece using the grinding piece according to the second grinding trajectory.
[0118] In a specific implementation of an embodiment of the present invention, the automatic workpiece grinding method further includes: using a force sensor to collect the force applied by the grinding piece on the workpiece and sending it to the control, and using a controller to control the grinding piece to grind the workpiece with constant force according to the output data of the force sensor.
[0119] The automatic workpiece grinding method in the embodiment of the present invention can be implemented based on the automatic workpiece grinding device in Example 1.
[0120] In the description of this application, it should be understood that the terms "center", "longitudinal", "lateral", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the protection content of the present invention.
[0121] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A workpiece automatic grinding device, characterized in that: include: robot; a polishing piece, provided on the robot; An image collector is provided on the robot and is used to photograph the surface of the workpiece from different angles to form point cloud data, and send the point cloud data to the controller; The controller is configured to generate a point cloud surface model based on the received point cloud data, calculate defect trajectory points on the workpiece surface based on the point cloud surface model, and then generate a first grinding trajectory in the workpiece coordinate system; convert the first grinding trajectory into a second grinding trajectory in the robot end coordinate system according to a coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system; and control the robot to move according to the second grinding trajectory to drive the grinding member to grind the workpiece; The controller is used to sequentially perform the following steps: After sequentially performing coarse registration and fine registration on the received point cloud data, spliced point cloud data is obtained, wherein the spliced point cloud data contains overall feature information of the workpiece; Performing surface segmentation on the spliced point cloud data to obtain a point cloud surface model; The stitched point cloud data is obtained through the following processing: Repeat the preset point cloud stitching steps until all frame point clouds are stitched together to obtain the stitched point cloud data P containing the overall feature information of the workpiece. b ; The preset point cloud stitching steps include: The adjacent frame point cloud P1 and frame point cloud P2 are coarsely and finely registered in sequence to obtain the corresponding transformation matrix; Based on the transformation matrix, the frame point cloud P1 is linearly transformed to obtain the frame point cloud P in the frame point cloud P2 coordinate system. 1b ; The frame point cloud P 1b Merge with the frame point cloud P2 to obtain the spliced frame point cloud P a ; The transformation matrix is calculated with the goal of minimizing the distance between the source point cloud and the target point cloud after coarse registration. The expression of the transformation matrix is: T = T0 + ΔT, where T0 represents the homogeneous transformation matrix corresponding to the coarse registration; ΔT represents the homogeneous transformation matrix corresponding to the fine registration. p ai represents the source point cloud after coarse registration, p bi represents the target point cloud, t represents the translation vector; R represents the rotation matrix; The coarse registration comprises the following steps: Input the frame point cloud P1 and the frame point cloud P2 into the preset PCRnet improved model network to obtain the homogeneous transformation matrix corresponding to the coarse registration, where the frame point cloud P1 is used as the source point cloud and the frame point cloud P2 is used as the target point cloud; The PCRnet improved model network includes an ISS key point feature extraction layer, a multi-layer perceptron layer, a maximum pooling layer, and a fully connected layer; The ISS key point feature extraction layer extracts the source ISS key points and the target ISS key points of the frame point cloud P1 and the frame point cloud P2 respectively; The multi-layer perceptron layer expands the received source ISS key points and target ISS key points to a preset dimension to obtain a source vector and a target vector of the preset dimension; The maximum pooling layer merges the source vector and the target vector and sends them to the fully connected layer. The fully connected layer outputs a homogeneous transformation matrix. The homogeneous transformation matrix is a seven-dimensional vector, where the first three dimensions represent the translation vector and the last four dimensions represent the rotation vector.
2. The automatic workpiece grinding device according to claim 1, characterized in that: The surface segmentation is performed on the spliced point cloud data. The specific process is as follows: Randomly select three points from the spliced point cloud data and calculate the initial plane based on the plane equation Ax+By+Cz=D. A, B, C are the coefficients of the plane equation, and D is a preset constant. Calculate the Euclidean distance e between each remaining point cloud data and the initial plane i ; If the Euclidean distance e of the remaining points in the point cloud data i <ε1, where ε1 is the preset threshold, the point is added to the interior point set and the number of interior points under the current plane equation parameters is counted; If the current number of inliers is greater than the preset number of inliers, the plane equation parameters are updated based on all the current inliers. The plane equation with the largest number of inliers is found through continuous iterative fitting, and the corresponding plane equation parameters are selected as the final fitting result. All the inliers contained in the plane are eliminated, and what remains is the point cloud surface model.
3. The automatic workpiece grinding device according to claim 2, characterized in that: The calculation process of the defect trajectory points on the workpiece surface is: Calculating normal vector information of each point according to the point cloud surface model; According to the region growing segmentation algorithm, the points are sorted based on the curvature, the point with the minimum curvature is selected as the seed point, the neighboring points are searched by the KD_Tree algorithm, and the normal vector angle and curvature value between the neighboring point and the seed point are calculated. If the curvature c i Angle α with the normal vector i If the value of a point is less than the corresponding threshold c and α, it will be added to the seed point set to obtain a discrete point cluster; generating a straight line point cloud cluster based on the discrete point cluster; The optimal moving squares method is used to smooth the line point cloud cluster to obtain the defect trajectory points on the workpiece surface.
4. The automatic workpiece grinding device according to claim 3, characterized in that: The generation process of the straight line point cloud cluster is as follows: Randomly select two points from a discrete cluster of points and combine them with the equation of the line Calculate the initial straight line, m, n, p, are the coefficients of the straight line equation; Calculate the Euclidean distance e between each remaining point cloud data and the initial plane j ; If the Euclidean distance e j <ε2, where ε2 is the preset threshold, then the point is added to the interior point set and the number of interior points under the current plane equation parameters is counted; If the current number of inliers is greater than the preset number of inliers, the line equation parameters are updated based on all the current inliers. The maximum number of inliers contained in the line equation is found through continuous iterative fitting, and the corresponding line equation parameters are selected as the final fitting result. The fitting result is a line point cloud cluster.
5. The automatic workpiece grinding device according to claim 1, characterized in that: The expression of the coordinate transformation matrix between the workpiece coordinate system and the robot end coordinate system is: T end_to_workpiece =T end_to_camera *T workpiece_to_camera T end_to_camera =T ibase *T base_to_board *T icam Among them, T end_to_workpiece is the coordinate transformation matrix between the workpiece coordinate system and the robot end coordinate system, T end_to_camera is the transformation matrix between the image collector coordinate system and the robot end coordinate system, T workpiece_to_camera is the transformation matrix between the workpiece coordinate system and the image acquisition coordinate system, T ibase is the coordinate transformation matrix between the robot end coordinate system and the robot base coordinate system, T icam is the coordinate transformation matrix between the calibration plate coordinate system and the image collector coordinate system, T base_to_board is the coordinate transformation matrix between the calibration plate coordinate system and the robot base coordinate system.
6. The automatic workpiece grinding device according to claim 1, characterized in that: A force sensor is provided on the grinding piece, and the force sensor is connected to the controller. The controller controls the grinding piece to grind the workpiece with a constant force according to output data of the force sensor.
7. A method for automatically polishing a workpiece based on the automatic workpiece polishing device according to any one of claims 1 to 6, characterized in that: include: Using an image collector located at the end of the robot, the surface of the workpiece is photographed from different angles to form point cloud data, and the point cloud data is sent to the controller; A controller is used to generate a point cloud surface model based on the received point cloud data, and the defect trajectory points on the workpiece surface are calculated based on the point cloud surface model, thereby generating a first grinding trajectory in the workpiece coordinate system; according to the coordinate conversion matrix between the workpiece coordinate system and the robot end coordinate system, the first grinding trajectory is converted into a second grinding trajectory in the robot end coordinate system; and the robot is controlled to perform grinding movement on the workpiece using the grinding piece according to the second grinding trajectory.
Citation Information
Patent Citations
Three-dimensional point cloud real-time collecting device and robot polishing path planning method
CN107127755A
Tool edge sharpening method for six-axis mechanical arm with force control function based on machine vision
CN109605140A