Mechanical arm fan blade morphology measurement method based on ICP algorithm splicing
Technical Field
The invention belongs to the technical field of surface profile measurement, and particularly relates to a mechanical arm fan blade morphology measurement method based on ICP algorithm splicing.
Background
Aircraft engines, which act as hearts of aircraft, directly determine the performance of the aircraft, which is closely related to the technological progress of the aircraft engine and is therefore also considered as a core technology ensuring the national strategic advantages. Although the development cycle and industry chain length of aeroengines, once developed successfully, are also very significant for economic and scientific technological advances. In recent years, with the development of aircraft technology, the higher requirements on the performance of the engine are also increasing the thrust-weight ratio, the supercharging ratio of the compressor and the temperature of the combustion chamber of the aeroengine, and the severe requirements on the performance of important parts are also increasing. The investigation statistics of the authoritative flight accidents indicate that about 36% of aircraft mechanical faults occur in the aero-engines. According to statistics in China, the proportion of aero-engine faults in accidents in the last ten years is over sixty percent, so that improvement of the related technology of engine manufacturing is needed.
The methods for obtaining blade measurement data are mainly classified into two methods of contact type and non-contact type according to whether or not the blade measurement data are in direct contact with a workpiece. The contact type measuring method is high in measurement accuracy generally, but small in measurement range, low in automation degree, and easy to occur edge jump and other phenomena on the parts with poor rigidity such as the blade edge, and the like, but the non-contact type measuring method is high in measurement accuracy, large in measuring range and high in scanning efficiency, can realize flexible mass measurement by combining with an industrial mechanical arm so as to solve the efficiency requirement of aeroengine production on blade scanning, and avoids measurement errors caused by the blade edge jump phenomenon caused by contact force. Because the mechanical arm has lower precision, the blade model obtained by directly splicing the mechanical arm and the hand-eye calibration data is easy to have dislocation, and therefore, the further registration is required by an auxiliary algorithm.
Disclosure of Invention
The invention provides a mechanical arm fan blade morphology measuring method based on ICP algorithm splicing for solving the problems.
The invention discloses a mechanical arm fan blade morphology measuring method based on ICP algorithm splicing, which comprises the following steps:
step1, calibrating a measurement system;
step 2, planning a blade measurement path based on model driving;
and 3, performing point cloud splicing based on an ICP algorithm.
Further, in the step 1, the calibration measurement system method is as follows, for the blade flexible measurement system, the point cloud data of the matte ceramic standard sphere obtained by using binocular structured light measurement is under the camera coordinate system O c of the system, the transformation relation between the coordinate system and the coordinate system O t of the mechanical arm end effector is unchanged, and the transformation relation is set as a homogeneous coordinate transformation matrixRotating the partial transformation matrix intoTranslating the partial transformation matrix intoWhich represents the transformation relationship between the robot arm end coordinate system and the sensor coordinate system;
The mechanical arm base coordinate system O b is fixedly connected with the base, and is equivalent to the world coordinate system O w under the condition that the base is arranged at a fixed position, and the transformation relation between O t and O b is set as The final objective of the measurement system is to convert the measured point cloud data under the binocular structure optical coordinate system O c into the world coordinate system O w, namely unify the measurement coordinate system to obtain a complete scanning result, wherein the point under the binocular structure optical coordinate system O c is set as P c=[xc,yc,zc,1]T, and a coordinate unification formula is obtained according to a coordinate transformation relation, wherein the formula is as follows:
Further, in step 1, the spherical center position of the standard sphere under the binocular structured light coordinate system is obtained by the least square method, and the space sphere function equation is set as follows:
(x-xo)2+(y-yo)2+(z-zo)2=R2
Let 2x 0=A,2y0=B,2z0 = C, The point on n spherical surfaces is obtained by a certain measurement, and the j-th measurement point is set asWritten in matrix form:
the values of a, B, C, D are determined to be available from the least squares criterion such that the following holds:
For an equation shaped as ax=b, when x= (a TA)-1AT b can meet the above requirement, it is possible to:
Then I.e. the centre of sphere of the ith measurement is
Further, in step 1, a rotation part transformation matrix is calculatedThe method comprises the following steps:
The mechanical arm is arranged to drive the binocular structured light to carry out m times of translation scanning on the standard ball, the gesture of each scanning is kept unchanged, and the ball center of the ith scanning is obtained as The homogeneous coordinate form isSince the standard sphere is fixed under the robot arm base coordinate system, there is for each scan:
obtaining a homogeneous matrix and expanding to obtain:
The mechanical arm performs translational movement between each scanning without changing the posture, so The change is made in such a way that,The position of the standard ball under the robot base coordinate system is unchanged, and for m scans, the standard ball has the functions of scanning for any two times And (3) withThe formula can be derived:
For m scans, the following holds:
For the above writable form R x a=b, where The hand-eye matrix to be solved is obtained; The size is 3m; The size is 3m, the solution is carried out by SVD decomposition, ab T is subjected to SVD decomposition to obtain a left singular matrix and a right singular matrix V, U, and then:
further, in step 1, the translation partial transformation matrix is solved The method comprises the following steps:
Solving for When the standard ball is photographed k times from a plurality of angles and a plurality of positions by the control mechanical arm, the standard ball center coordinates of the ith photographing are obtained by fittingFrom standard ball fixingThus, it is possible to obtain:
For k measurements:
For the above equation, the calculation can be performed by the least square method:
the hand-eye matrix in homogeneous form can be found as:
the method for measuring the morphology of the fan blade of the mechanical arm based on the ICP algorithm splicing as claimed in claim 1, wherein in the step 2, a CAD model of the blade is sampled:
PCL point cloud extraction is carried out on the blade CAD model, the PCL point cloud extraction is converted into a point cloud model, ICP splicing is carried out in order to ensure that an overlapping area exists among multiple scans in the height direction, and segmentation is carried out by taking segments with the height interval of 40% of the scanning height.
Further, in step 2, the method for calculating the cross-sectional scan viewing angle is as follows:
The method comprises the steps of carrying out section projection on each section of point cloud, taking a certain height range from top to bottom, dividing the point cloud of a leaf basin and a leaf back, carrying out least square fitting on the straight line of each section of point cloud, rotating the straight line into a horizontal direction, rectifying the section of the leaf, taking the minimum point x min and the maximum point x max of x coordinate values and calculating standard parabolas P1 and P2 respectively with coordinate origins, judging whether each point with the horizontal coordinate smaller than 0 is above the parabola P1, if so, judging the point with the horizontal coordinate larger than or equal to 0 is above the parabola P2, otherwise, judging the point with the horizontal coordinate larger than or equal to 0 is the leaf basin. Dividing the leaf back of the leaf basin into three parts according to the size of the abscissa, respectively and continuously dividing the leaf back of the leaf basin into three parts according to the size of the abscissa to ensure that the overlapping area can meet the requirement of correct ICP splicing, respectively fitting a straight line to each part by least square, and then making a perpendicular line of the straight line, wherein a point 700mm away from an intersection point of the two parts along the perpendicular line direction is taken as an origin of a shooting view angle according to the range of the depth of a structural view.
In step 3, when the preprocessed data are spliced by the multi-view point cloud, the two point clouds are roughly registered by coarse registration to provide a better initial value, and the point cloud data in the camera coordinate system O c of the nth scan are obtainedTransformation relation between coordinate system O t of mechanical arm end effector and coordinate system O b of mechanical arm baseHand-eye matrixThen the following holds:
Reference point cloud with fixed coordinates for given point cloud Another piece of point cloud to be aligned with the point cloud with coincident characteristicThe registration of the point cloud is described as how to find the optimal transformation matrix R, t, the problem of minimizing the following equation:
And continuously searching the closest points between the two initial point clouds or the point clouds obtained after multiple transformations, and obtaining transformation matrixes Rn and Tn which can enable the closest point to have higher degree of coincidence to transform the point clouds until the iteration condition is met.
Further, in step 8, the corresponding point matching method is as follows, traversing each point in C a for the point cloud C a to be registered and the reference point cloud C b Calculating the minimum point of Euclidean distance between the minimum point and the datum point in the datum point cloud as a matching pointForming a corresponding point set;
The method for solving the optimal transformation is as follows:
The corresponding point set C c calculates the analytical solution of the optimal transformation by means of SVD decomposition:
Wherein the method comprises the steps of And (3) withSVD decomposition is carried out on the H to obtain a left singular matrix U and a right singular matrix V, and then the optimal transformation matrix of the transformation is obtained as follows:
Rk=VUT
The homogeneous coordinates are in the form of:
Further, in step 9, the iterative method is as follows:
Each iteration can obtain that R k and T k act on the point cloud C a to be registered, and the point cloud C a to be registered comprises Stopping iteration when one of the following arbitrary conditions is met, otherwise, repeating the matching of the corresponding points and solving the optimal transformation;
A, reaching the maximum iteration times, B, E (R *,t*) is smaller than a set value, C, R k,Tk changes are smaller than the set value;
Visualization of the visualized acquisition effect of the point cloud data can be realized by carrying out three-dimensional reconstruction on the surface of the point cloud of the blade after the point cloud acquisition, pretreatment and splicing are completed:
The NURBS curve is defined as a piecewise polynomial as shown in the formula
Where { P i } is the control point, { N i,p (u) } is the P-th order basis function defined at the non-uniform junction vector;
The following formula defines NURBUS curved surfaces of the p-order in the u direction and the q-order in the v direction, and is a binary vector value segmentation rational function in the following form;
Wherein { P i,j } is a binary control mesh point, { w i,j } is a weight, { N i,p (u) } and { N j,q (v) } are basis functions defined in a non-uniform junction vector, and the leaf basin and leaf back are segmented by a parabolic segmentation method, and the leaf basin and leaf back are respectively fitted to obtain a leaf curved surface visual view.
Advantageous effects
According to the invention, a theoretical model of the blade flexible measurement system is established, a scanning path is automatically planned according to the CAD model of the blade, the multi-view acquisition point cloud is precisely matched through an ICP algorithm, the influence of multi-view splicing errors on the subsequent feature extraction precision is effectively reduced, and the three-dimensional reconstruction of the processed complete point cloud is realized.
Drawings
Fig. 1 is a schematic view of a sampling point cloud of a CAD model of a blade in the present invention.
FIG. 2 is a schematic view of each of the height sections of the present invention.
FIG. 3 shows a fan blade according to the present invention schematic of the segmentation of the leaf back of a cross-sectional leaf basin.
FIG. 4 is a schematic view of a cross-sectional view selection in accordance with the present invention.
Fig. 5 is a flow chart of an ICP matching algorithm in the present invention.
FIG. 6 is a schematic view of a reconstructed blade model according to the present invention.
FIG. 7 is a diagram of a hand-eye calibration test device according to the present invention.
Fig. 8 is a graph of point cloud center fitting data in accordance with the present invention.
Fig. 9 is a view of a blade flexibility measuring device in the present invention.
Fig. 10 is a schematic diagram of coordinate transformation considering a turntable in the present invention.
FIG. 11 is a schematic view of a rough matching splice of blades according to the present invention.
FIG. 12 is a schematic view of a blade fine matching splice according to the present invention.
Detailed Description
The present embodiment will be specifically described with reference to fig. 1 to 12.
The invention discloses a mechanical arm fan blade morphology measuring method based on ICP algorithm splicing, which comprises the following steps:
step 1, calibrating a measuring system
For the flexible blade measuring system, the point cloud data obtained by binocular structured light measurement is under the camera coordinate system O c of the system, the transformation relation between the coordinate system and the coordinate system O t of the mechanical arm end effector is unchanged, and the transformation relation is set as a homogeneous coordinate transformation matrix(Wherein the rotation matrix isTranslation matrix of) The specific values of the hand-eye matrix, which represent the transformation relation between the mechanical arm end coordinate system and the sensor coordinate system, are set by the mechanical arm controller tool coordinate system, the binocular structured light measurement coordinate system and the design size of the adapter. The mechanical arm base coordinate system O b is fixedly connected with the base, and is equivalent to the world coordinate system O w under the condition that the base is arranged at a fixed position, and the transformation relation between O t and O b is set as(Wherein the rotation matrix isTranslation matrix of). The final objective of the measurement system is to convert the measured point cloud data in the binocular structured light coordinate system O c into the world coordinate system O w, namely, unify the measurement coordinate system, so as to obtain a complete scanning result. The point under the binocular structured light coordinate system O c is set as P c=[xc,yx,zc,1]T, and a coordinate unified formula can be obtained by the coordinate transformation relation as follows:
step 11, obtaining the spherical center position under the binocular structured light coordinate system by a least square method, and setting a space sphere function equation as follows:
(x-xo)2+(y-yo)2+(z-zo)2=R2
Let 2x 0=A,2y0=B,2z0 = C, The point on n spherical surfaces is obtained by a certain measurement, and the j-th measurement point is set asWritten in matrix form:
the values of a, B, C, D are determined to be available from the least squares criterion such that the following holds:
For an equation shaped as ax=b, when x= (a TA)-1AT b can meet the above requirement, it is possible to:
Then I.e. the centre of sphere of the ith measurement is
Step 12, calculating the hand-eye matrix rotation part
The mechanical arm is arranged to drive the binocular structured light to carry out m times of translation scanning on the standard ball, the gesture of each scanning is kept unchanged, and the ball center of the ith scanning is obtained asThe homogeneous coordinate form isSince the standard sphere is fixed under the robot arm base coordinate system, there is for each scan:
obtaining a homogeneous matrix and expanding to obtain:
the mechanical arm performs translational movement between each scan, and the posture is not changed. Therefore, only The change is made in such a way that,Is unchanged. The position of the standard sphere in the robot-based coordinate system is unchanged, so for the m scans, there are any two scansAnd (3) withThe formula can be derived:
For m scans, the following holds:
For the above writable form R x a=b, where The hand-eye matrix to be solved is obtained; The size is 3m; The size is 3m. The equation in this form can be solved by SVD decomposition, and SVD decomposition is performed on Ab T to obtain left and right singular matrices V, U, then:
step 13, solving the translation transformation matrix
Solving forWhen the standard ball is photographed k times from a plurality of angles and a plurality of positions by the control mechanical arm, the standard ball center coordinates of the ith photographing are obtained by fittingFrom standard ball fixingThus, it is possible to obtain:
For k measurements:
For the above equation, the calculation can be performed by the least square method:
the hand-eye matrix in homogeneous form can be found as:
Step 2, blade measurement path planning based on model driving
In order to improve ICP splicing accuracy, the placement position of the blade is required to be determined according to the performance of the measuring sensor, the size and shape characteristics of the CAD model of the blade and the like, and the measuring path of the mechanical arm is required to be automatically planned, so that the complete measurement of the blade is finally realized. The method comprises the following steps:
And step 21, sampling a blade CAD model, namely extracting PCL point cloud from the blade CAD model, converting the PCL point cloud into a point cloud model, taking segments with the height interval of 40% of the scanning height to intercept in order to ensure that an overlapping area exists between the multiple scans in the height direction for ICP splicing, and enabling the point cloud to be shown in figure 2.
And 22, calculating a section scanning visual angle, namely performing section projection on each section of point cloud, and taking a certain height range from top to bottom of each intercepting height. The plane to be projected in the vertical and blade height direction is as shown in fig. 2. In order to realize planning on the front and back surfaces of the blade, the point clouds of the blade basin and the blade back are required to be segmented, the cross section of the blade is straightened by carrying out least square fitting on the point clouds of each cross section and rotating the point clouds into the horizontal direction, the minimum point x min and the maximum point x max of x coordinate values are taken to respectively calculate standard parabolas P1 and P2 with the origin of coordinates as shown in figure 3, whether each point with the abscissa less than 0 is above the parabola P1 is judged, if so, the point is the blade basin, otherwise, the point is the blade back, and similarly, whether each point with the abscissa greater than or equal to 0 is above the parabola P2 is judged. And dividing the leaf back of the segmented leaf basin into three parts according to the size of the abscissa, so as to ensure that the overlapping area can meet the requirement of correct ICP splicing. And respectively fitting a straight line to each part by least squares, then making a perpendicular line of the straight line, and calculating the section view angle according to the range of the structure light scene depth by taking a point which is 700mm away from the intersection point of the two along the perpendicular line direction as a shooting view angle origin, wherein the section view angle is shown in figure 4.
After the theoretical model of the blade flexible measurement system is built, the point cloud data is required to be preprocessed so as to enable the subsequent calculation step to be more convenient, quicker and more accurate in processing the point cloud data under the condition that the reality of the point cloud data is not affected. The two processing methods are an outlier rejection method and a voxel grid downsampling method based on statistical analysis respectively.
Step3, point cloud splicing based on ICP algorithm
When the preprocessed data are spliced by the multi-view point cloud, the two point clouds are roughly registered through rough registration to provide a good initial value. From the above, it can be seen that the point cloud data under the camera coordinate system O c at the nth scan is obtainedTransformation relation between coordinate system O t of mechanical arm end effector and coordinate system O b of mechanical arm baseHand-eye matrixThen the following holds:
is affected by the positioning precision of the mechanical arm, and is actually obtained Certain errors exist, so that the transformed point cloud is dislocated, and further fine registration of the point cloud is required. ICP algorithm and variations of ICP algorithm are the most common and well-developed fine registration methods.
Reference point cloud with fixed coordinates for given point cloudAnother piece of point cloud to be aligned with the point cloud with coincident characteristicThe registration of the point cloud can be described as how to find the optimal transformation matrix R, t, the problem of minimizing the following equation:
Based on the idea of iterative optimization, the method is characterized in that the closest points between the initial two point clouds or the point clouds obtained after multiple transformations are continuously searched to obtain transformation matrixes Rn and Tn which can enable the contact ratio of the closest points to be higher, the transformation is carried out on the point clouds until the iterative condition is met, and an ICP matching algorithm flow chart is shown in figure 5. The basic steps are as follows:
Step 31, corresponding point matching
For the point cloud with a better initial value, namely after coarse registration, the calculation process of the traditional ICP algorithm is that for the point cloud C a to be registered and the reference point cloud C b, the points in C a are traversedCalculating the minimum point of Euclidean distance between the minimum point and the datum point in the datum point cloud as a matching pointA corresponding set of points is formed.
Step 32, solving the optimal transformation
For the conventional registration problem between two point clouds, an optimal transformed solution can be calculated by means of SVD decomposition according to the corresponding point set C c:
Wherein the method comprises the steps of And (3) withAnd the point cloud to be registered and the reference point cloud centroid are respectively. SVD decomposition is performed on H to obtain left and right singular matrices U and V, and then the optimal transformation matrix of the (k) th transformation can be obtained as follows:
Rk=VUT
The homogeneous coordinates are in the form of:
Step 33, iterate
Each iteration can obtain that R k and T k act on the point cloud C a to be registered, and the point cloud C a to be registered comprisesStopping the iteration when any one of the following conditions is met, otherwise, repeating the step (1) and the step (2):
And A, reaching the maximum iteration times.
E (R *,t*) is smaller than the set value.
And R k,Tk is less than the set value.
And step 34, in order to realize the visualization of the visualized acquisition effect of the point cloud data, the visualization can be realized by carrying out three-dimensional reconstruction on the surface of the blade point cloud after the point cloud acquisition, the pretreatment and the splicing are completed. NURBS surface fitting is typically used in computer graphics or CAD/CAM for design, and by NURBS fitting, the amount of point cloud data can be effectively reduced without affecting reconstruction accuracy. The basic principle is as follows:
The NURBS curve is defined as a piecewise polynomial as shown in the formula
Where { P i } is the control point, { N i,p (u) } is the P-th order basis function defined at the non-uniform junction vector.
The following equation defines NURBUS surfaces in the u-direction p-order, v-direction q-order, which is a binary vector value piecewise rational function of the form.
Where { P i,j } is a binary control mesh point, { w i,j } is a weight, { N i,p (u) } and { N j,q (v) } are basis functions defined in the non-uniform junction vector.
Since NURBS surface fitting requires two principal directions to be selected for fitting, and the blade is a closed surface in the direction perpendicular to the height, the leaf back of the leaf basin is segmented by the parabolic segmentation method described above. And respectively fitting the leaf backs of the leaf basins to obtain a visual view of the leaf curved surface, as shown in figure 6.
Examples
The experimental device table in this embodiment is shown in fig. 7, and uses moveit control node program in the ros system to control the mechanical arm to perform specified motion and outputs the position and posture of each shooting point in the form of txt homogeneous coordinate matrix file, and simultaneously uses related software to control the FARO binocular structured light to obtain point cloud for 3D printing standard racket, and selects the point cloud of spherical part in each shooting point cloud to perform least square fitting spherical center as shown in fig. 8.
Storing the spherical center position coordinates and the homogeneous coordinate matrix obtained by shooting each time according to a corresponding sequence, calling eigen matrix library to write a hand-eye calibration calculation program by using C++ language in Qt creator, and solving the hand-eye matrix by using the data, wherein the finally obtained hand-eye matrix is as follows:
Considering that the blade to be measured is a large-sized aero-engine fan blade, a large bearing air floating turntable is adopted to build the blade flexibility measuring device as shown in fig. 9. In order to perform the subsequent splicing, parameters of the rotating shaft of the turntable need to be obtained. As shown in fig. 7, the rotating shaft is calibrated by a standard ball, the standard ball is fixed on the turntable, the ball center position is obtained by multiple rotations, space circle fitting is performed on the ball center position, and the parameter of the rotating shaft can be determined by fitting the circle center and the normal vector. Because the range of the scanning standard sphere is limited, the sphere center cannot form a complete circle, and the deviation easily occurs by using the common least square fitting space circle result, the least square space circle fitting with consistent random sampling is adopted.
Considering the movement range of the mechanical arm, the path is planned by combining the large-bearing air-bearing turntable, and the visual angles on different heights rotate to the same direction around the rotating shaft as shown in fig. 10, so that the occupied range of the path is reduced, errors caused by large-amplitude movement of the mechanical arm can be reduced, and the measurement efficiency is improved. The blade is scanned along a specified path and spliced with rough matching as shown in fig. 11.
It can be seen that due to errors in the pose data of the mechanical arm, dislocation exists between multiple scans (for obvious observation, the amplified adjacent dislocation point clouds are modified to be white for comparison), and the binocular structured light sensor introduces mixed point and ambient point clouds. And removing the point cloud of the environmental object, filtering stray points by a statistical filtering method, and then using an ICP (inductively coupled plasma) fine matching algorithm to splice, so that the pose error is reduced, and the splicing result is shown in fig. 12 (the adjacent point cloud uses yellow and green areas).
The foregoing is merely illustrative of the present invention and is not intended to limit the embodiments of the present invention, and those skilled in the art can easily make corresponding variations or modifications according to the main concept and spirit of the present invention, so that the protection scope of the present invention shall be defined by the claims.