Line laser on-machine measurement path planning method and device and storage medium

By constructing the optimal measurement pose objective function and local-global path planning, the problems of attitude discontinuity and poor path smoothness in line laser on-machine measurement are solved, realizing high-precision measurement of complex curved surfaces and improving the stability and consistency of measurement data.

CN120831107APending Publication Date: 2025-10-24TSINGHUA UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510990866.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing line laser in-machine measurement technology suffers from problems such as large variations in measurement pose, discontinuous posture, lack of comprehensive consideration of the geometric characteristics of complex curved surfaces, and poor path smoothness, resulting in insufficient measurement accuracy and consistency.

Method used

A path planning method based on constant measurement pose constraints is adopted. By constructing the optimal measurement pose objective function, the attitude change of the line laser is optimized, and a smooth measurement path is generated by combining a local-global path planning strategy.

Benefits of technology

It improves the imaging stability and consistency of line laser scanning data, outputs a continuous and smooth measurement path, and enhances the measurement accuracy and reliability of complex curved surface components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120831107A_ABST
    Figure CN120831107A_ABST
Patent Text Reader

Abstract

The invention provides a line laser on-machine measurement path planning method. The method comprises the following steps: taking a point corresponding to a minimum value of an average geodesic distance on a to-be-measured curved surface as an initial pose measurement point; defining a line laser optimal pose measurement coordinate system, and calculating all intersection points on an intersection line of the line laser measurement plane and the curved surface to be measured to obtain a series of line laser simulation measurement result points and normal vectors thereof; the adjustment angle from the current iteration direction vector to the next iteration direction vector of the line laser serves as an optimization variable to construct a line laser local optimal measurement pose target function, the optimal adjustment angle is solved, and the line laser local optimal measurement pose is obtained; iteratively solving to obtain a fairing line laser measurement path 1, and calculating and optimizing the visibility of the fairing line laser measurement path 1 to obtain a line laser measurement path 2; fitting and interpolation are carried out on the line laser measurement path 3 to obtain a uniformly encrypted line laser measurement path 3. According to the invention, the problem of insufficient precision of complex curved surface measurement path planning in the line laser on-machine measurement process is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of linear laser on-machine measurement, and in particular to a linear laser on-machine measurement path planning method and device and a storage medium. BACKGROUND

[0002] In recent years, linear laser has gradually become an important means for surface detection of numerical control machining due to its compact structure, high measurement efficiency and high frequency response capability. However, to realize high-precision on-machine measurement of linear laser in the machining process of complex curved surface parts such as air intake ducts of aircraft engines, there are still many challenges. Existing researches mainly focus on post-compensation methods of measurement data errors, and the research on path planning and attitude control affecting the quality of measurement data is still insufficient. In five-axis linkage measurement, due to the complex spatial motion relationship between the linear laser and the workpiece during the measurement process, the measurement error sources are extensive, including motion error, sensor pose error, etc. In particular, the change of measurement pose will significantly affect the accuracy and consistency of measurement data, so optimizing the measurement path and attitude control is a key link to improve the measurement accuracy.

[0003] Although there are some researches on the path planning method of linear laser on-machine measurement at present, there are still the following main deficiencies:

[0004] (1) Large change of measurement pose and discontinuous attitude

[0005] Most of the existing paths are based on discrete view points, and the connection method is often based on nearest neighbor or simple fitting, which leads to a large fluctuation of the attitude of the linear laser sensor during the measurement process, which is not conducive to the stability of laser imaging and measurement accuracy;

[0006] (2) Lack of comprehensive consideration of geometric characteristics of complex curved surface

[0007] Most methods focus on visibility and occlusion processing, but do not consider the curvature, deflection and other geometric characteristics of the measured curved surface, which leads to the fact that the path cannot closely follow the changes of the curved surface morphology, resulting in occlusion dead angles or sparse data areas;

[0008] (3) Poor path smoothness, lack of global constraint mechanism

[0009] Current path planning is mostly generated by local heuristic algorithms, and there is a lack of unified global smoothness constraint mechanism, which leads to irregular jumps, redundant scanning and even collision risks in the path; SUMMARY

[0010] The present application aims to at least solve one of the technical problems existing in the prior art to some extent.

[0011] To this end, the application provides a line laser on-machine measurement path planning method, device and storage medium based on constant measurement pose constraint, which solves the problem of insufficient measurement path planning precision of line laser on-machine measurement, especially the problem of measurement path generation of a belt-shaped complex surface such as an air inlet under a five-axis linkage measurement environment.

[0012] In order to achieve the above object, the application adopts the following technical scheme:

[0013] The application provides a line laser on-machine measurement path planning method in a first aspect, comprising:

[0014] In step S100, a to-be-measured surface is acquired, a point corresponding to a minimum average geodesic distance on the to-be-measured surface is taken as an initial pose measurement point, a normal vector of the initial pose measurement point on the to-be-measured surface is calculated as an initial optimal measurement pose vector of the line laser, a line laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the line laser, an iterative direction vector of the line laser and a measurement direction vector of the line laser is defined, all intersection points on the intersection line between a line laser measurement plane and the to-be-measured surface are calculated, a series of line laser simulation measurement result points and normal vectors thereof are obtained, an adjustment angle of the current iterative direction vector of the line laser to the next step iterative direction vector of the line laser is taken as an optimization variable based on the line laser simulation measurement result points and the normal vectors thereof to construct a line laser local optimal measurement pose target function, the optimal adjustment angle is solved, and a line laser local optimal measurement pose is obtained.

[0015] In step S200, a smoothed line laser measurement path 1 is obtained by iteratively solving based on the line laser local optimal measurement pose, and the visibility of the line laser measurement path 1 is calculated and optimized to obtain a line laser measurement path 2.

[0016] In step S300, the line laser measurement path 2 is fitted and interpolated again to obtain a uniformly encrypted line laser measurement path 3.

[0017] In some embodiments, in step S100, the geodesic center of the to-be-measured surface is determined by an improved A* algorithm, and a normal vector estimation algorithm based on a near neighbor is used to estimate the normal vector of the initial pose measurement point on the to-be-measured surface.

[0018] In some embodiments, in step S100, the to-be-measured surface is expressed by a series of triangles, and the obtained series of line laser simulation measurement result points are denoted as The corresponding series of normal vectors are denoted as And The following steps are taken to obtain the above-mentioned series of line laser simulation measurement result points and the corresponding series of normal vectors:

[0019] In the i-th measurement position, a line laser optimal pose measurement coordinate system is constructed, and the origin of the coordinate system is taken as the initial pose measurement point pi The direction vector of the line laser optimal measurement pose coordinate system is composed of the line laser optimal measurement pose vector n i , the line laser current iteration direction vector μ i , and the line laser measurement direction vector v i ; (n xi , n yi , n zi ), (μ xi , μ yi , μ zi ), and (v xi , v yi , v zi ) are the x, y, and z components of the above vectors, respectively; then the formula of the line laser measurement plane at the ith measurement position is:

[0020] μ xi (x-x p′i )+μ yi (y-y p′i )+μ zi (z-z p′i )=0

[0021] In the formula, x p′i , y p′i , and z p′i are the three-dimensional coordinates of p i ';

[0022] The distances (d a , d b , d c ) of each triangular vertex in the measured surface to the line laser measurement plane are calculated, wherein for a certain triangle, it is determined whether the triangle intersects the line laser measurement plane, specifically, when and only when the calculated d a , d b , and d c are of the same sign, it is determined that the triangle does not intersect the line laser measurement plane; otherwise, it is determined that the triangle intersects the line laser measurement plane, and the two endpoints of the intersection line are recorded as the intersection points

[0023] The calculated all intersection points of the measured surface and the line laser measurement plane are deleted, and the pseudo intersection points and repeated intersection points are obtained, to obtain a series of actual intersection points {ζ i} of the measured surface and the line laser measurement plane and a series of corresponding normal vectors {n ζi};

[0024] The {ζ i} and {n ζi} are fitted and discretely re-discretized to obtain a series of line laser simulation measurement result points and a series of corresponding normal vectors

[0025] In some embodiments, in step S100, the constructed local optimal measurement pose objective function of the line laser is L i (α i ,β i ,γ i ):

[0026]

[0027] in:

[0028] k1, k2, and k3 are constraint coefficients respectively;

[0029] D i is the constraint function of the measurement height; suppose that at the i+1th measurement position, the point corresponding to the optimal measurement position of the laser on the optimal measurement surface is p′ i+1 , point p′ i+1 The mapping point on the surface to be measured is p i+1 , d(p i+1 ,p′ i+1 ) represents point p′ i+1 With the mapping point p i+1 The vertical distance between them is calculated as follows:

[0030]

[0031] Where, Represents the point p′ i+1 Corresponding line laser simulation measurement result point; n i+1 Represents the line laser optimal measurement pose vector of the line laser optimal pose measurement coordinate system constructed at the i+1 measurement position;

[0032] is the constraint function of the in-plane angle; It represents the plane angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at this measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system, the direction vector ν is measured by the line laser i+1 and line laser iteration direction vector μ i+1 The vector is obtained on the plane formed by ν i+1 =μ i+1 ×n i+1, and calculate n i+1 and The angle between The calculation formula is as follows:

[0033]

[0034] is the constraint function of the plane's exterior angle; It represents the plane external angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at the i+1 measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system by n i+1 and μ i+1 The vector is obtained on the plane formed by And calculate n i+1 and The angle between The calculation formula is as follows:

[0035]

[0036] W i is the constraint function of the line laser measurement width, and the expression is as follows;

[0037]

[0038] Where w i is the line laser measurement width at the i-th measurement position, which is simulated by a series of line laser measurement result points To point p i ′ is the vector of the online laser measurement direction vector ν i The projection value on is calculated, w i The minimum and maximum values ​​of w are li and w ri , w li and w ri The corresponding physical meaning is the maximum measurement width in the negative and positive directions of the line laser sensor measurement direction, w li and w ri is about the rotation angle γ i The implicit function, w mi is the actual measurement width midpoint value of the line laser sensor;

[0039] The optimal measurement pose objective function of the i-th measurement position is solved by the gradient descent method, and the angle (α i ,β i ,γ i ), so that the objective function value is minimized and the optimal adjustment angle (α i ,β i ,γ i ), according to the formula μ i+1 =R ni (γ i )R vi (β i )R μi (α i )·μ i , so that according to the optimal measurement pose μ of the i-th measurement position i Calculate the optimal measurement pose μ at the i+1th measurement position i+1 , that is, the local optimal measurement pose of the line laser is obtained; R ni (γ i ) represents the optimal measurement pose vector n of the surrounding laser i Rotation angle γ i The rotation matrix, R vi (β i ) represents the direction vector ν of the laser measurement around the line i Rotation angle β i The rotation matrix, R μi (α i ) represents the current iteration direction vector μ around the linear laser i Rotation angle α i The rotation matrix of .

[0040] In some embodiments, in step S200, the iterative solution to obtain a smooth line laser measurement path 1 based on the line laser local optimal measurement pose includes:

[0041] Assume that at the i-th and i+1-th measurement positions, the points corresponding to the optimal measurement positions of the laser on the optimal measurement surface are p′ respectively. i and p′ i+1 , based on the smoothing constraint, let point p′ i To point p′ i+1 The iterative formula is:

[0042] p′ i+1 =p′ i +δ′·μ′ i

[0043] in,

[0044] δ′ is the iterative step size used for the smoothing constraint, and its calculation formula is as follows:

[0045]

[0046] wherein δ is a fixed iteration step, and l r is greater than or equal to χδ, the measurement path iteration is continued, χ is a correction factor; when the path to be iterated l r is less than χδ, the last path to be iterated is adjusted to χδ;

[0047] μ i is the iteration direction vector of the line laser after the fairing correction at the i-th measurement position, and the calculation formula is as follows:

[0048]

[0049] wherein μ i is the iteration direction vector of the line laser in the line laser optimal pose measurement coordinate system at the i-th measurement position; η is a coefficient; E i is the objective function; is the partial derivative of the objective function E i with respect to μ i ;

[0050] The objective function E i is defined as follows:

[0051]

[0052] wherein κ(p′ i ) and κ(p′ i-1 ) are the curvatures of the points p′ i and p′ i-1 respectively, τ(p′ i ) and τ(p′ i-1 ) are the deflections of the points p′ i and p′ i-1 respectively, λ is an adjustment coefficient, and m is the total number of line laser measurement points; κ(p i ′) and τ(p i ′) are defined as follows:

[0053]

[0054] The objective function E i is the partial derivative of the objective function E i with respect to μ , and the expression is as follows:

[0055]

[0056] In some embodiments, in step S200, the visibility of the line laser measurement path 1 is calculated and optimized to obtain a line laser measurement path 2, which includes:

[0057] Two types of light path obstruction are considered: (1) laser incident and reflected light path obstruction of adjacent surfaces; (2) reflected light path obstruction of the surface to be measured itself;

[0058] For case (1), when the line laser performs the measurement process according to the line laser measurement path 1, when the incident laser surface formed by the incident laser plane triangle intersects with the adjacent surface of the surface to be measured, it is determined that there is an obstruction of the laser incident and reflected light path of the adjacent surface, and the optimal measurement pose vector n of the line laser at the i-th measurement position is adjusted by the following formula: i Iterative direction vector μ around the linear laser i Rotation angle Thus changing the optimal measurement pose vector n of the line laser i :

[0059] in, Represents the iterative direction vector μ of the laser around the line i Rotation angle Otherwise, visibility optimization is not required; the incident laser plane triangle is the line laser measurement point in the line laser measurement path 1 and the triangle formed by the left and right intersection points of the line laser measurement plane and the edge of the surface to be measured;

[0060] For case (2), when the line laser performs the measurement process according to the line laser measurement path 1, when the laser receiving surface formed by the laser receiving triangle intersects with the surface to be measured, it is determined that there is a reflection light path obstruction of the surface to be measured itself. The visibility of the line laser measurement path 1 is optimized by the following two methods: ① By increasing the measurement height h to reduce the angle σ, σ is the optimal measurement posture vector n of the line laser i and reflected laser n ri , σ=arctan(r / h), where r is the horizontal distance between the emission position and the receiving position of the line laser; ② Increase the optimal measurement pose vector n of the line laser i Laser measurement direction vector ν around the line i Rotation angle Change the optimal measurement pose vector n of the line laser by the following formula i , so that the reflected light path follows the adjustment direction: in, Represents the direction vector ν of the laser measurement around the line i Rotation angle Otherwise, no visibility optimization is required.

[0061] In some embodiments, in step S300, fitting and then interpolating the line laser measurement path 2 includes:

[0062] During the definition line laser in-machine measurement process, the line laser optimal measurement position moves along a parameter curve P(μ) = (x(μ), y(μ), z(μ)), μ is the parameter of the parameter curve, x(μ), y(μ), z(μ) are respectively the x, y, z components of the coordinate point of the parameter curve P(μ); along with the movement of the line laser, the midpoint of the measurement range on the line laser forms a curved surface r(μ, ν) = P(μ) + ν·η(μ), where η(μ) is the measurement direction of the line laser, ν is the width range of the line laser in the measurement direction, the curved surface r(μ, ν) is a ruled surface, which is called the optimal measurement curved surface;

[0063] For the μ direction in the optimal measurement curved surface r(μ, ν), a series of measurement points and the corresponding line laser incident direction n = {n i} in the line laser measurement path 2 are fitted based on the double B-spline curve, and then uniformly encrypted and discretized to obtain more dense measurement points and the line laser incident direction For the ν direction in the optimal measurement curved surface r(μ, ν), the measurement direction of the line laser is kept consistent, and the full-range measurement of the measured curved surface is realized by performing row-by-row measurement on the optimal measurement curved surface, and the measurement times are taken as k v ; thus, the line laser measurement path 3 is obtained, denoted as p′ n , the line laser measurement direction is denoted as T, , the jth measurement point of the line laser in p′ n is denoted as p′ nj , j = 1, 2, …, k v , and the expression of p′ nj is as follows:

[0064]

[0065] wherein,

[0066] k v is the number of times of row-by-row measurement of the measured curved surface along the μ parameter direction in the optimal measurement curved surface r(μ, ν), the theoretical maximum measurement range of the line laser sensor is set as [-w0, w0], that is, 2w0 is the theoretical maximum measurement width of the line laser sensor, the actual maximum measurement width of the measured curved surface is set as w gmax = w gl + w gr , w gl is the maximum absolute value of the maximum measurement width w li of the negative direction of the measurement direction of the line laser sensor in all measurement positions in the line laser measurement process, and w grA maximum measurement width w of a positive direction of a measurement direction of a line laser sensor in all measurement positions in a line laser measurement process ri The maximum absolute value of a sign Indicates rounding down

[0067] A series of parameter curves corresponding to the path of the midpoint of the measurement range corresponding to the jth measurement

[0068] A parameter curve corresponding to the parameter v=0, A tangent direction of the curve fitted by the double B-spline curve, corresponding to the μ parameter direction in r(μ,ν) of the optimal measurement surface Corresponding to the ν parameter direction in r(μ,ν) of the optimal measurement surface.

[0069] In some embodiments, the line laser on-machine measurement path planning method further comprises post-processing the line laser measurement path 3 to obtain on-machine measurement path planning instructions.

[0070] The second aspect of the present application provides a line laser on-machine measurement path planning device, comprising:

[0071] The first module is configured to obtain a to-be-measured surface, take a point corresponding to a minimum average geodesic distance on the to-be-measured surface as an initial pose measurement point, calculate a normal vector of the initial pose measurement point on the to-be-measured surface as an initial optimal measurement pose vector of the line laser, define a line laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the line laser, the iterative direction vector of the line laser and the measurement direction vector of the line laser, calculate all intersection points on the intersection line of the line laser measurement plane and the to-be-measured surface, obtain a series of line laser simulation measurement result points and their normal vectors, and take an adjustment angle of the current iterative direction vector of the line laser to the next step iterative direction vector of the line laser as an optimization variable to construct a line laser local optimal measurement pose target function based on the line laser simulation measurement result points and their normal vectors, solve the optimal adjustment angle, and obtain the line laser local optimal measurement pose.

[0072] The second module is configured to iteratively solve a smoothed line laser measurement path 1 based on the line laser local optimal measurement pose, calculate and optimize the visibility of the line laser measurement path 1, and obtain a line laser measurement path 2.

[0073] The third module is configured to perform fitting and interpolation on the line laser measurement path 2 to obtain a uniformly encrypted line laser measurement path 3.

[0074] The third aspect of the present application provides a computer readable storage medium, the computer readable storage medium stores computer instructions, the computer instructions are used for making the computer execute the line laser in-machine measurement path planning method according to any one of the embodiments of the first aspect of the present application.

[0075] Compared with the prior art, the present application has the following characteristics and beneficial effects:

[0076] (1) Attitude continuity

[0077] The present application improves the imaging stability and consistency of laser scanning data by constructing an optimal measurement pose target function and strongly constraining the attitude change in the iteration process to keep the measurement attitude constant or slowly changing.

[0078] (2) Fairness planning strategy

[0079] The present application adopts a local-global two-stage path planning strategy, local optimal sampling + global fairness iteration, and outputs a continuous, smooth and strong execution path.

[0080] The present application can be widely applied to: in-flight surface precision detection of aerospace engine blades and inlet ducts; online measurement of complex structural parts such as automobile engine intake manifolds and combustion chambers; intelligent measurement system matched with high-speed milling or five-axis machining center; detection link in digital twin manufacturing system based on line laser. Through the implementation of the present application, the problem of insufficient control of measurement accuracy at the path planning level in the prior art can be effectively solved, the reliability and automation level of online quality detection of complex curved surface parts can be improved, and the in-depth application of line laser in intelligent manufacturing can be promoted. BRIEF DESCRIPTION OF DRAWINGS

[0081] Figure 1 is the flowchart of the line laser in-machine measurement path planning method provided by the embodiment of the present application;

[0082] Figure 2 (a) and (b) in the figure are respectively the schematic diagrams of the line laser measurement pose in the line laser plane and the line laser plane angle in the line laser in-machine measurement path planning method provided by the embodiment of the present application;

[0083] Figure 3 is the spatial position schematic diagram of the line laser optimal measurement surface, the line laser measurement plane, the line laser motion plane and the to-be-measured surface in the line laser in-machine measurement path planning method provided by the embodiment of the present application;

[0084] Figure 4 is the spatial position schematic diagram of the optimal measurement position, the optimal measurement surface and the line laser measurement path in the line laser in-machine measurement path planning method provided by the embodiment of the present application;

[0085] Figure 5 is a line laser measurement visibility schematic diagram involved in a line laser in-machine measurement path planning method provided by an embodiment of the present application, wherein (a) is an adjacent surface visibility schematic diagram, and (b) is a surface itself visibility schematic diagram to be measured;

[0086] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application. The following scheme is only used to explain the present application and the specific scheme is not limited thereto. In addition, in order to facilitate the description, only the parts related to the present application are shown in the drawings, not all the processes.

[0088] On the contrary, the present application covers any alternative, modification, equivalent method and scheme made on the essence and scope of the present application as defined by the claims. Further, in order to make the public better understand the present application, some specific details are described in the following detailed description of the present application. The present application can also be completely understood without the description of these details by those skilled in the art.

[0089] Referring to Figure 1 , the first aspect embodiment of the present application provides a line laser in-machine measurement path planning method, comprising the following steps:

[0090] Step S100, acquiring a surface to be measured, taking a point corresponding to a minimum average geodesic distance on the surface to be measured as an initial pose measurement point, calculating a normal vector of the initial pose measurement point on the surface to be measured as an initial optimal measurement pose vector of the line laser; defining a line laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the line laser, an iterative direction vector of the line laser and a measurement direction vector of the line laser, calculating all intersection points on the intersection line of the line laser measurement plane and the surface to be measured, obtaining a series of line laser simulation measurement result points and their normal vectors; based on the line laser simulation measurement result points and their normal vectors, taking an adjustment angle of the current iterative direction vector of the line laser to the next iterative direction vector of the line laser as an optimization variable to construct a line laser local optimal measurement pose objective function, solving the optimal adjustment angle to obtain a line laser local optimal measurement pose;

[0091] Step S200, based on the line laser local optimal measurement pose, iteratively solving to obtain a smoothed line laser measurement path 1; calculating and optimizing the visibility of the line laser measurement path 1 to obtain a line laser measurement path 2;

[0092] Step S300, fitting and re-interpolating the line laser measurement path 2 to obtain a uniformly encrypted line laser measurement path 3; post-processing the line laser measurement path 3 to obtain an in-machine measurement path planning instruction.

[0093] For the convenience of understanding and description, the definitions of the main terms involved in the embodiments of the present application are summarized as follows:

[0094] 1, the surface to be measured: the research object of the present application, characterized by: (1) the width (about 30 mm) is much smaller than the length (300-1500 mm), and the overall shape is approximately a band-shaped curved surface; (2) the curvature changes greatly along the length direction and changes slightly along the width direction.

[0095] 2, line laser in-machine measurement path: the line laser measurement path is a spatial curve, which is discretely represented as a series of line laser measurement points p' n ={P ni}, 0 n ni}, 0 i m, m is the total number of measurement points contained in the line laser measurement path. In the embodiments of the present application, a series of machine tool measurement points (X i , Y i , Z i , A i , C m ) corresponding to the final in-machine measurement path need to be obtained after post-processing.

[0096] 3, line laser measurement pose: the line laser measurement pose is generally defined by the in-plane angle α, the out-of-plane angle β and the measurement height h. As shown in (a) of Figure 2 , the in-plane angle α refers to the angle between the laser measurement plane axis in the line laser measurement plane and the normal of the surface to be measured; as shown in (b) of Figure 2 , the out-of-plane angle β refers to the angle between the laser measurement plane axis out of the line laser measurement plane and the normal of the surface to be measured; the measurement height h is the distance between the bottom plane of the line laser sensor and the surface of the surface to be measured, which is usually equal to the measurement value of the Z axis of the sensor.

[0097] 4, optimal line laser measurement pose: it is generally believed that the measurement error is the smallest when the in-plane angle α = 0, the out-of-plane angle β = 0 and the measurement height h = h m , which is called the optimal measurement pose, wherein h m is the optimal measurement height, which is taken as the measurement height corresponding to the midpoint of the measurement range of the line laser sensor. When it is beyond a certain range of the optimal measurement pose, the measurement accuracy and quality may decrease.

[0098] 5. Constant measurement position of line laser: In order to ensure the effect of continuous scanning measurement of line laser, it is necessary to ensure that the line laser is kept in the optimal measurement position interval, and to reduce the change of the position of line laser relative to the measured surface during the movement of line laser, that is, to ensure that the measurement position of line laser relative to the measured surface is optimal and constant.

[0099] 6. Measurement coordinate system of line laser: As shown in the left side of Figure 3 , the positive direction of Z axis is the center line of the light emitting direction of line laser, Y axis and Z axis jointly form the measurement plane of line laser, and X axis is the moving direction of line laser.

[0100] 7. Optimal position and optimal pose measurement coordinate system of line laser: As shown in the right side of Figure 3 , an optimal measurement pose coordinate system is defined at each measurement position of line laser, and the origin of the optimal measurement pose coordinate system at the i-th measurement position is taken as the initial pose measurement point p i ′, p i ′ is a point with coordinates (0, 0, h m ) in the measurement coordinate system of line laser, and the point is called the optimal measurement position. The direction vectors of the coordinate system are composed of the optimal measurement pose vector n i of line laser, the current iteration direction vector μ i of line laser, and the measurement direction vector v i of line laser, wherein (x p′i , y p′i , z p′i ) are the three-dimensional coordinates of p i ′, (n xi , n yi , n zi ), (u xi , u yi , u zi ) and (v xi , v yi , v zi ) are the xyz components of the above direction vectors respectively. n i is consistent with the direction of Z axis of the coordinate system of line laser, v i = μ i × n i , the optimal measurement pose vector n i of line laser is consistent with the Y axis direction of line laser, and in the optimal pose measurement coordinate system, the laser beam of line laser is incident along the optimal measurement pose vector n i , so as to achieve the best measurement.

[0101] 8. Optimal measurement surface: As shown in Figure 4As shown, in the process of the line laser in-machine measurement, the line laser optimal measurement position moves along a parameter curve P(μ) = (x(μ), y(μ), z(μ)), μ is the parameter of the parameter curve, and x(μ), y(μ), z(μ) are respectively the x, y, z components of the coordinate point of the parameter curve P(μ); if all the measurement data are at the optimal measurement height h m , then the data points of the line laser single measurement are on a straight line. Along with the movement of the line laser, the points in the measurement range on the line laser form a curved surface r(μ, ν) = P(μ) + ν·η(μ), where η(μ) is the measurement direction of the line laser, and ν is the width range of the line laser in the measurement direction. The curved surface r(μ, ν) is a ruled surface, which is referred to as an optimal measurement curved surface. In the present application, the optimal measurement curved surface refers to the optimal measurement curved surface that forms a mapping relationship with the to-be-measured curved surface.

[0102] 9. Line laser measurement plane: as shown in Figure 3 , the line laser measurement plane is the plane where the line laser incident laser beam is located. At the i-th measurement position, the line laser measurement plane is formed by the line laser optimal measurement pose vector n i and the line laser measurement direction vector v i .

[0103] 10. Line laser motion plane: as shown in Figure 3 , at the i-th measurement position, the line laser motion plane is the plane formed by the line laser optimal measurement pose vector n i and the line laser iteration direction vector μ i .

[0104] 11. Line laser simulation measurement result point: as shown in Figure 3 , at the i-th measurement position, the line laser measurement plane and the to-be-measured curved surface form an intersection line, and the discrete sampling points on the intersection line constitute the line laser simulation measurement result points. According to the definition of the line laser beam plane and the to-be-measured curved surface, all intersection points on the intersection line can be solved, and after fitting and discretizing the intersection points and the normal vectors corresponding to the intersection points on the to-be-measured curved surface, a series of line laser simulation measurement result points n and a series of corresponding normal vectors n

[0105] In some embodiments, step S100 comprises:

[0106] Step S110, initial optimal measurement pose vector solving, specifically comprising:

[0107] Step S111, determining an initial pose measurement point on the to-be-measured curved surface.

[0108] For the i-th measurement position, take the geodesic center of the surface to be measured as the initial pose measurement point, denoted as point p i ′ i ′ m is a point with coordinates (0, 0, h a ) in the line laser measurement coordinate system at the i-th measurement position, and is the optimal measurement position of the line laser sensor. The geodesic center of the surface to be measured is defined as the point corresponding to the minimum average geodesic distance on the surface to be measured. In this embodiment, the surface to be measured is represented by an STL (Stereolithography) format file, and the surface to be measured is expressed as a series of triangles in the STL format file, denoted as each triangle vertex (v b ,v c ), and the corresponding normal vector is n v . The normal vector n v is positive outwardly perpendicular to the surface to be measured. The traditional algorithm calculates all geodesic distances and then finds the minimum value, which is too low in efficiency. The improved A* algorithm (for existing algorithm) is used to optimize the search process and speed up the solution in this embodiment. The improved A* algorithm starts searching from a random point on the surface to be measured and finds the point corresponding to the minimum average geodesic distance.

[0109] Step S112, initial pose measurement point normal vector calculation.

[0110] The initial pose measurement point normal vector on the surface to be measured is estimated using a neighbor-based normal vector estimation algorithm. Specifically, the k-nearest neighbor algorithm is used to find the neighboring points of the initial pose measurement point, the covariance matrix is calculated, and then eigenvalue decomposition is performed. The eigenvector corresponding to the minimum eigenvalue is the normal vector of the initial pose measurement point.

[0111] Step S120, line laser simulation measurement result point calculation.

[0112] Step S121, intersection point calculation.

[0113] At the i-th measurement position, a line laser optimal pose measurement coordinate system is constructed, taking the initial pose measurement point p i ′ as the origin of the coordinate system. The direction vectors of the line laser optimal pose measurement coordinate system are composed of the line laser optimal measurement pose vector n i , the line laser iteration direction vector μ i , and the line laser measurement direction vector v i . (n xi ,n yi ,n zi ), (μ xi ,μ yi ,μ zi ) and (v xi ,v yi,v zi ) are the x, y, and z components of the above vectors respectively; then the formula for the line laser measurement plane at the i-th measurement position is:

[0114] μ xi (xx p′i )+μ yi (yy p′i )+μ zi (zz p′i )=0 (1)

[0115] Where x p′i ,y p′i ,z p′i is p′ i The three-dimensional coordinates of

[0116] Based on the point-to-plane formula, the distance (d a ,d b ,d c ). For a certain triangle, determine whether it intersects with the line laser measurement plane. Specifically, if and only if the calculated d a ,d b ,d c If the three distances are of the same sign, the triangle is determined to be non-intersecting with the line laser measurement plane; otherwise, the triangle is determined to be intersecting with the line laser measurement plane, and the two endpoints of the intersection line are recorded as the intersection points. The above calculation completes the intersection calculation of a single triangle and the line laser measurement plane. All triangles in the surface to be measured are calculated in sequence to filter out all their intersections with the line laser measurement plane.

[0117] Step S122: Remove false intersections and duplicate intersections.

[0118] The above intersection calculation method assumes that the line laser measurement plane is infinite. However, the actual line laser measurement plane has boundaries, so some intersections are not the points of the line laser simulation measurement results, which are called pseudo-intersections. In addition, the intersections of adjacent triangles within the measurement range are calculated twice, and the triangles at the edge of the surface to be measured are calculated only once. The intersections calculated repeatedly are called repeated intersections. Therefore, all the intersections of the selected surface to be measured and the line laser measurement plane are projected onto the Y axis of the line laser measurement coordinate system to obtain the projection points ζ y , first perform Euclidean distance clustering on each projection point, remove the pseudo intersection points that exceed the width range of the line laser measurement, sort the remaining intersection points after removing the pseudo intersection points by the size of the Y-axis component coordinates, remove the intersection points that are repeatedly calculated, and obtain a series of actual intersection points {ζ i}, and the corresponding series of normal vectors {n ζi},{nζi} is {ζ i}The normal vector of the triangle where it is located.

[0119] Step S123: intersection fitting.

[0120] In order to accurately simulate the results of line laser on-machine measurement, considering the unevenness of the STL surface, the actual intersection of the measured surface and the line laser measurement plane {ζ i} and the corresponding normal vector {n ζi}Fitting and re-discretization are performed to obtain a series of line laser simulation measurement result points And the corresponding series of normal vectors Among them, when {ζ i}When the number of intersection points is less than 3, it means that the line laser measurement plane intersects only one triangle, and linear interpolation fitting can be used; when {ζ i When the number of intersection points contained in} is greater than 3, the B-spline curve is used to fit the intersection points and their normal vectors.

[0121] Step S130: construct and solve the optimal measurement pose objective function.

[0122] like Figure 3 As shown, for the i-th measurement position, point p i ′ is the optimal measurement position of the line laser, p i 'On the optimal measurement surface, the optimal measurement surface is a ruled surface that forms a mapping relationship with the surface to be measured. Let point p i The mapping point of ′ on the surface to be measured is p i (p i ′ and p i It can overlap or not overlap). Assume that at the i+1th measurement position, the point corresponding to the optimal measurement position of the laser line on the optimal measurement surface is p′ i+1 , whose mapping point on the surface to be measured is p i+1 , line laser iteration direction vector μ i+1 . i+1 Considered as μ i Three rotation angles α of the line laser optimal pose measurement coordinate system around the i-th measurement position i ,β i ,γ i , note (α i ,β i ,γ i ) is the adjustment angle, (α i ,β i ,γ i ) as the optimization variable to construct the local optimal measurement pose objective function of the line laser, μ i+1 With μ i The following relationship is satisfied:i+1 =R ni (γ i )R vi (β i )R μi (α i )·μ i , where R ni (γ i ) represents the optimal measurement pose vector n of the surrounding laser i Rotation angle γ i The rotation matrix, R vi (β i ) represents the direction vector ν of the laser measurement around the line i Rotation angle β i The rotation matrix, R μi (α i ) represents the current iteration direction vector μ around the linear laser i Rotation angle α i The minimum value of the above objective function is solved by the optimization method to obtain the optimal adjustment angle, thereby obtaining the local optimal measurement pose of the line laser.

[0123] Specifically, see Figure 3 , for the i-th measurement position, the local optimal measurement pose objective function L of the line laser is constructed i (α i ,β i ,γ i )as follows:

[0124]

[0125] in:

[0126] k1, k2, k3 are constraint coefficients respectively. In this embodiment, the parameter combination for a certain planning is set as follows: k1 = 0.1, k2 = 1, k3 = 0.5;

[0127] D i is the constraint function for measuring height; d(p i+1 ,p i ' +1 ) represents point p i ' +1 With the mapping point p i+1 The vertical distance between them is calculated as follows:

[0128]

[0129] Where, Represents the point p′ i+1 Corresponding line laser simulation measurement result point; n i+1Represents the line laser optimal measurement pose vector of the line laser optimal pose measurement coordinate system constructed at the i+1 measurement position;

[0130] is the constraint function of the plane angle; It represents the plane angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at this measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system by ν i+1 and μ i+1 The vector is obtained on the plane formed by And calculate n i+1 and The angle between The calculation formula is as follows:

[0131]

[0132] is the constraint function of the plane's exterior angle; It represents the plane external angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at the i+1 measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system by n i+1 and μ i+1 The vector is obtained on the plane formed by And calculate n i+1 and The angle between The calculation formula is as follows:

[0133]

[0134] W i is the constraint function of the line laser measurement width. It is believed that the measurement error is smaller near the middle position. During the measurement process, by setting W i Ensure that the maximum measurement width of the line laser does not fluctuate significantly, W i The expression is as follows;

[0135]

[0136] Where w i is the line laser measurement width at the i-th measurement position, which is simulated by a series of line laser measurement result points To point p i ′ is the vector of the online laser measurement direction vector ν i The projection value on is calculated, w i The minimum and maximum values ​​of w are li and w ri , w li and w ri The corresponding physical meaning is the maximum measurement width in the negative and positive directions of the line laser sensor measurement direction, w li and w ri is about the rotation angle γ i The implicit function, w mi is the actual measurement width midpoint value of the line laser sensor, w mi =(w li +w ri ) / 2.

[0137] Then, the optimal measurement pose objective function of the i-th measurement position is solved by the gradient descent method, and the angle (α i ,β i ,γ i ), so that the objective function value is minimized and the optimal adjustment angle (α i ,β i ,γ i ), according to the formula μ i+1 =R ni (γ i )R vi (β i )R μi (α i )·μ i , so that according to the optimal measurement pose μ of the i-th measurement position i Calculate the optimal measurement pose μ at the i+1th measurement position i+1 .

[0138] It can be understood that the embodiments of the present invention impose constraints on the measurement height, in-plane angle, out-of-plane angle and measurement width respectively, thereby constructing the local optimal measurement posture objective function of the line laser. By solving the optimal measurement posture objective function of the line laser, it can be ensured that the line laser is in the optimal measurement posture for each measurement, and at the same time, the constant posture of continuous measurement can be guaranteed, thereby improving the measurement accuracy and data quality of the curved surface.

[0139] In some embodiments, step S200 includes:

[0140] Step S210, linear laser measurement path smoothing iteration.

[0141] As shown in Figure 3 , let the iteration formula from point p′ i to point p′ i+1 be:

[0142] p′ i+1 = p′ i + δ·μ i (8)

[0143] Wherein, δ is a fixed iteration step size.

[0144] The actual iteration formula is obtained by modifying the above iteration formula through smoothing constraints:

[0145] p′ i+1 = p′ i + δ′·μ′ i (9)

[0146] Wherein:

[0147] δ′ is the iteration step size adopted by the smoothing constraint, which is obtained from the fixed iteration step size δ, and the calculation formula is as follows:

[0148]

[0149] When the path to be iterated l r is greater than or equal to χδ, the measurement path iteration is continuously performed, χ is a correction coefficient, 1 < χ < 5; when the path to be iterated l r is less than χδ, the last path to be iterated is adjusted to χδ. Through the adjusted iteration step size, the iteration direction fluctuation caused by too few intersection points in the last stage can be avoided.

[0150] μ i ′ is the linear laser iteration direction vector after smoothing correction, which is obtained from the linear laser iteration direction vector μ i :

[0151]

[0152] In the formula, η is a coefficient; E i is the objective function; is the partial derivative of the objective function E i with respect to μ i .

[0153] The definition of the objective function E i is as follows:

[0154]

[0155] Where, κ(p′ i ) and κ(p′ i-1 ) are points p′ i and point p′ i-1 The curvature, τ(p′ i ) and τ(p′ i-1 ) are points p′ i and point p′ i-1 The deflection of the target path is λ, which is the adjustment coefficient. In this embodiment, λ = 0.5 and can be adjusted during the iteration process. m is the total number of line laser measurement points. The objective function reflects the smoothness of the measurement path. The objective function E i The smaller the value, the smoother the measurement path. The midpoint p of the objective function i The curvature κ(p i ′) and deflection τ(p i ′) are defined as follows:

[0156]

[0157] Objective function E i For μ i The partial derivative of The expression is:

[0158]

[0159] Therefore, at the i-th measurement position, the current iteration direction vector μ of the current line laser is calculated based on step S100. i , and then calculate the i+1th measurement position p′ by formula (9) i+1 , thus gradually iterating to obtain the smooth line laser measurement path 1.

[0160] Step S220: Optimize the visibility of the line laser measurement path.

[0161] See also Figure 5 Since line laser is a non-contact measurement, once the light path is blocked, there will be no measurement results in that area, resulting in incomplete measurement results of the surface to be measured. The blue area is the blocked area. This embodiment considers two types of light path blockage: (1) laser incident and reflected light path blockage of adjacent surfaces, such as Figure 5 As shown in (a); (2) The reflected light path of the surface to be measured is blocked, such as Figure 5 As shown in (b). This step optimizes the line laser measurement path 1 by considering the relevant constraints of optimizing the angles inside and outside the measurement plane and the measurement visibility. The parameters that need to be optimized are three measurement posture parameters in, is the optimal measurement pose vector n of the line laser i Iterative direction vector μ around the linear laseri The rotation angle, is the optimal measurement pose vector n of the line laser i Measurement direction vector ν around the line laser i The rotation angle is , and h is the measurement height of the line laser. In order to reduce the repeated measurement error, the adjustment of the three measurement posture parameters is global adjustment, that is, all the measurement points on the smooth line laser measurement path 1 and the optimal measurement posture vector are adjusted together to obtain the line laser measurement path 2. The series of measurement points in the line laser measurement path 2 are recorded as

[0162] For case (1), see Figure 5 In (a), taking the example of covering the surface to be measured with one measurement, the influence of the adjacent surfaces of the surface to be measured on the visibility of the surface to be measured is calculated. For the line laser measurement path 1, at the i-th measurement position, the line laser measurement point and the left intersection point ζ of the line laser measurement plane and the edge of the surface to be measured li and right intersection point ζ ri , the three points form a triangle, which describes the outer contour of the incident line laser beam and is defined as the incident laser plane triangle. As the line laser performs the measurement process according to the line laser measurement path 1, the incident laser plane triangle forms the incident laser surface. For case (2), see Figure 5 In (b), taking the example of covering the surface to be measured with one measurement, the influence of the surface to be measured on the visibility of the surface to be measured is calculated. At the i-th measurement position, the line laser measurement point The intersection point p of the line laser center laser beam and the line laser i , and the receiving point p of the line laser ci , three points form a triangle, which describes the outer contour of the incident and received light beams of the line laser, and is called the laser receiving triangle. As the line laser performs the measurement process according to the line laser measurement path 1, the laser receiving triangle forms a laser receiving surface. The intersection of the incident laser surface and the adjacent surface of the surface to be measured is used to determine whether there is light path obstruction on the adjacent surface. When the incident laser surface intersects with the adjacent surface of the surface to be measured, it is determined that there is light path obstruction on the adjacent surface and adjustment is required. Otherwise, it is determined that there is no light path obstruction on the adjacent surface and no adjustment is required. The intersection of the laser receiving surface and the surface to be measured is used to determine whether there is light path obstruction on the surface to be measured itself. When the laser receiving surface intersects with the surface to be measured, it is determined that there is light path obstruction on the surface to be measured itself and adjustment is required. Otherwise, it is determined that there is no light path obstruction on the surface to be measured itself and no adjustment is required.

[0163] If there is light path occlusion on adjacent surfaces, according to Adjustment is made. The specific adjustment method is: set the initial angle Adjustment is made by the following formula to change the optimal measurement pose vector n of the line laser i : wherein, represents the rotation matrix of the rotation angle i around the line laser iteration direction vector μ .

[0164] If there is a light path obstruction of the measured surface itself, adjustment is made according to . See Figure 5 (b), which defines σ as the included angle between the optimal measurement pose vector n of the line laser i and the reflected laser n ri (n ri at the connecting line of points p i and p ci ), σ = arctan(r / h), where r is the horizontal distance between the emission position and the receiving position of the line laser. In order to avoid the light path obstruction of the measured surface itself, the direction of the reflected laser n ri is adjusted according to . Specifically, set the initial optimal measurement height h = h m when the light path obstruction of the measured surface itself is not considered, and the initial Two adjustment methods are proposed as follows: ① By appropriately increasing h, the angle σ is reduced to avoid the light path obstruction of the measured surface itself; ② Appropriately increase The optimal measurement pose vector n of the line laser is changed by the following formula i : wherein, represents the rotation matrix of the rotation angle i around the line laser measurement direction vector ν .

[0165] After the line laser measurement path 1 is adjusted according to the above visibility calculation, the line laser measurement path 2 can be obtained.

[0166] It can be understood that, through step S200, firstly, all the local optimal measurement poses obtained in step S100 are iterated based on the curvature and the torsion double constraints of the measurement points, which ensures the smoothness of the line laser measurement path; and then, the three measurement attitude parameters are adjusted according to the visibility, which allows the measured surface to be measured by the line laser and ensures the stability of the overall measurement attitude, thereby ensuring the quality of the measurement data.

[0167] In some embodiments, step S300 comprises:

[0168] Step S310: Line laser measurement path fitting and interpolation.

[0169] For the μ direction in the optimal measurement surface r(μ,ν), a series of measurement points in the line laser measurement path 2 are and the corresponding line laser incident direction n={n i Fitting is performed based on the double B-spline curve, and then uniform parameters are encrypted and discretized to obtain denser measurement points. and line laser incident direction For the v direction in the optimal measurement surface r(μ,ν) (consistent with the line laser measurement direction), multiple line-by-line measurements are performed on the optimal measurement surface. Each measurement path is along the μ direction in the optimal measurement surface r(μ,ν), and the number of measurements is k. v , change the v parameter to achieve full range measurement of the surface to be measured; thus obtaining the line laser measurement path 3, recorded as p′ n , p′ n The corresponding normal vector (i.e. the direction of line laser measurement) is recorded as T, Let p′ n The j-th measured line laser point is p′ nj ,j=1,2,…,k v , p′ nj The expression is as follows:

[0170]

[0171]

[0172] in,

[0173] k v is the number of line-by-line measurements of the surface to be measured on the optimal measurement surface. Assume that the theoretical maximum measurement range of the line laser sensor is [-w0, w0], that is, 2w0 is the theoretical maximum measurement width of the line laser sensor, and the actual maximum measurement width of the surface to be measured is w gmax =w gl +w gr , w gl The maximum measurement width w in the negative direction of the line laser sensor in all measurement positions during the line laser measurement process li The maximum absolute value, w gl Corresponding parameters ν=0,w gr The maximum measurement width w in the positive direction of the line laser sensor in all measurement positions during the line laser measurement process ri The maximum absolute value, w gr The corresponding parameter is ν=1, when the actual maximum measurement width w of the surface to be measured is gmaxWhen the actual maximum measurement width w of the curved surface to be measured is greater than the theoretical maximum measurement width 2w0 of the line laser sensor, multiple line-by-line measurements are needed to cover the entire curved surface. When the actual maximum measurement width w of the curved surface to be measured is less than or equal to the theoretical maximum measurement width 2w0 of the line laser sensor, one measurement is performed at the corresponding measurement position. gmax When the actual maximum measurement width w of the curved surface to be measured is greater than the theoretical maximum measurement width 2w0 of the line laser sensor, multiple line-by-line measurements are needed to cover the entire curved surface. When the actual maximum measurement width w of the curved surface to be measured is less than or equal to the theoretical maximum measurement width 2w0 of the line laser sensor, one measurement is performed at the corresponding measurement position. represents the floor function;

[0174] is a series of parametric curves corresponding to the path of the midpoint in the measurement point range for the jth measurement,

[0175] is the parametric curve corresponding to the parameter v = 0, is the tangent direction of the curve fitted by the double B-spline curve, corresponding to the μ parameter direction in r(μ,ν) of the optimal measurement surface; corresponding to the ν parameter direction in r(μ,ν) of the optimal measurement surface.

[0176] Step S320, post-processing of the line laser measurement path.

[0177] Through post-processing, the line laser measurement path 3 is converted into machine tool axis coordinates. In this embodiment, based on the topology of the five-axis machine tool under study, the corresponding measurement point p′ n and its normal vector T in the line laser measurement path 3 are converted into instruction programs (X i , Y i , Z i , A i , C i ), 0 < i < m. Wherein, the i-th measurement position in the line laser measurement path 3 is p ni = (X i , Y i , Z i ), and the line laser measurement direction is x, y, z axis components of the line laser incident direction respectively. The corresponding machine tool rotary axis coordinate calculation formula is:

[0178]

[0179] At the same time, the optimal spindle rotation angle in the line laser measurement process is given, and the calculation formula is:

[0180]

[0181] However, considering that the spindle angle cannot be adjusted at any time during the measurement process, as the remaining axes can, the spindle angle adjustment method of this embodiment is: if the spindle angle S i changes less than 10°, S iUpdate the average of all calculation results obtained from formula (21);If the main shaft angle changes more than 10°, adjust S in segments during the measurement process i That is, adjust 10° at a time when the cumulative change of the calculation results of formula (21) reaches 10° each time, otherwise, do not adjust.

[0182] It can be understood that through step S300, a method of post-processing the linear laser measurement path 3 to the corresponding machine tool coordinate system measurement program is given, so that the final in-machine measurement path planning instruction can be directly run on the machine tool, and the goal of linear laser in-machine measurement is achieved.

[0183] The linear laser in-machine measurement path planning device provided by the second aspect embodiment of the present application comprises:

[0184] The first module is configured to obtain a to-be-measured curved surface, take a point corresponding to a minimum average geodesic distance on the to-be-measured curved surface as an initial pose measurement point, calculate a normal vector of the initial pose measurement point on the to-be-measured curved surface as an initial optimal measurement pose vector of the linear laser, define a linear laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the linear laser, an iterative direction vector of the linear laser and a measurement direction vector of the linear laser, calculate all intersection points on the intersection line between a linear laser measurement plane and the to-be-measured curved surface, and obtain a series of linear laser simulation measurement result points and normal vectors thereof; based on the linear laser simulation measurement result points and the normal vectors thereof, take an adjustment angle of the current iterative direction vector of the linear laser to the next step iterative direction vector of the linear laser as an optimization variable to construct a linear laser local optimal measurement pose target function, solve the optimal adjustment angle, and obtain a linear laser local optimal measurement pose.

[0185] The second module is configured to iteratively solve a smoothed linear laser measurement path 1 based on the linear laser local optimal measurement pose, calculate and optimize the visibility of the linear laser measurement path 1, and obtain a linear laser measurement path 2.

[0186] The third module is configured to perform fitting and interpolation on the linear laser measurement path 2 to obtain a uniformly encrypted linear laser measurement path 3.

[0187] Further, the linear laser in-machine measurement path planning device of the embodiment further comprises:

[0188] The fourth module is configured to post-process the linear laser measurement path 3 to obtain an in-machine measurement path planning instruction.

[0189] It should be noted that the foregoing embodiment explanation of the linear laser in-machine measurement path planning method is also applicable to the linear laser in-machine measurement path planning device of the present embodiment, and will not be repeated here.

[0190] In order to implement the above embodiment, the embodiment of the present invention further proposes a computer-readable storage medium, on which a computer program is stored. The program is executed by a processor to execute the line laser on-machine measurement path planning method of the above embodiment.

[0191] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present invention. It should be noted that the electronic devices in the embodiments of the present invention may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs, desktop computers, and servers. Figure 6 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0192] like Figure 6 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 into a random access memory (RAM) 103. Various programs and data required for the operation of the electronic device are also stored in the RAM 103. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An input / output (I / O) interface 105 is also connected to the bus 104.

[0193] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Figure 6 The electronic device is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0194] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present application. For example, an embodiment includes a computer program product comprising a computer program carried on a computer readable medium, the computer program comprising program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network by the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the methods of the embodiments of the present application are performed.

[0195] It should be noted that the computer readable medium described above in the present application can be a computer readable signal medium or a computer readable storage medium or any combination thereof. The computer readable storage medium may, for example, be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any suitable combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, device or apparatus. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can transmit, propagate or transport program for use by or in connection with an instruction execution system, device or apparatus. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, cable, optical fiber, RF (radio frequency), or any suitable combination thereof.

[0196] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled into the electronic device.

[0197] The computer readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the above-mentioned in-machine measurement path planning method of the line laser.

[0198] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, Python, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0199] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction.

[0200] In addition, the terms "first", "second", etc. are used only for the purpose of description and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.

[0201] Any process or method descriptions or descriptions of the flow diagrams in the specification or elsewhere in this document, can be understood as representing the steps of the code of the modules, segments or portions of the code for implementing specific logic functions or steps in the process, and the scope of the preferred embodiments of the present application includes additional implementation in which the steps are performed in different order, including an essentially simultaneous performance of the functions according to the involved functions, or in reverse order, which should be understood by those skilled in the art of the embodiments of the present application.

[0202] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of instructions to implement logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, processor- based system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer- readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical connections), a portable computer diskette (a magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and stored in a computer memory.

[0203] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, the various steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, or their combinations can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0204] Those skilled in the art can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by programs instructing related hardware, and the developed programs can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of steps of the method embodiments.

[0205] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each of the units can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0206] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A method for path planning of in-machine measurement with a line laser, characterized in that Comprise: Step S100, obtain the measured surface, take the point corresponding to the minimum average geodesic distance on the measured surface as the initial pose measurement point, calculate the normal vector of the initial pose measurement point on the measured surface as the initial optimal measurement pose vector of the line laser; define a line laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the line laser, the iterative direction vector of the line laser and the measurement direction vector of the line laser, calculate all intersection points on the intersection line of the line laser measurement plane and the measured surface, obtain a series of line laser simulation measurement result points and their normal vectors; based on the line laser simulation measurement result points and their normal vectors, take the adjustment angle of the current iterative direction vector of the line laser to the next step iterative direction vector of the line laser as the optimization variable to construct the line laser local optimal measurement pose objective function, solve the optimal adjustment angle to obtain the line laser local optimal measurement pose; Step S200, based on the line laser local optimal measurement pose, iteratively solve to obtain a smooth line laser measurement path 1; calculate and optimize the visibility of the line laser measurement path 1 to obtain a line laser measurement path 2; Step S300, fitting and interpolation are performed on the line laser measurement path 2 to obtain a uniformly encrypted line laser measurement path 3.

2. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S100, the geodesic center of the measured surface is determined by the improved A* algorithm; the normal vector estimation algorithm based on the nearest neighbor is used to estimate the normal vector of the initial pose measurement point on the measured surface.

3. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S100, the surface to be measured is expressed by a series of triangles, and the simulated measurement points obtained by the series of line lasers are denoted as The corresponding series of normal vectors are denoted as and are obtained according to the following steps: At the i-th measuring position, a line laser optimal pose measurement coordinate system is constructed, taking the coordinate system origin as the initial pose measurement point p' i The direction vector of the line laser optimal pose measurement coordinate system is composed of the line laser optimal measurement pose vector n i , the line laser current iteration direction vector μ i , and the line laser measurement direction vector v i ; (n xi , n yi , n zi ), (μ xi , μ yi , μ zi ), and (v xi , v yi , v zi ) are the x, y, and z components of the above vectors respectively; then the formula of the line laser measurement plane at the i-th measuring position is: μ xi (x-x p′i )+μ yi (y-y p′i )+μ zi (z-z p′i )=0 where x p′i ,y p′i ,z p′i are three-dimensional coordinates of p' i . Calculate the distance (d a ,d b ,d c ) from each vertex of the triangle in the measured surface to the line laser measurement plane, wherein for a certain triangle, it is judged whether it intersects with the line laser measurement plane, specifically, when and only when the calculated d a ,d b ,d c The three distances are of the same sign, it is determined that the triangle does not intersect with the line laser measurement plane; otherwise, it is determined that the triangle intersects with the line laser measurement plane, and the two endpoints of the intersection line are recorded as intersection points For all intersection points of the calculated to-be-measured surface and the line laser measurement plane, the pseudo intersection points and the repeated intersection points are deleted, to obtain a series of actual intersection points {ζ i} of the to-be-measured surface and the line laser measurement plane and a corresponding series of normal vectors {n ζi}. fitting and re-discretizing the {ζ i} and {n ζi} to obtain a series of simulated measurement points of the line laser and a corresponding series of normal vectors 4. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S100, the locally optimal measurement pose target function of the line laser is constructed as L i (α i ,β i ,γ i ) Wherein: k1, k2, k3 are constraint coefficients respectively; D i The constraint function for measuring height; set in the i+1 measurement position, the point corresponding to the optimal measurement position of the line laser on the optimal measurement surface is p' i+1 , the mapping point of the point p' i+1 on the surface to be measured is p i+1 , d(p i+1 , p' i+1 ) represents the vertical distance between the point p' i+1 and the mapping point p i+1 , and the calculation formula is as follows: In the formula, represents the line laser simulation measurement point corresponding to the point p' i+1 n represents the line laser simulation measurement point corresponding to the point p' i+1 represents the line laser optimal measurement pose vector of the line laser optimal pose measurement coordinate system constructed at i+1 measurement positions. is the constraint function of the in-plane angle; It represents the plane angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at this measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system, the direction vector ν is measured by the line laser i+1 and line laser iteration direction vector μ i+1 The vector is obtained on the plane formed by ν i+1 =μ i+1 ×n i+1 , and calculate n i+1 and The angle between The calculation formula is as follows: is the constraint function of the plane's exterior angle; It represents the plane external angle of the line laser measurement pose at the i+1 measurement position, and is taken as the optimal measurement pose vector n of the line laser at the i+1 measurement position. i+1 Simulation measurement results with line laser point Normal vector The angle between them is calculated by taking the point p′ i+1 Corresponding line laser simulation measurement result points Normal vector Projected into the line laser optimal pose measurement coordinate system by n i+1 and μ i+1 The vector is obtained on the plane formed by And calculate n i+1 and The angle between The calculation formula is as follows: W i The constraint function for the line laser measurement width is expressed as follows; Where w i is the line laser measurement width at the i-th measurement position, which is simulated by a series of line laser measurement result points to point p′ i The vector of the online laser measurement direction vector ν i The projection value on is calculated, w i The minimum and maximum values ​​of w are li and w ri , w li and w ri The corresponding physical meaning is the maximum measurement width in the negative and positive directions of the line laser sensor measurement direction, w li and w ri is about the rotation angle γ i The implicit function, w mi is the actual measurement width midpoint value of the line laser sensor; The optimal measurement pose objective function of the i-th measurement position is solved by the gradient descent method, and the angle (α i ,β i ,γ i ), so that the objective function value is minimized and the optimal adjustment angle (α i ,β i ,γ i ), according to the formula μ i+1 =R ni (γ i )R vi (β i )R μi (α i )·μ i , so that according to the optimal measurement pose μ of the i-th measurement position i Calculate the optimal measurement pose μ at the i+1th measurement position i+1 , that is, the local optimal measurement pose of the line laser is obtained; R ni (γ i ) represents the optimal measurement pose vector n of the surrounding laser i Rotation angle γ i The rotation matrix, R vi (β i ) represents the direction vector ν of the laser measurement around the line i Rotation angle β i The rotation matrix, R μi (α i ) represents the current iteration direction vector μ around the linear laser i Rotation angle α i The rotation matrix of .

5. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S200, the line laser local optimal measurement pose is used to iteratively solve to obtain a smooth line laser measurement path 1, which comprises: The points corresponding to the optimal measurement positions of the line laser on the optimal measurement surface at the i-th and i+1-th measurement positions are p' and p' i and p' i+1 Based on the fairing constraint, an iterative formula from the point p' i to the point p' i+1 is: p' i+1 = p' i + δ' · μ' i Wherein, δ' is the iterative step length adopted by the smoothing constraint, and the calculation formula is as follows: Where δ is a fixed iteration step size. r When it is greater than or equal to χδ, the measurement path iteration is continued, χ is the correction coefficient; when the path to be iterated l r When it is less than χδ, the last iterative path is adjusted to χδ; μ i ′ is the fairing-corrected linear laser iterative direction vector at the i-th measurement position, and the calculation formula is as follows: In the formula, μ i is the iterative direction vector of the line laser in the line laser optimal pose measurement coordinate system at the i th measurement position; η is a coefficient; E i is the target function; is the target function E i is the partial derivative of μ i . Objective function E i is defined as follows: Where, κ(p′ i ) and κ(p′ i-1 ) are points p′ i and point p′ i-1 The curvature, τ(p′ i ) and τ(p′ i-1 ) are points p′ i and point p′ i-1 deflection, λ is the adjustment coefficient, m is the total number of line laser measurement points; κ(p′ i ) and τ(p′ i ) are defined as follows: Objective function E i For μ i Partial derivative The expression for 6. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S200, the visibility of the line laser measurement path 1 is calculated and optimized to obtain a line laser measurement path 2, which comprises: Two types of light path occlusion are considered: (1) laser incidence and reflection light path occlusion of adjacent surfaces; (2) reflection light path occlusion of the measured surface itself; For case (1), when the line laser performs the measurement process according to the line laser measurement path 1, the incident laser curved surface formed by the incident laser plane triangle intersects with the adjacent curved surface of the to-be-measured curved surface, it is determined that there is laser incidence and reflection path blocking of the adjacent curved surface, and the optimal measurement pose vector n of the line laser at the ith measurement position is adjusted through the following formula i The rotation angle of the rotation matrix of the iteration direction vector μ of the line laser around i The rotation angle of the rotation matrix of the iteration direction vector μ of the line laser around The optimal measurement pose vector n of the line laser is changed i : Wherein, The rotation matrix of the iteration direction vector μ of the line laser around i The rotation angle of the rotation matrix of the iteration direction vector μ of the line laser around The incident laser plane triangle is a triangle composed of the line laser measurement point in the line laser measurement path 1 And the left and right intersection points of the line laser measurement plane and the edge of the to-be-measured curved surface. For case (2), when the line laser performs the measurement process according to the line laser measurement path 1, when the laser receiving surface formed by the laser receiving triangle intersects with the surface to be measured, it is determined that there is a reflection light path obstruction of the surface to be measured itself. The visibility of the line laser measurement path 1 is optimized by the following two methods: ① By increasing the measurement height h to reduce the angle σ, σ is the optimal measurement posture vector n of the line laser i and reflected laser n ri , σ=arctan(r / h), where r is the horizontal distance between the emission position and the receiving position of the line laser; ② Increase the optimal measurement pose vector n of the line laser i Laser measurement direction vector ν around the line i Rotation angle Change the optimal measurement pose vector n of the line laser by the following formula i , so that the reflected light path follows the adjustment direction: in, Represents the direction vector ν of the laser measurement around the line i Rotation angle Otherwise, no visibility optimization is required.

7. The linear laser on-machine-measuring path planning method according to claim 1, wherein, In step S300, the fitting and interpolation on the line laser measurement path 2 comprises: In the process of in-machine measurement of the line laser, the optimal measurement position of the line laser moves along a parameter curve P(mu)=(x(mu), y(mu), z(mu)), mu is the parameter of the parameter curve, x(mu), y(mu), z(mu) are x, y, z components of the coordinate points of the parameter curve P(mu) respectively; with the movement of the line laser, the midpoint in the measurement range of the line laser forms a surface r(mu, nu)=P(mu)+nu·eta(mu), where eta(mu) is the measurement direction of the line laser, nu is the width range of the line laser in the measurement direction, and the surface r(mu, nu) is a ruled surface, which is called the optimal measurement surface; For the μ direction in the optimal measurement surface r(μ,ν), a series of measurement points in the line laser measurement path 2 and the corresponding line laser incident direction n={n i} are fitted based on double B-spline curves, and then uniformly encrypted and discretized to obtain more dense measurement points and the line laser incident direction For the v direction in the optimal measurement surface r(μ,ν), the measurement direction is consistent with the line laser measurement direction, and the measurement is performed row by row on the optimal measurement surface, and the measurement times are taken as k v , to realize full-range measurement of the measured surface; thereby obtaining the line laser measurement path 3, denoted as p′ n , the line laser measurement direction is denoted as T, Let the jth measurement point of p′ n in the line laser measurement path be p′ nj , j=1,2,…,k v , and the expression of p′ nj is as follows: Wherein, k v For the μ parameter direction in the optimal measurement surface r(μ,ν), the number of times of measuring the to-be-measured surface on the optimal measurement surface row by row, assuming that the theoretical maximum measurement range of the line laser sensor is [-w0,w0], that is, 2w0 is the theoretical maximum measurement width of the line laser sensor, and assuming that the actual maximum measurement width of the to-be-measured surface is w gmax = w gl +w gr , w gl is the maximum absolute value of the maximum measurement width w li of the negative direction of the measurement direction of the line laser sensor in all measurement positions in the line laser measurement process, and w gr is the maximum absolute value of the maximum measurement width w ri of the positive direction of the measurement direction of the line laser sensor in all measurement positions in the line laser measurement process; the symbol represents rounding down; a series of parameter curves corresponding to the path of the mid-point of the range of measurement points for the jth measurement; is the parameter curve corresponding to the parameter v = 0, is the tangent direction of the curve after being fitted by double B-spline curve, corresponding to the μ parameter direction in r(μ,ν) of the optimal measurement surface; is the ν parameter direction in r(μ,ν) of the optimal measurement surface.

8. The line laser on-machine-measuring path planning method according to any one of claims 1 to 7, characterized in that, Further comprising, post-processing the line laser measurement path 3 to obtain in-machine measurement path planning instructions.

9. A linear laser on-machine-measurement path planning apparatus characterized by comprising: Comprise: The first module is configured to acquire a to-be-measured curved surface, take a point corresponding to a minimum average geodesic distance on the to-be-measured curved surface as an initial pose measurement point, calculate a normal vector of the initial pose measurement point on the to-be-measured curved surface as an initial optimal measurement pose vector of the line laser, define a line laser optimal pose measurement coordinate system composed of the optimal measurement pose vector of the line laser, an iterative direction vector of the line laser and a measurement direction vector of the line laser, calculate all intersection points on an intersection line between a line laser measurement plane and the to-be-measured curved surface, obtain a series of line laser simulation measurement result points and normal vectors thereof, take an adjustment angle of the current iterative direction vector of the line laser to a next step iterative direction vector of the line laser as an optimization variable to construct a line laser local optimal measurement pose target function based on the line laser simulation measurement result points and the normal vectors thereof, solve the optimal adjustment angle, and obtain a line laser local optimal measurement pose; The second module is configured to iteratively solve a smoothed line laser measurement path 1 based on the line laser local optimal measurement pose; Visibility of the line laser measurement path 1 is calculated and optimized to obtain a line laser measurement path 2; The third module is configured to perform fitting and interpolation on the line laser measurement path 2 to obtain a uniformly encrypted line laser measurement path 3.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the computer to perform the line laser in-machine measurement path planning method in any one of claims 1-8.