A robotic polishing path generation method and apparatus
Patent Information
- Application Number
- CN202611486334.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-23
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本发明提供了一种机器人打磨路径生成方法和装置,以解决相关技术中的机器人打磨路径生成方案无法快速、准确地生成覆盖工件的打磨路径,导致机器人打磨路径生成过程的效率较低的问题
[0010]本发明实施例的技术方案,先确定待打磨工件表面在机器人基坐标系下的三维点云数据;然后对变换后的三维点云数据进行自适应预处理;将带法线的预处理后的三维点云数据转换为封闭的三角网格模型,并去除三角网格模型中的虚假面片;根据三角网格模型识别待打磨工件的几何主方向向量,针对三角网格模型中的每一个三角形面片,根据几何主方向向量生成三角形面片的打磨路径;对各个三角形面片的打磨路径进行连接,得到覆盖待打磨工件的打磨路径;对打磨路径中的路径点进行工艺约束处理,得到最终的覆盖待打磨工件的打磨路径;最后根据最终的打磨路径中的各个路径点的位姿信息,生成机器人运动指令。本发明实施例的技术方案解决了相关技术中的机器人打磨路径生成方案无法快速、准确地生成覆盖工件的打磨路径,导致机器人打磨路径生成过程的效率较低的问题,可以自动确定待打磨工件表面的三维点云数据,并对变换后的三维点云数据进行自适应预处理,无需人工调参,适应不同尺寸和密度的工件,可以自动将三维点云数据转换为封闭的三角网格模型,并去除三角网格模型中的虚假面片,得到高质量的三角网格模型,可以自动根据三角网格模型识别待打磨工件的几何主方向向量,根据几何主方向向量生成三角网格模型中的各个三角形面片的打磨路径,进而对各个三角形面片的打磨路径进行连接,得到覆盖待打磨工件的打磨路径,并对打磨路径中的路径点进行工艺约束处理,实现自动、快速、准确地生成覆盖工件的打磨路径,提高机器人打磨路径生成过程的效率,可以自动根据打磨路径中的各个路径点的位姿信息,生成机器人运动指令。
Smart Images

Figure CN122990113A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional point cloud data processing technology, and in particular to a method and apparatus for generating robot grinding paths. Background Technology
[0002] Before using a grinding robot to grind the surface of a workpiece, a grinding path covering the workpiece needs to be generated. The grinding path covering the workpiece can be multiple points that the grinding robot needs to grind sequentially when grinding the workpiece surface.
[0003] In related technologies, a common robotic grinding path generation scheme involves generating a grinding path covering the workpiece based on manual teaching before the grinding robot grinds the workpiece surface. This process typically involves an operator manually controlling the robot's end effector to move along the workpiece surface using a teach pendant, recording a series of path points, and then the robot controller interpolates to generate the grinding path covering the workpiece. This method heavily relies on the operator's experience, has a long teaching cycle, and struggles to guarantee the uniformity and coverage of the path for complex curved surfaces. The robotic grinding path generation schemes in these technologies, dependent on manual operation, cannot quickly and accurately generate grinding paths covering the workpiece, resulting in low efficiency. Summary of the Invention
[0004] This invention provides a method and apparatus for generating robot grinding paths, in order to solve the problem that robot grinding path generation schemes in related technologies cannot quickly and accurately generate grinding paths covering the workpiece, resulting in low efficiency in the robot grinding path generation process.
[0005] According to one aspect of the present invention, a method for generating a robot grinding path is provided, comprising: Determine the three-dimensional point cloud data of the workpiece surface to be ground in the robot base coordinate system; Adaptive preprocessing is performed on the transformed 3D point cloud data; The preprocessed 3D point cloud data with normals is converted into a closed triangular mesh model, and false faces in the triangular mesh model are removed. The geometric principal direction vector of the workpiece to be polished is identified based on the triangular mesh model. For each triangular facet in the triangular mesh model, a polishing path for the triangular facet is generated based on the geometric principal direction vector. The grinding paths of each triangular facet are connected to obtain a grinding path covering the workpiece to be ground. The path points in the grinding path are subjected to process constraint processing to obtain the final grinding path covering the workpiece to be ground. Based on the pose information of each path point in the final polishing path, robot motion commands are generated.
[0006] According to another aspect of the present invention, a robotic polishing path generation apparatus is provided, comprising: The data determination module is used to determine the three-dimensional point cloud data of the surface of the workpiece to be ground in the robot's base coordinate system. The data preprocessing module is used to perform adaptive preprocessing on the transformed 3D point cloud data; The model processing module is used to convert the preprocessed 3D point cloud data with normals into a closed triangular mesh model and remove false faces from the triangular mesh model. The surface processing module is used to identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, and generate a polishing path for each triangular surface in the triangular mesh model based on the geometric principal direction vector. The path generation module is used to connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece to be ground. The path constraint module is used to perform process constraint processing on the path points in the grinding path to obtain the final grinding path covering the workpiece to be ground. The instruction generation module is used to generate robot motion instructions based on the pose information of each path point in the final grinding path.
[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that is executed by the at least one processor, which enables the at least one processor to perform the robot grinding path generation method according to any embodiment of the present invention.
[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the robot grinding path generation method according to any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the robot grinding path generation method according to any embodiment of the present invention.
[0010] The technical solution of this invention first determines the three-dimensional point cloud data of the workpiece surface to be polished in the robot's base coordinate system; then, adaptive preprocessing is performed on the transformed three-dimensional point cloud data; the preprocessed three-dimensional point cloud data with normals is converted into a closed triangular mesh model, and false faces in the triangular mesh model are removed; the geometric principal direction vector of the workpiece to be polished is identified according to the triangular mesh model, and for each triangular face in the triangular mesh model, a polishing path for the triangular face is generated according to the geometric principal direction vector; the polishing paths of each triangular face are connected to obtain a polishing path covering the workpiece to be polished; process constraint processing is performed on the path points in the polishing path to obtain the final polishing path covering the workpiece to be polished; finally, robot motion commands are generated according to the pose information of each path point in the final polishing path. The technical solution of this invention solves the problem that the robot grinding path generation scheme in related technologies cannot quickly and accurately generate grinding paths covering the workpiece, resulting in low efficiency in the robot grinding path generation process. It can automatically determine the three-dimensional point cloud data of the workpiece surface to be ground and perform adaptive preprocessing on the transformed three-dimensional point cloud data without manual parameter tuning, adapting to workpieces of different sizes and densities. It can automatically convert the three-dimensional point cloud data into a closed triangular mesh model and remove false faces from the triangular mesh model to obtain a high-quality triangular mesh model. It can automatically identify the geometric principal direction vector of the workpiece to be ground based on the triangular mesh model, generate grinding paths for each triangular facet in the triangular mesh model based on the geometric principal direction vector, and then connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece. It also performs process constraint processing on the path points in the grinding path, achieving automatic, fast, and accurate generation of grinding paths covering the workpiece, improving the efficiency of the robot grinding path generation process. Furthermore, it can automatically generate robot motion commands based on the pose information of each path point in the grinding path.
[0011] Common robotic grinding path generation methods require an operator to manually control the robot's end effector to move along the workpiece surface via a teach pendant, recording a series of path points. The robot controller then interpolates and generates a grinding path covering the workpiece. This entire process is extremely time-consuming and labor-intensive, and requires the workpiece to be ground to be fixed in place with high positioning accuracy. The technical solution of this invention eliminates the need for an operator to manually teach the points, automatically, quickly, and accurately generating a grinding path covering the workpiece and robot motion commands.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a flowchart of a robot grinding path generation method provided in Embodiment 1 of the present invention.
[0015] Figure 2 This is a flowchart of a robot grinding path generation method provided in Embodiment 2 of the present invention.
[0016] Figure 3 This is a schematic diagram of a robot grinding path generation device provided in Embodiment 3 of the present invention.
[0017] Figure 4 A schematic diagram of the structure of an electronic device for implementing the robot grinding path generation method of this embodiment of the invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0019] It should be noted that the terms "target," "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] Example 1 Figure 1This is a flowchart illustrating a robot grinding path generation method according to Embodiment 1 of the present invention. This embodiment is applicable to situations where a grinding path covering the workpiece is generated before the workpiece surface is ground by a grinding robot. This method can be executed by a robot grinding path generation device, which can be implemented in hardware and / or software and can be configured in electronic equipment used to control the robot. Figure 1 As shown, the method includes: Step 101: Determine the three-dimensional point cloud data of the workpiece surface to be ground in the robot base coordinate system.
[0021] A grinding robot is a robot used to grind the surface of a workpiece. The robot's working area can be a pre-defined area where the grinding robot performs its grinding operations. The workpiece to be ground is any workpiece whose surface needs to be ground by the robot. The workpiece to be ground is placed within the robot's working area. The workpiece can be placed arbitrarily within the robot's working area without the need for precise positioning using fixtures.
[0022] Specifically, determining the three-dimensional point cloud data of the workpiece surface to be polished in the robot base coordinate system includes: acquiring the three-dimensional point cloud data of the workpiece surface to be polished through a camera component; wherein the workpiece to be polished is placed in the robot's working area, and the three-dimensional point cloud data is located in the camera coordinate system; and transforming the three-dimensional point cloud data from the camera coordinate system to the robot base coordinate system.
[0023] The camera component can be a 3D structured light camera positioned within the robot's working area. The 3D point cloud data of the workpiece surface to be polished can be multiple 3D points representing the features and spatial distribution of the workpiece's outer surface. Each point contains an abscissa, ordinate, and ordinate. The camera component can project a structured light pattern onto the outer surface of the workpiece to be polished, acquiring the 3D point cloud data. The coordinates of each point are defined in the camera coordinate system; that is, the 3D point cloud data of the workpiece surface is located in the camera coordinate system. The camera coordinate system can be a 3D coordinate system established with the center point of the camera component as the origin. The 3D structured light camera can project a structured light pattern onto the outer surface of the workpiece from at least one preset viewpoint to acquire the 3D point cloud data. For complex workpieces, 3D points can be acquired from multiple viewpoints and then fused into complete 3D point cloud data of the workpiece surface through Iterative Closest Point (ICP) registration.
[0024] The robot's base coordinate system can be a three-dimensional coordinate system established with the center point of the grinding robot as the origin. Transforming 3D point cloud data from the camera coordinate system to the robot's base coordinate system means converting the coordinates of each point in the 3D point cloud data from the camera coordinate system to the robot's base coordinate system. For each point in the 3D point cloud data, the transformation matrix can be multiplied by the point's coordinates in the camera coordinate system to obtain the point's coordinates in the robot's base coordinate system.
[0025] The transformation matrix can be a pre-defined numerical matrix used to convert coordinates from the camera coordinate system to the robot base coordinate system. The transformation matrix can be multiplied by the point's coordinates in the camera coordinate system to obtain the point's coordinates in the robot base coordinate system. An eye-in-hand configuration can be used, where the camera assembly is fixedly mounted on the end flange of the grinding robot. The transformation matrix can be a 4×4 homogeneous transformation matrix obtained through a pre-completed hand-eye calibration program, containing a 3×3 rotation matrix R and a 3×1 translation vector t. The hand-eye calibration program can record the joint angles of the grinding robot at each scan time and calculate the transformation matrix through forward kinematics. The process of converting the coordinates of a point from the camera coordinate system to the robot base coordinate system can be expressed as: Tcam_to_base = Tend_to_base × Tcam_to_end. Here, Tend_to_base represents the relationship between the robot flange and the robot base coordinate system, which can be obtained through the robot teach pendant. Tcam_to_end represents the transformation relationship from the camera to the end of the robot flange, obtained through hand-eye calibration. Tcam_to_base represents the coordinates of the point in the robot's base coordinate system. Transforming the 3D point cloud data from the camera coordinate system to the robot's base coordinate system ensures that the subsequently generated grinding path is directly defined in the robot's base coordinate system and can be recognized by the robot actuator without additional coordinate transformation.
[0026] Step 102: Perform adaptive preprocessing on the transformed 3D point cloud data.
[0027] Optionally, adaptive preprocessing is performed on the transformed 3D point cloud data, including: calculating the average pixel spacing of the transformed 3D point cloud data; determining whether the total number of points in the transformed 3D point cloud data exceeds a preset threshold; if the total number of points exceeds the preset threshold, voxel downsampling is performed on the transformed 3D point cloud data to obtain downsampled 3D point cloud data; the average pixel spacing of the downsampled 3D point cloud data is determined; and a pre-set normal estimation algorithm is used to analyze each point in the downsampled 3D point cloud data to determine the normal direction vector of each point in the downsampled 3D point cloud data; wherein, the downsampled 3D point cloud data is the preprocessed 3D point cloud data.
[0028] Specifically, calculating the average pixel spacing of the transformed 3D point cloud data includes: constructing a spatial retrieval structure kd-tree based on the transformed 3D point cloud data; for each point in the transformed 3D point cloud data, querying the Euclidean distance between the point and its nearest neighbor in the kd-tree; and using the average of all the queried Euclidean distances as the average pixel spacing of the transformed 3D point cloud data. The average pixel spacing of the transformed 3D point cloud data reflects the actual density of the transformed 3D point cloud data and serves as the benchmark for calculating all subsequent adaptive parameters.
[0029] The total number of points in the transformed 3D point cloud data refers to the total number of points contained in the transformed 3D point cloud data. The preset threshold can be a pre-set value. For example, the preset threshold is 400,000. If the total number of points exceeds the preset threshold, a pre-set voxel downsampling algorithm can be used to process the transformed 3D point cloud data to obtain downsampled 3D point cloud data.
[0030] Optionally, voxel downsampling is performed on the transformed 3D point cloud data to obtain downsampled 3D point cloud data. This includes: calculating the average pixel spacing of each point in the transformed 3D point cloud data through random sampling; calculating the voxel magnification factor using the following formula based on the total number of points in the transformed 3D point cloud data and a preset threshold: ratio = sqrt(N / Ntarget); where ratio is the voxel magnification factor, N is the total number of points in the transformed 3D point cloud data, and Ntarget is the preset threshold; calculating the voxel size using the following formula based on the calculated average pixel spacing and voxel magnification factor: voxel_size = avg_dist × ratio; where voxel_size is the voxel size, avg_dist is the average pixel spacing, and ratio is the voxel magnification factor; and performing voxel downsampling on the transformed 3D point cloud data using the voxel size to obtain downsampled 3D point cloud data. The calculated voxel size can be determined as the average pixel spacing of the downsampled 3D point cloud data. When the total number of points exceeds a preset threshold, adaptive voxel downsampling is performed to accelerate subsequent processing. Unlike traditional methods with fixed voxel sizes, embodiments of the present invention can adaptively calculate voxel sizes based on point cloud density.
[0031] Specifically, the K-nearest neighbor search algorithm can be used to perform principal component analysis (PCA) on the neighborhood of each point to obtain the eigenvector corresponding to the minimum eigenvalue of each point. The eigenvector corresponding to the minimum eigenvalue of a point is the normal direction vector of that point. Thus, the normal direction vector of each point is determined. For example, K=20. Further, a tangent plane-based orient normals consistent tangent plane method can be used. This involves setting the number of neighborhood points (e.g., 30) and iteratively adjusting the normal direction vector of each point to ensure that the normal directions of adjacent points are consistent, avoiding mesh reconstruction failure caused by normal direction vector flipping.
[0032] Therefore, the transformed 3D point cloud data can be subjected to three-stage adaptive preprocessing, with all parameters dynamically calculated based on the actual point cloud density, eliminating the need for manual parameter tuning.
[0033] Optionally, after determining whether the total number of points in the transformed 3D point cloud data exceeds a preset threshold, the method further includes: if the total number of points does not exceed the preset threshold, then using a pre-set normal estimation algorithm to analyze each point in the transformed 3D point cloud data and determine the normal direction vector of each point in the transformed 3D point cloud data; wherein, the transformed 3D point cloud data is pre-processed 3D point cloud data. If the total number of points does not exceed the preset threshold, then it is not necessary to perform voxel downsampling on the transformed 3D point cloud data, and the normal direction vector of each point in the transformed 3D point cloud data is directly determined. The transformed 3D point cloud data is pre-processed 3D point cloud data. A pre-set normal estimation algorithm can be used to analyze each point in the transformed 3D point cloud data and determine the normal direction vector of each point in the transformed 3D point cloud data.
[0034] Step 103: Convert the preprocessed 3D point cloud data with normals into a closed triangular mesh model, and remove false faces from the triangular mesh model.
[0035] The preprocessed 3D point cloud data, with the normal direction vectors of each included point determined, is the preprocessed 3D point cloud data with normals. The Screened Poisson Reconstruction algorithm can be used to convert this preprocessed 3D point cloud data with normals into a closed triangular mesh model. The Screened Poisson Reconstruction algorithm implicitly fits the surface by solving the Poisson equation, exhibiting good robustness to noise. The algorithm parameters include octree depth and sample density coefficients. The recommended value range for octree depth is 8-10. The octree depth determines the mesh resolution. Under fully closed boundary conditions, the Screened Poisson Reconstruction algorithm generates a mesh covering the entire solution domain, resulting in the triangular mesh model including spurious faces far from the preprocessed 3D point cloud data with normals. These spurious faces can be triangular faces used to complete the bottom and periphery of the workpiece to be polished.
[0036] Optionally, removing false faces from the triangular mesh model includes: sorting the density values of each mesh vertex in the triangular mesh model, determining the density value corresponding to the low quantile in the density value sequence as a density threshold, and marking mesh vertices in the triangular mesh model with density values lower than the density threshold as mesh vertices to be deleted; setting a distance tolerance threshold based on the average point spacing of the preprocessed 3D point cloud data, determining the distance from each mesh vertex not marked as a mesh vertex to be deleted to the nearest point cloud point, and marking mesh vertices whose distance to the nearest point cloud point is greater than the distance tolerance threshold as false face mesh vertices; removing the triangular faces associated with false face mesh vertices in the triangular mesh model, thereby removing false faces from the triangular mesh model; wherein, a false mesh vertex is a mesh vertex marked as a mesh vertex to be deleted or a false face mesh vertex.
[0037] In the process of converting preprocessed 3D point cloud data with normals into a closed triangular mesh model using the masked Poisson reconstruction algorithm, the density value of each mesh vertex in the triangular mesh model is determined. The density value of a mesh vertex can be a numerical value used to characterize the sampling density of the point cloud near the mesh vertex. The density value corresponding to the low quantile in the density value sequence can be the maximum value among the density values ranked in the bottom 3% or bottom 5% of the density value sequence. Mesh vertices to be deleted can be mesh vertices that are included in false patches, filtered based on their density values. The density threshold can be a numerical value used to measure whether a mesh vertex is included in a false patch based on its density value. Generally, mesh vertices with density values lower than the density threshold can be marked as mesh vertices to be deleted. The density values of each mesh vertex in the triangular mesh model can be sorted in descending order of numerical value, the density value corresponding to the low quantile in the density value sequence can be determined as the density threshold, and mesh vertices with density values lower than the density threshold in the triangular mesh model can be marked as mesh vertices to be deleted.
[0038] False patch vertices are mesh vertices selected based on their distance to the nearest point in the point cloud. The nearest point in the point cloud is the point in the preprocessed 3D point cloud data that has the smallest distance to the mesh vertex. The distance between a mesh vertex and its nearest point in the point cloud is the distance from the mesh vertex to the nearest point in the point cloud. The distance tolerance threshold is a numerical value used to determine whether a mesh vertex is included in a false patch based on its distance to the nearest point in the point cloud. Typically, mesh vertices whose distance to the nearest point in the point cloud is greater than the distance tolerance threshold can be marked as false patch mesh vertices. The distance tolerance threshold can be calculated using the following formula, based on the average point spacing of the preprocessed 3D point cloud data: distance_threshold = effective_resolution × k. Where distance_threshold is the distance tolerance threshold, effective_resolution is the average point spacing of the preprocessed 3D point cloud data, and k is a pre-set multiplier. The value of k can range from 1.5 to 3.5. For example, k is 1.5. For each mesh vertex that is not marked as a mesh vertex to be deleted, the distance from the mesh vertex to the nearest point cloud point can be calculated, and mesh vertices whose distance to the nearest point cloud point is greater than the distance tolerance threshold are marked as false patch mesh vertices.
[0039] False mesh vertices are mesh vertices marked as vertices to be deleted or false patch mesh vertices; that is, mesh vertices that are filtered out and contained within false patches. Triangular patches associated with false patch mesh vertices refer to triangular patches that contain false patch mesh vertices. By removing the triangular patches associated with false patch mesh vertices from the triangular mesh model, the false patches in the triangular mesh model can be removed. Therefore, all false mesh vertices and triangular patches associated with false patch mesh vertices can be removed at once, resulting in a clean, polished region mesh.
[0040] Step 104: Identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, and generate a polishing path for each triangular facet in the triangular mesh model based on the geometric principal direction vector.
[0041] Optionally, identifying the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model includes: smoothing the triangular mesh model; performing principal component analysis on the mesh vertices in the smoothed triangular mesh model to determine the geometric principal direction vector of the workpiece to be polished; wherein the geometric principal direction vector includes the major axis direction vector, the minor axis direction vector, and the thickness direction vector.
[0042] Specifically, a preset smoothing filter can be used to smooth the triangular mesh model, resulting in a smoothed triangular mesh model. The preset smoothing filter can be a pre-defined filter used for smoothing the triangular mesh model. The preset smoothing filter can be a window-based sine smoothing filter. The parameters of the preset smoothing filter can include the number of iterations, passband frequency, etc. For example, the number of iterations is 20, and the passband frequency is 0.1. By smoothing the triangular mesh model, high-frequency noise in the triangular mesh model can be removed while maintaining the overall geometric characteristics of the triangular mesh model.
[0043] Specifically, a preset principal component analysis (PCA) algorithm can be used to perform PCA on the vertices of the smoothed triangular mesh model to determine the geometric principal direction vectors of the workpiece to be ground. The geometric principal direction vectors include the major axis direction vector, the minor axis direction vector, and the thickness direction vector. The major axis direction vector of the workpiece can be a vector representing the axial direction of the workpiece itself. The minor axis direction vector of the workpiece can be a vector representing the direction perpendicular to the axial direction of the workpiece itself. The thickness direction vector of the workpiece can be a vector representing the direction perpendicular to the thickness direction of the workpiece. The thickness direction of the workpiece can be the perpendicular direction between two relatively parallel surfaces of the workpiece. The preset PCA algorithm can be a pre-set algorithm used to perform PCA on the vertices of the smoothed triangular mesh model to determine the geometric principal direction vectors of the workpiece to be ground.
[0044] Specifically, we can first calculate the centroids of the vertices in the smoothed triangular mesh model, then construct the covariance matrix, and perform eigenvalue decomposition on the covariance matrix to obtain three eigenvectors sorted by eigenvalues from largest to smallest. The three eigenvectors sorted by eigenvalues from largest to smallest are the major axis vector, minor axis vector, and thickness vector of the workpiece to be ground.
[0045] The grinding path covering the workpiece to be ground can be multiple points that the grinding robot needs to grind sequentially when grinding the workpiece surface in the preprocessed 3D point cloud data with normals. For each triangular facet in the smoothed triangular mesh model, the grinding path of the triangular facet can be multiple points that the grinding robot needs to grind sequentially when grinding the workpiece surface to which the triangular facet belongs in the preprocessed 3D point cloud data with normals.
[0046] For each triangular facet in the smoothed triangular mesh model, the facet path generation component can analyze and detect the principal geometric direction vectors of the triangular facet and the workpiece to be ground, generating a grinding path for the triangular facet. The facet path generation component is a preset software module used to analyze and detect the principal geometric direction vectors of the triangular facets in the workpiece's triangular mesh model and the workpiece, generating a grinding path for the triangular facet.
[0047] Step 105: Connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece to be ground.
[0048] After generating the grinding paths for each triangular facet in the smoothed triangular mesh model, the grinding paths for each triangular facet can be connected to form a series of points, resulting in a grinding path covering the workpiece to be ground. Each point is a path point in the grinding path.
[0049] Step 106: Perform process constraint processing on the path points in the grinding path to obtain the final grinding path covering the workpiece to be ground.
[0050] Optionally, process constraint processing is applied to the path points in the grinding path to obtain the final grinding path covering the workpiece to be ground. This includes: for each path point in the grinding path, detecting whether the distance between the path point and the edge of the workpiece to be ground is less than a safe distance, and deleting path points whose distance to the edge of the workpiece to be ground is less than the safe distance; for each path point in the grinding path, detecting whether the distance between the path point and adjacent path points is less than a minimum distance, and deleting path points whose distance to adjacent path points is less than the minimum distance; and determining the grinding path after deletion processing as the final grinding path covering the workpiece to be ground.
[0051] The safety distance can be a preset value. For example, a safety distance of 3 mm. For each path point in the grinding path, it can be detected whether the distance between the path point and the edge of the workpiece to be ground is less than the safety distance. By deleting path points whose distance to the edge of the workpiece is less than the safety distance and discarding path points that exceed the safety range, it is ensured that the grinding trajectory does not touch the physical edge of the workpiece, thus preventing edge chipping.
[0052] Adjacent path points can refer to other path points preceding and following the current path point. The minimum distance can be a preset value. For example, the minimum distance is 3 millimeters. For each path point in the grinding path, it can be detected whether the distance between the path point and its adjacent path points is less than the minimum distance. By deleting path points whose distance to their adjacent path points is less than the minimum distance, spacing control can be applied to dense path points, reducing the number of robot motion commands and improving execution efficiency.
[0053] Step 107: Generate robot motion commands based on the pose information of each path point in the final polishing path.
[0054] For each path point in the polishing path, the pose information of the path point includes position coordinates and orientation information.
[0055] Position coordinates refer to the x, y, and y coordinates of a path point. Attitude information can be used to describe the attitude that the end effector of the grinding robot needs to maintain when it is on the workpiece surface corresponding to the path point. For example, attitude information can be a rotation vector describing the attitude that the end effector of the grinding robot needs to maintain when it is on the workpiece surface corresponding to the path point.
[0056] Optionally, based on the pose information of each path point in the final grinding path, robot motion commands are generated, including: smoothing the normal direction vector of each path point in the final grinding path to obtain a smoothed normal direction vector for each path point; for each path point in the final grinding path, constructing a robot end-effector pose rotation matrix for the path point based on the smoothed normal direction vector of the path point, converting the robot end-effector pose rotation matrix of the path point into pose information of the path point, generating robot motion commands corresponding to the path point based on the pose information of the path point; sorting the robot motion commands corresponding to each path point to obtain a robot motion command sequence; and adding a lift command to the end of the robot motion command sequence to obtain a robot motion command corresponding to the workpiece to be ground.
[0057] The smoothed normal direction vector of a path point refers to the normal direction vector of the path point after smoothing. A preset smoothing algorithm can be used to smooth the normal direction vectors of each path point in the grinding path, resulting in the smoothed normal direction vector for each path point. The preset smoothing algorithm can be a pre-defined algorithm used to smooth the normal direction vectors of each path point in the grinding path.
[0058] For each path point in the grinding path, the robot end effector pose rotation matrix for that path point is a 3×3 orthogonal matrix used to unambiguously describe the spatial orientation of the robot end effector's coordinate system relative to the robot's base coordinate system when the grinding robot is grinding the workpiece surface to which the path point belongs. The three columns of the robot end effector pose rotation matrix are the unit direction vectors of the X, Y, and Z axes of the robot end effector's coordinate system in the robot's base coordinate system, and the three columns are the projections of the X, Y, and Z axes of the robot's base coordinate system onto the robot end effector's coordinate system.
[0059] For each path point in the grinding path, the smoothed normal direction vector of the path point can be analyzed and detected using a pose information generation component to construct the robot end effector pose rotation matrix for that path point. The pose information generation component can be a pre-defined software module used to analyze and detect the smoothed normal direction vector of the path point and construct the robot end effector pose rotation matrix. The robot end effector pose rotation matrix of the path point can be converted into a rotation vector format. The rotation vector obtained from the converted robot end effector pose rotation matrix of the path point is a rotation vector that can be used to describe the posture that the robot end effector of the grinding robot needs to maintain when grinding the workpiece surface to which the path point belongs. The pose information of the path point can be obtained by converting the robot end effector pose rotation matrix of the path point into a rotation vector format and then into the pose information of the path point.
[0060] Optionally, based on the pose information of the path points, robot motion instructions corresponding to the path points are generated, including: for each path point in the grinding path, by adding the pose information of the path point to the robot motion instruction template, robot motion instructions corresponding to the path points are obtained.
[0061] The robot motion command corresponding to a path point can be a command used to instruct the grinding robot to grind the workpiece surface to which the path point belongs. The robot motion command corresponding to a path point includes the pose information of the path point. The robot motion command template can be a command that does not include the pose information of the path point but is used to instruct the grinding robot to grind the workpiece surface to which the path point belongs. For each path point in the grinding path, the robot motion command corresponding to the path point can be obtained by adding the pose information of the path point to the robot motion command template, thereby generating the robot motion command corresponding to the path point based on the pose information of the path point.
[0062] Specifically, the robot motion instructions corresponding to each path point can be sorted according to their order to form an instruction sequence. This sequence is the robot motion instruction sequence. The robot motion instructions corresponding to the workpiece to be polished are a set of instructions used to instruct the polishing robot to polish the surface of the workpiece. The lift instruction can be used to instruct the end effector of the polishing robot to move away from the workpiece surface. A lift instruction can be added to the end of the robot motion instruction sequence. The robot motion instruction sequence after adding the lift instruction is a set of instructions that can be used to instruct the polishing robot to polish the surface of the workpiece to be polished. Thus, the robot motion instructions corresponding to the workpiece to be polished are obtained.
[0063] The technical solution of this invention first determines the three-dimensional point cloud data of the workpiece surface to be polished in the robot's base coordinate system; then, adaptive preprocessing is performed on the transformed three-dimensional point cloud data; the preprocessed three-dimensional point cloud data with normals is converted into a closed triangular mesh model, and false faces in the triangular mesh model are removed; the geometric principal direction vector of the workpiece to be polished is identified according to the triangular mesh model, and for each triangular face in the triangular mesh model, a polishing path for the triangular face is generated according to the geometric principal direction vector; the polishing paths of each triangular face are connected to obtain a polishing path covering the workpiece to be polished; process constraint processing is performed on the path points in the polishing path to obtain the final polishing path covering the workpiece to be polished; finally, robot motion commands are generated according to the pose information of each path point in the final polishing path. The technical solution of this invention solves the problem that the robot grinding path generation scheme in related technologies cannot quickly and accurately generate grinding paths covering the workpiece, resulting in low efficiency in the robot grinding path generation process. It can automatically determine the three-dimensional point cloud data of the workpiece surface to be ground and perform adaptive preprocessing on the transformed three-dimensional point cloud data without manual parameter tuning, adapting to workpieces of different sizes and densities. It can automatically convert the three-dimensional point cloud data into a closed triangular mesh model and remove false faces from the triangular mesh model to obtain a high-quality triangular mesh model. It can automatically identify the geometric principal direction vector of the workpiece to be ground based on the triangular mesh model, generate grinding paths for each triangular facet in the triangular mesh model based on the geometric principal direction vector, and then connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece. It also performs process constraint processing on the path points in the grinding path, achieving automatic, fast, and accurate generation of grinding paths covering the workpiece, improving the efficiency of the robot grinding path generation process. Furthermore, it can automatically generate robot motion commands based on the pose information of each path point in the grinding path.
[0064] Common robotic grinding path generation methods require an operator to manually control the robot's end effector to move along the workpiece surface via a teach pendant, recording a series of path points. The robot controller then interpolates and generates a grinding path covering the workpiece. This entire process is extremely time-consuming and labor-intensive, and requires the workpiece to be ground to be fixed in place with high positioning accuracy. The technical solution of this invention eliminates the need for an operator to manually teach the points, automatically, quickly, and accurately generating a grinding path covering the workpiece and robot motion commands.
[0065] Example 2 Figure 2 This is a flowchart illustrating a robot grinding path generation method according to Embodiment 2 of the present invention. Embodiments of the present invention can be combined with various optional solutions from one or more of the above embodiments. For example... Figure 2 As shown, the method includes: Step 201: Determine the three-dimensional point cloud data of the workpiece surface to be ground in the robot base coordinate system.
[0066] Step 202: Perform adaptive preprocessing on the transformed 3D point cloud data.
[0067] Step 203: Convert the preprocessed 3D point cloud data with normals into a closed triangular mesh model.
[0068] Step 204: Sort the density values of each grid vertex in the triangular mesh model, determine the density value corresponding to the low quantile in the density value sequence as the density threshold, and mark the grid vertices in the triangular mesh model whose density values are lower than the density threshold as grid vertices to be deleted.
[0069] Step 205: Set a distance tolerance threshold based on the average point spacing of the preprocessed 3D point cloud data. For each mesh vertex that is not marked as a mesh vertex to be deleted, determine the distance from the mesh vertex to the nearest point cloud point. Mark the mesh vertices whose distance to the nearest point cloud point is greater than the distance tolerance threshold as false patch mesh vertices.
[0070] Step 206: Remove the triangular faces associated with the vertices of the false face mesh in the triangular mesh model, thereby removing the false faces in the triangular mesh model.
[0071] Among them, false mesh vertices are mesh vertices that are marked as mesh vertices to be deleted or false patch mesh vertices.
[0072] Step 207: Identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, and generate a polishing path for each triangular facet in the triangular mesh model based on the geometric principal direction vector.
[0073] Step 208: Connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece to be ground.
[0074] Step 209: Perform process constraint processing on the path points in the grinding path to obtain the final grinding path covering the workpiece to be ground.
[0075] Step 210: Generate robot motion commands based on the pose information of each path point in the final polishing path.
[0076] The technical solution of this invention can automatically determine the three-dimensional point cloud data of the surface of the workpiece to be polished, and perform adaptive preprocessing on the transformed three-dimensional point cloud data without manual parameter adjustment. It is adaptable to workpieces of different sizes and densities. It can automatically convert the three-dimensional point cloud data into a closed triangular mesh model, and use density thresholds and distance thresholds to remove false faces in the triangular mesh model to obtain a high-quality triangular mesh model. It can automatically identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, generate polishing paths for each triangular facet in the triangular mesh model based on the geometric principal direction vector, and then connect the polishing paths of each triangular facet to obtain a polishing path covering the workpiece to be polished. Process constraints are applied to the path points in the polishing path to achieve automatic, fast, and accurate generation of polishing paths covering the workpiece, improving the efficiency of the robot polishing path generation process. It can automatically generate robot motion commands based on the pose information of each path point in the polishing path.
[0077] Example 3 Figure 3 This is a schematic diagram of a robotic grinding path generation device provided in Embodiment 3 of the present invention. The device can be configured in an electronic device. Figure 3 As shown, the device includes: a data determination module 301, a data preprocessing module 302, a model processing module 303, a patch processing module 304, a path generation module 305, a path constraint module 306, and an instruction generation module 307.
[0078] The system comprises the following modules: a data determination module 301, used to determine the three-dimensional point cloud data of the workpiece surface to be polished in the robot's base coordinate system; a data preprocessing module 302, used to perform adaptive preprocessing on the transformed three-dimensional point cloud data; a model processing module 303, used to convert the preprocessed three-dimensional point cloud data with normals into a closed triangular mesh model and remove false faces from the triangular mesh model; a face processing module 304, used to identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, and generate a polishing path for each triangular face in the triangular mesh model based on the geometric principal direction vector; a path generation module 305, used to connect the polishing paths of each triangular face to obtain a polishing path covering the workpiece to be polished; a path constraint module 306, used to perform process constraint processing on the path points in the polishing path to obtain the final polishing path covering the workpiece to be polished; and an instruction generation module 307, used to generate robot motion instructions based on the pose information of each path point in the final polishing path.
[0079] The technical solution of this invention can automatically determine the three-dimensional point cloud data of the surface of the workpiece to be polished, and perform adaptive preprocessing on the transformed three-dimensional point cloud data without manual parameter adjustment. It is adaptable to workpieces of different sizes and densities. It can automatically convert the three-dimensional point cloud data into a closed triangular mesh model and remove false faces in the triangular mesh model to obtain a high-quality triangular mesh model. It can automatically identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, generate the polishing path of each triangular face in the triangular mesh model based on the geometric principal direction vector, and then connect the polishing paths of each triangular face to obtain a polishing path covering the workpiece to be polished. Process constraints are applied to the path points in the polishing path to achieve automatic, fast, and accurate generation of polishing paths covering the workpiece, improving the efficiency of the robot polishing path generation process. It can automatically generate robot motion commands based on the pose information of each path point in the polishing path. Common robotic grinding path generation methods require an operator to manually control the robot's end effector to move along the workpiece surface via a teach pendant, recording a series of path points. The robot controller then interpolates and generates a grinding path covering the workpiece. This entire process is extremely time-consuming and labor-intensive, and requires the workpiece to be ground to be fixed in place with high positioning accuracy. The technical solution of this invention eliminates the need for an operator to manually teach the points, automatically, quickly, and accurately generating a grinding path covering the workpiece and robot motion commands.
[0080] In an optional embodiment of the present invention, the data preprocessing module 302 is specifically used for: calculating the average point spacing of the transformed 3D point cloud data; determining whether the total number of points in the transformed 3D point cloud data exceeds a preset threshold; if the total number of points exceeds the preset threshold, performing voxel downsampling on the transformed 3D point cloud data to obtain downsampled 3D point cloud data, determining the average point spacing of the downsampled 3D point cloud data, and using a pre-set normal estimation algorithm to analyze each point in the downsampled 3D point cloud data to determine the normal direction vector of each point in the downsampled 3D point cloud data; wherein, the downsampled 3D point cloud data is the preprocessed 3D point cloud data.
[0081] In an optional embodiment of the present invention, the data preprocessing module 302 is specifically used to: if the total number of points does not exceed a preset threshold, use a pre-set normal estimation algorithm to analyze each point in the transformed 3D point cloud data and determine the normal direction vector of each point in the transformed 3D point cloud data; wherein, the transformed 3D point cloud data is the preprocessed 3D point cloud data.
[0082] In an optional embodiment of the present invention, the data preprocessing module 302 is specifically configured to: calculate the average point spacing of each point in the transformed 3D point cloud data by random sampling; calculate the voxel magnification factor using the following formula based on the total number of points in the transformed 3D point cloud data and a preset threshold: ratio = sqrt(N / Ntarget); where ratio is the voxel magnification factor, N is the total number of points in the transformed 3D point cloud data, and Ntarget is the preset threshold; calculate the voxel size using the following formula based on the calculated average point spacing and voxel magnification factor: voxel_size = avg_dist × ratio; where voxel_size is the voxel size, avg_dist is the average point spacing, and ratio is the voxel magnification factor; and perform voxel downsampling on the transformed 3D point cloud data using the voxel size to obtain downsampled 3D point cloud data.
[0083] In an optional embodiment of the present invention, the model processing module 303 is specifically configured to: sort the density values of each grid vertex in the triangular mesh model; determine the density value corresponding to the low quantile in the density value sequence as a density threshold; mark the grid vertices in the triangular mesh model whose density values are lower than the density threshold as grid vertices to be deleted; set a distance tolerance threshold based on the average point spacing of the preprocessed 3D point cloud data; determine the distance from each grid vertex to the nearest point cloud point for each grid vertex not marked as a grid vertex to be deleted; mark the grid vertices whose distance to the nearest point cloud point is greater than the distance tolerance threshold as false facet grid vertices; remove the triangular facets associated with the false facet grid vertices in the triangular mesh model, thereby removing the false facets in the triangular mesh model; wherein, a false grid vertex is a grid vertex marked as a grid vertex to be deleted or a false facet grid vertex.
[0084] In an optional embodiment of the present invention, the patch processing module 304 is specifically used to: smooth the triangular mesh model; perform principal component analysis on the mesh vertices in the smoothed triangular mesh model to determine the geometric principal direction vector of the workpiece to be polished; wherein the geometric principal direction vector includes the major axis direction vector, the minor axis direction vector, and the thickness direction vector.
[0085] In an optional embodiment of the present invention, the path constraint module 306 is specifically configured to: for each path point in the grinding path, detect whether the distance between the path point and the edge of the workpiece to be ground is less than a safe distance, and delete the path points whose distance to the edge of the workpiece to be ground is less than the safe distance; for each path point in the grinding path, detect whether the distance between the path point and adjacent path points is less than a minimum distance, and delete the path points whose distance to adjacent path points is less than the minimum distance; and determine the grinding path after deletion as the final grinding path covering the workpiece to be ground.
[0086] In an optional embodiment of the present invention, the instruction generation module 307 is specifically configured to: smooth the normal direction vectors of each path point in the final grinding path to obtain smoothed normal direction vectors of each path point; for each path point in the final grinding path, construct a robot end effector pose rotation matrix for the path point based on the smoothed normal direction vector of the path point, convert the robot end effector pose rotation matrix of the path point into pose information of the path point, generate robot motion instructions corresponding to the path point based on the pose information of the path point; sort the robot motion instructions corresponding to each path point to obtain a robot motion instruction sequence; and add a lifting instruction to the end of the robot motion instruction sequence to obtain a robot motion instruction corresponding to the workpiece to be ground.
[0087] In an optional embodiment of the present invention, the instruction generation module 307 is specifically used to: for each path point in the grinding path, add the pose information of the path point to the robot motion instruction template to obtain the robot motion instruction corresponding to the path point.
[0088] The robot grinding path generation device provided in this embodiment of the invention can execute the robot grinding path generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0089] Example 4 Figure 4A schematic diagram of an electronic device 10, which can be used to implement the robotic grinding path generation method of embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0090] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory 12 or a random access memory 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 12 or loaded from storage unit 18 into the random access memory 13. The random access memory 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, read-only memory 12, and random access memory 13 are interconnected via a bus 14. An input / output interface 15 is also connected to the bus 14.
[0091] Multiple components in electronic device 10 are connected to input / output interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0092] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the robotic grinding path generation method.
[0093] In some embodiments, the robotic polishing path generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via read-only memory 12 and / or communication unit 19. When the computer program is loaded into random access memory 13 and executed by processor 11, one or more steps of the robotic polishing path generation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the robotic polishing path generation method by any other suitable means (e.g., by means of firmware).
[0094] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), payload programmable logic devices (PLCs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0095] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or electronic device.
[0096] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0097] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube or liquid crystal display monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0098] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0099] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system. This addresses the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.
[0100] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0101] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for generating a robot grinding path, characterized in that, include: Determine the three-dimensional point cloud data of the workpiece surface to be ground in the robot base coordinate system; Adaptive preprocessing is performed on the transformed 3D point cloud data; The preprocessed 3D point cloud data with normals is converted into a closed triangular mesh model, and false faces in the triangular mesh model are removed. The geometric principal direction vector of the workpiece to be polished is identified based on the triangular mesh model. For each triangular facet in the triangular mesh model, a polishing path for the triangular facet is generated based on the geometric principal direction vector. The grinding paths of each triangular facet are connected to obtain a grinding path covering the workpiece to be ground. The path points in the grinding path are subjected to process constraint processing to obtain the final grinding path covering the workpiece to be ground. Based on the pose information of each path point in the final polishing path, robot motion commands are generated.
2. The robot grinding path generation method according to claim 1, characterized in that, Adaptive preprocessing is performed on the transformed 3D point cloud data, including: Calculate the average point spacing of the transformed 3D point cloud data; Determine whether the total number of points in the transformed 3D point cloud data exceeds a preset threshold; If the total number of points exceeds a preset threshold, the transformed 3D point cloud data is downsampled using voxels to obtain downsampled 3D point cloud data. The average point spacing of the downsampled 3D point cloud data is determined, and a pre-set normal estimation algorithm is used to analyze each point in the downsampled 3D point cloud data to determine the normal direction vector of each point in the downsampled 3D point cloud data. The downsampled 3D point cloud data is the preprocessed 3D point cloud data.
3. The robot grinding path generation method according to claim 2, characterized in that, After determining whether the total number of points in the transformed 3D point cloud data exceeds a preset threshold, the process also includes: If the total number of points does not exceed the preset threshold, a pre-set normal estimation algorithm is used to analyze each point in the transformed 3D point cloud data to determine the normal direction vector of each point in the transformed 3D point cloud data; wherein, the transformed 3D point cloud data is the pre-processed 3D point cloud data.
4. The robot grinding path generation method according to claim 2, characterized in that, The transformed 3D point cloud data is downsampled using voxels to obtain downsampled 3D point cloud data, including: The average point spacing of each point in the transformed 3D point cloud data is calculated by random sampling. The voxel magnification factor is calculated using the following formula, based on the total number of points in the transformed 3D point cloud data and a preset threshold: ratio = sqrt(N / Ntarget); Where ratio is the voxel magnification factor, N is the total number of points in the transformed 3D point cloud data, and Ntarget is the preset threshold; Calculate the voxel size using the following formula, based on the calculated average pixel spacing and voxel magnification: voxel_size = avg_dist × ratio; Where voxel_size is the voxel size, avg_dist is the average pixel spacing, and ratio is the voxel magnification factor; Voxel downsampling is performed on the transformed 3D point cloud data using voxel size to obtain downsampled 3D point cloud data.
5. The robot grinding path generation method according to claim 1, characterized in that, Removing spurious faces from the triangular mesh model includes: The density values of each grid vertex in the triangular mesh model are sorted, and the density value corresponding to the low quantile in the density value sequence is determined as the density threshold. Grid vertices in the triangular mesh model with density values lower than the density threshold are marked as grid vertices to be deleted. Based on the average point spacing of the preprocessed 3D point cloud data, a distance tolerance threshold is set. For each mesh vertex that is not marked as a mesh vertex to be deleted, the distance from the mesh vertex to the nearest point cloud point is determined. Mesh vertices whose distance to the nearest point cloud point is greater than the distance tolerance threshold are marked as false patch mesh vertices. Remove the triangular facets associated with false facet mesh vertices in the triangular mesh model, thereby removing the false facets in the triangular mesh model; wherein, a false mesh vertex is a mesh vertex that is marked as a mesh vertex to be deleted or a false facet mesh vertex.
6. The robot grinding path generation method according to claim 1, characterized in that, Identifying the principal geometric direction vector of the workpiece to be ground based on the triangular mesh model includes: Perform mesh smoothing on the triangular mesh model; Principal component analysis is performed on the vertices of the smoothed triangular mesh model to determine the geometric principal direction vector of the workpiece to be polished; wherein, the geometric principal direction vector includes the major axis direction vector, the minor axis direction vector, and the thickness direction vector.
7. The robot grinding path generation method according to claim 1, characterized in that, The path points in the grinding path are subjected to process constraint processing to obtain the final grinding path covering the workpiece to be ground, including: For each path point in the grinding path, check whether the distance between the path point and the edge of the workpiece to be ground is less than the safe distance, and delete the path points whose distance to the edge of the workpiece to be ground is less than the safe distance. For each path point in the polishing path, check whether the distance between the path point and its adjacent path points is less than the minimum distance, and delete the path points whose distance between adjacent path points is less than the minimum distance; The grinding path after deletion is determined as the final grinding path covering the workpiece to be ground.
8. The robot grinding path generation method according to claim 1, characterized in that, Based on the pose information of each path point in the final polishing path, robot motion commands are generated, including: The normal direction vectors of each path point in the final polishing path are smoothed to obtain the smoothed normal direction vectors of each path point. For each path point in the final polishing path, a robot end-effector pose rotation matrix is constructed based on the smooth normal direction vector of the path point. The robot end-effector pose rotation matrix of the path point is converted into the pose information of the path point. Based on the pose information of the path point, robot motion commands corresponding to the path point are generated. The robot motion commands corresponding to each path point are sorted to obtain a sequence of robot motion commands; A lifting command is added to the end of the robot motion command sequence to obtain the robot motion command corresponding to the workpiece to be polished.
9. The robot grinding path generation method according to claim 8, characterized in that, Based on the pose information of the path points, generate robot motion commands corresponding to the path points, including: For each path point in the grinding path, the robot motion command corresponding to the path point is obtained by adding the pose information of the path point to the robot motion command template.
10. A robot grinding path generation device, characterized in that, include: The data determination module is used to determine the three-dimensional point cloud data of the surface of the workpiece to be ground in the robot's base coordinate system. The data preprocessing module is used to perform adaptive preprocessing on the transformed 3D point cloud data; The model processing module is used to convert the preprocessed 3D point cloud data with normals into a closed triangular mesh model and remove false faces from the triangular mesh model. The surface processing module is used to identify the geometric principal direction vector of the workpiece to be polished based on the triangular mesh model, and generate a polishing path for each triangular surface in the triangular mesh model based on the geometric principal direction vector. The path generation module is used to connect the grinding paths of each triangular facet to obtain a grinding path covering the workpiece to be ground. The path constraint module is used to perform process constraint processing on the path points in the grinding path to obtain the final grinding path covering the workpiece to be ground. The instruction generation module is used to generate robot motion instructions based on the pose information of each path point in the final grinding path.