A 3D vision-based mold line robot polishing method and system for castings

CN122539348APending Publication Date: 2026-08-11HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-11
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请通过提供一种基于3D视觉的铸造件合模线机器人打磨方法及系统,以解决现有技术中在铸造件表面存在毛刺、氧化皮及局部几何扰动条件下,飞边脊线识别不稳定、打磨轨迹难以准确生成的问题;从而在复杂铸造件表面扰动条件下稳定提取合模线目标脊线并生成高精度打磨轨迹,完成高精度打磨执行

Benefits of technology

1.通过对点云数据进行分层切片、径向距离分析、峰值幅值判别及跨截面空间连续性匹配,直接提取合模线的连续空间脊线,并以此作为轨迹生成依据获得高精度打磨轨迹。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122539348A_ABST
    Figure CN122539348A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on 3D vision's casting part parting line robot polishing method and system in the field of intelligent manufacturing technology.The method obtains parting line candidate area by layering slice, radial distance analysis to three-dimensional point cloud data;Extract initial contour point set to generate guide curve and construct multiple radial search section, extract two-dimensional section point set in neighborhood;By radial extreme value screening, peak amplitude discrimination and local connectivity clustering analysis, obtain the main feature point of flash;Space continuity matching and continuity segment number statistics are carried out to the main feature point of flash in adjacent radial search section, and continuous spatial ridge line point is generated;Polishing trajectory is generated based on continuous spatial ridge line point.The method can extract parting line target ridge line and generate high-precision polishing trajectory under the condition of complex casting surface disturbance, complete high-precision polishing execution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing technology for industrial robots, and in particular to a robotic grinding method and system for casting part parting line based on 3D vision. This technology is mainly applied to the automatic identification and grinding of parting lines in casting products, and can be widely used in precision machining fields such as automotive parts, aerospace, and machinery manufacturing. Background Technology

[0002] Casting technology is widely used in machinery manufacturing, automotive parts, engineering equipment, and energy equipment. During the casting process, due to the presence of the parting surface, parting lines and flash are usually formed on the outer surface of the casting. If these flashes are not removed, they will affect the appearance quality, assembly accuracy, and subsequent performance of the product. Therefore, the parting line area usually needs to be ground in the post-processing of castings.

[0003] Currently, the main methods for removing parting lines in castings include manual grinding and robotic teaching grinding. Manual grinding suffers from high labor intensity, poor working environment, low processing consistency, and high safety risks. Robotic teaching grinding usually relies on preset trajectories or offline programming, which makes it difficult to adapt to dimensional deviations, thermal deformation, and clamping errors between batches of castings, and is prone to missed grinding or over-grinding.

[0004] With the development of 3D vision technology, acquiring point cloud data of casting surfaces and identifying areas to be processed through 3D scanning has become an important technical direction for automated grinding. Current technologies often employ edge detection, curvature analysis, or comparison with theoretical models to identify the parting line area. However, actual casting surfaces often contain burrs, oxide scale, local roughness fluctuations, and shrinkage cavities, making identification results based on local curvature or edge features easily susceptible to interference. This leads to unstable extraction of the true ridge line of the flash, thus affecting the accuracy of the robot's grinding trajectory generation. Summary of the Invention

[0005] This application provides a 3D vision-based robotic grinding method and system for casting mold line, which solves the problems in the prior art where the identification of flash ridges is unstable and the grinding trajectory is difficult to generate accurately under the conditions of burrs, oxide scale and local geometric disturbances on the surface of castings; thereby stably extracting the target ridge of the mold line and generating a high-precision grinding trajectory under the condition of surface disturbance of complex castings, and completing the high-precision grinding execution.

[0006] This application provides a 3D vision-based robotic grinding method for casting mold lines, comprising the following steps: S1: Acquire 3D point cloud data of the casting surface and preprocess it to obtain the main body point cloud data of the workpiece. ; S2: Transfer point cloud data Map the data to the workpiece coordinate system and filter it to obtain point cloud data. ; S3: Point cloud data along the axis Perform layered slicing, extract radial outer boundary points in each layered slice, and determine candidate regions for the mold parting line of the casting based on the abrupt change characteristics of the radial distance between adjacent boundary points; S4: Extract an initial contour point set within the candidate region of the mold parting line, fit and generate a guide curve along the direction of the mold parting line, construct multiple radial search sections along the normal of the guide curve, and extract point cloud data located in the neighborhood of the section to form the corresponding two-dimensional section point set. S5: Within the two-dimensional cross-section point set corresponding to each radial search cross-section, radial extreme value screening, peak amplitude discrimination, and local connectivity clustering analysis are performed sequentially to obtain the main feature points of the fly-edge. S6: Perform spatial continuity matching and continuous segment count on the main feature points of the flash in adjacent radial search sections, eliminate isolated interference points, and generate continuous spatial ridge points; S7: Generate a grinding trajectory based on the continuous spatial ridge points, and control the robot to perform grinding of the casting part along the grinding trajectory.

[0007] The beneficial effects of the above embodiments are as follows: This method improves upon the complete process of "point cloud processing - layered slicing - candidate region identification - radial section construction - continuous ridge extraction - grinding trajectory generation", which can stably extract the target ridge of the mold parting line and generate a high-precision grinding trajectory under the surface disturbance conditions of complex castings, thus completing the high-precision grinding execution.

[0008] Based on the above embodiments, this application can be further improved as follows: In one embodiment of this application, the preprocessing in S1 includes: The raw point cloud acquired by the 3D camera is subjected to denoising, filtering, and downsampling. Based on the spatial distribution characteristics of the point cloud, non-workpiece areas are eliminated, and only the point cloud of the main workpiece is retained.

[0009] In one embodiment of this application, the process of constructing the workpiece coordinate system in S2 includes: Calculate the geometric centroid of the workpiece's main point cloud in the acquisition coordinate system and use it as the origin of the workpiece coordinate system; A covariance matrix is ​​constructed based on the decentralized point cloud data, and its features are decomposed. The eigenvector corresponding to the largest eigenvalue is selected as the main direction of the workpiece. By combining the eigenvectors corresponding to the second largest eigenvalues ​​and the right-hand rule, a complete workpiece coordinate system is established.

[0010] Beneficial effects: By constructing a workpiece coordinate system through geometric centroid positioning and covariance matrix eigenvalue decomposition, it can adaptively match castings with arbitrary orientations, eliminate the influence of workpiece clamping deviations and placement angle errors on subsequent point cloud analysis, provide a unified coordinate reference for subsequent layer slicing and radial distance calculation, and improve the consistency and accuracy of mold parting line positioning.

[0011] In one embodiment of this application, the screening process in S2 includes: Calculation based on point cloud normal vectors unit vector along the workpiece coordinate system axis The included angle ; when If the point is in the sidewall machining area, it is determined to be retained; otherwise, it is determined to be the top or bottom surface area of ​​the workpiece and is discarded. Based on the spatial distribution range of points in the radial direction of the workpiece coordinate system, internal cavity areas and background interference areas are eliminated; Perform connectivity filtering on the remaining point cloud to remove discrete small clusters and obtain continuous and complete point cloud data of the main body of the workpiece. .

[0012] Beneficial effects: Through a three-level filtering mechanism of normal vector angle filtering, radial range filtering, and connected region filtering, the top surface, bottom surface, internal cavity, background interference and discrete noise points of the workpiece can be accurately removed, and only the effective point cloud of the side wall processing area can be retained, which greatly reduces the amount of data for subsequent processing. At the same time, it eliminates the interference of irrelevant regional features on the identification of the mold line, and improves the processing efficiency and the targeting of feature extraction.

[0013] In one embodiment of this application, the process of obtaining the candidate region of the parting line of the casting in S3 includes: S3.1: Slice the workpiece main body point cloud into layers along the workpiece coordinate system axis according to the preset slice spacing. The point set of the f-th layer slice is represented as... ;in, ; The minimum Z-coordinate of the point cloud. F represents the total number of slice layers. Indicates the axial slice layer spacing; Project each slice point onto the current cross-sectional plane to obtain the two-dimensional boundary distribution characteristics of the current cross-section; S3.2: Within the current cross-sectional plane, establish a polar coordinate system with the origin of the workpiece coordinate system as the reference center, and set the coordinates according to the preset angle step size. Divide the angle into G consecutive angle intervals, where the g-th angle interval is... );in, , ; Calculate the radial distance from the origin of the polar coordinate system to each point within each angle interval; Within each angular interval, the point with the largest radial distance is selected as the candidate outer boundary point in that direction; Arrange all candidate outer boundary points in angular order to form the current slice boundary point set; S3.3: Calculate the radial variation between adjacent boundary points in the current slice. ; in, Indicates the first radial distance between boundary points Indicates the radial distance between adjacent boundary points; When the following conditions are met: When this happens, the corresponding region is identified as a geometric abrupt change region; in, Radial variation threshold: ;in, Represents all radial variations in the current slice layer. The average value, Represents all radial variations in the current slice layer. standard deviation This is the proportionality coefficient; S3.4: Merge multiple consecutive geometric abrupt change regions that meet the conditions, and determine the candidate region for the mold line by combining the axial continuity distribution in adjacent slices.

[0014] Beneficial effects: By using axial layering and slicing, polar coordinate radial boundary extraction, adaptive radial mutation threshold determination, and multi-slice continuous region merging, the candidate region of the mold parting line can be quickly located based solely on the geometric features of the point cloud itself, without relying on theoretical numerical model comparison. This avoids matching errors caused by batch size deviations and thermal deformation of castings. At the same time, the adaptive threshold can be adapted to workpieces with different surface roughness and different sizes, improving the robustness of candidate region recognition.

[0015] In one embodiment of this application, the method for obtaining the initial contour point set in step S4 includes: Within the candidate region of the mold line, a point with a radial local maximum value is selected as the initial seed point; Centered on the initial seed point, within its neighborhood, according to Euclidean distance... Angle with normal Double constraint filtering of expansion points; where, Indicates the coordinates of the current seed point. Indicates the coordinates of candidate points in the neighborhood. and These represent the normal vectors of the corresponding points; When the following conditions are met: and At that time, it was incorporated into the fly-edge point cluster; among them, This indicates a preset neighborhood distance threshold. Indicates the threshold of normal continuity; Extract the boundary point sequence from the formed fly edge point cluster to form the initial contour point set.

[0016] Beneficial effects: By using the radial local maximum point as the initial seed point and combining the dual constraints of Euclidean distance and normal angle to expand the flash point cluster, the geometrically continuous flash contour can be accurately extracted within the candidate region, filtering out local discrete noise points and ensuring that the initial contour point set can accurately reflect the overall direction of the mold line, providing a reliable foundation for subsequent guided curve fitting.

[0017] In one embodiment of this application, S4 specifically refers to: A guide curve is fitted based on the initial contour point set and distributed along the mold line. Follow the guide curve in a preset step size Perform discrete sampling to obtain multiple center nodes. ; Construct a radial search section at each center node, with its normal direction... Tangent vector of the guiding curve at that point Vertical, that is, satisfying ;in, This represents the tangential vector of the guiding curve at the u-th center node. Indicates the normal direction of the radial search section; Point cloud data located in the neighborhood of the radial search section are extracted to form the corresponding two-dimensional cross-section point set.

[0018] Beneficial effects: Based on the initial contour fitting guide curve, a radial search section perpendicular to the mold parting line is constructed along the curve normal, which can realize the vertical section sampling of flash features, so that the direction of subsequent section analysis is strictly matched with the direction of flash ridge, avoiding the distortion of flash height features caused by section tilt, and improving the accuracy of flash feature extraction.

[0019] In one embodiment of this application, the process of obtaining the main feature points of the burr in S5 includes: S5.1: For each radial search section, establish a height distribution sequence along the normal direction for the set of two-dimensional cross-section points. Detect peak points that satisfy the local maximum condition, when: When this occurs, the corresponding point is determined to be a local peak point; where, This represents the height value of the k-th point within the j-th radial search section along the normal direction of the section, where j represents the radial search section number and k represents the point number within the current section; S5.2: Select the highest peak within the current cross-section. and the second peak Calculate the height difference ; S5.3: If Then determine the highest peak. If the point is a key feature of the burr, it is considered a burr and should be removed. Indicates the peak amplitude threshold; S5.4: Perform local connectivity clustering analysis on the retained main feature points of the fly edge, and calculate the Euclidean distance between any two candidate points within the current cross section. ,in, , Indicates the coordinates of the candidate point; When the following conditions are met: When, the corresponding points are divided into the same locally connected region; where, Indicates the clustering distance threshold; Connected regions with more than a threshold output points are used as the main feature point set of the flyedge.

[0020] Beneficial effects: Through a three-level verification mechanism of radial local extremum screening, peak amplitude discrimination, and local connectivity clustering, the main features of the flash edge can be effectively distinguished from surface burrs and local unevenness disturbances. Only flash edge main feature points with sufficient amplitude and connectivity are retained, which greatly reduces the interference of local surface defects on feature recognition and improves the accuracy of flash edge feature extraction.

[0021] In one embodiment of this application, the process of generating continuous spatial ridge points in S6 includes: Sequential matching of the main feature points of the flash in adjacent radial search sections is performed, and the spatial Euclidean distance between them is calculated. ;in, This represents the coordinates of the main feature point of the flash in the j-th radial search section. This represents the coordinates of the corresponding flash feature point in the (j+1)th radial search section. Denotes the Euclidean norm; like If , then the two points are determined to satisfy spatial continuity; where, Indicates the threshold for continuous distance between cross sections; Calculate the logarithm of all continuous cross sections that meet the conditions. Where M represents the total number of cross-sections, Indicates an indicator function; When the following conditions are met: When the corresponding continuous point set is defined as the ridge point of the continuous space, then, This represents the threshold for the number of continuous cross sections.

[0022] Beneficial effects: By matching the spatial distance between adjacent cross-sectional feature points and counting the number of continuous segments, isolated abnormal peak points can be eliminated, and only spatial ridge points continuously distributed along the parting line can be retained. This further strengthens the global spatial continuity constraint of the parting line, ensures that the extracted ridges conform to the physical characteristics of the parting line being continuously distributed along the parting surface, and improves the reliability of ridge extraction.

[0023] In one embodiment of this application, the grinding trajectory generation process in S7 includes: Taking the ridge point in continuous space as the center path, along the surface normal vector corresponding to the ridge point... Multiple parallel trajectories are generated by offsetting to both sides. The i-th offset trajectory point on the w-th offset path is represented as: ; in, Let i be the coordinates of the i-th continuous spatial ridge point. This represents the unit normal vector of the corresponding workpiece surface. ; The formula for representing the distance between adjacent paths is: Where D represents the diameter of the grinding head. Indicates the path overlap rate; The offset trajectory points are transformed from the workpiece coordinate system to the robot base coordinate system, and the end-effector attitude matrix is ​​constructed based on the preset tool coordinate system so that the tool spindle is aligned with the surface normal. The trajectory points are projected onto the actual surface of the workpiece, and smoothing and accessibility checks are performed to generate the grinding trajectory.

[0024] Beneficial effects: By generating multiple parallel grinding trajectories through ridge point normal offset, combined with path overlap rate control, coordinate system transformation, posture matching, smoothing processing and accessibility verification, a high-precision grinding trajectory adapted to the robot's motion characteristics can be generated, ensuring that the grinding area completely covers the flash width, while avoiding over-grinding and under-grinding, thus improving the consistency and surface quality of grinding processing.

[0025] This application also provides a 3D vision-based robotic grinding system for casting mold parting lines, including: 3D vision acquisition module: used to acquire 3D point cloud data of the surface of the casting; Point cloud processing module: used to construct the workpiece coordinate system and identify candidate regions for the mold parting line; Section Analysis Module: Used to generate radial search sections and extract the main feature points of the flash; Ridge extraction module: used to extract continuous spatial ridge points through spatial continuity matching and continuous segment count statistics; Trajectory generation module: used to generate robot grinding trajectory based on continuous spatial ridge points; Robot execution module: Used to control the robotic arm to complete the grinding operation.

[0026] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. By performing layered slicing, radial distance analysis, peak amplitude discrimination, and cross-sectional spatial continuity matching on point cloud data, the continuous spatial ridge line of the mold line is directly extracted, and this is used as the basis for trajectory generation to obtain a high-precision grinding trajectory.

[0027] 2. Based on the spatial coordinates of three-dimensional point clouds and global continuity constraints, a multi-level constraint recognition mechanism with inherent logical connections is constructed. Through radial extreme value screening, peak amplitude discrimination, local connectivity clustering analysis, and cross-section continuity verification, the judgment is improved from local point judgment to spatial structure judgment. Attached Figure Description

[0028] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below.

[0029] Figure 1 This is a flowchart illustrating the steps of a 3D vision-based robotic grinding method for casting mold lines in an embodiment of this application. Detailed Implementation

[0030] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading the present invention, any modifications of the present invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.

[0031] Example 1: like Figure 1 As shown, a robotic grinding method for casting mold lines based on 3D vision includes the following steps: S1: Use a structured light 3D camera to acquire 3D point cloud data of the casting surface, and preprocess the acquired point cloud data to obtain the main body point cloud data of the workpiece. ; Step S1 specifically includes the following process: S1.1: Using a structured light 3D camera (Eye-in-hand mode) installed on the robot's end effector, the casting to be polished is automatically acquired from multiple perspectives. S1.2: During data acquisition, denoising preprocessing and dynamic real-time stitching of single-frame point clouds are performed simultaneously to ultimately construct a global stitched point cloud including the environmental background. Specifically, it includes: S1.2.1: Statistical outlier removal is performed on the collected single-frame point cloud data. Sparse noise is removed by calculating the average neighborhood distance, and local high-density noise is further removed by radius filtering. In the downsampling stage, the point cloud space is divided into a uniform voxel grid. The geometric centroid is calculated for the point set in each non-empty voxel and only the centroid point is retained, so as to maintain the overall contour features of the workpiece while significantly reducing the amount of data. S1.2.2: Using the pre-completed hand-eye calibration results, the point cloud is transformed from the camera coordinate system to the robot base coordinate system to achieve spatial unification of multi-frame data, as detailed below: S1.2.2.1: Read the robot's joint encoder data at the current frame acquisition time, and obtain the transformation matrix of the robot's end flange coordinate system relative to the base coordinate system through forward kinematics calculation. ; S1.2.2.2: Load the fixed transformation matrix of the camera relative to the end flange obtained from hand-eye calibration. ; S1.2.2.3: Construct the total transformation matrix from the camera coordinate system to the robot base coordinate system. ; S1.2.2.4: Perform coordinate transformation on each point in the preprocessed single-frame point cloud: ; All the transformed points constitute the point cloud in the robot coordinate system for the current frame. ,in, Indicates the first Point cloud points, Coordinate components, This represents the point number, and N is the total number of points in the point cloud.

[0032] The above hand-eye calibration results were obtained through the following methods: The "eye-in-hand" calibration method is adopted, in which the 3D camera is fixedly mounted on the flange at the end of the robotic arm, and a circular calibration plate with calibration dot matrix is ​​used. By acquiring calibration images in multiple poses using a robotic arm and combining them with the robot's end-effector pose information in each pose, the Tsai-Lenz algorithm is used to solve for the transformation matrix from the camera coordinate system to the robotic arm's end-effector flange coordinate system. .

[0033] S1.3: Spatial range filtering based on the Z-axis direction of the robot base coordinate system, from the global stitched point cloud. Remove background areas and desktop interference point clouds that are irrelevant to the workpiece; specifically including: S1.3.1: Based on the estimated placement height of the workpiece in the robot base coordinate system, set the effective range threshold in the Z-axis direction. ; S1.3.2: Traverse the global point cloud For each point in the array, retain the Z-coordinate that satisfies For points, remove point cloud data whose Z coordinates are out of range; S1.3.3: The final point cloud data containing only the main body information of the workpiece is denoted as the main body point cloud of the workpiece. And use it as input for the subsequent step S2.

[0034] S2: Transfer point cloud data Map the data to the workpiece coordinate system and filter out irrelevant point clouds to obtain point cloud data. ; Step S2 is to eliminate casting placement errors and establish a unified workpiece coordinate system. The point cloud data is mapped to the workpiece coordinate system, and further filtered to remove irrelevant point clouds, thus obtaining the main body point cloud data of the workpiece. The specific process includes: S2.1: Calculation geometric centroid As the origin of the coordinate system: ; Constructing a covariance matrix based on decentralized point cloud data Eigenvalues ​​are obtained by performing eigenvalue decomposition on COV. and the corresponding feature vectors , , Select the largest eigenvalue corresponding feature vector As the principal direction of the workpiece (i.e., the workpiece coordinate system) ), second largest eigenvalue corresponding vector As axis; Based on the right-hand rule, the cross product of vectors is used for calculation. Direction vector of the axis Thus constructing an orthogonal rotation matrix. Combining the origin With rotation matrix Establish a complete workpiece coordinate system ; S2.2: Map all point cloud data to the workpiece coordinate system : ; S2.3: Further filter the point cloud of the workpiece body to focus on the processing area. Specific implementation methods include: S2.3.1: Calculate the normal vector of the i-th point in the point cloud. unit vector along the workpiece coordinate system axis (Right now Angle between directions ; Set angle threshold range , and Parameters set for pre-calibration or experience: when When the point is determined to be within the sidewall processing area, it is retained; when If the workpiece is outside this range, it is considered to be the top or bottom surface area and will be rejected. S2.3.2: Statistically determine the spatial distribution range of the remaining points in the radial direction (XY plane) of the workpiece coordinate system; based on the workpiece design dimensions, eliminate invalid points located in the internal cavity area (radius too small) and the external background interference area (radius too large); S2.3.3: Perform Euclidean clustering on the point cloud that has been filtered as described above; identify and retain the largest connected cluster with the most points and the best spatial continuity, and remove discrete small clusters formed by residual noise, to obtain a continuous, complete point cloud of the workpiece body containing only effective sidewall features. .

[0035] S3: Point cloud data along the axis Perform layered slicing, extract radial outer boundary points in each layered slice, and determine candidate regions for the mold parting line of the casting based on the abrupt change characteristics of the radial distance between adjacent boundary points; Step S3, obtaining the candidate region for the parting line of the casting, includes the following specific steps: S3.1: With the Z-axis of the workpiece coordinate system as the axial direction, the preset slice layer spacing is... The f-th layer slice point set Defined as: ; in, , The minimum Z-coordinate of the point cloud. F represents the total number of slice layers. Indicates the axial slice layer spacing; Will Projecting onto the XY plane yields the two-dimensional boundary distribution characteristics, i.e., a two-dimensional point set; S3.2: Establish a polar coordinate system in the XY plane and set the angle step size. Divide the circumference into G intervals, and the g-th angular interval is... ),in, , ; For any point within the interval, calculate its radial distance to the origin of the polar coordinate system. ; Select radial distance within each interval The point with the largest value is selected as a candidate outer boundary point in that direction, forming the boundary point set.

[0036] ; in, The radial distance is denoted as ; S3.3: Radial variation between adjacent boundary points in the current slice ,in, Indicates the first radial distance between boundary points Indicates the radial distance between adjacent boundary points; Set radial variation threshold The adaptive approach is used to determine: ,in, Represents all radial variations in the current slice layer. The average value, Represents all radial variations in the current slice layer. Standard deviation; This is a scaling factor, set using calibration samples or experimental data, and adjusted according to the complexity of the actual workpiece and the noise level of the point cloud. like If so, the corresponding region is determined to be a geometric abrupt change region; S3.4: Merge multiple consecutive geometric abrupt change regions that meet the conditions, and check the angular overlap and axial continuity of abrupt change regions in adjacent slice layers (f and f+1); If a mutation region is in a continuous Layer (such as) If a region exists in all slices and its positional offset is less than the tolerance, it is marked as a candidate region for the mold parting line. .

[0037] S4: Extract the initial contour point set within the candidate region of the mold line, fit and generate a guide curve along the direction of the mold line, and construct multiple radial search sections along the normal of the curve to extract point cloud data in the neighborhood of the section to form the corresponding two-dimensional section point set. The specific process of step S4 includes: S4.1: In the candidate region of the parting line The specific process of obtaining the initial contour point set is as follows: S4.1.1: Define the candidate region for the mold parting line. The radial distance sequence arranged in angular order is as follows ,in This represents the radial distance of the i-th candidate point relative to the central axis of the workpiece coordinate system, where n is the total number of candidate points. When satisfied and When this point is determined to be a radial local maximum point, it is denoted as the initial seed point. ; S4.1.2: Using the current seed point Search for candidate points within a preset neighborhood around the center. ; Calculate seed point With candidate points Euclidean distance between them: ; Set a preset neighborhood distance threshold ;in, This represents the average sampling interval of the point cloud in the current region. The expansion factor can be set using experimental data; like Then the candidate points Include in the temporary expansion set; otherwise, terminate the expansion in that direction. S4.1.3: For each candidate point in the temporary extended set Calculate its relationship with the current seed point normal angle ;in, and They represent , The unit normal vector at that location, Indicates the angle between the normals of two points (unit: radians or degrees); Set normal continuity threshold This parameter can be set using calibration samples or experimental data, and adjusted according to the smoothness of the workpiece surface; like If the candidate point satisfies the spatial continuity condition, it is formally incorporated into the fly-edge point cluster. ; S4.1.4: Using the newly added points in the fringe point cluster as new seed points, repeat steps S4.1.2-S4.1.3 until no more new points can be added; finally, for the formed fringe point cluster... Boundary extraction is performed to obtain ordered initial contour points. ; S4.2: A coarse ridge path is fitted and generated. Multiple radial search sections are constructed along the normal of this path, and point cloud data located in the neighborhood of the sections are extracted to form the corresponding two-dimensional section point sets. The specific process includes: S4.2.1: Based on the initial contour point set The least squares method is used to fit a smooth and continuous three-dimensional space curve. , serving as a guiding curve; where s represents the arc length; S4.2.2: Along According to the preset step size Discrete sampling is performed to obtain a series of central nodes. ;in, , ;in, , The total length of the guide curve. The settings are made using calibration samples or experimental data, and adjusted according to the point cloud density and accuracy requirements. S4.2.3: At each central node At that point, calculate the unit tangent vector of the guiding curve. , build a and normal direction and The vertical plane, i.e., the radial search section. ,satisfy ; Finally, the radial search section Defined as: ; in, Let be any point in space; S4.2.4: For each radial search section Centered on the axis, extend a certain thickness to both sides of its normal direction. (like ), forming a thin layer region That is, the cross-sectional neighborhood; Traverse the original workpiece point cloud and filter out all points that fall into it. The points within the region constitute the two-dimensional cross-sectional point set of the current cross-section. .

[0038] S5: Within the two-dimensional cross-section point set corresponding to each radial search cross-section, radial extremum screening, peak amplitude discrimination, and local connectivity clustering analysis are performed sequentially to obtain the main feature points of the fly-edge. The extraction of the main feature points of the flash edge in step S5 includes the following process: S5.1: The set of two-dimensional cross-section points corresponding to the j-th radial search cross-section The height distribution sequence is formed by sorting the heights according to their projected coordinates in the direction normal to the cross section: ; in, This represents the height value of the k-th point within the j-th radial search section along the normal direction of the section. This is the center node of the cross section. This is the normal vector of the cross section. K is the index of the point inside the cross section; Calculate the standard deviation of the height distribution at all K points within the cross section. ,in , The average height of all points within the current cross-section; This reflects the degree of dispersion of the current cross-sectional point cloud in the normal direction: when the cross-section has significant flash edge characteristics, due to the huge height difference between the highest point and the base point, The value will increase significantly; conversely, if the cross-section is only a flat surface or has only minor noise, The value is relatively small; Traverse the sequence, if a certain point satisfies and If it is a local peak point, it is determined to be a local peak point and added to the candidate set. ; S5.2: Sort all local peak points of the current section in descending order of height value, and select the highest point. Second highest point Calculate the height difference ; S5.3: Set peak amplitude threshold , Based on the above calculations Sure: ;in The confidence coefficient is set using calibration samples or experimental data and adjusted according to the surface roughness characteristics of the workpiece being tested and the allowable false detection rate level. like Then determine The corresponding points are the main feature points of the fringe and should be retained. like If it is a local burr peak, it is determined to be removed. S5.4: Retain the main feature points of the burr. Calculate any two candidate points within the current cross section. and The Euclidean distance between them is: ; Define cluster distance threshold , Based on the local average neighborhood distance of the point cloud within the current cross section Sure: ; in, It is obtained by calculating the average Euclidean distance from each candidate point to its K nearest neighbors; The expansion factor is set using calibration samples or experimental data; like Then and They are classified as the same locally connected region; The disjoint-set data structure algorithm was used to perform full clustering, resulting in several connected clusters. ; Set minimum point threshold This value is determined by the minimum number of effective contact points of the robotic grinding tool: calculate the minimum number of coverage points. Where D is the diameter of the grinding head. The average sampling interval of the point cloud; less than Clusters that are considered noise or false detections that cannot support effective grinding operations are discarded. Ultimately, the union of all points in the remaining connected clusters constitutes the main feature point set of the flyedge. .

[0039] S6: Perform spatial continuity matching and continuous segment count on the main feature points of the flash edge in adjacent radial search sections, eliminate isolated interference points, and generate continuous spatial ridge points; Step S6 generates continuous spatial ridge points, the specific process of which includes: S6.1: Perform sequential matching of the main feature points of the flash edge in adjacent radial search sections (the j-th section and the (j+1)-th section) and calculate the spatial Euclidean distance between them. ;in, This represents the coordinates of the main feature point of the flash in the j-th radial search section. This represents the coordinates of the corresponding flash feature point in the (j+1)th radial search section. Denotes the Euclidean norm; S6.2: Set the threshold for continuous distance between cross sections Its value depends on the slice spacing. Dynamic adjustment of local sampling density of point cloud; optionally, Among them, the coefficient The settings are made using calibration samples or experimental data, and adjusted according to the point cloud noise level. The following judgment rules shall be applied: like If the two points satisfy spatial continuity, they are marked as a valid connection. like If the connection is broken, the corresponding point is considered a potential isolated point and is not included in the ridge line. S6.3: For all M sections (M-1 pairs of adjacent sections), count the number of consecutive sections that satisfy the conditions: ; in: M represents the total number of cross sections; This indicates an indicator function that takes the value 1 if the condition within the parentheses is true, and 0 otherwise. Set a threshold for the number of continuous sections Its value is determined by the minimum continuous length of the trajectory required by the robot grinding process; Minimum number of continuous sections is Where D represents the diameter of the grinding head; The lower limit of the proportional threshold should meet the following requirements. This means ensuring that even with high-density slices (large M), a sufficiently long continuous ridge segment can still be retained to generate an effective grinding trajectory; like Then all points involved in the continuous connection Defined as a set of ridge points in continuous space ; Remove isolated peak points that do not meet the continuity condition.

[0040] S7: Generate robot grinding trajectory based on continuous spatial ridge points, and control the robot to perform grinding of casting part mold line along the grinding trajectory.

[0041] The specific process of generating the robot polishing trajectory in step S7 includes: S7.1: Let the coordinates of the i-th continuous spatial ridge point be... The unit normal vector of the workpiece surface at that point is W parallel trajectories are generated by symmetrically offsetting to both sides along the normal direction (W is usually 3~5, covering the width of the flyedge). The i-th trajectory point on the w-th offset path is represented as: ; in, The range of values ​​is that negative values ​​represent one side and positive values ​​represent the other side; Indicates the distance between adjacent paths; Set path overlap rate The settings are dynamically adjusted based on the amount of flash removal, surface roughness requirements, and tool wear. In this example, Typically, an overlap of 0.2 to 0.4 (i.e., 20% to 40% overlap) is used to ensure continuous sanding. Calculate the distance between adjacent paths: ; Where D is the diameter of the grinding head; S7.2: Transform the trajectory points from the workpiece coordinate system to the robot base coordinate system using the following formula: ; in, Let be the homogeneous coordinates of the trajectory point in the robot's base coordinate system; These are the coordinates of the trajectory points in the workpiece coordinate system; This is the transformation matrix from the robot's end-effector coordinate system to the robot's base coordinate system; This is the fixed installation transformation matrix from the tool coordinate system to the robot end flange coordinate system; This is the transformation matrix from the workpiece coordinate system to the tool coordinate system; S7.3: Calculate the tangent vector of a trajectory point by using the difference between adjacent trajectory points. The robot's Y-axis direction is calculated using the cross product. The normal vector of the trajectory point is... The above information is combined to obtain the pose matrix of the robot's end effector. ; The above attitude matrix It can be converted into Euler angles required by the robot controller, and combined with the trajectory point position information obtained by S7.2, together they form a complete pose command in the robot base coordinate system, driving the end effector to move along the trajectory and maintain the preset posture.

[0042] S7.4: Project the trajectory points onto the actual surface of the workpiece, and use B-spline interpolation to smooth the trajectory and remove unnecessary trajectory jumps; Perform reachability checks to verify whether each trajectory point is reachable within the robot's operating space; if some trajectory points are unreachable, adjust the trajectory to fit the robot's operating range. Through the above steps, the trajectory points from the workpiece coordinate system to the robot base coordinate system were obtained, and the posture and path of the robot end effector were also calculated. Finally, the robot control system drives the robotic arm along the grinding trajectory. The motion, along with the linkage control of the end grinding spindle (including the floating mechanism), applies constant contact force to the workpiece surface, thereby automatically removing the flash from the casting and smoothing the mold line area.

[0043] Example 2: A robotic grinding system for casting mold part parting line based on 3D vision, comprising: 3D vision acquisition module: used to acquire 3D point cloud data of the surface of the casting; Point cloud processing module: used to construct the workpiece coordinate system and identify candidate regions for the mold parting line; Section Analysis Module: Used to generate radial search sections and extract the main feature points of the flash; Ridge extraction module: used to extract continuous spatial ridge points through spatial continuity matching and continuous segment count statistics; Trajectory generation module: used to generate robot grinding trajectory based on continuous spatial ridge points; Robot execution module: Used to control the robotic arm to complete the grinding operation.

[0044] The specific functions of each module are the same as those in the polishing method shown in Example 1, and will not be repeated here.

[0045] In terms of hardware, the casting part part mold line robotic grinding system should include at least the following equipment: 3D camera, robotic arm, floating grinding head and control computer.

[0046] The technical solutions described in the embodiments of this application have at least the following technical effects or advantages: (1) This invention constructs a workpiece coordinate system and slices it along the axial direction, identifies candidate regions for the mold parting line by combining radial changes, and performs cross-sectional feature analysis along the guide curve. Compared with existing methods that directly identify based on local edges or single geometric features, this invention reduces the influence of workpiece posture error and surface disturbance on the identification results, and improves the accuracy of extracting the main feature points of the flash and the initial positioning of the mold parting line. (2) By performing spatial continuity matching on the main feature points of adjacent cross sections and combining the number of continuous cross sections for continuity determination, the present invention can eliminate isolated abnormal peaks and local noise interference, thereby improving the continuity and reliability of mold line ridge extraction. (3) The present invention constructs a step-by-step constraint recognition mechanism of “candidate region screening - cross-sectional feature extraction - cross-section continuous verification”, which enables the edge recognition process to gradually transition from coarse positioning to precise confirmation, reducing the probability of false detection and missed detection under complex surface disturbance conditions; (4) The present invention generates robot grinding trajectory based on recognition results, realizes full-process automation of casting mold line recognition and automatic grinding, and improves grinding adaptability and processing consistency.

[0047] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A 3D vision-based mold line robot polishing method for a casting, characterized by, Includes the following steps: S1: Acquire 3D point cloud data of the casting surface and preprocess it to obtain the main body point cloud data of the workpiece. ; S2: mapping the point cloud data to the workpiece coordinate system and screening to obtain point cloud data ;​ S3: axially to the point cloud data The method comprises the following steps: performing hierarchical slicing, extracting radial outer boundary points in each layer slice, and obtaining a candidate area of the mold line of the casting part according to the mutation characteristics of the radial distance between adjacent boundary points. S4: Extract an initial contour point set within the candidate region of the mold parting line, fit and generate a guide curve along the direction of the mold parting line, construct multiple radial search sections along the normal of the guide curve, and extract point cloud data located in the neighborhood of the section to form the corresponding two-dimensional section point set. S5: Within the two-dimensional cross-section point set corresponding to each radial search cross-section, radial extreme value screening, peak amplitude discrimination, and local connectivity clustering analysis are performed sequentially to obtain the main feature points of the fly-edge. S6: Perform spatial continuity matching and continuous segment count on the main feature points of the flash in adjacent radial search sections, eliminate isolated interference points, and generate continuous spatial ridge points; S7: Generate a grinding trajectory based on the continuous spatial ridge points, and control the robot to perform grinding of the casting part along the grinding trajectory.

2. The cast part parting line robotic polishing method of claim 1, wherein: The process of constructing the workpiece coordinate system in S2 includes: Calculate the geometric centroid of the workpiece's main point cloud in the acquisition coordinate system and use it as the origin of the workpiece coordinate system; A covariance matrix is ​​constructed based on the decentralized point cloud data, and its features are decomposed. The eigenvector corresponding to the largest eigenvalue is selected as the main direction of the workpiece. By combining the eigenvectors corresponding to the second largest eigenvalues ​​and the right-hand rule, a complete workpiece coordinate system is established.

3. The method for grinding castings on a mold-closing line using a robot, as described in claim 1, is characterized in that: The filtering process in S2 includes: Computing point cloud based normal vectors angle with workpiece coordinate system axis unit vector ;​ When the point belongs to the side wall machining region, it is reserved; otherwise, it is determined as the top surface or bottom surface region of the workpiece, and is removed. Based on the spatial distribution range of points in the radial direction of the workpiece coordinate system, internal cavity areas and background interference areas are eliminated; The remaining point cloud is subjected to connected region screening to remove discrete small clusters to obtain continuous and complete workpiece body point cloud data .

4. The cast part parting line robotic polishing method of claim 1, wherein: The process of obtaining the candidate region of the parting line of the casting in S3 includes: S3.1: Slice the workpiece main body point cloud into layers along the workpiece coordinate system axis according to the preset slice spacing. The point set of the f-th layer slice is represented as... ;in, ; The minimum Z-coordinate of the point cloud. F represents the total number of slice layers. Indicates the axial slice layer spacing; Project each slice point onto the current cross-sectional plane to obtain the two-dimensional boundary distribution characteristics of the current cross-section; S3.2: Within the current cross-sectional plane, establish a polar coordinate system with the origin of the workpiece coordinate system as the reference center, and set the coordinates according to the preset angle step size. Divide the angle into G consecutive angle intervals, where the g-th angle interval is... );in, , ; Calculate the radial distance from the origin of the polar coordinate system to each point within each angle interval; Within each angular interval, the point with the largest radial distance is selected as the candidate outer boundary point in that direction; Arrange all candidate outer boundary points in angular order to form the current slice boundary point set; S3.3: Calculate the radial variation between adjacent boundary points in the current slice ; in, Indicates the first radial distance between boundary points Indicates the radial distance between adjacent boundary points; When the following conditions are met: When this occurs, the corresponding region is identified as a geometric abrupt change region; among which, Radial variation threshold: ;in, Represents all radial variations in the current slice layer. The average value, Represents all radial variations in the current slice layer. standard deviation This is the proportionality coefficient; S3.4: Merge multiple consecutive geometric abrupt change regions that meet the conditions, and determine the candidate region for the mold line by combining the axial continuity distribution in adjacent slices.

5. The cast part parting line robotic polishing method of claim 1, wherein: The method for obtaining the initial contour point set in step S4 includes: Within the candidate region of the mold line, a point with a radial local maximum value is selected as the initial seed point; with the initial seed point as the center, in its neighborhood according to the Euclidean distance and the normal angle dual constraint screening expansion point; wherein, denotes the current seed point coordinate, denotes the neighborhood candidate point coordinate, and respectively denote the corresponding point normal vector; When the following are satisfied: and it is incorporated into the burr point cluster; wherein, denotes a preset neighborhood distance threshold, denotes a normal continuity threshold; Extract the boundary point sequence from the formed fly edge point cluster to form the initial contour point set.

6. The cast part parting line robotic polishing method of claim 5, wherein: Specifically, S4 is: A guide curve is fitted based on the initial contour point set and distributed along the mold line. along the guiding curve in a preset step length discrete sampling is performed to obtain a plurality of central nodes ; Construct a radial search section at each center node, with its normal direction... Tangent vector of the guiding curve at that point Vertical, that is, satisfying ;in, This represents the tangential vector of the guiding curve at the u-th center node. Indicates the normal direction of the radial search section; Point cloud data located in the neighborhood of the radial search section are extracted to form the corresponding two-dimensional cross-section point set.

7. The cast part parting line robotic polishing method of claim 1, wherein: The process of obtaining the main feature points of the flash edge in S5 includes: S5.1: For each radial search section, establish a height distribution sequence along the normal direction for the set of two-dimensional cross-section points. Detect peak points that satisfy the local maximum condition, when: When this occurs, the corresponding point is determined to be a local peak point; where, This represents the height value of the k-th point within the j-th radial search section along the normal direction of the section, where j represents the radial search section number and k represents the point number within the current section; S5.2: Select the highest peak vertex in the current section and the second highest peak vertex , calculate the height difference ; S5.3: If , then determine the highest peak vertex as the flash body feature point, otherwise as the burr removal; where, denotes the peak value amplitude threshold; S5.4: Local connectivity clustering analysis is performed on the reserved fin body feature points, and the Euclidean distance between any two candidate points in the current cross section is calculated wherein, , represents the candidate point coordinates; When the following condition is satisfied: the corresponding points are divided into the same local connected region; wherein, denotes a clustering distance threshold value; Connected regions with more than a threshold output points are used as the main feature point set of the flyedge.

8. The cast part parting line robotic polishing method of claim 1, wherein: The process of generating continuous spatial ridge points in S6 includes: Sequential matching of the main feature points of the flash in adjacent radial search sections is performed, and the spatial Euclidean distance between them is calculated. ;in, This represents the coordinates of the main feature point of the flash in the j-th radial search section. This represents the coordinates of the corresponding flash feature point in the (j+1)th radial search section. Denotes the Euclidean norm; like If , then the two points are determined to satisfy spatial continuity; where, Indicates the threshold for continuous distance between cross sections; count all continuous sections that meet the conditions ; wherein M represents the total section number, represents an indicator function; When the following is satisfied: a corresponding set of consecutive points is defined as a continuous spatial ridge point; wherein, represents a threshold of the number of continuous sections.

9. The cast part parting line robotic polishing method of claim 1, wherein: The grinding trajectory generation process in S7 includes: With the continuous space ridge line point as the center path, along the ridge line point corresponding surface normal vector Generate multiple parallel trajectories by biasing to both sides, the i-th bias trajectory point on the w-th bias path is represented as: ; in, Let i be the coordinates of the i-th continuous spatial ridge point. This represents the unit normal vector of the corresponding workpiece surface. ; The formula for representing the distance between adjacent paths is: Where D represents the diameter of the grinding head. Indicates the path overlap rate; The offset trajectory points are transformed from the workpiece coordinate system to the robot base coordinate system, and the end effector attitude matrix is ​​constructed based on the preset tool coordinate system. The trajectory points are projected onto the actual surface of the workpiece, and smoothing and accessibility checks are performed to generate the grinding trajectory.

10. A 3D vision-based robotic grinding system for casting mold lines, employing the robotic grinding method for casting mold lines as described in any one of claims 1-9, comprising: 3D vision acquisition module: used to acquire 3D point cloud data of the surface of the casting; Point cloud processing module: used to construct the workpiece coordinate system and identify candidate regions for the mold parting line; Section Analysis Module: Used to generate radial search sections and extract the main feature points of the flash; Ridge extraction module: used to extract continuous spatial ridge points through spatial continuity matching and continuous segment count statistics; Trajectory generation module: used to generate robot grinding trajectory based on continuous spatial ridge points; Robot execution module: Used to control the robotic arm to complete the grinding operation.