Large cast hole laser cutting track adaptive generation method
Patent Information
- Application Number
- CN202611391241.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-10-13
AI Technical Summary
[0002]大型铸件体积大、自重高,受工装约束、工件自身形变等因素,装夹完成后位置与姿态普遍存在偏差,难以实现高精度就位
(1)本发明基于修正后的主方向向量计算得到相机动态拍照姿态;控制机器人采用相机动态拍照姿态,以预设的初始扫描位置为起点,并按照之字形扫描策略对待加工铸件表面进行扫描,采集得到正向扫描点云和负向扫描点云,无需预先获知工件实际尺寸,可自适应确定扫描范围,实现大型铸件表面点云完整采集,能够适配工件装夹带来的位置与角度偏移,为后续孔洞识别与轨迹生成提供可靠的点云数据源;
Smart Images

Figure CN122902422A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser cutting technology, and in particular to an adaptive method for generating laser cutting trajectories for holes in large castings. Background Technology
[0002] Large castings are bulky and heavy, and due to tooling constraints and workpiece deformation, their position and orientation often deviate after clamping, making high-precision positioning difficult. If manual teaching or offline programming is used to generate fixed cutting trajectories, workpiece clamping offsets can directly cause trajectory misalignment, potentially rendering the workpiece unusable. To address this clamping offset problem, existing technologies introduce 3D vision to acquire workpiece point clouds and perform unified trajectory compensation through overall registration. However, this method only corrects the overall workpiece pose and cannot accommodate local geometric undulations on the casting surface or deformation errors around holes. Furthermore, the complex surface structure of large castings makes point cloud acquisition prone to noise and outliers. Incomplete scanning coverage can further amplify geometric errors in local areas, causing data-level interference for subsequent hole identification and trajectory generation.
[0003] Meanwhile, due to the casting process, castings have numerous holes with irregular contours, and the edges of these holes often have burrs and flash, making them prone to contour distortion during point cloud inspection. Under the combined effect of local deformation and point cloud noise, not only are the extracted hole contours prone to local protrusions and abrupt trajectory changes, resulting in rough cuts, ablation, and other processing defects, but the local plane containing the hole also exhibits depth deviations, making it difficult for the laser focus to align with the actual processed surface, thus compromising the consistency of the cutting depth. Summary of the Invention
[0004] This invention provides an adaptive method for generating laser cutting trajectories for holes in large castings, in order to overcome the aforementioned technical problems.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows: An adaptive method for generating laser cutting trajectories for holes in large castings includes: S1. Under multiple preset initial scanning poses, acquire the original point cloud of several castings to be processed, preprocess the original point cloud to obtain the positioning point cloud for main direction calculation. S2. Based on the covariance matrix of the location point cloud computing, perform eigenvalue decomposition on the covariance matrix to obtain three principal direction vectors; perform order correction and positive and negative direction unification on the three principal direction vectors to obtain the corrected principal direction vectors. S3. Calculate the camera's dynamic shooting posture based on the corrected main direction vector; control the robot to adopt the camera's dynamic shooting posture, starting from the preset initial scanning position, and scan the surface of the casting to be processed according to a zigzag scanning strategy to collect positive and negative scanning point clouds; convert the positive scanning point cloud, negative scanning point cloud, and the positioning point cloud in S1 to the robot's base coordinate system, and stitch them together according to the execution order of the initial scan to obtain the complete point cloud of the casting to be processed; S4. Perform voxel downsampling on the complete point cloud of the casting to be processed to obtain a voxel downsampled complete point cloud; perform directional proportional interval filtering on the voxel downsampled complete point cloud based on the corrected principal direction vector to obtain a filtered point cloud; extract maximum connected clustering from the filtered point cloud to obtain the main point cloud of the upper surface; sequentially perform RANSAC plane fitting and PCA exact plane fitting on the main point cloud of the upper surface to obtain the true plane of the upper surface, and then construct the upper surface plane equation; use the upper surface plane equation to project the main point cloud of the upper surface onto the true plane of the upper surface to obtain the projected plane point cloud; S5. Calculate the surface normal vector of each point in the projection plane point cloud; perform boundary detection on each point in the projection plane point cloud according to the surface normal vector to determine whether the point is a boundary point; after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the hole edge point cloud; perform Euclidean clustering operation on the hole edge point cloud to segment it into several independent hole contour point clouds. S6. Fit the three-dimensional plane containing the point cloud of each hole contour to obtain a two-dimensional contour point set; obtain an ordered closed two-dimensional contour point set based on the two-dimensional contour point set; preprocess the ordered closed two-dimensional contour point set to obtain smoothed two-dimensional points; back-project the smoothed two-dimensional points back to the three-dimensional plane to obtain the smoothed hole contour trajectory line. S7. Extract the point cloud of the local processing area around the hole, and sequentially perform RANSAC plane fitting and PCA precise plane fitting operations on the point cloud of the local processing area around the hole to obtain the local real processing plane, and then construct the equation of the local real processing plane; using the equation of the local real processing plane, project the smoothed hole contour trajectory line point by point onto the local real processing plane to obtain the laser cutting trajectory points carrying real depth information. S8. Calculate the trajectory tangent vector of each laser cutting trajectory point, construct a local coordinate system based on the trajectory tangent vector, and solve the laser cutting head posture quaternion corresponding to each laser cutting trajectory point in the local coordinate system; process the laser cutting head posture quaternion to obtain the posture-smoothed hole cutting trajectory; perform starting point closure processing and transition trajectory generation processing based on the posture-smoothed hole cutting trajectory to finally obtain the complete laser cutting trajectory; realize the hole processing of the casting based on the complete laser cutting trajectory.
[0006] Furthermore, in S2, based on the covariance matrix of the cloud computing of the positioning points, eigenvalue decomposition is performed on the covariance matrix to obtain three principal direction vectors; the order of the three principal direction vectors is corrected and the positive and negative directions are unified to obtain the corrected principal direction vectors, specifically including: S21. Based on the location point cloud computing, the centroid of the point cloud is located using the following formula: ; in, To locate the centroid of the point cloud; For positioning point clouds The Middle One point; For positioning point clouds The number of points included; S22. Calculate the covariance matrix based on the centroid of the point cloud. The calculation formula is as follows: ; in, This is the covariance matrix corresponding to the localized point cloud; S23, regarding the covariance matrix Eigenvalue decomposition yields a set of original principal direction vectors, containing three original principal direction vectors, satisfying the following equation: ; in, For the first One original principal direction vector; For the first The eigenvalues corresponding to the original principal direction vectors; S24. According to the preset main direction order correction rule, the three original main direction vectors output by S23 are sequentially corrected to obtain the sequentially corrected main direction vector group. The specific rules for correcting the main direction order are as follows: From the three original principal direction vectors, the original principal direction vector with the largest absolute value of the Y-axis component in the robot base coordinate system is selected as the first candidate direction after sequential correction; the original principal direction vector with the largest absolute value of the X-axis component in the robot base coordinate system is selected as the second candidate direction after sequential correction; and the original principal direction vector with the largest absolute value of the Z-axis component in the robot base coordinate system is selected as the third candidate direction after sequential correction. S25. Combining the constraints of the robot's photographing posture and processing posture, the positive and negative directions of the sequentially corrected main direction vector group are unified, so that the first, second, and third main directions obtained after processing have stable physical meanings, and the corrected main direction vector is obtained. The corrected principal direction vector includes the corrected first principal direction. Second main direction and the third main direction , respectively represented as: ; in, , , These are the first, second, and third candidate directions after sequential correction; , , This is the positive and negative direction correction factor, with a value of 1 or -1.
[0007] Furthermore, the zigzag scanning strategy includes: controlling the robot to move a preset step length in the positive direction along the corrected first main direction and continuously collecting point clouds, and detecting in real time whether the robot has reached the positive boundary of the casting to be processed in the first main direction; when the positive boundary of the first main direction is detected, controlling the robot to step a preset width in the corrected second main direction to switch the movement direction, controlling the robot to move a preset step length in the negative direction along the corrected first main direction and continuously collecting point clouds, until the negative boundary of the casting to be processed in the first main direction is detected; repeating the aforementioned scanning process until a zigzag scanning path that completely covers the entire surface of the casting to be processed is generated.
[0008] Furthermore, the formula for calculating the camera's dynamic shooting pose based on the corrected principal direction vector is as follows: , ; in: For the first The first scan path Dynamic shooting posture of the camera; For the first The starting position of the scan path; This represents the displacement of the robot along the corrected first principal direction; This is the corrected first principal direction; This is the corrected second principal direction; For scanning path index; The total number of zigzag scan paths; This is the image pose index for the current path; The step spacing is along the corrected second principal direction; Among them, the Starting position of the scan path for: ; in: This is the preset initial scan position.
[0009] Furthermore, based on the corrected principal direction vector, the voxel downsampled upper surface point cloud is subjected to directional scaling interval filtering to obtain the filtered point cloud, represented as: ; in: voxel downsampling complete point cloud The corrected third principal direction in the corrected principal direction vector Above, according to the proportional range Point cloud of the region retained after filtering; voxel downsampling complete point cloud In the revised third principal direction Minimum projection value on; voxel downsampling complete point cloud In the revised third principal direction The projected length on; and It is a preset ratio and satisfies ; For point In the revised third principal direction Projection value on; voxel downsampling complete point cloud Any point in it.
[0010] Further, in S5, the surface normal vector of each point in the projection plane point cloud is calculated; boundary detection is performed on each point in the projection plane point cloud based on the surface normal vector to determine whether the point is a boundary point; after traversing the projection plane point cloud, all boundary points are extracted to obtain the hole edge point cloud; Euclidean clustering is performed on the hole edge point cloud to segment it into several independent hole contour point clouds, including: S51, For the current point in the projection plane point cloud , Randomly select this point k Given a neighborhood of points, find the centroid of each neighborhood point. Construct the current point neighborhood covariance matrix Perform eigenvalue decomposition on the covariance matrix and find the smallest eigenvalue. The corresponding feature vector is used as the current point Surface normal vector The formula is: ; ; in, For neighborhood point set The first in One point; S52. Perform boundary detection on each point in the projection plane point cloud according to the surface normal vector, determine whether the point is a boundary point, and after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the set of hole edge point clouds, expressed as: ; in: For the current point; The extracted point cloud set for the edges of the holes; , Points and Surface normal vector; It is the dot product of the surface normal vectors; The boundary angle threshold; It is the inverse cosine function, used to calculate the angle between the normal vectors; This is for calculating the maximum value. It is the logical "if and only if" symbol; S53. Perform Euclidean clustering on the point cloud of the hole edge to obtain a set of several independent point clouds of hole contours, expressed as: ; in: Collect point clouds of the outlines of each hole; Euclidean clustering operator; Point cloud for the edges of the input holes; This is the clustering distance threshold; , These represent the minimum and maximum number of cluster points, respectively.
[0011] Furthermore, based on the aforementioned two-dimensional contour point set, an ordered closed two-dimensional contour point set is obtained, specifically including: Calculate the center point of the two-dimensional contour point set, where the center point is the geometric centroid of the two-dimensional contour point set; using the center point as the polar coordinate pole, obtain the offset vector of each contour point in the two-dimensional contour point set relative to the center point. The center angle corresponding to each contour point is calculated based on the offset vector. The contour points are sorted according to the value of the central angle. If they are sorted in ascending order of the central angle value, the contour points are arranged counterclockwise. If they are sorted in descending order of the central angle value, the contour points are arranged clockwise, thus obtaining an ordered closed two-dimensional contour point set.
[0012] Furthermore, the quaternion of the laser cutting head's posture is processed to obtain a smoothed hole cutting trajectory; based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain a complete laser cutting trajectory, including: The laser cutting head attitude quaternion is subjected to sign unification, median filtering, and normalization processing. The processing formula includes: ; ; ; in: and The first The and the first Quaternions obtained by unifying the symbols of laser cutting trajectory points; It is the dot product of quaternions; The filtered first A number of quaternions; This is the median filtering operator; The radius of the sliding window; … For the first A sequence of quaternions with consistent sign within a sliding window centered on a laser cutting trajectory point; The normalized quaternion; Based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain the complete laser cutting trajectory, specifically including: Perform start-end closure processing on the smoothed hole cutting trajectory: Interpolation smooths the position and attitude between the starting and ending points of the trajectory to eliminate jumps in the position and attitude of the beginning and end, forming a continuous closed contour of a single hole. The transition trajectory generation process is performed on the cutting trajectory of each hole after the closure process. The processing formula is as follows: ; in: For the first The lifting transition point after the hole cutting is completed; For the first The endpoint of the cutting trajectory of the hole; For safety reasons, the lifting height is measured in mm. For the first The surface normal vector at the endpoint of each hole; From the lifting transition point to the first The starting point of each hole is planned to create a moving path, thereby generating a transition trajectory between holes; The final complete laser cutting trajectory is represented as follows: ; in: For the complete laser cutting trajectory; This is the initial approach trajectory, used to move the robot from its initial position to the starting point of the first hole cutting; For the first The cutting trajectory of each hole ; For the first The hole to the first The transition trajectory of each hole; This represents the total number of holes; To return the trajectory.
[0013] The present invention has the following beneficial effects: (1) The present invention calculates the dynamic shooting posture of the camera based on the corrected main direction vector; the robot is controlled to adopt the dynamic shooting posture of the camera, with the preset initial scanning position as the starting point, and scans the surface of the casting to be processed according to the zigzag scanning strategy, and collects the positive scanning point cloud and the negative scanning point cloud. It does not need to know the actual size of the workpiece in advance, and can adaptively determine the scanning range, realize the complete collection of the point cloud of the surface of the large casting, and can adapt to the position and angle offset caused by the workpiece clamping, providing a reliable point cloud data source for subsequent hole recognition and trajectory generation. (2) By processing several independent hole contour point clouds, a smooth hole contour trajectory line is obtained, which effectively eliminates noise and local protrusions, so that the trajectory meets the requirements of high-precision laser cutting. (3) By extracting the point cloud of the local processing area around the hole, RANSAC plane fitting and PCA precise plane fitting operations are performed on the point cloud of the local processing area around the hole in sequence to obtain the local real processing plane; the smoothed hole contour trajectory line is projected point by point onto the local real processing plane to complete the depth correction, suppress the depth jump caused by point cloud noise, so that the laser focus can be accurately aligned with the actual edge of the hole and ensure the cutting depth accuracy. (4) Based on the hole cutting trajectory after posture smoothing, the starting point closure processing and transition trajectory generation processing are carried out to avoid the risk of collision between the cutting head and the workpiece, thereby improving the motion stability and processing safety of multi-hole continuous cutting operations. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of the adaptive generation method for laser cutting trajectory of holes in large castings in this invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0017] This embodiment provides an adaptive method for generating laser cutting trajectories for holes in large castings, such as... Figure 1 As shown, it includes: S1. Under multiple preset initial scanning poses, acquire the original point cloud of several castings to be processed, preprocess the original point cloud to obtain the positioning point cloud for main direction calculation. Specifically, in this embodiment, a communication connection is established between the robot control terminal and the robot controller to read the interactive signals indicating that the robot has reached its position, has started measurement, and is allowed to proceed with the next scan. The robot is moved to at least two preset initial scan poses, and at each scan pose, a 3D camera is triggered to acquire the original point cloud of the casting to be processed.
[0018] In a specific embodiment, S1 involves preprocessing the original point cloud to obtain a positioning point cloud for main direction calculation, specifically including: S11. Perform voxel downsampling on the original point cloud to obtain a downsampled point cloud; combine the hand-eye coordinate transformation matrix to transform the downsampled point cloud to the robot base coordinate system to obtain a base coordinate point cloud; Specifically, let the first The original point cloud in the frame camera coordinate system is The voxel downsampling operator is , No. The hand-eye transformation matrix from the camera coordinate system to the robot base coordinate system corresponding to the frame is: Then the first Frame base coordinate point cloud for: ; S12. The base coordinate point clouds obtained under multiple initial scan poses are stitched together according to the execution order of the initial scan to obtain the localization point cloud; Specifically, positioning point clouds for: ; in, m This represents the initial number of scan poses; This is a point cloud set merging operation.
[0019] S13. Perform height direction pass-through filtering and secondary downsampling processing on the positioning point cloud in sequence to obtain the positioning point cloud used for main direction calculation.
[0020] S2. Based on the covariance matrix of the location point cloud computing, perform eigenvalue decomposition on the covariance matrix to obtain three principal direction vectors; perform order correction and positive and negative direction unification on the three principal direction vectors to obtain the corrected principal direction vectors. In a specific embodiment, in S2, based on the covariance matrix of the location point cloud computing, the covariance matrix is decomposed into eigenvalues to obtain three principal direction vectors; the three principal direction vectors are then corrected in order and their positive and negative directions are unified to obtain corrected principal direction vectors, specifically including: S21. Based on the location point cloud computing, the centroid of the point cloud is located using the following formula: ; in, To locate the centroid of the point cloud; For positioning point clouds The Middle One point; For positioning point clouds The number of points included; S22. Calculate the covariance matrix based on the centroid of the point cloud. The calculation formula is as follows: ; in, This is the covariance matrix corresponding to the localized point cloud; S23, regarding the covariance matrix Eigenvalue decomposition yields a set of original principal direction vectors, containing three original principal direction vectors, satisfying the following equation: ; in, For the first One original principal direction vector; For the first The eigenvalues corresponding to the original principal direction vectors; S24. According to the preset main direction order correction rule, the three original main direction vectors output by S23 are sequentially corrected to obtain the sequentially corrected main direction vector group. The specific rules for correcting the main direction order are as follows: From the three original principal direction vectors, the original principal direction vector with the largest absolute value of the Y-axis component in the robot base coordinate system is selected as the first candidate direction after sequential correction; the original principal direction vector with the largest absolute value of the X-axis component in the robot base coordinate system is selected as the second candidate direction after sequential correction; and the original principal direction vector with the largest absolute value of the Z-axis component in the robot base coordinate system is selected as the third candidate direction after sequential correction. S25. Combining the constraints of the robot's photographing posture and processing posture, the positive and negative directions of the sequentially corrected main direction vector group are unified, so that the first, second, and third main directions obtained after processing have stable physical meanings, and the corrected main direction vector is obtained. The corrected principal direction vector includes the corrected first principal direction. Second main direction and the third main direction , respectively represented as: ; in, , , These are the first, second, and third candidate directions after sequential correction; , , This is the positive and negative direction correction factor, with a value of 1 or -1. Specifically, the constraints on the robot's photography pose and processing pose include camera shooting constraints and robot joint reachability constraints, wherein: Camera shooting constraints: The camera optical axis should be oriented toward the workpiece surface to ensure that the camera's field of view covers the workpiece during the scanning and acquisition process, and to prevent the camera from turning away from the workpiece or exceeding the effective field of view, so as to ensure normal point cloud acquisition. The robot joint reachability constraint is as follows: the positive and negative values of the principal direction vector will change the robot's motion direction. It is necessary to ensure that the zigzag scanning path planned based on the principal direction and the subsequent cutting and processing posture fall within the reachable working range of the robot joint, so as to avoid singular configuration and joint over-limit problems.
[0021] Because the feature vectors output by traditional PCA only determine the spatial axis, and the direction can be positive or negative (the vector inversion still results in the same feature vector), directly selecting positive and negative values randomly would lead to problems such as the camera being unable to capture point clouds when facing away from the workpiece and the robot being unable to reach it. Therefore, S25 performs unified processing of positive and negative directions: under the premise that the axis remains unchanged, the vector sign is flipped to meet the constraints of photography and processing, so that the physical meaning of the first, second, and third main directions is fixed, and the subsequent zigzag scanning positive / negative motion logic is stable.
[0022] This embodiment innovatively formulates a main direction order correction rule, giving the three main directions stable physical meanings (length, width, and height). This overcomes the problem of inconsistent feature vector order in traditional PCA, ensuring the consistency of the reference coordinate system for subsequent scanning and trajectory generation, and guaranteeing stable identification even when the workpiece has angular deflection.
[0023] S3. Calculate the camera's dynamic shooting posture based on the corrected main direction vector; control the robot to adopt the camera's dynamic shooting posture, starting from the preset initial scanning position, and scan the surface of the casting to be processed according to a zigzag scanning strategy to collect positive and negative scanning point clouds; convert the positive scanning point cloud, negative scanning point cloud, and the positioning point cloud in S1 to the robot's base coordinate system, and stitch them together according to the execution order of the initial scan to obtain the complete point cloud of the casting to be processed; In a specific embodiment, the zigzag scanning strategy includes: controlling the robot to move a preset step length in the positive direction along the corrected first main direction and continuously collecting point clouds, and detecting in real time whether the robot has reached the positive boundary of the casting to be processed in the first main direction; when the positive boundary of the first main direction is detected, controlling the robot to step a preset width in the corrected second main direction to switch the movement direction, controlling the robot to move a preset step length in the negative direction along the corrected first main direction and continuously collecting point clouds, until the negative boundary of the casting to be processed in the first main direction is detected; and repeatedly executing the aforementioned scanning process until a zigzag scanning path that completely covers the entire surface of the casting to be processed is generated.
[0024] Specifically, both forward and negative scanning use the camera dynamic shooting posture calculated by S2, which enables the camera to follow the actual main direction of the casting to be processed.
[0025] In a specific embodiment, the formula for calculating the camera's dynamic shooting posture based on the corrected principal direction vector is as follows: , ; in: For the first The first scan path Dynamic shooting posture of the camera; For the first The starting position of the scan path; This represents the displacement of the robot along the corrected first principal direction, which increases during positive scanning and decreases during negative scanning. This is the corrected first principal direction; This is the corrected second principal direction; For scanning path index; The total number of zigzag scan paths; This is the image pose index for the current path; This represents the step spacing along the corrected second principal direction.
[0026] Among them, the Starting position of the scan path for: ; in: This is the preset initial scan position.
[0027] Specifically, the complete point cloud representation of the casting to be processed is as follows: ; in: For the complete point cloud of the casting to be processed; To locate the point cloud; For the first The first scan path Point cloud acquired from each pose; For indexing the entire scan path r Union operation; To index the poses of all images within a single scan path Union operation.
[0028] Specifically, the zigzag adaptive scanning method proposed in this embodiment scans back and forth along the corrected first main direction and steps along the corrected second main direction, which can automatically adapt to the actual size of the workpiece without knowing the precise size and position of the workpiece in advance. It realizes the automatic acquisition of complete point cloud of a large range of workpieces and solves the problem of incomplete or redundant scanning when the workpiece position is offset in the traditional fixed trajectory scanning method.
[0029] S4. Complete point cloud of the casting to be processed. Perform voxel downsampling to reduce data density while preserving geometric features, resulting in a complete voxel downsampled point cloud. Based on the corrected principal direction vector, the voxel downsampled complete point cloud is filtered by direction ratio interval, retaining the point cloud within the preset ratio range, and removing the edges of the casting to be processed and the height abnormal area to obtain the filtered point cloud; the maximum connected cluster is extracted from the filtered point cloud, and discrete noise points are filtered out to obtain the main point cloud of the upper surface. RANSAC plane fitting and PCA precise plane fitting operations are performed sequentially on the main point cloud of the upper surface to obtain the true plane of the upper surface, and then the plane equation of the upper surface is constructed. Using the equation of the upper surface plane, the main point cloud of the upper surface is projected onto the real plane of the upper surface to obtain the projected plane point cloud, so that the hole boundary features in the point cloud are more stably expressed on the same reference plane.
[0030] In a specific embodiment, the voxel-downsampled upper surface point cloud is subjected to directional proportional interval filtering based on the corrected principal direction vector to obtain the filtered point cloud, as shown below: ; in: voxel downsampling complete point cloud The corrected third principal direction in the corrected principal direction vector Above, according to the proportional range Point cloud of the region retained after filtering; voxel downsampling complete point cloud In the revised third principal direction Minimum projection value on; voxel downsampling complete point cloud In the revised third principal direction The projected length on; and It is a preset ratio and satisfies ; For point In the revised third principal direction Projection value on; voxel downsampling complete point cloud Any point in it.
[0031] Specifically, the maximum connectivity cluster is extracted from the filtered point cloud to obtain the main point cloud of the upper surface. , is represented as: ; in: Extracting operators for maximum connectivity clustering; This is the clustering distance threshold, in mm, used to control the spatial connectivity range of clusters.
[0032] Specifically, RANSAC plane fitting and PCA precise plane fitting operations are sequentially performed on the main point cloud of the upper surface to obtain the true plane of the upper surface, and then the plane equation of the upper surface is constructed, including: The RANSAC algorithm is used to perform robust plane fitting on the main point cloud of the upper surface, including: randomly extracting a subset of point cloud from the main point cloud of the upper surface, generating candidate planes using the subset of point cloud, counting the distance from each point in the main point cloud of the upper surface to the candidate planes, distinguishing points in the plane from outliers based on a preset distance threshold, selecting the candidate plane with the most points in the plane after multiple iterations and using it as the coarse fitting plane, removing outliers, and obtaining the set of points in the plane after removing outliers; Performing PCA exact plane fitting on the point set in the plane includes: constructing the covariance matrix of the point set in the plane and performing eigenvalue decomposition, taking the eigenvector corresponding to the smallest eigenvalue as the normal vector of the true plane on the upper surface, and calculating the geometric centroid of the point set in the plane as the plane point position of the true plane on the upper surface. Based on the normal vector and the plane points, the equation of the upper surface plane is constructed as follows: ; in: Let be the normal vector of the true plane on the upper surface; For spatial point coordinates; For plane constants; These are the planar points on the actual plane of the upper surface; Specifically, using the equation of the upper surface plane, the point cloud of the main body of the upper surface is projected onto the real plane of the upper surface, and the resulting projected plane point cloud is represented as follows: ; in: Points in the point cloud of the projection plane; These are the points to be projected in the main point cloud of the upper surface; Normal vector The length of the module.
[0033] Specifically, this embodiment removes height anomaly regions from the upper surface point cloud by directional proportional interval filtering, extracts the main point cloud by maximum connectivity clustering, and finally projects the point cloud onto the precise plane fitted by RANSAC+PCA, so that the hole boundary features can be stably expressed on the two-dimensional plane, effectively eliminating the interference of point cloud noise and outliers on subsequent hole edge detection, and providing a reliable data foundation for the accurate extraction of hole contours.
[0034] S5. Calculate the surface normal vector of each point in the projection plane point cloud; perform boundary detection on each point in the projection plane point cloud according to the surface normal vector to determine whether the point is a boundary point; after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the hole edge point cloud; perform Euclidean clustering operation on the hole edge point cloud to segment it into several independent hole contour point clouds. In a specific embodiment, in S5, the surface normal vector of each point in the projection plane point cloud is calculated; boundary detection is performed on each point in the projection plane point cloud based on the surface normal vector to determine whether the point is a boundary point; after traversing the projection plane point cloud, all boundary points are extracted to obtain the hole edge point cloud; Euclidean clustering is performed on the hole edge point cloud to segment it into several independent hole contour point clouds, including: S51, For the current point in the projection plane point cloud , Randomly select this point k Given a neighborhood of points, find the centroid of each neighborhood point. Construct the current point neighborhood covariance matrix Perform eigenvalue decomposition on the covariance matrix and find the smallest eigenvalue. The corresponding feature vector is used as the current point Surface normal vector The formula is: ; ; in, For neighborhood point set The first in One point; S52. Perform boundary detection on each point in the projection plane point cloud according to the surface normal vector, determine whether the point is a boundary point, and after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the set of hole edge point clouds, expressed as: ; in: For the current point; The extracted point cloud set for the edges of the holes; , Points and Surface normal vector; It is the dot product of the surface normal vectors; The boundary angle threshold; It is the inverse cosine function, used to calculate the angle between the normal vectors; This is for calculating the maximum value. This is the logical "if and only if" symbol, indicating that the condition on the left is equivalent to the decision on the right. Specifically, in this embodiment, for each point in the projection plane point cloud, its neighboring points are searched, and the angle between the normal vector of the neighboring points and the normal vector of the current point is calculated. If the maximum angle exceeds a preset angle threshold, the point is determined to be a boundary point.
[0035] S53. Perform Euclidean clustering on the point cloud of the hole edge to obtain a set of several independent point clouds of hole contours, expressed as: ; in: Collect point clouds of the outlines of each hole; Euclidean clustering operator; Point cloud for the edges of the input holes; This is the clustering distance threshold; , These represent the minimum and maximum number of cluster points, respectively.
[0036] Specifically, in this embodiment, the minimum and maximum values of the number of cluster points are set according to the actual size of the hole, and clusters that are too small (noise) and too large (non-hole edge) are eliminated.
[0037] S6. The PCA algorithm is used to fit the three-dimensional plane containing the point cloud of each hole contour to project the three-dimensional hole contour point cloud onto the two-dimensional PCA plane coordinate system to obtain a two-dimensional contour point set; an ordered closed two-dimensional contour point set is obtained based on the two-dimensional contour point set; the ordered closed two-dimensional contour point set is preprocessed to obtain smoothed two-dimensional points; the smoothed two-dimensional points are inversely projected back to the three-dimensional plane to obtain the smoothed hole contour trajectory line. Specifically, the PCA algorithm is used to fit the plane containing the point cloud of each hole contour to project the three-dimensional hole contour point cloud onto the two-dimensional PCA plane coordinate system. The resulting two-dimensional contour point set is represented as follows: ; in: It is a two-dimensional contour point set; , These are the two principal directions of the PCA fitting plane; , For point exist , Projection value in the direction; Add cloud-like dots to outline the hole; Add clouds to the outline of the hole Any point in it.
[0038] In a specific embodiment, obtaining an ordered closed two-dimensional contour point set based on the two-dimensional contour point set specifically includes: Calculate the center point of the two-dimensional contour point set, where the center point is the geometric centroid of the two-dimensional contour point set; using the center point as the polar coordinate pole, obtain the offset vector of each contour point in the two-dimensional contour point set relative to the center point. The center angle corresponding to each contour point is calculated based on the offset vector. The contour points are sorted according to the value of the central angle. If they are sorted in ascending order of the central angle value, the contour points are arranged counterclockwise. If they are sorted in descending order of the central angle value, the contour points are arranged clockwise, thus obtaining an ordered closed two-dimensional contour point set.
[0039] Specifically, the ordered closed two-dimensional contour point set, arranged in ascending order of central angle values, is represented as follows:
[0040] in: It is an ordered closed two-dimensional contour point set; For the sorted number One outline point; and The first The and the first +1 central angle corresponding to the contour points; and The first Contour points coordinates and coordinate; and The center points of the two-dimensional contour point set are respectively of coordinates and coordinate; This is the arctangent function for the four quadrants, used to calculate the central angle corresponding to the contour point.
[0041] In a specific embodiment, the ordered closed two-dimensional contour point set is preprocessed to obtain smoothed two-dimensional points, including: Deduplication: For an ordered closed two-dimensional contour point set, the Euclidean distance between adjacent contour points is calculated sequentially; when the Euclidean distance between adjacent contour points is less than a preset distance threshold, it is determined that there are redundant points, any one of the adjacent contour points is retained, and the other redundant point is removed, thereby eliminating local point density unevenness and avoiding interference with subsequent smoothing effects. Equidistant resampling process: Calculate the cumulative arc length of the ordered closed two-dimensional contour, and resample the cumulative arc length at a preset arc length interval to obtain a closed contour with uniform point distribution; Periodic Gaussian smoothing: The closed contour is treated as a periodic signal. A one-dimensional Gaussian convolution kernel is used to perform convolution smoothing on the two-dimensional coordinates of the contour points in the closed contour to suppress noise at the edge of holes and local protrusions, resulting in smoothed two-dimensional points.
[0042] Specifically, the expression for periodic Gaussian smoothing is: ; ; in: The first one obtained after periodic Gaussian smoothing One outline point; The radius of the Gaussian smoothing window; These are the Gaussian smoothing parameters; These are the normalized weights of the one-dimensional Gaussian convolution kernel. This is the offset index of the Gaussian convolution kernel relative to the current point, with a value range of [ ]; For the first point in an ordered closed contour set Points, because their outlines are closed loops, are indexed. A periodic circular index is used, and when the sequence boundary is exceeded, the modulo of the total number of points is used to map to the effective index range; It is a natural exponential function; ∑ is the index variable for summation; ∑ is the summation operator.
[0043] Specifically, this embodiment addresses the accuracy requirements of hole contours in laser cutting. After projecting the three-dimensional hole contour point cloud onto a two-dimensional PCA plane, it effectively eliminates noise and local protrusions at the hole edges through steps such as central angle sorting and preprocessing. This ensures the smoothness and continuity of the contour trajectory, enabling the generated laser cutting trajectory to meet high-precision processing requirements.
[0044] S7. Extract the point cloud of the local processing area around the hole, and sequentially perform RANSAC plane fitting and PCA precise plane fitting operations on the point cloud of the local processing area around the hole to obtain the local real processing plane, and then construct the equation of the local real processing plane; using the equation of the local real processing plane, project the smoothed hole contour trajectory line point by point onto the local real processing plane to obtain the laser cutting trajectory points carrying real depth information. In a specific embodiment, the constructed local real processing plane equation is expressed as: ; in: This represents the unit normal vector of the local processing area. For spatial point coordinates; For plane constants; Let be the centroid of the set of points in the plane; This is a transpose operation; The formula for solving the laser cutting trajectory point carrying true depth information by orthogonally projecting the point onto the plane is: ; in: The points representing the trajectory of the hole outline before projection; These are the laser cutting trajectory points that carry real depth information; Normal vector The length of the module.
[0045] Specifically, in this embodiment, when multiple holes are located on the same processing surface, only one RANSAC plane fitting and PCA precise plane fitting operation is performed on the point cloud of the surface to project all hole contour trajectories onto the same plane in batches, thereby reducing the amount of computation.
[0046] Specifically, this embodiment adopts a two-stage planar fitting strategy of RANSAC coarse fitting + PCA fine fitting, which transforms the hole contour trajectory depth correction problem into a planar projection problem, ensuring that the laser focus is accurately aligned with the real spatial position of the hole edge and avoiding depth jumps caused by point cloud noise; at the same time, it supports batch projection of multiple holes, which significantly improves computational efficiency.
[0047] S8. Calculate the trajectory tangent vector of each laser cutting trajectory point, construct a local coordinate system based on the trajectory tangent vector, and solve the laser cutting head posture quaternion corresponding to each laser cutting trajectory point in the local coordinate system; process the laser cutting head posture quaternion to obtain the posture-smoothed hole cutting trajectory; perform starting point closure processing and transition trajectory generation processing based on the posture-smoothed hole cutting trajectory to finally obtain the complete laser cutting trajectory; realize the hole processing of the casting based on the complete laser cutting trajectory.
[0048] In a specific embodiment, the calculation of the first... laser cutting trajectory points The formula for calculating the tangent vector of the trajectory is: ; in: , These are the coordinates of two consecutive laser cutting trajectory points; For the first The trajectory tangential vector at each laser cutting trajectory point; Solving for the laser cutting head attitude quaternion corresponding to each laser cutting trajectory point in the local coordinate system specifically includes: ; ; ; ; in: For the first The local coordinate system at each laser cutting trajectory point Axial direction (along the normal direction); For the first Surface normal vector at each laser cutting trajectory point; For surface normal vector The modulus length; For the first The local coordinate system at each laser cutting trajectory point Axial direction (projection of the tangential vector onto the normal plane); For the first The local coordinate system at each laser cutting trajectory point Axial direction; For the first The quaternion of the laser cutting head attitude corresponding to each laser cutting trajectory point is represented as follows: Component form; For the first The rotation matrix of the laser cutting trajectory points, and the column vectors are respectively... , , Axial direction; This is the quaternion operator for rotation matrices.
[0049] Specifically, the laser cutting head's attitude quaternion is processed to obtain a smoothed hole cutting trajectory, including: The laser cutting head attitude quaternion is subjected to sign unification, median filtering, and normalization processing. The processing formula includes: ; ; ; in: and The first The and the first Quaternions obtained by unifying the symbols of laser cutting trajectory points; For the quaternion dot product, when the dot product is less than 0, Inverting ensures that adjacent quaternions have the same sign, avoiding sudden changes in attitude; The filtered first A number of quaternions; This is a median filtering operator used to take the median of each component of a quaternion within a sliding window; The radius of the sliding window; … For the first The quaternion sequence with sign uniformity within a sliding window centered on a laser cutting trajectory point is normalized to ensure that the filtered quaternion is still a unit quaternion. It is the normalized quaternion.
[0050] Specifically, this embodiment can suppress abrupt changes in the attitude of adjacent trajectory points by performing sign unification and filtering on the quaternion of the laser cutting head attitude.
[0051] Based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain the complete laser cutting trajectory, specifically including: Perform start-end closure processing on the smoothed hole cutting trajectory: Interpolation smooths the position and attitude between the starting and ending points of the trajectory to eliminate jumps in the position and attitude of the beginning and end, forming a continuous closed contour of a single hole. The transition trajectory generation process is performed on the cutting trajectory of each hole after the closure process. The processing formula is as follows: ; in: For the first The lifting transition point after the hole cutting is completed; For the first The endpoint of the cutting trajectory of the hole; To ensure a safe lifting height (in mm), the laser cutting head should be raised to avoid collisions with the casting during the transfer process. For the first The surface normal vector at the end of each hole.
[0052] Specifically, from the lifting transition point to the first The starting point of each hole is planned to move along a path, thereby generating a transition trajectory between holes.
[0053] The final complete laser cutting trajectory is represented as follows: ; in: For the complete laser cutting trajectory; This is the initial approach trajectory, used to move the robot from its initial position to the starting point of the first hole cutting; For the first The cutting trajectory of each hole ; For the first The hole to the first The transition trajectory of each hole; This represents the total number of holes; To return to the trajectory, the robot returns to a safe position after the laser cutting is completed.
[0054] Specifically, this embodiment performs smooth closure processing on the starting and ending points of the hole cutting trajectory to ensure seamless connection between the beginning and end; a transition trajectory is generated between different holes to ensure that the robot is raised to a safe height before moving to the next hole cutting starting point.
[0055] Specifically, this embodiment integrates the calculation of the tangential direction of the hole contour, the construction of the local coordinate system with normal constraints, the quaternion sign uniformity, the sliding window midpoint filtering, and the generation of transition trajectories between holes into a complete laser cutting trajectory generation process. Quaternion filtering effectively suppresses the attitude change between adjacent trajectory points, and the lifting transition points between holes ensure the safe and smooth transfer of the laser cutting head between different holes.
[0056] In this embodiment, after obtaining the independent cutting trajectory corresponding to each hole, all holes are sorted according to the centroid position of each hole to obtain the hole cutting sequence, including: The axes are sorted according to the two-dimensional coordinates of the center of gravity, prioritizing sorting by the magnitude of the horizontal coordinate of the center of gravity. If the difference in the horizontal coordinates is less than a preset tolerance threshold, then sorting is performed by the magnitude of the vertical coordinate of the center of gravity; or... A laser head processing starting reference point is set, and the Euclidean distance from the centroid of each hole to the processing starting reference point is calculated. The holes are then sorted in ascending order of Euclidean distance. The order of the holes is determined by the sorting, thus obtaining the hole cutting processing sequence and achieving a reasonable planning of the laser cutting processing sequence.
[0057] Specifically, in this embodiment, the cutting trajectories of each hole are arranged according to the hole cutting sequence, and an infeed point and a retraction point are generated for each hole's cutting trajectory to obtain a complete laser cutting trajectory. Based on the coordinates and attitude quaternions of the trajectory points in the complete laser cutting trajectory, a target point definition file is generated according to the robot target point format. Laser cutting process parameters are set, and finally, a robot path execution file is generated and sent to the robot controller for execution. The robot target point formula is: ; in: For the first complete laser cutting trajectory after arrangement The sequence of robot target points is arranged according to the aforementioned hole cutting and processing order; , , For the first The three-dimensional coordinates of the laser cutting trajectory points in the robot's base coordinate system, in mm; , , , For the first The four components of the tool posture quaternion corresponding to each laser cutting trajectory point; For the first Robot configuration parameters for each laser cutting trajectory point, including axis configuration flags ( , , , This is used to determine the axis configuration selection when solving the robot's inverse kinematics. Specifically, taking a large casting with multiple holes as an example, after the workpiece is clamped, its position and angle have certain uncertainties. The robot moves to two preset initial scanning poses to collect positioning point clouds. After downsampling and hand-eye calibration coordinate transformation, the positioning point clouds are stitched together, and PCA is used to calculate the three principal directions of the workpiece. The robot is controlled to perform a zigzag adaptive scan along the first principal direction. After detecting the edge of the workpiece in the forward scan, it steps a preset width along the second principal direction and then scans in the reverse direction. The above scanning process is repeated to stitch together the complete point cloud of the casting to be processed. The robot is controlled to collect the fine point cloud of the upper surface of the casting to be processed. The height abnormal region is removed by directional proportional interval filtering, and the maximum connected cluster is extracted to obtain the main point cloud of the upper surface. RANSAC+PCA is used to fit the upper surface plane, and the point cloud is projected onto the upper surface plane. Normal vector estimation and boundary detection are performed on the projection plane point cloud to extract the hole edge point cloud. Euclidean clustering is used to segment different holes into independent hole contour point clouds. PCA plane projection, central angle sorting, equidistant resampling, and periodic Gaussian smoothing are sequentially applied to each hole contour to generate a smooth contour trajectory. RANSAC+PCA is used to fit the local real processing plane corresponding to the hole, and the contour trajectory lines are projected onto the local real processing plane to obtain the true depth. The laser cutting head posture quaternions corresponding to each laser cutting trajectory point are solved to generate the cutting trajectory of each hole and the transition trajectory between holes. An executable file for the robot is output, completing the automated laser cutting of large castings with multiple holes.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive method for generating laser cutting trajectories for holes in large castings, characterized in that, include: S1. Under multiple preset initial scanning poses, acquire the original point cloud of several castings to be processed, preprocess the original point cloud to obtain the positioning point cloud for main direction calculation. S2. Based on the covariance matrix of the location point cloud computing, perform eigenvalue decomposition on the covariance matrix to obtain three principal direction vectors; perform order correction and positive and negative direction unification on the three principal direction vectors to obtain the corrected principal direction vectors. S3. Calculate the camera's dynamic shooting posture based on the corrected main direction vector; The robot is controlled to take pictures dynamically using the camera. Starting from the preset initial scanning position, it scans the surface of the casting to be processed according to the zigzag scanning strategy, and collects positive scanning point clouds and negative scanning point clouds. The positive scanning point clouds, negative scanning point clouds and positioning point clouds in S1 are all converted to the robot's base coordinate system and stitched together according to the execution order of the initial scan to obtain the complete point cloud of the casting to be processed. S4. Perform voxel downsampling on the complete point cloud of the casting to be processed to obtain a voxel downsampled complete point cloud; perform directional proportional interval filtering on the voxel downsampled complete point cloud based on the corrected principal direction vector to obtain a filtered point cloud; extract maximum connected clustering from the filtered point cloud to obtain the main point cloud of the upper surface; sequentially perform RANSAC plane fitting and PCA exact plane fitting on the main point cloud of the upper surface to obtain the true plane of the upper surface, and then construct the upper surface plane equation; use the upper surface plane equation to project the main point cloud of the upper surface onto the true plane of the upper surface to obtain the projected plane point cloud; S5. Calculate the surface normal vector of each point in the projection plane point cloud; perform boundary detection on each point in the projection plane point cloud according to the surface normal vector to determine whether the point is a boundary point; after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the hole edge point cloud; perform Euclidean clustering operation on the hole edge point cloud to segment it into several independent hole contour point clouds. S6. Fit the three-dimensional plane containing the point cloud of each hole contour to obtain a two-dimensional contour point set; obtain an ordered closed two-dimensional contour point set based on the two-dimensional contour point set; preprocess the ordered closed two-dimensional contour point set to obtain smoothed two-dimensional points; back-project the smoothed two-dimensional points back to the three-dimensional plane to obtain the smoothed hole contour trajectory line. S7. Extract the point cloud of the local processing area around the hole, and sequentially perform RANSAC plane fitting and PCA precise plane fitting operations on the point cloud of the local processing area around the hole to obtain the local real processing plane, and then construct the equation of the local real processing plane; using the equation of the local real processing plane, project the smoothed hole contour trajectory line point by point onto the local real processing plane to obtain the laser cutting trajectory points carrying real depth information. S8. Calculate the trajectory tangent vector of each laser cutting trajectory point, construct a local coordinate system based on the trajectory tangent vector, and solve the laser cutting head attitude quaternion corresponding to each laser cutting trajectory point in the local coordinate system; process the laser cutting head attitude quaternion to obtain the hole cutting trajectory after attitude smoothing. Based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain the complete laser cutting trajectory. The complete laser cutting trajectory is used to process holes in castings.
2. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 1, characterized in that, In S2, based on the covariance matrix of the cloud computing at the positioning point, the covariance matrix is decomposed into eigenvalues to obtain three principal direction vectors; The three principal direction vectors are corrected in order and their positive and negative directions are unified to obtain the corrected principal direction vectors, specifically including: S21. Based on the location point cloud computing, the centroid of the point cloud is located using the following formula: ; in, To locate the centroid of the point cloud; For positioning point clouds The Middle One point; For positioning point clouds The number of points included; S22. Calculate the covariance matrix based on the centroid of the point cloud. The calculation formula is as follows: ; in, This is the covariance matrix corresponding to the localized point cloud; S23, regarding the covariance matrix Eigenvalue decomposition yields a set of original principal direction vectors, containing three original principal direction vectors, satisfying the following equation: ; in, For the first One original principal direction vector; For the first The eigenvalues corresponding to the original principal direction vectors; S24. According to the preset main direction order correction rule, the three original main direction vectors output by S23 are sequentially corrected to obtain the sequentially corrected main direction vector group. The specific rules for correcting the main direction order are as follows: From the three original principal direction vectors, the original principal direction vector with the largest absolute value of the Y-axis component in the robot base coordinate system is selected as the first candidate direction after sequential correction; the original principal direction vector with the largest absolute value of the X-axis component in the robot base coordinate system is selected as the second candidate direction after sequential correction; and the original principal direction vector with the largest absolute value of the Z-axis component in the robot base coordinate system is selected as the third candidate direction after sequential correction. S25. Combining the constraints of the robot's photographing posture and processing posture, the positive and negative directions of the sequentially corrected main direction vector group are unified, so that the first, second, and third main directions obtained after processing have stable physical meanings, and the corrected main direction vector is obtained. The corrected principal direction vector includes the corrected first principal direction. Second main direction and the third main direction , respectively represented as: ; in, , , These are the first, second, and third candidate directions after sequential correction; , , This is the positive and negative direction correction factor, with a value of 1 or -1.
3. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 2, characterized in that, The zigzag scanning strategy includes: controlling the robot to move a preset step length in the positive direction along the corrected first main direction and continuously collecting point clouds, and detecting in real time whether the robot has reached the positive boundary of the casting to be processed in the first main direction; when the positive boundary of the first main direction is detected, controlling the robot to step a preset width in the corrected second main direction to switch the movement direction, controlling the robot to move a preset step length in the negative direction along the corrected first main direction and continuously collecting point clouds, until the negative boundary of the casting to be processed in the first main direction is detected; repeating the above scanning process until a zigzag scanning path that completely covers the entire surface of the casting to be processed is generated.
4. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 3, characterized in that, The formula for calculating the camera's dynamic shooting posture based on the corrected principal direction vector is as follows: , ; in: For the first The first scan path Dynamic shooting posture of the camera; For the first The starting position of the scan path; This represents the displacement of the robot along the corrected first principal direction; This is the corrected first principal direction; This is the corrected second principal direction; For scanning path index; The total number of zigzag scan paths; This is the image pose index for the current path; The step spacing is along the corrected second principal direction; Among them, the Starting position of the scan path for: ; in: This is the preset initial scan position.
5. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 4, characterized in that, Based on the corrected principal direction vector, the voxel downsampled upper surface point cloud is subjected to directional proportional interval filtering to obtain the filtered point cloud, represented as: ; in: voxel downsampling complete point cloud The corrected third principal direction in the corrected principal direction vector Above, according to the proportional range Point cloud of the region retained after filtering; voxel downsampling complete point cloud In the revised third principal direction Minimum projection value on; voxel downsampling complete point cloud In the revised third principal direction The projected length on; and It is a preset ratio and satisfies ; For point In the revised third principal direction Projection value on; voxel downsampling complete point cloud Any point in it.
6. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 5, characterized in that, In S5, the surface normal vector of each point in the projection plane point cloud is calculated; the boundary detection of each point in the projection plane point cloud is performed according to the surface normal vector to determine whether the point is a boundary point; after completing the traversal of the projection plane point cloud, all boundary points are extracted to obtain the hole edge point cloud. Perform Euclidean clustering on the point cloud of the hole edge to segment it into several independent point clouds of hole contours, including: S51, For the current point in the projection plane point cloud , Randomly select this point k Given a neighborhood of points, find the centroid of each neighborhood point. Construct the current point neighborhood covariance matrix Perform eigenvalue decomposition on the covariance matrix and find the smallest eigenvalue. The corresponding feature vector is used as the current point Surface normal vector The formula is: ; ; in, For neighborhood point set The first in One point; S52. Perform boundary detection on each point in the projection plane point cloud according to the surface normal vector, determine whether the point is a boundary point, and after completing the traversal of the projection plane point cloud, extract all boundary points to obtain the set of hole edge point clouds, expressed as: ; in: For the current point; The extracted point cloud set for the edges of the holes; , Points and Surface normal vector; It is the dot product of the surface normal vectors; The boundary angle threshold; It is the inverse cosine function, used to calculate the angle between the normal vectors; This is for calculating the maximum value. It is the logical "if and only if" symbol; S53. Perform Euclidean clustering on the point cloud of the hole edge to obtain a set of several independent point clouds of hole contours, expressed as: ; in: Collect point clouds of the outlines of each hole; Euclidean clustering operator; Point cloud for the edges of the input holes; This is the clustering distance threshold; , These represent the minimum and maximum number of cluster points, respectively.
7. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 6, characterized in that, Based on the aforementioned two-dimensional contour point set, an ordered closed two-dimensional contour point set is obtained, specifically including: Calculate the center point of the two-dimensional contour point set, where the center point is the geometric centroid of the two-dimensional contour point set; using the center point as the polar coordinate pole, obtain the offset vector of each contour point in the two-dimensional contour point set relative to the center point. The center angle corresponding to each contour point is calculated based on the offset vector. The contour points are sorted according to the value of the central angle. If they are sorted in ascending order of the central angle value, the contour points are arranged counterclockwise. If they are sorted in descending order of the central angle value, the contour points are arranged clockwise, thus obtaining an ordered closed two-dimensional contour point set.
8. The adaptive generation method for laser cutting trajectory of holes in large castings according to claim 7, characterized in that, The laser cutting head's attitude quaternion is processed to obtain the hole cutting trajectory after attitude smoothing; Based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain the complete laser cutting trajectory, including: The laser cutting head attitude quaternion is subjected to sign unification, median filtering, and normalization processing. The processing formula includes: ; ; ; in: and The first The and the first Quaternions obtained by unifying the symbols of laser cutting trajectory points; It is the dot product of quaternions; The filtered first A number of quaternions; This is the median filtering operator; The radius of the sliding window; … For the first A sequence of quaternions with consistent sign within a sliding window centered on a laser cutting trajectory point; The normalized quaternion; Based on the smoothed hole cutting trajectory, starting point closure processing and transition trajectory generation processing are performed to finally obtain the complete laser cutting trajectory, specifically including: Perform start-end closure processing on the smoothed hole cutting trajectory: Interpolation smooths the position and attitude between the starting and ending points of the trajectory to eliminate jumps in the position and attitude of the beginning and end, forming a continuous closed contour of a single hole. The transition trajectory generation process is performed on the cutting trajectory of each hole after the closure process. The processing formula is as follows: ; in: For the first The lifting transition point after the hole cutting is completed; For the first The endpoint of the cutting trajectory of the hole; For safety reasons, the lifting height is measured in mm. For the first The surface normal vector at the endpoint of each hole; From the lifting transition point to the first The starting point of each hole is planned to create a moving path, thereby generating a transition trajectory between holes; The final complete laser cutting trajectory is represented as follows: ; in: For the complete laser cutting trajectory; This is the initial approach trajectory, used to move the robot from its initial position to the starting point of the first hole cutting; For the first The cutting trajectory of each hole ; For the first The hole to the first The transition trajectory of each hole; This represents the total number of holes; To return the trajectory.