Planning method and device for plane touch measurement obstacle avoidance path on measuring machine
By using plane dot measurement and point cloud data processing on the measuring machine in the three-coordinate detection technology, an effective plane touch measurement obstacle avoidance path for complex workpieces is generated, which solves the problem of insufficient efficiency and accuracy of path planning of complex workpieces in the prior art. Efficient and accurate measurement path planning is achieved.
Patent Information
- Application Number
- CN202411410857.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-10
AI Technical Summary
The existing three-coordinate detection technology is limited in efficiency and accuracy when dealing with the measurement path planning of complex workpieces, especially workpieces containing grooves and bosses.
By performing plane pointing measurements on the measuring machine, obtain standard plane point cloud data of the workpiece to be tested, determine the starting point and moving step size, establish a local coordinate system, determine whether there is a cloud data in the quadrant, and filter the effective path points to generate plane touch measurement Obstacle avoidance path.
It significantly reduces the data volume and calculation requirements, improves the efficiency of path planning, achieves accurate obstacle avoidance, ensures measurement accuracy, and greatly improves path effectiveness.
Smart Images

Figure CN119437033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-coordinate detection, and in particular to a method and device for planning a plane touch-detection obstacle avoidance path on a measuring machine. Background Art
[0002] In the field of three-dimensional measurement technology, the main challenge currently lies in the measurement path planning for complex workpieces. In particular, when the workpiece surface contains grooves and bosses, it is not efficient to directly use CAD model data for obstacle avoidance path planning. This is because the model data volume is huge and the processing is complex, and it is often not flexible enough when converted into an actual measurement path.
[0003] Therefore, the efficiency and accuracy of obstacle avoidance path planning in the related art methods are limited when processing these complex geometric shapes. In order to improve this situation, a method is needed that can simplify data processing and improve the efficiency of path generation. Summary of the invention
[0004] The present invention provides a method and device for planar touch measurement and obstacle avoidance path planning on a measuring machine, and the technical solution is as follows:
[0005] On the one hand, a method for planar touch measurement and obstacle avoidance path planning on a measuring machine is provided, the method comprising:
[0006] When performing plane dot measurement on a measuring machine, obtain the standard plane of the workpiece to be measured;
[0007] Determine a starting point according to the point cloud data of the standard plane, wherein the starting point serves as the starting point of path planning;
[0008] Determine a moving step length according to the starting point and the boundary value of the point cloud data;
[0009] Planning a plane path standard point in the standard plane according to the starting point and the moving step length;
[0010] A local PCS coordinate system is established according to each plane standard path point, and the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane;
[0011] Determine whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point;
[0012] In response to the presence of point cloud data in four quadrants around the coordinate system of the plane standard path point, the plane path standard point is screened for validity to obtain valid path points of the standard plane, and the valid path points are plane touch obstacle avoidance paths.
[0013] Optionally, determining the starting point according to the point cloud data of the standard plane includes:
[0014] In the standard plane, calculate the minimum boundary values minX, minY and minZ of each point cloud data in three dimensions, and the maximum boundary values maxX, maxY and maxZ;
[0015] The minimum boundary value of the three dimensions is taken as the first plane, denoted as pMin(minX,minY,minZ);
[0016] The maximum boundary value of the three dimensions is taken as the second plane, denoted as pMax(maxX,maxY,maxZ);
[0017] Project the first plane and the second plane onto an input plane, recorded as input plane planeIn;
[0018] Get the X starting line segment lineX according to the point startX(pMax.x,0,0) and the point endX(pMin.x,0,0);
[0019] Get the Y starting line segment lineY according to the point startY(0,pMin.y,0) and the point endY(0,pMax.y,0);
[0020] The intersection of the X starting line segment lineX and the Y starting line segment lineY is determined as the starting point, which is recorded as the starting point pA.
[0021] Optionally, the method further includes:
[0022] In response to the normal vector of the input plane planeIn being (0, 0, 1), the starting point pA is expressed as (pMin.x, pMax.y, pMin.z);
[0023] In response to the normal vector of the input plane planeIn being (1, 0, 0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z);
[0024] In response to the normal vector of the input plane planeIn being (0, 1, 0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z).
[0025] Optionally, determining the moving step length according to the boundary value between the starting point and the point cloud data includes:
[0026] The closest X-axis distance between the starting point pA and the point cloud data of the standard plane is recorded as startU, the closest X-axis distance between the second plane pMax and the point cloud data of the standard plane is recorded as endU, the number of path columns is recorded as numU, and the number of path rows is recorded as numV;
[0027] Calculate the lateral movement step length xGap according to the startU, the endU and the numU, and the calculation process is xGap=((pA-pMax)-startU-endU) / (numU-1);
[0028] The closest Y-axis distance between the starting point pA and the point cloud data of the standard plane is recorded as startV;
[0029] The closest Y-axis distance between the second plane pMax and the point cloud data of the standard plane is recorded as endV;
[0030] The vertical movement step length yGap is calculated according to the startV, the endV and the numV, and the calculation process is yGap=((pA-pMin)-startV-endV) / (numV-1);
[0031] The moving step length is determined according to the lateral moving step length xGap and the vertical moving step length yGap.
[0032] Optionally, planning a plane path standard point in the standard plane according to the starting point and the moving step length includes:
[0033] The planned plane path standard point is obtained according to the lateral movement step length xGap, the vertical movement step length yGap, the starting point pA, the startU, the endU, the startV and the endV.
[0034] Optionally, in response to the presence of point cloud data in four quadrants around the coordinate system of the plane standard path point, screening the plane path standard point for validity to obtain the valid path point of the standard plane includes:
[0035] Set the ROI cylinder area of each plane path standard point, where the center of the cylinder is the corresponding plane path standard point, the cylinder vector is the normal vector of the input plane, and the cylinder radius is determined according to the minimum distance between adjacent points of the point cloud data;
[0036] In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is less than the preset number, the plane path standard point corresponding to the current ROI cylindrical area is determined to be an invalid path point and is screened out;
[0037] In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is not less than the preset number, a coordinate system is established with the plane path standard point corresponding to the current ROI cylindrical area as the origin, the line segment lineX direction as the X-axis direction, and the line segment lineY direction as the Y-axis direction;
[0038] In response to the presence of point cloud data in all four quadrants of the coordinate system, the current plane path standard point is determined to be a valid path point.
[0039] On the other hand, a device for plane touch measurement and obstacle avoidance path planning on a measuring machine is provided, the device comprising:
[0040] The plane acquisition module is used to obtain the standard plane of the workpiece to be measured when performing plane dot measurement on the measuring machine;
[0041] A starting point acquisition module, used to determine a starting point according to the point cloud data of the standard plane, wherein the starting point serves as the starting point of the path planning;
[0042] A step length determination module, used to determine a moving step length according to a boundary value between the starting point and the point cloud data;
[0043] A path planning module, used to plan a plane path standard point in the standard plane according to the starting point and the moving step length;
[0044] A coordinate establishment module, used to establish a local PCS coordinate system according to each plane standard path point, wherein the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane;
[0045] The quadrant judgment module is used to judge whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point;
[0046] The path obstacle avoidance module, in response to the presence of point cloud data in four quadrants around the coordinate system where the plane standard path point exists, performs validity screening on the plane path standard point to obtain the valid path point of the standard plane, and the valid path point is the plane touch obstacle avoidance path.
[0047] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the method for plane touch measurement and obstacle avoidance path planning on a measuring machine as described in the above aspects.
[0048] On the other hand, a computer program product is also provided, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the planar touch measurement and obstacle avoidance path planning method on a measuring machine as described in the above aspect.
[0049] In the present invention, the data volume is optimized. By only using the point cloud data of the geometric elements to be measured rather than the entire model information, the data volume is significantly reduced, and the calculation and storage requirements are reduced; the path planning efficiency is improved, and the point cloud data enables the path planning algorithm to generate a valid path more quickly, avoiding processing delays caused by model complexity; accurate obstacle avoidance is achieved. When generating a standard path, the path points are corrected through obstacle avoidance processing to adapt to the geometric features of the actual workpiece, avoiding interference with grooves and bosses, and ensuring measurement accuracy; the path effectiveness is greatly improved. By setting the ROI area and screening invalid path points, the effectiveness of the planned path and the measurement accuracy are improved. Plane touch obstacle avoidance path Plane touch obstacle avoidance path BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flow chart of a method for planar touch-touch obstacle avoidance path planning on a measuring machine provided by an exemplary embodiment of the present application is shown;
[0051] Figure 2 A schematic diagram of determining the coordinates of line segments lineX and lineY provided by an exemplary embodiment of the present application is shown;
[0052] Figure 3 A coordinate schematic diagram of a moving step length confirmation process provided by an exemplary embodiment of the present application is shown;
[0053] Figure 4 A schematic diagram of a U-shaped path pattern provided by an exemplary embodiment of the present application is shown;
[0054] Figure 5 A schematic diagram of a V-shaped path pattern provided by an exemplary embodiment of the present application is shown;
[0055] Figure 6 A schematic diagram of invalid path points provided by an exemplary embodiment of the present application is shown;
[0056] Figure 7 A schematic diagram of valid path points provided by an exemplary embodiment of the present application is shown;
[0057] Figures 8 to 11 A schematic diagram of a path planning process after a model is imported provided by an exemplary embodiment of the present application is shown;
[0058] Fig.12 A structural block diagram of a plane touch obstacle avoidance path planning device on a measuring machine provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0060] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0061] Figure 1 It is a flowchart of a method for plane touch and obstacle avoidance path planning on a measuring machine provided by an exemplary embodiment of the present application. The method is applicable to an operating terminal device, which is embedded with the execution process of the plane touch and obstacle avoidance path planning method. Without limitation, the operating device can be another device that communicates and exchanges information with the measuring machine, and can also be integrated with the measuring machine to realize integrated plane touch and obstacle avoidance.
[0062] Step 101, when performing plane dot measurement on a measuring machine, a standard plane of a workpiece to be measured is obtained.
[0063] Step 102, determining a starting point based on the point cloud data of the standard plane, the starting point serves as the starting point of the path planning.
[0064] Among them, the starting point is determined according to the point cloud data of the standard plane, and the Figure 2 As shown, step 102 includes the following execution contents.
[0065] In the standard plane, traverse and calculate the three-dimensional minimum boundary values minX, minY and minZ, as well as the maximum boundary values maxX, maxY and maxZ of each point cloud data, and take the three-dimensional minimum boundary value as the first plane, denoted as pMin (minX, minY, minZ), and take the three-dimensional maximum boundary value as the second plane, denoted as pMax (maxX, maxY, maxZ).
[0066] Furthermore, the first plane and the second plane are projected onto the input plane, which is recorded as the input plane planeIn.
[0067] like Figure 2 As shown, the X starting line segment lineX is obtained according to the starting point startX(pMax.x,0,0) and the end point endX(pMin.x,0,0), and the Y starting line segment lineY is obtained according to the starting point startY(0,pMin.y,0) and the end point endY(0,pMax.y,0).
[0068] The intersection of the X starting line segment lineX and the Y starting line segment lineY is confirmed as the starting point, recorded as the starting point pA, and pA can be regarded as the starting position of the entire point cloud.
[0069] In addition, the following special case of the normal vector of the input plane planeIn needs to be considered.
[0070] In response to the normal vector of the input plane planeIn being (0,0,1), the starting point pA is expressed as (pMin.x, pMax.y, pMin.z); in response to the normal vector of the input plane planeIn being (1,0,0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z); in response to the normal vector of the input plane planeIn being (0,1,0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z).
[0071] Step 103: Determine the moving step length according to the starting point and the boundary value of the point cloud data.
[0072] In a possible implementation, the execution process of determining the moving step length according to the boundary value of the starting point and the point cloud data includes the following content.
[0073] In the X direction, some known information is first obtained. The X-axis distance between the starting point pA and the point cloud data of the standard plane is recorded as startU, and the X-axis distance between the second plane pMax and the point cloud data of the standard plane is recorded as endU.
[0074] The lateral movement step length xGap is calculated based on the known startU, endU and numU. The calculation process is xGap = ((pA-pMax)-startU-endU) / (numU-1).
[0075] The same is true for the Y direction. Get some known information, record the closest X-axis distance between the starting point pA and the point cloud data of the standard plane as startU, record the closest X-axis distance between the second plane pMax and the point cloud data of the standard plane as endU, record the number of path columns as numU, and the number of path rows as numV.
[0076] The vertical movement step length yGap is calculated based on the known startV, endV and numV, and the calculation process is yGap=((pA-pMin)-startV-endV) / (numV-1).
[0077] like Figure 3 As shown, the moving step length is determined according to the horizontal moving step length xGap and the vertical moving step length yGap. Figure 3 In the figure, the black points are the input original point cloud, that is, the point cloud data of the standard plane, and the brown points are the standard points of the planned plane path.
[0078] Step 104, plan the plane path standard points in the standard plane according to the starting point and the moving step length.
[0079] At this point, through step 102 and step 103, the moving directions and moving steps in the X and Y directions can be known, and the planned plane path standard points can be obtained according to the horizontal moving step xGap, the vertical moving step yGap, the starting point pA, startU, endU, startV and endV. Figure 4 and Figure 5 As shown, Figure 4 This is a schematic diagram of the U-shaped path style. Figure 5 This is a schematic diagram of the V-shaped path style.
[0080] Step 105: Establish a local PCS coordinate system according to each plane standard path point.
[0081] Among them, the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane.
[0082] Step 106 , determining whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point.
[0083] Step 107 , in response to the presence of point cloud data in four quadrants around the coordinate system where the plane standard path point exists, the plane path standard points are screened for validity to obtain valid path points of the standard plane.
[0084] Among them, the valid path point is the plane touch obstacle avoidance path.
[0085] like Figure 6 As shown, the blue points are the input original point cloud, that is, the point cloud data actually scanned by the standard plane, and the yellow points are the standard points of the plane path planned on the plane. It can be seen that this path point contains some invalid paths, so the invalid path points need to be removed.
[0086] First, set the ROI cylindrical area for each plane path standard point, where the cylinder center is the corresponding plane path standard point, the cylinder vector is the normal vector of the input plane, and the cylinder radius is determined according to the minimum distance between adjacent points in the point cloud data. In an example, the cylinder radius is more than 1.5 times the minimum distance between adjacent blue points. If it is too small, it will be detrimental to the ROI selection effect. Of course, those skilled in the art can customize it according to the selection effect.
[0087] In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is less than the preset number, the plane path standard point corresponding to the current ROI cylindrical area is determined to be an invalid path point and is screened out.
[0088] In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is not less than the preset number of plane path standard points, a coordinate system is established with the plane path standard point corresponding to the current ROI cylindrical area as the origin, the line segment lineX direction as the X-axis direction, and the line segment lineY direction as the Y-axis direction.
[0089] In one example, the preset number is 4, that is, the plane path standard point is used as the origin of the coordinate system and expanded into 4 quadrants. If the ROI area can enclose no less than 4 point clouds, it proves that the path point is within the valid range and is not outside or on the edge of the point cloud.
[0090] Only when there are point cloud data in all four quadrants of the coordinate system, the current plane path standard point is determined to be a valid path point. Figure 7 As shown, in Figure 6 On the basis of Figure 7 The pink point in the middle is the smallest valid path point. Finally, the invalid points are screened out to obtain the valid path points of the standard plane.
[0091] Based on the above, please refer to Figures 8 to 12 , an exemplary embodiment is given.
[0092] First, import the model. The structure of the model is as follows Figure 8 As shown ( Figure 8 Figure a is the axial view of the model, and figure b is the top view of the model); further, Fig. 9 As shown, pick up the standard plane 100 and convert the plane model into point cloud data; further, as Fig.10 As shown, the plane path standard points are generated on the standard plane 100; finally, the path points are corrected according to the process of step 105 to obtain the valid path points of the standard plane 100.
[0093] In summary, the present application provides a method for planar touch measurement and obstacle avoidance path planning on a measuring machine, which has the following technical effects. The data volume is optimized by using only the point cloud data of the geometric elements to be measured, rather than the entire model information, which significantly reduces the data volume and reduces the computing and storage requirements; the path planning efficiency is improved, and the point cloud data enables the path planning algorithm to generate effective paths more quickly, avoiding processing delays caused by model complexity; accurate obstacle avoidance is achieved, and when generating a standard path, the path points are corrected to adapt to the geometric features of the actual workpiece through obstacle avoidance processing, avoiding interference with grooves and bosses, and ensuring the accuracy of the measurement; the path effectiveness is greatly improved, and the effectiveness and measurement accuracy of the planned path are improved by setting the ROI area and screening invalid path points.
[0094] Please refer to Fig.12, which shows a structural block diagram of a plane touch obstacle avoidance path planning device on a measuring machine provided by an exemplary embodiment of the present application, the device comprising:
[0095] The plane acquisition module 1201 is used to obtain the standard plane of the workpiece to be measured when performing plane dot measurement on the measuring machine;
[0096] A starting point acquisition module 1202 is used to determine a starting point according to the point cloud data of the standard plane, and the starting point serves as the starting point of the path planning;
[0097] A step length determination module 1203, configured to determine a moving step length according to a boundary value between the starting point and the point cloud data;
[0098] A path planning module 1204 is used to plan a plane path standard point in the standard plane according to the starting point and the moving step length;
[0099] A coordinate establishment module 1205 is used to establish a local PCS coordinate system according to each plane standard path point, and the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane;
[0100] A quadrant determination module 1206 is used to determine whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point;
[0101] The path obstacle avoidance module 1207, in response to the presence of point cloud data in four quadrants around the coordinate system of the plane standard path point, performs validity screening on the plane path standard point to obtain valid path points of the standard plane, and the valid path points are the plane touch obstacle avoidance path.
[0102] Optionally, the starting point acquisition module 1202 includes:
[0103] A first acquisition unit is used to calculate the minimum boundary values minX, minY and minZ of each point cloud data in three dimensions, and the maximum boundary values maxX, maxY and maxZ in the standard plane;
[0104] A second acquisition unit is used to take the minimum boundary value of the three dimensions as the first plane, which is recorded as pMin (minX, minY, minZ);
[0105] A third acquisition unit is used to take the maximum boundary value of the three dimensions as the second plane, recorded as pMax(maxX, maxY, maxZ);
[0106] a fourth acquisition unit, configured to project the first plane and the second plane onto an input plane, recorded as input plane planeIn;
[0107] A fifth acquisition unit is used to obtain the X starting line segment lineX according to the point startX(pMax.x,0,0) and the point endX(pMin.x,0,0);
[0108] The sixth acquisition unit is used to obtain the Y starting line segment lineY according to the point startY(0,pMin.y,0) and the point endY(0,pMax.y,0);
[0109] A seventh acquiring unit is used to determine the starting point according to the intersection of the X starting line segment lineX and the Y starting line segment lineY, and record it as the starting point pA.
[0110] Optionally, the device further includes:
[0111] A first representation module, for responding to the normal vector of the input plane planeIn being (0, 0, 1), the starting point pA is represented as (pMin.x, pMax.y, pMin.z);
[0112] A second representation module, for responding to the normal vector of the input plane planeIn being (1, 0, 0), the starting point pA is represented as (pMin.x, pMin.y, pMax.z);
[0113] The third representation module is used to represent the starting point pA as (pMin.x, pMin.y, pMax.z) in response to the normal vector of the input plane planeIn being (0, 1, 0).
[0114] Optionally, the step length determination module 1203 includes:
[0115] A first determining unit is used to record the closest X-axis distance between the starting point pA and the point cloud data of the standard plane as startU, record the closest X-axis distance between the second plane pMax and the point cloud data of the standard plane as endU, record the number of path columns as numU, and record the number of path rows as numV;
[0116] A second determining unit is used to calculate a lateral movement step length xGap according to the startU, the endU and the numU, wherein the calculation process is xGap=((pA-pMax)-startU-endU) / (numU-1);
[0117] A third determining unit is used to record the closest Y-axis distance between the starting point pA and the point cloud data of the standard plane as startV;
[0118] A fourth determining unit, configured to record the closest Y-axis distance between the second plane pMax and the point cloud data of the standard plane as endV;
[0119] A fifth determining unit, configured to calculate a vertical moving step length yGap according to the startV, the endV and the numV, wherein the calculation process is yGap=((pA-pMin)-startV-endV) / (numV-1);
[0120] The sixth determining unit is used to determine the moving step length according to the lateral moving step length xGap and the vertical moving step length yGap.
[0121] Optionally, the path planning module 1204 includes:
[0122] The first planning unit is used to obtain the planned plane path standard point according to the lateral movement step length xGap, the vertical movement step length yGap, the starting point pA, the startU, the endU, the startV and the endV.
[0123] Optionally, the path obstacle avoidance module 1207 includes:
[0124] A first obstacle avoidance unit is used to set the ROI cylinder area of each plane path standard point, wherein the center of the cylinder is the corresponding plane path standard point, the cylinder vector is the normal vector of the input plane, and the cylinder radius is determined according to the minimum distance between adjacent points of the point cloud data;
[0125] The second obstacle avoidance unit is used to determine that the plane path standard point corresponding to the current ROI cylindrical area is an invalid path point and screen it out if the number of point cloud data is less than a preset number within the ROI cylindrical area of each plane path standard point;
[0126] The third obstacle avoidance unit is used to establish a coordinate system with the plane path standard point corresponding to the current ROI cylindrical area as the origin, the line segment lineX direction as the X-axis direction, and the line segment lineY direction as the Y-axis direction within the ROI cylindrical area of each plane path standard point if the amount of point cloud data is not less than the preset amount;
[0127] The fourth obstacle avoidance unit is used to determine that the current plane path standard point is a valid path point in response to the presence of point cloud data in all four quadrants of the coordinate system.
[0128] At least one instruction is stored in the memory, and the at least one instruction is configured to be executed by one or more processors to implement the functions of each step in the above-mentioned plane touch measurement obstacle avoidance path planning method on the measuring machine.
[0129] The present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is loaded and executed by a processor to implement the planar touch measurement and obstacle avoidance path planning method on a measuring machine as provided in the above-mentioned embodiments.
[0130] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk, etc. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM).
[0131] The above serial numbers of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0132] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0133] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for plane touch measurement and obstacle avoidance path planning on a measuring machine, characterized in that: The method comprises: When performing plane dot measurement on a measuring machine, obtain the standard plane of the workpiece to be measured; Determine a starting point according to the point cloud data of the standard plane, wherein the starting point serves as the starting point of path planning; Determine a moving step length according to the starting point and the boundary value of the point cloud data; Planning a plane path standard point in the standard plane according to the starting point and the moving step length; A local PCS coordinate system is established according to each plane standard path point, and the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane; Determine whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point; In response to the presence of point cloud data in four quadrants around the coordinate system of the plane standard path point, the plane path standard point is screened for validity to obtain valid path points of the standard plane, and the valid path points are plane touch obstacle avoidance paths.
2. The method according to claim 1, characterized in that Determining the starting point according to the point cloud data of the standard plane includes: In the standard plane, calculate the minimum boundary values minX, minY and minZ of each point cloud data in three dimensions, and the maximum boundary values maxX, maxY and maxZ; The minimum boundary value of the three dimensions is taken as the first plane, denoted as pMin(minX,minY,minZ); The maximum boundary value of the three dimensions is taken as the second plane, denoted as pMax(maxX,maxY,maxZ); Project the first plane and the second plane onto an input plane, recorded as input plane planeIn; Get the X starting line segment lineX according to the point startX(pMax.x,0,0) and the point endX(pMin.x,0,0); Get the Y starting line segment lineY according to the point startY(0,pMin.y,0) and the point endY(0,pMax.y,0); The intersection of the X starting line segment lineX and the Y starting line segment lineY is determined as the starting point, which is recorded as the starting point pA.
3. The method according to claim 2, characterized in that The method further comprises: In response to the normal vector of the input plane planeIn being (0, 0, 1), the starting point pA is expressed as (pMin.x, pMax.y, pMin.z); In response to the normal vector of the input plane planeIn being (1, 0, 0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z); In response to the normal vector of the input plane planeIn being (0, 1, 0), the starting point pA is expressed as (pMin.x, pMin.y, pMax.z).
4. The method according to claim 2, characterized in that: The step of determining the moving step length according to the boundary value between the starting point and the point cloud data includes: The closest X-axis distance between the starting point pA and the point cloud data of the standard plane is recorded as startU, the closest X-axis distance between the second plane pMax and the point cloud data of the standard plane is recorded as endU, the number of path columns is recorded as numU, and the number of path rows is recorded as numV; Calculate the lateral movement step length xGap according to the startU, the endU and the numU, and the calculation process is xGap=((pA-pMax)-startU-endU) / (numU-1); The closest Y-axis distance between the starting point pA and the point cloud data of the standard plane is recorded as startV; The closest Y-axis distance between the second plane pMax and the point cloud data of the standard plane is recorded as endV; The vertical movement step length yGap is calculated according to the startV, the endV and the numV, and the calculation process is yGap=((pA-pMin)-startV-endV) / (numV-1); The moving step length is determined according to the lateral moving step length xGap and the vertical moving step length yGap.
5. The method according to claim 4, characterized in that The step of planning a plane path standard point in the standard plane according to the starting point and the moving step length includes: The planned plane path standard point is obtained according to the lateral movement step length xGap, the vertical movement step length yGap, the starting point pA, the startU, the endU, the startV and the endV.
6. The method according to claim 5, characterized in that In response to the presence of point cloud data in four quadrants around the coordinate system of the plane standard path point, screening the plane path standard point for validity to obtain the valid path point of the standard plane includes: Set the ROI cylinder area of each plane path standard point, where the center of the cylinder is the corresponding plane path standard point, the cylinder vector is the normal vector of the input plane, and the cylinder radius is determined according to the minimum distance between adjacent points of the point cloud data; In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is less than the preset number, the plane path standard point corresponding to the current ROI cylindrical area is determined to be an invalid path point and is screened out; In the ROI cylindrical area of each plane path standard point, if the number of point cloud data is not less than the preset number, a coordinate system is established with the plane path standard point corresponding to the current ROI cylindrical area as the origin, the line segment lineX direction as the X-axis direction, and the line segment lineY direction as the Y-axis direction; In response to the presence of point cloud data in all four quadrants of the coordinate system, the current plane path standard point is determined to be a valid path point.
7. A device for plane touch measurement and obstacle avoidance path planning on a measuring machine, characterized in that: The device comprises: The plane acquisition module is used to obtain the standard plane of the workpiece to be measured when performing plane dot measurement on the measuring machine; A starting point acquisition module, used to determine a starting point according to the point cloud data of the standard plane, wherein the starting point serves as the starting point of the path planning; A step length determination module, used to determine a moving step length according to a boundary value between the starting point and the point cloud data; A path planning module, used to plan a plane path standard point in the standard plane according to the starting point and the moving step length; A coordinate establishment module, used to establish a local PCS coordinate system according to each plane standard path point, and the point cloud data of the standard plane in the local PCS coordinate system is transformed to the XOY plane; The quadrant judgment module is used to judge whether there is point cloud data in the four quadrants around the PCS local coordinate system of each plane standard path point; The path obstacle avoidance module, in response to the presence of point cloud data in four quadrants around the coordinate system where the plane standard path point exists, performs validity screening on the plane path standard point to obtain the valid path point of the standard plane, and the valid path point is the plane touch obstacle avoidance path.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method for plane touch measurement and obstacle avoidance path planning on a measuring machine as described in any one of claims 1 to 6 above.