Robot milling trajectory compensation method based on visual guidance and neural network prediction
Patent Information
- Application Number
- CN202611290339.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]本发明的目的在于提供基于视觉引导与神经网络预测的机器人铣削轨迹补偿方法,以解决机器人铣削加工因定位精度低、铣削力诱导的轨迹偏差大、传统动力学建模复杂且精度受限的问题
[0017]本发明的技术效果和优点:1、本发明采用纯数据驱动的神经网络直接学习“位姿–工艺参数–轨迹偏差”映射,避免了复杂的物理建模和参数辨识。
Smart Images

Figure CN122816078A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing technology, specifically relating to a robot milling trajectory compensation method based on visual guidance and neural network prediction. Background Technology
[0002] Current methods for improving the accuracy of end-effector milling trajectories in industrial robots mainly fall into two categories. One category is based on real-time trajectory compensation using measurement data. This method measures the workpiece surface deformation and uses neural networks to interpolate and compensate for path point positions. However, this method only compensates for static deformation caused by workpiece clamping or its own weight, completely failing to handle the dynamic, time-varying elastic deformation induced by milling forces during robot milling. The other category is based on trajectory deviation prediction, typically relying on robot dynamics models (such as the stiffness matrix method, finite element method, and multibody system transfer matrix method). This type of method requires precise identification of the robot's stiffness, damping, and modal parameters, a cumbersome and laborious process that struggles to cover the robot's entire pose space. Furthermore, these dynamics models are mostly based on linear and time-invariant assumptions, failing to accurately characterize the time-varying characteristics of milling forces and the nonlinear stiffness behavior dependent on robot pose, thus significantly limiting the accuracy of deviation prediction.
[0003] Regarding error measurement, current machining error measurement technologies mainly involve detecting the internal state of the robot (such as encoder feedback, drive current, vibration signals, acoustic emission signals, etc.) and indirectly inferring machining errors using error identification models or data-driven methods. However, the identification accuracy of this method is greatly limited by the accuracy of the sensors and the model assumptions. Furthermore, for robotic milling, which involves strong nonlinearity and multi-source interference, indirect measurement often struggles to accurately separate the dynamic deviations induced by milling forces.
[0004] In addition, traditional trajectory generation methods rely heavily on accurate workpiece CAD models and theoretical installation poses. However, in actual processing, workpieces often have clamping deviations, thermal deformations, and other factors, causing the preset trajectory to deviate from the actual shape, further weakening the effectiveness of offline compensation. Summary of the Invention
[0005] The purpose of this invention is to provide a robot milling trajectory compensation method based on visual guidance and neural network prediction, so as to solve the problems of low positioning accuracy, large trajectory deviation induced by milling force, and complex and limited accuracy of traditional dynamic modeling in robot milling.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a robot milling trajectory compensation method based on visual guidance and neural network prediction, the specific steps of which are as follows: S1, Vision system calibration and trajectory extraction.
[0007] S2, Construct a trajectory deviation prediction model based on neural networks; S21, the experimental procedure, involves milling under different robot poses and combinations of process parameters; first, process S1 is performed on each robot to obtain... Then, high-precision measuring equipment was used to measure the actual machined trajectory points in real time. , ; Where i is the index of the discrete trajectory point; Represents the three-dimensional coordinates of the i-th actual machining trajectory point in the robot's base coordinate system; N is the total number of trajectory points, determined by the sampling frequency of the vision system and the trajectory length.
[0008] Calculate the trajectory deviation vector for each discrete point: ; in, This represents the deviation components of the i-th trajectory point in the X, Y, and Z directions. Positive values indicate that the actual position is offset from the ideal position along the positive coordinate axis, while negative values indicate that the position is offset in the opposite direction.
[0009] S22, Network Construction and Training: Construct a backpropagation neural network. The number of neurons in the input layer is proportional to the input features, and the number of neurons in the output layer is proportional to the output quantity. Use 3-5 hidden layers with 5-30 neurons per layer. For the activation function, use the hyperbolic tangent Tanh function for the hidden layers and the linear purelin function for the output layer. The loss function is the mean squared error. Divide the sample dataset, consisting of robot pose parameters, process parameters, and corresponding trajectory deviation vectors, into training, validation, and test sets. Use the training set to train the neural network until the error on the validation set converges. The test set is used to evaluate the model performance after training and does not participate in the training process. Use the collected dataset to train the network until the error on the validation set converges. S3, Offline trajectory deviation prediction and compensation, for the ideal trajectory points extracted in S1 Based on the tangential direction of the trajectory and the inverse kinematics of the robot, i.e., based on the desired end-effector pose, a set of joint angles q required for the robot to reach the point can be calculated, or the actual end-effector pose of the robot when it reaches the point can be directly read. Combine the joint angle q or the robot end-effector pose with the corresponding preset process parameters of the robot during the S2 experiment to form an input vector: ; Where x, y, z represent the theoretical three-dimensional coordinates of the robot's end effector in the robot's base coordinate system; a, b, c represent the Euler angles of rotation about a fixed axis, characterizing the theoretical attitude of the robot's end effector. n is the spindle speed, v... f For feed rate, ap For cutting depth, c h For workpiece thickness; The input is fed into the deep neural network trained by S2, and the predicted trajectory deviation vector at that point is directly output: ; in, Let X be the prediction bias components of the i-th trajectory point in the X, Y, and Z directions; Generate compensated instruction trajectory points: ; Perform the above compensation on all N trajectory points to obtain the complete offline compensated trajectory. ; S4, Trajectory Smoothing and Robot Program Generation, for the compensated trajectory point sequence Smoothing filtering is performed to avoid impacts on robot movement caused by abrupt changes between adjacent points; The smoothed compensation trajectory is converted into a robot executable program by a post-processor. The robot performs milling according to the compensation program, and the actual machined trajectory will accurately approximate the original ideal trajectory.
[0010] Preferably, S1 specifically includes: S11, Install a vision sensing device at a fixed position at the end of the robot or in the workspace to perform hand-eye calibration between the vision system and the robot's base coordinate system; S12, place the workpiece to be processed on the worktable, and scan the surface of the workpiece on the worktable using a vision system to obtain the three-dimensional point cloud data of the workpiece. S13: Identify preset machining features on the workpiece. Based on the identified machining features and the 3D point cloud data obtained in S12, use image processing and point cloud segmentation algorithms to extract the discrete point sequence of the ideal machining trajectory in the robot's base coordinate system, expressed as: ; Where i is the index of the discrete trajectory point; The i-th ideal trajectory point represents the three-dimensional coordinates of the i-th ideal trajectory point in the robot's base coordinate system; N is the total number of trajectory points, which is determined by the sampling frequency of the vision system and the trajectory length.
[0011] Preferably, it also includes S5, online model updating and adaptation. Specifically, during the machining process, the C-Track vision system is used to monitor the residual deviation between the actual trajectory and the ideal trajectory in real time. When the residual deviation of multiple consecutive trajectory points exceeds 2 to 3 times the standard deviation σ of the model prediction error on the test set in S2, incremental learning is triggered: new data is fed back to the neural network for small-batch fine-tuning, so as to realize the adaptive capability of the prediction model to slow-changing disturbances such as tool wear and temperature drift.
[0012] Preferably, the visual sensing device in S1 includes one or more of binocular or monocular cameras, structured light or line laser profilometers; The preset processing features include edges, scribing lines, spraying trajectory marks, or natural textures.
[0013] Preferably, the different process parameters in S2 are specifically the spindle speed n and the feed rate v. f axial depth of cut a p Workpiece thickness c h ; The robot pose features specifically refer to key joint angles. Or end pose.
[0014] Preferably, in step S3, if there are multiple solutions among the set of joint angles q required for the robot to reach the point based on the trajectory tangential direction and the inverse kinematics of the robot, the solution with the optimal stiffness or the solution closest to the current pose is selected.
[0015] Preferably, the smoothing filtering process in S4 includes spline interpolation or moving average.
[0016] Preferably, the base coordinate system calibration steps in S11 are as follows: First, target points are planned and pasted on the robot end flange and axes A1 and A2. Then, the robot is moved to the HOME position, the target points are placed at the A1 joint axis, and the rotation of the robot joint A1 axis is controlled independently. The position of the target points during the movement is measured using a binocular vision sensor to obtain a series of points on the movement path. These points are then used to fit a circle C1 to obtain the center O1. The robot is then moved back to the HOME position, the target points are placed on the target seat at the A2 joint axis, and the rotation of the robot joint A2 axis is controlled independently. The position of the target points during the movement is measured using a binocular vision sensor to obtain a series of points on the movement path. These points are then used to fit a circle C2 to obtain the center O2. The target points are then placed at the center O1, perpendicular to circle C2. Create plane 1 using the normal of circle C1. Project the center O2 onto plane 1 to obtain projection point O2'. Then, through projection point O2', create plane 2 perpendicular to the normal of circle C1. Translate plane 2 downwards by a distance d1 along the normal of the plane to obtain the plane containing the robot's base coordinate system. Project the center O1 and projection point O2' onto plane 2. The projection point O1' of the center O1 is the origin of the base coordinate system, the projection point O2'' of O2' is the point on the x-axis of the base coordinate system, and the normal of plane 2 is the z-axis of the base coordinate system. This is how the robot's base coordinate system is constructed.
[0017] The technical effects and advantages of this invention are as follows: 1. This invention uses a pure data-driven neural network to directly learn the mapping of "pose-process parameters-trajectory deviation", avoiding complex physical modeling and parameter identification.
[0018] 2. No workpiece CAD model required: The actual processing trajectory is directly extracted through visual scanning, which solves the problem of trajectory failure caused by the deviation between the actual workpiece and the design model. It is especially suitable for small batch, multi-variety or repair scenarios.
[0019] 3. Comprehensive consideration of pose correlation and process parameter nonlinearity: Neural networks can automatically capture the nonlinear effects of stiffness anisotropy caused by robot pose, milling force time-varying nature, and the coupling of the two on trajectory deviation, and the prediction accuracy is higher than that of traditional linear or quasi-static models.
[0020] 4. Offline compensation, without increasing the burden on online control: Compensation is completed before processing, without changing the original control system architecture of the robot, thus avoiding the stability risks and delay issues caused by real-time compensation.
[0021] 5. Simple to implement and low cost: Only one set of vision equipment and one data acquisition training are needed to quickly compensate for the processing of similar workpieces and within the range of process parameters, which is easy to promote.
[0022] 6. No need to connect to the robot's control system, directly measure the actual processing trajectory: The vision system directly measures the three-dimensional point cloud of the workpiece surface and the spatial position of the end target point. It is completely independent of the robot control system, does not need to be connected to the internal signal interface, and can be deployed after calibration, making it easy to implement. Attached Figure Description
[0023] Figure 1 This is a flowchart of the present invention; Figure 2 This is a schematic diagram illustrating the extraction of the trajectory to be processed by the vision system of the present invention; Figure 3 This is a structural diagram of the neural network trajectory deviation prediction model of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This invention provides, for example Figures 1-3 The robot milling trajectory compensation method based on vision guidance and neural network prediction shown in the figure includes step 1: vision system calibration and extraction of the machining trajectory. This embodiment uses a C-Track binocular vision sensor to measure the actual machining trajectory. First, target points are planned and pasted on the robot's end flange and on axes A1 and A2. The base coordinate system and workpiece coordinate system are calibrated using the following steps: The calibration steps for the base coordinate system are as follows: Move the robot to the HOME position (0°, -90°, 90°, 0°, 90°, 0°), place the target point at the A1 joint axis, and control the rotation of the robot's A1 joint axis independently. Use a binocular vision sensor to measure the position of the target point during the movement, obtaining a series of points on the movement path. Use these points to fit a circle C1, obtaining the center O1. Move the robot back to the HOME position, place the target point on the target mount at the A2 joint axis, and control the rotation of the robot's A2 joint axis independently. Use a binocular vision sensor to measure the position of the target point during the movement, obtaining a series of points on the movement path. Use these points to fit a circle C2, obtaining the center O2. The target point is then placed at the center O1, perpendicular to circle C2. Create plane 1 using the normal of circle C1. Project the center O2 onto plane 1 to obtain projection point O2'. Then, through projection point O2', create plane 2 perpendicular to the normal of circle C1. Translate plane 2 downwards along the normal of the plane by a distance d1 (d1=675mm) to obtain the plane containing the robot's base coordinate system. Project the center O1 and projection point O2' onto plane 2. The projection point O1' of the center O1 is the origin of the base coordinate system, the projection point O2'' of O2' is the point on the x-axis of the base coordinate system, and the normal of plane 2 is the z-axis of the base coordinate system. This is how the robot's base coordinate system is constructed.
[0026] The tool coordinate system is calibrated as follows: On the robot's end flange or tool mounting surface, select several points and fit a plane P1 as the reference plane for the tool coordinate system. Then, translate plane P1 to the location of the tool tip, obtaining the plane Ptool tip passing through the tool tip. Measure a series of points on the cylindrical surface of the end flange or tool holder, fitting a cylinder C. The intersection of its axis and Ptool tip is the origin of the tool coordinate system. Finally, select a side surface of the flange, select several points on this plane, and fit a plane P2. The projection of the normal to this plane onto Ptool tip is the coordinate system's z-axis direction (x-axis or y-axis direction), and the normal to Ptool tip is the direction of the coordinate system's z-axis.
[0027] After calibrating the base coordinate system and tool coordinate system, a tracking model is established. The workpiece to be processed is placed on the worktable, and a processing trajectory is planned. The discrete point sequence of the ideal processing trajectory in the robot's base coordinate system is taught through the vision system and denoted as: ; Where i is the index of the discrete trajectory point; represents the three-dimensional coordinates of the i-th actual machining trajectory point in the robot's base coordinate system; N is the total number of trajectory points, determined by the sampling frequency of the vision system and the trajectory length. N is set to 60 trajectory points, which uniformly cover a 300mm long straight milling trajectory.
[0028] Step 2: Construct a trajectory deviation prediction model based on neural networks To cover different stiffness regions and typical process parameter ranges of the robot, this embodiment adopts L9(3 4 The milling experiment was designed using an orthogonal array, with factors including: spindle speed n, feed rate vf, depth of cut ap, and workpiece thickness ch.
[0029] In each working condition, the robot mills according to the planned trajectory. Simultaneously, the C-Track binocular vision sensor tracks the end-effector target point in real time to obtain the actual milling trajectory points. ; Calculate the trajectory deviation vector for each discrete point: ; in, This represents the deviation components of the i-th trajectory point in the X, Y, and Z directions. Positive values indicate that the actual position is offset from the ideal position along the positive axis, while negative values indicate that the position is offset in the opposite direction. This embodiment uses a backpropagation (BP) neural network as the trajectory deviation prediction model, and its structure includes three parts: an input layer, a hidden layer, and an output layer. The input features are 10-dimensional, including the six-dimensional pose information (X, Y, Z, A, B, C) of the robot end effector at the theoretical trajectory point, and four key process parameters (spindle speed n, feed rate v). f Cutting depth a p Workpiece thickness c h ).
[0030] Output layer: The output is a three-dimensional trajectory deviation vector. .
[0031] Hidden layers: Based on the highly nonlinear characteristics of the robot milling error prediction task, three hidden layers are set up, with 20, 13 and 8 neurons in each layer, forming a funnel-shaped structure with decreasing number of neurons in each layer, so as to gradually extract abstract features and control the number of model parameters.
[0032] For the activation function selection, the hyperbolic tangent Tanh function is used in the hidden layer. Its output is centered at zero, which matches the standardized input distribution and helps maintain the stability of the gradient direction during backpropagation, alleviating the gradient vanishing problem. The linear purelin function is used in the output layer, without limiting the output amplitude, to adapt to the continuous real-valued output characteristics of trajectory deviation in regression tasks. The training algorithm adopts the Levenberg-Marquardt algorithm, which combines the advantages of the Gauss-Newton method and gradient descent, and features fast convergence speed and high accuracy in mean squared error problems.
[0033] After normalizing the dataset, it was randomly divided into training, validation, and test sets at a ratio of 70%, 15%, and 15%, respectively. The training set was used to update network weights and biases; the validation set was used to monitor the model's generalization ability and prevent overfitting; and the test set, independent of the training process, was used for final performance evaluation.
[0034] Model performance was evaluated using the coefficient of determination (R²) and mean absolute percentage error (MAPE). In this embodiment, 540 valid sample points were collected in the CFRP milling experiment. The training results show that the R² values of the error components in the X, Y, and Z directions are all relatively high, the overall coefficient of determination is close to one, and the mean absolute error is controlled within a low level. This indicates that the neural network model has successfully achieved high-precision fitting of the complex nonlinear mapping of "pose-process parameters-trajectory deviation".
[0035] Step 3: Offline trajectory deviation prediction and compensation For the ideal trajectory points extracted in step 1 The robot's end-effector pose and preset process parameters are input into a trained neural network model, and the model outputs the prediction error at that point. Then generate the compensated instruction trajectory points. :
[0036] That is, the trajectory is pre-corrected according to the "opposite direction of the predicted deviation", so that after the robot deviates due to the milling force during actual processing, the actual position reached is close to the ideal trajectory point. The above compensation is performed on all N trajectory points to obtain the complete offline compensated trajectory.
[0037] Step 4: Trajectory Smoothing and Robot Program Generation To avoid abrupt changes between adjacent compensated trajectory points that could cause motion shocks to the robot, the compensated trajectory point sequence is smoothed using interpolation. The smoothed compensated trajectory is then converted into a KRL program executable by the KUKA robot via a post-processor. The robot performs milling operations according to the compensation program. Comparing the trajectory errors before and after compensation, in this embodiment, the compensated trajectory accurately approximates the original ideal trajectory.
[0038] Step 5: Online Model Update and Adaptation During the machining process, the C-Track vision system is used to monitor the residual deviation between the actual trajectory and the ideal trajectory in real time. When the residual deviation of multiple consecutive trajectory points exceeds a set threshold (e.g., 0.05mm), incremental learning is triggered: new data is fed back to the neural network for small-batch fine-tuning, enabling the prediction model to adapt to slow-changing disturbances such as tool wear and temperature drift.
[0039] In summary, the robot milling trajectory accuracy compensation method based on vision guidance and neural network prediction described in this embodiment directly extracts the trajectory to be processed by the vision system, directly learns the "pose-process parameter-trajectory deviation" mapping by the neural network, and performs offline compensation and online adaptive updates. This avoids the complexity of traditional dynamic modeling and the deviation problem of CAD model, and achieves high-precision milling trajectory error compensation without modification of the underlying controller.
[0040] Comparative Implementation Case: Real-time Trajectory Compensation Method Based on Measurement Data This method measures the static deformation (caused by clamping or self-weight) at a small number of discrete points on the workpiece using a probe. A neural network is then used to spatially interpolate and fit these deformation values, constructing a "position → deformation" mapping model. This model predicts the deformation at any point along the theoretical machining trajectory and superimposes this deformation onto the theoretical trajectory for real-time compensation. Essentially, this method is a spatial interpolation compensation technique for static deformation, and it does not involve time-varying or nonlinear factors such as dynamic milling forces, robot stiffness anisotropy, or process parameters. It is suitable for static contour deformation compensation scenarios.
[0041] Step 1: Determine the measurement points The measurement points are determined, and each point is measured one by one using a probe. The deviation between the measurement data of each measurement point and the reference contour data is calculated to obtain the deformation of the measurement points of the product to be processed.
[0042] Step 2: Training the neural network model The neural network model is trained using the deformation and the corresponding measurement point positions.
[0043] Step 3: Predict Deformation Variables The path point positions of the theoretical processing trajectory are substituted into the trained neural network model for prediction, and the deformation of the path points in the theoretical processing trajectory is obtained.
[0044] Step 4: Compensate for errors The deformation is superimposed onto the theoretical machining trajectory, and the tool is controlled to move according to the superimposed path.
[0045] Target Static deformation caused by workpiece clamping or its own weight Dynamic, time-varying milling force-induced end elastic deformation during milling Sources of error Workpiece clamping deformation and uneven stress Dynamic deformation induced by milling force Measurement method Directly measure the deformation of the workpiece surface. The robot's end-effector pose and workpiece surface point cloud are measured in real time using a vision system (binocular or monocular camera, structured light, line laser profilometer). Is a CAD model required? Reference profile data is required. No CAD model required; actual processing trajectory can be extracted directly through visual scanning. Neural network input features Path point location (X, Y, Z) Robot end effector pose (6D) and process parameters (spindle speed, feed rate, depth of cut, workpiece thickness, etc.) Advantages and disadvantages It can only handle static clamping deformation and cannot handle dynamic, time-varying errors (such as cutting force-induced deformation). Covers both static and dynamic errors, including time-varying elastic deformation induced by milling force. .
[0046] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A robot milling trajectory compensation method based on visual guidance and neural network prediction, characterized in that: The specific steps are as follows: S1, Visual system calibration and trajectory extraction; S2, Construct a trajectory deviation prediction model based on neural networks; S21, the experimental procedure, involves milling under different robot poses and combinations of process parameters; first, process S1 is performed on each robot to obtain... Then, high-precision measuring equipment was used to measure the actual machined trajectory points in real time. , ; Where i is the index of the discrete trajectory point; represents the three-dimensional coordinates of the i-th actual machining trajectory point in the robot's base coordinate system; N is the total number of trajectory points, determined by the sampling frequency of the vision system and the trajectory length. Calculate the trajectory deviation vector for each discrete point: ; in, This represents the deviation components of the i-th trajectory point in the X, Y, and Z directions. Positive values indicate that the actual position is offset from the ideal position along the positive axis, while negative values indicate that the position is offset in the opposite direction. S22, Network Construction and Training: Construct a backpropagation neural network. The number of neurons in the input layer is proportional to the input features, and the number of neurons in the output layer is proportional to the output quantity. Use 3-5 hidden layers with 5-30 neurons per layer. For the activation function, use the hyperbolic tangent Tanh function for the hidden layers and the linear purelin function for the output layer. The loss function is the mean squared error. Divide the sample dataset, consisting of robot pose parameters, process parameters, and corresponding trajectory deviation vectors, into training, validation, and test sets. Use the training set to train the neural network until the error on the validation set converges. The test set is used to evaluate the model performance after training and does not participate in the training process. Use the collected dataset to train the network until the error on the validation set converges. S3, Offline trajectory deviation prediction and compensation, for the ideal trajectory points extracted in S1 Based on the tangential direction of the trajectory and the inverse kinematics of the robot, i.e., based on the desired end-effector pose, a set of joint angles q required for the robot to reach the point can be calculated, or the actual end-effector pose of the robot when it reaches the point can be directly read. Combine the joint angle q or the robot end-effector pose with the corresponding preset process parameters of the robot during the S2 experiment to form an input vector: ; Where x, y, z represent the theoretical three-dimensional coordinates of the robot's end effector in the robot's base coordinate system; a, b, c represent the Euler angles of rotation about a fixed axis, characterizing the theoretical attitude of the robot's end effector; n is the spindle speed, v is the rotational speed of the robot's end effector, and z is the rotational speed of the robot's end effector. f For feed rate, a p For cutting depth, c h For workpiece thickness; The input is fed into the deep neural network trained by S2, and the predicted trajectory deviation vector at that point is directly output: ; in, Let X be the prediction bias components of the i-th trajectory point in the X, Y, and Z directions; Generate compensated instruction trajectory points: ; Perform the above compensation on all N trajectory points to obtain the complete offline compensated trajectory. ; S4, Trajectory Smoothing and Robot Program Generation, for the compensated trajectory point sequence Smoothing filtering is performed to avoid impacts on robot movement caused by abrupt changes between adjacent points; The smoothed compensation trajectory is converted into a robot executable program by a post-processor. The robot performs milling according to the compensation program, and the actual machined trajectory will closely approximate the original ideal trajectory. S1 specifically includes: S11, Install a vision sensing device at a fixed position at the end of the robot or in the workspace to perform hand-eye calibration between the vision system and the robot's base coordinate system; S12, place the workpiece to be processed on the worktable, and scan the surface of the workpiece on the worktable using a vision system to obtain the three-dimensional point cloud data of the workpiece. S13: Identify preset machining features on the workpiece. Based on the identified machining features and the 3D point cloud data obtained in S12, use image processing and point cloud segmentation algorithms to extract the discrete point sequence of the ideal machining trajectory in the robot's base coordinate system, expressed as: ; Where i is the index of the discrete trajectory point; represents the three-dimensional coordinates of the i-th ideal trajectory point in the robot's base coordinate system; N is the total number of trajectory points, determined by the sampling frequency of the vision system and the trajectory length. It also includes S5, online model updating and adaptation. Specifically, during the machining process, the C-Track vision system is used to monitor the residual deviation between the actual trajectory and the ideal trajectory in real time. When the residual deviation of multiple consecutive trajectory points exceeds 2 to 3 times the standard deviation σ of the model prediction error on the test set in S2, incremental learning is triggered: new data is fed back to the neural network for small-batch fine-tuning, realizing the predictive model's ability to adapt to slow-changing disturbances such as tool wear and temperature drift.
2. The robot milling trajectory compensation method based on visual guidance and neural network prediction according to claim 1, characterized in that: The visual sensing device in S1 includes one or more of binocular or monocular cameras, structured light or line laser profilometers. The preset processing features include edges, scribing lines, spraying trajectory marks, or natural textures.
3. The robot milling trajectory compensation method based on visual guidance and neural network prediction according to claim 1, characterized in that: The different process parameters in S2 are specifically the spindle speed n and the feed rate v. f axial depth of cut a p Workpiece thickness c h ; The robot pose features specifically refer to key joint angles. Or end pose.
4. The robot milling trajectory compensation method based on visual guidance and neural network prediction according to claim 1, characterized in that: In step S3, based on the tangential direction of the trajectory and the inverse kinematics of the robot, a set of joint angles q required for the robot to reach the point is calculated. If there are multiple solutions, the solution with the optimal stiffness or the one closest to the current pose is selected.
5. The robot milling trajectory compensation method based on visual guidance and neural network prediction according to claim 1, characterized in that: The smoothing filtering process in S4 includes spline interpolation or moving average.
6. The robot milling trajectory compensation method based on visual guidance and neural network prediction according to claim 1, characterized in that: The calibration steps of the base coordinate system in S11 are as follows: First, plan and paste target points on the robot's end flange and on axes A1 and A2. Then, move the robot to the HOME position, place the target points on the A1 joint axis, and control the rotation of the robot's A1 joint axis independently. Use a binocular vision sensor to measure the position of the target points during the movement to obtain a series of points on the movement path. Use these points to fit a circle C1 to obtain the center O1. Move the robot back to the HOME position, place the target points on the target seat at the A2 joint axis, and control the rotation of the robot's A2 joint axis independently. Use a binocular vision sensor to measure the position of the target points during the movement to obtain a series of points on the movement path. Use these points to fit a circle C2 to obtain the center O2. Pass through the center O1, perpendicular to circle C2. Create plane 1 using the normal of circle C1. Project the center O2 onto plane 1 to obtain projection point O2'. Then, through projection point O2', create plane 2 perpendicular to the normal of circle C1. Translate plane 2 downwards by a distance d1 along the normal of the plane to obtain the plane containing the robot's base coordinate system. Project the center O1 and projection point O2' onto plane 2. The projection point O1' of the center O1 is the origin of the base coordinate system, the projection point O2'' of O2' is the point on the x-axis of the base coordinate system, and the normal of plane 2 is the z-axis of the base coordinate system. This is how the robot's base coordinate system is constructed.