Method for rapidly realizing online measurement of complex component clamping pose error based on vision
Technical Field
The invention belongs to the technical field of visual online measurement of clamping pose errors, and particularly relates to a method for quickly realizing online measurement of the clamping pose errors of a complex component based on vision.
Background
The non-reference complex component (complex component for short) refers to a complex component without a reliable measurement reference surface/line, and is commonly used in the fields of aerospace and the like, such as an aircraft engine turbine blade, a ceramic core, a casing, a turbine outer ring and the like. The complex components after forming require modification to ensure dimensional accuracy and surface finish. The complex member modification is different from common processing, the clamping pose error of the complex member needs to be accurately measured, and the complex member modification is a key problem to be solved firstly. For example, ceramic cores for turbine blade casting do not have effective measuring methods and shaping equipment at home at present, aeronautical material manufacturing units can only adopt a manual shaping mode and human eye detection, shaping precision is poor (0.2mm), yield is low (18%), and the modification process is easy to crack.
Most of the existing pose measurement methods are based on a feature point/line extraction technology, a pose calculation model (Jianepiu, Dingguo, Liyong, Ma Shu, Zhang Jian, Zhouyousheng) is established, a workpiece pose adjustment method [ P ] based on measurement point geometric feature iterative registration is adopted, CN108253911A,2018-07-06 ] is adopted, clamping pose error information is solved, manual intervention is needed in the measurement process, and the measurement time is long.
For pose measurement of a non-reference complex component, feature lines and feature points cannot be accurately extracted by contact type and non-contact type pose measurement, great errors are brought to pose calculation, and measurement failure is caused. Meanwhile, the contact measurement of the geometric characteristics takes a long time, and the operation is complex, so that the time requirement of online measurement cannot be met.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a method for quickly realizing online measurement of the clamping pose error of the complex component based on vision, a point cloud model is obtained by utilizing vision, feature points/lines do not need to be extracted, the measurement process is automatic, the measurement time is short, and the requirement of online measurement of the clamping pose error of the complex component without reference is met.
In order to achieve the purpose, the invention adopts the technical scheme that:
a method for rapidly realizing online measurement of complex component clamping pose errors based on vision comprises the following steps:
1) complex component clamping: the complex component is clamped on a special clamp, the special clamp comprises a base 1, the base 1 fixes a clamp body 2 on an equipment turntable, the top of the clamp body 2 is connected with an upper cover plate 3, the upper cover plate 3 is connected with a positioning block 4 through a positioning pin 5, the positioning block 4 and a clamping block 6 are matched to clamp the complex component, the clamping block 6 realizes manual clamping force adjustment and self-locking through an adjusting nut 7, and the clamp body 2 is a cylinder;
2) point cloud model acquisition: the clamped complex component and a special clamp form a component combination, complex component clamping pose error information is contained in a point cloud model of the component combination, a three-dimensional scanner (XTOM-ET-5M) is used for obtaining piece point clouds from 4 uniformly distributed angles and automatically splicing the piece point clouds into a point cloud model of a complete combination, an algorithm adopted by automatic splicing has noise immunity and robustness, the point cloud model allows existence of noise and local loss, the point cloud quality and integrity of a vertical side face a of a positioning block, a horizontal plane b of an upper cover plate and a side face c of a cylinder are guaranteed as far as possible, and a coordinate system where the point cloud model is located is a visual coordinate system;
3) generating a reference frame: a reference frame is formed by the vertical side face a of the positioning block, the horizontal plane b of the upper cover plate and the side face c of the cylinder, and a reference coordinate system is obtained through the reference frame; fitting the horizontal plane b of the upper cover plate and the side face c of the cylinder to obtain a normal vector of the vertical side face a of the positioning block, namely the pointing direction of the Y axis; the normal vector of the horizontal plane b of the upper cover plate is the Z-axis pointing direction; the intersection line of the side surface c of the cylinder and the horizontal plane b of the upper cover plate is circular, and the coordinate of the center of the circle is the origin (x) of the reference coordinate system0,y0,z0) (ii) a The reference coordinate system satisfies the right-hand rule, and the pointing direction of the X-axis can be determined, assuming the Z-axis direction (i)z,jz,kz) In the Y-axis direction (i)y,jy,ky) From vector cross multiplication, the X-axis direction (i)x,jx,kx) Calculating as shown in the following formula;
4) point cloud coordinate system transformation and segmentation: and solving a posture transformation matrix D and a translational vector T of the point cloud model transformed from the visual coordinate system to the reference coordinate system by using the reference coordinate system, wherein the point cloud model is transformed to the reference coordinate system, and the transformation formula is as follows: p ═ P × D + T, P represents the coordinate value of the point in the initial point cloud data; p' represents the coordinate value of the point in the point cloud data under the reference coordinate system; segmenting the point cloud model, wherein the segmented model is an actually measured pose model;
5) solving clamping pose errors: the reference pose model is a complex component point cloud model without clamping pose errors under a reference coordinate system according to the positioning requirements of the clamp; and comparing the actual measurement pose model with the reference pose model to solve the clamping pose error.
The complex component in the step 1) is arranged on a special fixture and needs to meet the requirements: the displacement error is less than or equal to 2mm, and the angle error is less than or equal to 1 degree.
The concrete method for solving the clamping attitude error in the step 5) comprises the following steps: randomly selecting N sample points from the reference pose model to obtain a point set S1, searching corresponding points in the actual measurement pose model to obtain a point set S2, wherein all point pairs form a point pair set; removing unreliable point pairs by using an Euclidean distance adaptive threshold method; calculating a pose transformation matrix M from the point pair set; transforming the pose of the point set S2 according to the pose transformation matrix M to obtain a point set S2 ', calculating the distance square sum D1 of all points from the point set S2 to the point set S2', and taking the absolute value delta D of the difference between the distance square sums of two continuous iterations as the basis for convergence; if the delta D is smaller than the threshold tau, converging and stopping iteration, otherwise, repeating the process; and the pose transformation matrix M is a clamping pose error of the actual measurement pose model relative to the reference pose model.
The method for rapidly realizing online measurement of the clamping pose error of the complex component based on the vision modifies the tool path file according to the tool path file generated by path planning and the measured pose error of the actual clamping, and compensates the processing error caused by the clamping pose error; and combining with core trimming NC automatic programming software to automatically generate a new NC program, wherein the process is completely automatic and automatically generates NC codes.
The invention has the beneficial effects that: the method is particularly suitable for the online measurement of the clamping pose error of a non-reference complex component, the measurement time is short (less than 30s), the time cost for measuring the clamping pose error by contact is far less, the measurement process does not need artificial interference, the automation of the process is realized, and the complexity of using contact measurement is greatly simplified. The characteristics meet the requirement of automatic modification of equipment of the non-reference complex component, and the core problem of automatic modification of the equipment of the non-reference complex component is solved.
Drawings
FIG. 1 is a flow chart of an embodiment method.
FIG. 2 is a front view and a top view of the special clamp of the embodiment.
FIG. 3 is a schematic view of a combination of example components.
FIG. 4 is a diagram of a reference coordinate system for a combination of example components.
FIG. 5 is a flowchart of clamping pose error calculation according to the embodiment.
Detailed Description
The invention is further illustrated with reference to the following figures and examples.
Referring to fig. 1, a method for rapidly realizing online measurement of complex component clamping pose errors based on vision comprises the following steps:
1) complex component clamping: the ceramic core is clamped on a special clamp, as shown in fig. 2, the special clamp comprises a base 1, the base 1 fixes a clamp body 2 on an equipment turntable, the top of the clamp body 2 is connected with an upper cover plate 3, the upper cover plate 3 is connected with a positioning block 4 through a positioning pin 5, the positioning block 4 and a clamping block 6 are matched to clamp a ceramic core 8 and prevent damage to the ceramic core 8, as shown in fig. 3, the clamping block 6 realizes manual adjustment of clamping force and self-locking through an adjusting nut 7, and the clamp body 2 is a cylinder;
because the invention can calculate the clamping pose errors of the ceramic core 8 and the special fixture, the requirement on the clamping precision is lower, and simultaneously, the pose calculation speed is considered, the ceramic core 8 is arranged on the special fixture and needs to meet the requirements: the displacement error is less than or equal to 2mm, the angle error is less than or equal to 1 degrees, the precision can be ensured by a special clamp, the ceramic core 8 is required to be stable after being clamped, and the ceramic core cannot shake in the measuring and processing processes;
2) point cloud model acquisition: the clamped ceramic core 8 and the special fixture form a component combination, the clamping pose error information of the ceramic core 8 is contained in a point cloud model of the component combination, a three-dimensional scanner (XTOM-ET-5M, measuring breadth: 400 × 300mm, binocular) is used for obtaining piece point clouds from 4 uniformly distributed angles and automatically splicing the piece point clouds into a point cloud model of the complete component combination, an algorithm adopted by automatic splicing has noise resistance and robustness, the point cloud model allows the existence of noise points and local deletion, the point cloud quality and integrity of a vertical side face a of a positioning block, a horizontal plane b of an upper cover plate and a side face c of a cylinder are ensured as far as possible, and a coordinate system where the point cloud model is located is a visual coordinate system as shown in FIG. 3;
3) generating a reference frame: a reference frame is formed by the vertical side face a of the positioning block, the horizontal plane b of the upper cover plate and the side face c of the cylinder, and a reference coordinate system can be obtained through the reference frame; by utilizing the fitting of the horizontal plane b of the upper cover plate and the side face c of the cylinder, the normal vector of the vertical side face a of the positioning block of the embodiment is (0.0580,0.3495,0.9351), namely the pointing direction of the Y axis; the normal vector of the horizontal plane b of the upper cover plate of the embodiment is (-0.5016,0.8209,0.2729), namely the Z-axis pointing direction; the intersection line of the side surface c of the cylinder and the horizontal plane b of the upper cover plate is circular, and the coordinates of the circle center of the embodiment are (20.1766,81.6553,120.1818), namely the origin of the reference coordinate system; the reference coordinate system satisfies the right-hand rule, and it can be determined that the pointing direction of the X-axis is calculated by the following formula (0.6725, 0.4850, -0.2227),
the reference coordinate system is shown in fig. 4;
4) point cloud coordinate system transformation and segmentation: and solving a posture transformation matrix D and a translational vector T of the point cloud model transformed from the visual coordinate system to the reference coordinate system by using the reference coordinate system, wherein the point cloud model is transformed to the reference coordinate system, and the transformation formula is as follows: p ═ P × D + T, P represents the coordinate value of the point in the initial point cloud data; p' represents the coordinate value of the point in the point cloud data under the reference coordinate system; dividing the point cloud model, and reducing the number of point clouds (the number of points 2214986 is reduced to 862846); the segmented model is an actual measurement pose model;
5) solving clamping pose errors: the reference pose model is a complex component point cloud model without clamping pose errors under a reference coordinate system according to the positioning requirements of the clamp; comparing the actual measurement pose model with the reference pose model to solve clamping pose errors; the process is as follows: as shown in fig. 5, N (N ═ 5000) sample points are randomly selected from the reference pose model to obtain a point set S1, corresponding points are searched in the actual measurement pose model to obtain a point set S2, and all point pairs form a point pair set; removing unreliable point pairs by using an Euclidean distance adaptive threshold method; calculating a pose transformation matrix M between the point pair sets by using a quaternion method; transforming the pose of the point set S2 according to the pose transformation matrix M to obtain a point set S2 ', calculating the distance square sum D1 of all points from the point set S2 to the point set S2', and taking the absolute value delta D of the difference between the distance square sums of two continuous iterations as the basis for convergence; if the delta D is smaller than the threshold tau, converging and stopping iteration, otherwise, repeating the process; the pose transformation matrix M is a clamping pose error of the actual measurement pose model relative to the reference pose model;
according to a tool path file generated by path planning, the measured pose error of actual clamping, the tool path file is modified, and the processing error caused by the clamping pose error is compensated; the method is combined with the core trimming NC automatic programming software to automatically generate a new NC program, the process is completely automatic, no intervention of any person is needed, the key problem is solved for the ceramic core trimming equipment, the NC codes are automatically generated, the effect is good through the simulation verification of the NC program, and the requirements of the ceramic core on-line measurement and on-line processing are met.