An autonomous programming system and method for post-processing machining of a casting robot
Through visual acquisition and deep learning module combined with three-dimensional point cloud processing, an independent programming system of casting robots is generated, which solves the problems of long programming time and poor adaptability of casting robots, and achieves efficient and safe casting processing.
Patent Information
- Application Number
- CN202410407248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-03
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-04-03
AI Technical Summary
In the prior art, casting robot processing program has a long time to program and poor adaptability, especially for large thin-wall castings, which are large and inconsistent in deformation, which cannot meet the production quality requirements, and there are safety risks in manual teaching.
The visual acquisition module, deep learning module and three-dimensional point cloud processing module are adopted, combined with the robot offline programming module, and the robot motion trajectory and control program are generated through the three-dimensional point cloud data matching with the three-dimensional digital-analog model to realize independent programming.
No manual teaching is required, which improves programming efficiency, reduces clamping and positioning requirements, solves casting deformation problems, has a wide range of application, shortens the replacement time, and avoids manual teaching safety hazards.
Smart Images

Figure CN118081767B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot automation, and more specifically, to a self-programming system and method for post-processing of castings by robots. Background Art
[0002] Traditionally, the post-processing of castings is completed by manual cooperation with power tools. However, the working environment in the foundry workshop is harsh (high dust, high noise, and high risk), which seriously affects the health and safety of workers. In addition, manual operations have problems such as low efficiency, poor grinding consistency, and difficult to effectively guarantee quality. Currently, robots are applied to the post-processing of castings in some foundries, but there are the following problems:
[0003] (1) There are many types of castings and frequent changeovers. The programming time of the robot processing program is long; a large amount of teaching is usually required manually before robot processing, and the teaching programming time for complex workpieces is long and the teaching accuracy is poor.
[0004] (2) The adaptability of the robot program is poor. For some complex workpieces, there is also offline programming based on the 3D digital model of the casting. This method does not require teaching a large number of points on the actual workpiece, and the programming time is short. However, there is a problem of inconsistency between the offline program based on the 3D digital model of the casting and the actual workpiece processing program.
[0005] (3) The problem of large and inconsistent deformation of large thin-walled castings cannot be solved. Standard offline programming or teaching programming cannot achieve poor adaptability of the program caused by the deformation of the casting and cannot meet the production quality requirements.
[0006] The present invention develops a self-programming system and method for post-processing of castings by robots after casting, and the post-processing technologies that can be mainly completed include cutting, grinding, deburring, etc., especially suitable for large thin-walled castings and die castings. The present invention can solve the above three problems of current robot teaching programming and offline programming.
[0007] Therefore, it is an urgent problem for those skilled in the art to propose a self-programming system and method for post-processing of castings by robots to solve the difficulties existing in the prior art. Summary of the Invention
[0008] In view of this, the present invention provides a self-programming system and method for post-processing of castings by robots to solve the technical problems existing in the prior art.
[0009] In order to achieve the above object, the present invention provides the following technical solutions:
[0010] An autonomous programming system for post-processing of casting robots, comprising: a vision acquisition module, a deep learning module, a three-dimensional point cloud processing module, and a robot offline programming module; wherein,
[0011] The vision acquisition module is used to acquire the two-dimensional image information of the workpiece and the three-dimensional point cloud data of the workpiece;
[0012] The deep learning module is connected to the first output end of the vision acquisition module and is used to obtain the processing contour information of the workpiece through the two-dimensional image information of the workpiece;
[0013] The three-dimensional point cloud processing module is connected to the second output end of the vision acquisition module and the output end of the deep learning module, and is used to match the acquired three-dimensional point cloud data of the workpiece with the processing contour information of the workpiece in the corrected three-dimensional digital model to obtain the processing contour information of the workpiece in the three-dimensional digital model;
[0014] The robot offline programming module is connected to the output end of the three-dimensional point cloud processing module and is used to generate the actual motion trajectory and motion control program of the robot according to the processing contour information of the workpiece in the three-dimensional digital model.
[0015] Optionally, it further includes: a robot processing system connected to the robot offline programming module, and the robot processing system includes: an industrial robot system module, a quick-change module, and an end processing tool module; wherein,
[0016] The industrial robot system module is connected to the input end of the quick-change module and is used to execute the motion trajectory of the robot;
[0017] The quick-change module is connected to the input end of the end processing tool module and the input end of the vision acquisition module, and is used for the quick-change operation of the vision acquisition module and the end processing tool module;
[0018] The end processing tool module is used for the processing operation of the workpiece.
[0019] Optionally, the specific process of the vision acquisition module acquiring the three-dimensional point cloud data of the workpiece is as follows:
[0020] The first step: Use a vision sensor to acquire the three-dimensional point cloud data of the workpiece;
[0021] The second step: Use the three-dimensional digital model of the workpiece as a reference model;
[0022] The third step: Use the ICP algorithm to register the acquired three-dimensional point cloud data of the workpiece with the reference model;
[0023] The fourth step: Initialize the transformation parameters to preliminarily align the acquired three-dimensional point cloud data of the workpiece with the reference model;
[0024] Step 5: Continuously optimize the transformation parameters through an iterative method to align the three-dimensional point cloud data of the workpiece collected with the reference model;
[0025] Step 6: For each three-dimensional point cloud data collected, find the nearest point on the reference model to establish a point correspondence relationship;
[0026] Step 7: Use the least squares method to calculate the optimal transformation parameters and calculate the transformation by minimizing the distance between the point correspondence relationships;
[0027] Step 8: Determine whether the ICP algorithm has converged, that is, whether the three-dimensional point cloud data of the workpiece has approached the reference model. If not, return to Step 5; if so, stop the iteration;
[0028] Step 9: Through continuous iterative optimization, obtain the optimized transformation parameters, apply them to the three-dimensional point cloud data of the workpiece collected, and align the three-dimensional point cloud data of the workpiece collected with the reference model to obtain the optimized three-dimensional point cloud data of the workpiece.
[0029] Optionally, the vision sensor includes but is not limited to: lidar, 3D vision camera, depth camera, structured light sensor, 3D scanner.
[0030] A method for autonomous programming of post-processing of a casting robot, applying the system for autonomous programming of post-processing of a casting robot described in any one of the above, includes the following steps:
[0031] S1. Collect the three-dimensional point cloud data of the workpiece through a 3D scanner, and at the same time collect the two-dimensional image information of the workpiece, and preprocess and label the collected two-dimensional image information;
[0032] S2. Deploy the trained deep learning model to the robot processing system, and learn the two-dimensional image information of the collected workpiece to generate the processing contour information of the workpiece;
[0033] S3. Real-time correct the three-dimensional model of the workpiece through the gradient descent optimization algorithm to obtain the corrected three-dimensional digital model of the workpiece;
[0034] S4. Match the processing contour information of the workpiece with the corrected three-dimensional digital model of the workpiece to obtain the processing contour information of the workpiece on the corrected three-dimensional digital model;
[0035] S5. Design the processing path of the robot according to the processing contour information of the corrected three-dimensional digital model, generate the motion trajectory points of the robot by using the interpolation algorithm, and convert the robot motion trajectory into the corresponding robot motion control program;
[0036] S6. Import the motion trajectory points of the robot into the simulation environment to verify the motion path planning of the robot. If the simulation is normal, the robot can execute the control program generated by the motion trajectory points to complete relevant operation tasks. If there are problems in the simulation, return to S5 to regenerate the robot motion trajectory according to the results feedback by the simulation.
[0037] Optionally, the content of preprocessing and annotation of the collected two-dimensional image information in S1 is specifically as follows:
[0038] Based on the vision acquisition module, take pictures of the processed standard workpiece and the blank workpiece before processing, and collect image data containing workpiece processing contour information;
[0039] Preprocess the collected image data, including operations such as denoising, cropping, and resizing;
[0040] Manually annotate the processing contour information in the image data using annotation tools or annotation software;
[0041] Perform quality control and review on the annotated image data;
[0042] Convert the reviewed and annotated image data into a unified data format to obtain the annotated image data;
[0043] Associate the annotated image data with the annotation information and save it to the corresponding file or database.
[0044] Optionally, S3 is specifically as follows:
[0045] Assume that the three-dimensional model of the workpiece is represented as a set of parameter points θ, and the three-dimensional point cloud data set D of the workpiece. Define an error function E(θ) representing the distance between the three-dimensional model of the workpiece and the three-dimensional point cloud data. It represents the distance from the points in the three-dimensional point cloud data of the workpiece to the nearest surface of the three-dimensional model of the workpiece represented by the set of parameter points. Its formula is:
[0046]
[0047] where p i is a point in the three-dimensional point cloud data of the workpiece, M(θ) is the point on the surface of the workpiece model represented by the set of parameter points, and f is the function of the shortest distance between the point in the three-dimensional point cloud data of the workpiece and the point on the surface of the workpiece model;
[0048] Gradient calculation: Calculate the gradient of the error function E(θ) with respect to the set of parameter points θ of the three-dimensional model of the workpiece;
[0049] Gradient update: Use the gradient information to update the parameter set θ with a learning rate α to reduce the error function E(θ). Its formula is:
[0050] where, θ (t+1) is the three-dimensional model parameters of the workpiece at the (t + 1)-th time, θ (t) is the three-dimensional model parameters of the workpiece at the t-th time, α is the learning rate, is the gradient vector of the error function E(θ) at the current t-th parameter point;
[0051] Iterative optimization: Repeat the steps of gradient calculation and gradient update, and iteratively update the parameter set θ until the error function converges or reaches the set number of iterations, so as to obtain the corrected three-dimensional digital model of the workpiece.
[0052] Optionally, S4 is specifically:
[0053] Feature extraction: Respectively perform feature extraction on the machining profile information and three-dimensional digital model of the workpiece to obtain the feature points and descriptors of the machining profile information and three-dimensional digital model of the workpiece;
[0054] Feature matching: Perform feature point matching;
[0055] Coordinate transformation and mapping: According to the feature point pairs obtained by matching, perform coordinate transformation and mapping;
[0056] Perspective transformation: If the two-dimensional image information of the workpiece and the three-dimensional digital model are not in the same coordinate system, perform perspective transformation to map them to the same coordinate system;
[0057] Fitting or registration: Use the ICP registration algorithm to further fit and align the two-dimensional image information and the three-dimensional digital model to obtain the matching result.
[0058] Optionally, the feature point matching is specifically:
[0059] Descriptor generation: After feature extraction, generate descriptors based on feature points;
[0060] Nearest neighbor matching: For the descriptors of each feature point, use the nearest neighbor matching algorithm to calculate its most similar neighbor in another set of descriptors, that is, find the nearest feature point;
[0061] Distance metric: Use the Euclidean distance metric to measure the difference between two descriptors;
[0062] Matching screening: For each feature point, by comparing the distances with other feature points, select the closest feature point as the matching point, and exclude incorrect matches by setting thresholds or using more advanced screening algorithms.
[0063] Optionally, it further includes:
[0064] S7. Calibrate the tool coordinate system of the robot using a calibration tool, then calibrate the workpiece coordinate system, calculate the transformation relationship between the workpiece coordinate system and the tool coordinate system, and record the calibrated tool coordinate system and workpiece coordinate system of the robot.
[0065] S8. Assign the calibrated workpiece coordinate system to the robot control program, and determine the transformation relationship between the workpiece coordinate system and the tool coordinate system through vision-guided positioning, guiding the robot to find the workpiece coordinate system, and determining the machining trajectory executed by the robot with the workpiece coordinate system as a reference.
[0066] S9. Apply the workpiece coordinate system after vision calibration to the robot machining operation, and ensure that the robot performs positioning and tasks through testing and verification.
[0067] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a casting robot post-processing machining autonomous programming system and method, and its beneficial effects are as follows:
[0068] 1) The present invention does not require manual teaching programming, the manual operation is simple, which can greatly improve the programming efficiency, shorten the teaching programming and debugging time of robot machining, and can avoid the safety problems of manual teaching, and cause damage to personnel and equipment due to mistakes during the teaching process.
[0069] 2) The clamping and positioning requirements for the workpiece to be polished are reduced. There is a certain deviation in the workpiece clamping. With vision-guided positioning, it is not necessary to modify the robot program again, nor does it affect the machining accuracy of the robot.
[0070] 3) It can solve the deformation problems of castings or die-castings, especially the deformation problems of large castings or die-castings, and will not cause machining quality problems or the program cannot be used due to the deformation of the workpiece itself.
[0071] 4) It has a wide range of applications, the equipment modification for product changeover is relatively small, the changeover time is shortened, and the production efficiency of the enterprise is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for description in the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0073] Figure 1 It is a structural diagram of a casting robot post-processing machining autonomous programming system provided by the present invention.
[0074] Figure 2Flow chart of an autonomous programming method for post - processing of castings by a robot provided by the present invention. Specific embodiments
[0075] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0076] See Figure 1 As shown, the present invention discloses an autonomous programming system for post - processing of castings by a robot, including: a visual acquisition module, a deep learning module, a 3D point cloud processing module, and a robot offline programming module; among them,
[0077] The visual acquisition module is used to acquire two - dimensional image information of the workpiece and three - dimensional point cloud data of the workpiece;
[0078] The deep learning module is connected to the first output end of the visual acquisition module and is used to obtain the processing contour information of the workpiece through the two - dimensional image information of the workpiece;
[0079] Specifically, the processing contour information obtained through deep learning is finally converted onto the 3D digital model. According to the processing contour information, autonomous trajectory planning of the robot and generation of a motion program can be realized, which can solve a series of problems and difficulties in traditional robot programming by manual teaching.
[0080] The 3D point cloud processing module is connected to the second output end of the visual acquisition module and the output end of the deep learning module, and is used to match the three - dimensional point cloud data of the workpiece collected with the processing contour information of the workpiece in the corrected 3D digital model to obtain the processing contour information of the workpiece in the 3D digital model;
[0081] By matching and correcting the three - dimensional point cloud data collected by the visual acquisition module with the 3D digital model of the workpiece, a more accurate 3D digital model of the workpiece can be obtained, which can solve the problem of machining positioning accuracy caused by deformation of castings or die - castings.
[0082] The robot offline programming module is connected to the output end of the 3D point cloud processing module and is used to generate the actual motion trajectory and motion control program of the robot according to the processing contour information of the workpiece in the 3D digital model.
[0083] Furthermore, it further includes: a robot processing system connected to the robot offline programming module. The robot processing system includes: an industrial robot system module, a quick - change module, and an end - effector processing tool module; among them,
[0084] The industrial robot system module is connected to the input end of the quick-change module and is used to execute the motion trajectory of the robot.
[0085] The quick-change module is connected to the input ends of the end-effector module and the vision acquisition module and is used for the quick-change operation of the vision acquisition module and the end-effector module.
[0086] The end-effector module is used for the processing operation of the workpiece.
[0087] Further, the specific process of the vision acquisition module collecting the three-dimensional point cloud data of the workpiece is as follows:
[0088] The first step: Use the vision sensor to collect the three-dimensional point cloud data of the workpiece.
[0089] The second step: Use the three-dimensional digital model of the workpiece as the reference model.
[0090] The third step: Use the ICP algorithm to register the collected three-dimensional point cloud data of the workpiece with the reference model.
[0091] The fourth step: Initialize the transformation parameters to preliminarily align the collected three-dimensional point cloud data of the workpiece with the reference model.
[0092] The fifth step: Through an iterative method, continuously optimize the transformation parameters to make the collected three-dimensional point cloud data of the workpiece align with the reference model.
[0093] The sixth step: For each piece of three-dimensional point cloud data collected, find the nearest point on the reference model to establish a point correspondence relationship.
[0094] Specifically, for a point p in the three-dimensional point cloud dataset P of the collected workpiece i , find its nearest neighbor point q j in the reference model point cloud Q, and its formula is:
[0095]
[0096] where q k is an arbitrary neighbor point in the reference model point cloud Q, argmin is the value of the parameter at which the function obtains the minimum value, p i is a point in the three-dimensional point cloud dataset P of the collected workpiece, and q j is the nearest neighbor point.
[0097] The seventh step: Use the least squares method to calculate the optimal transformation parameters and calculate the transformation by minimizing the distance between the point correspondence relationships.
[0098] Assume that T is the transformation matrix (including translation and rotation), and the loss function L is defined as follows. The optimal transformation matrix T is calculated by using the least squares method:
[0099]
[0100] Among them, L is the loss function, representing the sum of the squares of the minimum distances between the transformed points of the three-dimensional point cloud data of the workpiece collected and the points of the reference model point cloud, p i and q i represent the points corresponding to the i-th pair of point clouds, where p i is the point in the actual workpiece point cloud data, and q i is the point in the reference model point cloud data.
[0101] Eighth step: Determine whether the ICP algorithm converges, that is, whether the three-dimensional point cloud data of the workpiece is close to the reference model. If not, return to the fifth step; if so, stop the iteration.
[0102] Ninth step: Through continuous iterative optimization, obtain the optimized transformation parameters, apply them to the three-dimensional point cloud data of the workpiece collected, and align the three-dimensional point cloud data of the workpiece collected with the reference model to obtain the optimized three-dimensional point cloud data of the workpiece.
[0103] Furthermore, the vision sensor includes but is not limited to: lidar, 3D vision camera, depth camera, structured light sensor, 3D scanner.
[0104] Corresponding to Figure 1 the described system, the present invention also provides a method for autonomous programming of post-processing machining of a casting robot, which is used for Figure 1 the specific implementation of the system in Figure 2 as shown, and includes the following steps:
[0105] S1. Collect the three-dimensional point cloud data of the workpiece through a 3D scanner, and at the same time collect the two-dimensional image information of the workpiece, and preprocess and label the collected two-dimensional image information.
[0106] S2. Deploy the trained deep learning model to the robot processing system, and learn the two-dimensional image information of the collected workpiece to generate the processing contour information of the workpiece.
[0107] Furthermore, the trained deep learning model is deployed locally or at the edge;
[0108] Convert the trained deep learning model into a format suitable for the deployment environment, including techniques such as model optimization, quantization (reducing the precision of model parameters), and pruning (reducing the model size) to ensure the high-efficiency performance of the deep learning model in the deployment environment.
[0109] Select a suitable platform according to the deployment requirements, such as TensorFlow Serving, PyTorch Serving, Docker containers, servers, mobile devices, etc.;
[0110] Deploy the converted and optimized deep learning model on the selected platform; according to the interfaces and methods provided by the platform, load the deep learning model into the available running environment;
[0111] Integrate the deployed deep learning model into the robot processing system to ensure that the deep learning model can cooperate seamlessly with other components;
[0112] Conduct performance tests on the deployed deep learning model, including metrics such as inference speed and accuracy;
[0113] Monitor the running status of the deep learning model in the actual application of the robot processing system, promptly discover and solve problems, and update and maintain the deep learning model as needed.
[0114] Specifically, train a deep learning model to identify and understand a dataset containing workpiece processing contour information, obtain a deep learning model for workpiece processing contour image data and optimize it to improve the image data processing speed and accuracy, ensuring that accurate workpiece processing contour information can be quickly generated.
[0115] The specific implementation method is as follows:
[0116] Prepare a dataset with annotations of workpiece processing contour information, ensuring that the dataset contains image data and corresponding processing contour information labels;
[0117] Preprocess the image data, including operations such as denoising, resizing, and normalization, to improve the stability and accuracy of model training;
[0118] Use popular deep learning frameworks such as TensorFlow, PyTorch, and Keras to build and train the model;
[0119] Use the prepared dataset to train the selected model, divide the dataset into training set, validation set, and test set, and monitor the performance of the model during training;
[0120] Select appropriate loss functions and optimizers to train the model. The loss function can be selected as cross-entropy loss or mean squared error, and the optimizer can be selected as Adam or SGD;
[0121] Optimize the model performance by adjusting hyperparameters such as learning rate, batch size, number of network layers, and number of nodes;
[0122] Evaluate the performance of the trained model using the test set, including precision, recall, and F1-score metrics;
[0123] Optimize the model based on the evaluation results to improve the model performance by changing the model structure, increasing the diversity of the dataset, etc.;
[0124] Regularly retrain the model with new image data to maintain the accuracy and adaptability of the model.
[0125] S3. Real-time correct the three-dimensional model of the workpiece through the gradient descent optimization algorithm to obtain the corrected three-dimensional digital model of the workpiece;
[0126] By correcting the three-dimensional model, the problem that the actual workpiece is not completely consistent with the three-dimensional digital model caused by deformation problems in the casting production process can be solved; this method defines an error function and uses the gradient descent algorithm to minimize this error function to adjust the model parameters to adapt to the new point cloud.
[0127] Specifically, create a digital three-dimensional model containing the geometric shape, dimensions, and structural information of the workpiece (casting) according to the design specifications and requirements, design an accurate three-dimensional model (three-dimensional digital model) of the workpiece (casting) using three-dimensional modeling software, or obtain the three-dimensional digital model of the workpiece through a precise 3D scanner and photogrammetry, and save it in digital model formats such as STEP and STL.
[0128] S4. Match the machining profile information of the workpiece with the corrected three-dimensional digital model of the workpiece to obtain the machining profile information of the workpiece in the corrected three-dimensional digital model;
[0129] S5. Design the machining path of the robot according to the machining profile information of the corrected three-dimensional digital model, generate the motion trajectory points of the robot by using the interpolation algorithm, and convert the robot motion trajectory into the corresponding robot motion control program;
[0130] Specifically, the interpolation algorithm is spline interpolation or Bezier curve.
[0131] S6. Import the motion trajectory points of the robot into the simulation environment to verify the robot motion path planning; if the simulation is normal, the robot can execute the control program generated by the motion trajectory points to complete the relevant operation tasks, if there are problems in the simulation, return to S5 to regenerate the robot motion trajectory according to the results feedback by the simulation.
[0132] Furthermore, the specific content of preprocessing and annotation of the collected two-dimensional image information in S1 is as follows:
[0133] Take pictures of the machined standard workpiece and the blank workpiece before machining based on the vision acquisition module, and collect the image data containing the machining profile information of the workpiece;
[0134] Preprocess the collected image data, including operations such as denoising, cropping, and resizing;
[0135] Specifically, ensure the quality and consistency of the image data.
[0136] Manually annotate the processing contour information in the image data using annotation tools or software;
[0137] In addition, the annotator needs to detail the position and shape of the contour or annotation trajectory in the image according to the predefined annotation rules.
[0138] Perform quality control and review on the annotated image data;
[0139] In addition, perform cross-validation through the annotations of multiple personnel, or use specialized quality control tools and metrics.
[0140] Convert the reviewed and annotated image data into a unified data format to obtain the well-annotated image data;
[0141] Associate the well-annotated image data with the annotation information and save it in the corresponding file or database.
[0142] Further facilitate subsequent machine learning or algorithm training.
[0143] Furthermore, S3 specifically is:
[0144] Assume that the three-dimensional model of the workpiece is represented as a set of parametric points θ, and the set of three-dimensional point cloud data of the workpiece is D. Define an error function E(θ) representing the distance between the three-dimensional model of the workpiece and the three-dimensional point cloud data, which represents the distance from the points in the three-dimensional point cloud data of the workpiece to the nearest surface of the three-dimensional model of the workpiece represented by the set of parametric points. Its formula is:
[0145]
[0146] where, p i is a point in the three-dimensional point cloud data of the workpiece, M(θ) is the point on the surface of the workpiece model represented by the set of parametric points, and f is the function of the shortest distance between the point in the three-dimensional point cloud data of the workpiece and the point on the surface of the workpiece model;
[0147] Gradient calculation: Calculate the gradient of the error function E(θ) with respect to the set of parametric points θ of the three-dimensional model of the workpiece;
[0148] Gradient update: Use the gradient information to update the set of parameters θ with the learning rate α to reduce the error function E(θ). Its formula is:
[0149] where, θ (t+1) is the three-dimensional model parameter of the workpiece at the (t + 1)-th time, θ(t) is the three-dimensional model parameters of the workpiece at the t-th time, and α is the learning rate. is the gradient vector of the error function E(θ) at the current parameter point of the t-th time;
[0150] Iterative optimization: Repeat the steps of gradient calculation and gradient update, and iteratively update the parameter set θ until the error function converges or reaches the set number of iterations, so as to obtain the corrected three-dimensional digital model of the workpiece.
[0151] Further, S4 is specifically as follows:
[0152] Feature extraction: Respectively extract features from the machining profile information and the three-dimensional digital model of the workpiece to obtain the feature points and descriptors of the machining profile information and the three-dimensional digital model of the workpiece;
[0153] Feature matching: Perform feature point matching;
[0154] Coordinate transformation and mapping: According to the paired feature points obtained by matching, perform coordinate transformation and mapping;
[0155] Perspective transformation: If the two-dimensional image information of the workpiece and the three-dimensional digital model are not in the same coordinate system, perform perspective transformation to map them to the same coordinate system;
[0156] Fitting or registration: Use the ICP registration algorithm to further fit and align the two-dimensional image information and the three-dimensional digital model to obtain the matching result.
[0157] Further, the feature point matching is specifically as follows:
[0158] Generate descriptors: After feature extraction, generate descriptors based on feature points;
[0159] Nearest neighbor matching: For the descriptor of each feature point, use the nearest neighbor matching algorithm to calculate its most similar neighbor in another set of descriptors, that is, find the nearest feature point;
[0160] Distance metric: Use the Euclidean distance metric to measure the difference between two descriptors;
[0161] Matching screening: For each feature point, by comparing the distances with other feature points, select the closest feature point as the matching point, and exclude incorrect matches by setting thresholds or using more advanced screening algorithms.
[0162] Further, it also includes:
[0163] S7. Calibrate the tool coordinate system of the robot through a calibration tool, then calibrate the workpiece coordinate system, calculate the transformation relationship between the workpiece coordinate system and the tool coordinate system, and record the calibrated tool coordinate system and workpiece coordinate system of the robot;
[0164] S8. Assign the calibrated workpiece coordinate system to the robot control program, and determine the transformation relationship between the workpiece coordinate system and the tool coordinate system through visual guidance positioning, guiding the robot to find the workpiece coordinate system, and determining the machining trajectory executed by the robot with the workpiece coordinate system as a reference;
[0165] S9. Apply the workpiece coordinate system after visual calibration to the robot machining operation, and ensure that the robot performs positioning and tasks through testing and verification.
[0166] Specifically, the visual guidance positioning function can accurately identify the workpiece coordinate system under any placement of the workpiece, thereby guiding the robot to complete the machining operation according to the correct machining trajectory, and can solve the problem of inaccurate traditional workpiece positioning.
[0167] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An autonomous programming system for post-processing machining of casting robots, characterized in that, Including: a visual acquisition module, a deep learning module, a 3D point cloud processing module, and a robot offline programming module; wherein, the visual acquisition module is used to acquire the two-dimensional image information of the workpiece and the three-dimensional point cloud data of the workpiece; the deep learning module is connected to the first output end of the visual acquisition module and is used to obtain the machining contour information of the workpiece through the two-dimensional image information of the workpiece; the 3D point cloud processing module is connected to the second output end of the visual acquisition module and the output end of the deep learning module, and is used to match the acquired three-dimensional point cloud data of the workpiece with the machining contour information of the workpiece in the corrected 3D digital model to obtain the machining contour information of the workpiece in the 3D digital model; the robot offline programming module is connected to the output end of the 3D point cloud processing module and is used to generate the actual motion trajectory and motion control program of the robot according to the machining contour information of the workpiece in the 3D digital model; The specific process of the visual acquisition module acquiring the three-dimensional point cloud data of the workpiece is as follows: The first step: Use a vision sensor to acquire the three-dimensional point cloud data of the workpiece; The second step: Use the 3D digital model of the workpiece as a reference model; The third step: Use the ICP algorithm to register the acquired three-dimensional point cloud data of the workpiece with the reference model; The fourth step: Initialize the transformation parameters and perform a preliminary alignment of the acquired three-dimensional point cloud data of the workpiece with the reference model; The fifth step: Through an iterative method, continuously optimize the transformation parameters to align the acquired three-dimensional point cloud data of the workpiece with the reference model; The sixth step: For each acquired three-dimensional point cloud data, find the nearest point on the reference model to establish a point correspondence relationship; The seventh step: Use the least squares method to calculate the optimal transformation parameters and perform a transformation calculation by minimizing the distance between the point correspondence relationships; The eighth step: Determine whether the ICP algorithm converges, that is, whether the three-dimensional point cloud data of the workpiece has approached the reference model. If not, return to the fifth step. If so, stop the iteration; The ninth step: Through continuous iterative optimization, obtain the optimized transformation parameters, apply them to the acquired three-dimensional point cloud data of the workpiece, and align the acquired three-dimensional point cloud data of the workpiece with the reference model to obtain the optimized three-dimensional point cloud data of the workpiece.
2. The autonomous programming system for post-processing of casting robots according to claim 1, wherein, It further includes: a robot processing system connected to the robot offline programming module, and the robot processing system includes: an industrial robot system module, a quick change module, and an end processing tool module; wherein, the industrial robot system module is connected to the input end of the quick change module and is used to execute the motion trajectory of the robot; the quick change module is connected to the input end of the end processing tool module and the input end of the visual acquisition module and is used for the quick change operation of the visual acquisition module and the end processing tool module; the end processing tool module is used for the machining operation of the workpiece.
3. The autonomous programming system for post-processing of a casting robot according to claim 1, characterized in that The vision sensor includes but is not limited to: lidar, 3D vision camera, structured light sensor, or 3D scanner.
4. An autonomous programming method for post-processing machining of a casting robot, characterized in that Applied to a casting robot post-processing machining autonomous programming system according to any one of claims 1-3, it includes the following steps: S1. Use a 3D scanner to acquire the three-dimensional point cloud data of the workpiece, and at the same time acquire the two-dimensional image information of the workpiece, and perform preprocessing and annotation on the acquired two-dimensional image information; S2. Deploy the trained deep learning model to the robotic machining system, and learn the two-dimensional image information of the workpiece being collected to generate the machining contour information of the workpiece; S3. Real-time correct the three-dimensional model of the workpiece through the gradient descent optimization algorithm to obtain the corrected three-dimensional digital model of the workpiece; S4. Match the machining contour information of the workpiece with the corrected three-dimensional digital model of the workpiece to obtain the machining contour information of the workpiece in the corrected three-dimensional digital model; S5. Design the machining path of the robot according to the machining contour information of the corrected three-dimensional digital model, generate the actual motion trajectory of the robot by using the interpolation algorithm, and convert the actual motion trajectory of the robot into the corresponding motion control program of the robot; S6. Import the actual motion trajectory of the robot into the simulation environment to verify the motion path planning of the robot; if the simulation is normal, the robot can execute the control program generated by the actual motion trajectory to complete the relevant operation tasks, if there is a problem with the simulation, return to S5 to regenerate the actual motion trajectory of the robot according to the results of the simulation feedback.
5. A method for autonomous programming of post-processing machining of a casting robot according to claim 4, characterized in that, The content of preprocessing and annotation of the collected two-dimensional image information in S1 is specifically as follows: Take pictures of the machined standard workpiece and the blank workpiece before machining based on a 3D scanner, and collect image data containing the machining contour information of the workpiece; Preprocess the collected image data, including operations such as denoising, cropping, and resizing; Manually annotate the machining contour information in the image data using an annotation tool; Perform quality control and review on the annotated image data; Convert the annotated image data that passes the review into a unified data format to obtain the annotated image data; Associate the annotated image data with the annotation information and save it to the corresponding file or database.
6. A method for autonomous programming of post-processing machining of a casting robot according to claim 4, characterized in that, S3 is specifically as follows: Assume that the three-dimensional model of the workpiece is represented as a set of parameter points θ, and the set of three-dimensional point cloud data of the workpiece is D. Define an error function E(θ) that represents the distance between the three-dimensional model of the workpiece and the three-dimensional point cloud data. It represents the distance from the points in the three-dimensional point cloud data of the workpiece to the nearest surface of the three-dimensional model of the workpiece represented by the set of parameter points. Its formula is: where p i is a point in the three-dimensional point cloud data of the workpiece, M(θ) is a point on the surface of the three-dimensional model of the workpiece represented by a set of parameter points, and f is a function of the shortest distance between the point in the three-dimensional point cloud data of the workpiece and the point on the surface of the three-dimensional model of the workpiece; Gradient calculation: Calculate the gradient of the error function E(θ) with respect to the set of parameter points θ of the three-dimensional model of the workpiece; Gradient update: Using gradient information, update the set of parameter points θ with a learning rate α to reduce the error function E(θ), and its formula is: where, θ (t+1) is the workpiece three-dimensional model parameter at the (t + 1)-th time, θ (t) is the workpiece three-dimensional model parameter at the t-th time, α is the learning rate, is the gradient vector of the error function E(θ) at the current parameter point of the t-th time; Iterative optimization: Repeat the steps of gradient calculation and gradient update, and iteratively update the set of parameter points θ until the error function converges or reaches the set number of iterations, so as to obtain the corrected three-dimensional digital model of the workpiece.
7. A method for autonomous programming of post-processing of a casting robot according to claim 4, characterized in that S4 is specifically as follows: Feature extraction: Respectively perform feature extraction on the machining contour information and the three-dimensional digital model of the workpiece to obtain the feature points and descriptors of the machining contour information and the three-dimensional digital model of the workpiece; Feature matching: Perform feature point matching; Coordinate transformation and mapping: According to the pair of feature points obtained by the matching, perform coordinate transformation and mapping; Perspective transformation: If the two-dimensional image information of the workpiece and the three-dimensional digital model are not in the same coordinate system, perform perspective transformation to map them to the same coordinate system; Fitting or registration: Use the ICP registration algorithm to further fit and align the two-dimensional image information and the three-dimensional digital model to obtain the matching result.
8. A method for autonomous programming of post-processing machining of a casting robot according to claim 7, characterized in that, Feature point matching is specifically as follows: Generate descriptors: After feature extraction, generate descriptors based on feature points; Nearest neighbor matching: For the descriptor of each feature point, the nearest neighbor matching algorithm is used to calculate its most similar neighbor in another set of descriptors, that is, to find the nearest feature point; Distance metric: The Euclidean distance metric is used to measure the difference between two descriptors; Matching screening: For each feature point, by comparing the distances with other feature points, the closest feature point is selected as the matching point, and false matches are excluded by setting a threshold or using a more advanced screening algorithm.
9. A method for autonomous programming of post-processing machining of a casting robot according to claim 4, characterized in that It also includes: S7. Calibrate the tool coordinate system of the robot with a calibration tool, then calibrate the workpiece coordinate system, and calculate the transformation relationship between the workpiece coordinate system and the tool coordinate system; S8. Assign the calibrated workpiece coordinate system to the robot control program, and determine the transformation relationship between the workpiece coordinate system and the tool coordinate system through visual guidance and positioning, guide the robot to find the workpiece coordinate system, and determine the processing path executed by the robot with the workpiece coordinate system as a reference; S9. Apply the workpiece coordinate system after visual calibration to the robot processing operation, and ensure that the robot performs positioning and tasks through testing and verification.
Citation Information
Patent Citations
Aircraft part high-precision matching component processing method based on digital measurement
CN103995496A
Casting cleaning robot three-dimensional point cloud processing method based on deep learning
CN117670816A