Large-scale part hole shaft automatic assembly centering measurement method based on depth cameraTechnical Field
The invention belongs to the field of automatic assembly of large parts, and particularly relates to a depth camera-based automatic assembly centering measurement method for a hole shaft of a large part.
Background
The core task of the automatic shaft hole assembly system for the mechanical parts is to realize the coincidence of shaft axes of shaft hole parts to be assembled. The mechanical part automatic shaft hole assembly system is divided into 3 types according to different part detection strategies, namely an F/T (force/torque) based mechanical part automatic shaft hole assembly system, a machine vision based mechanical part automatic shaft hole assembly system and a hybrid mechanical part automatic shaft hole assembly system.
The machine vision detection mode belongs to non-contact detection, has the characteristics of high resolution, high timeliness and the like, can effectively improve the assembly precision of shaft hole assembly, and reduces the damage of detection to parts to be assembled. The automatic shaft hole assembly system based on machine vision improves the assembly precision of shaft hole assembly, and meanwhile, the risk of damage to mechanical parts to be assembled is reduced by a non-contact detection mode. However, the machine vision detection resolution and sensitivity are very high, which causes various noises in the environment to have certain influence on the detection performance, so the machine vision detection equipment has certain requirements on the environment.
At present, most of digital assembly attitude adjusting technologies are more applied to assembly of large components such as airplane fuselages and wings, and are less applied to a high-precision assembly centering process of large component hole shafts. Meanwhile, advanced measuring equipment and automatic positioning equipment are often used in the assembling process, so that the cost is high, and the occupied operating space is large.
Disclosure of Invention
The invention aims to provide a depth camera-based automatic assembly centering measurement method for a hole shaft of a large part, so as to solve the problems of stability, precision, efficiency and cost of the traditional assembly of the hole shaft of the large part.
The technical scheme adopted by the invention is as follows: a method for automatically assembling a hole shaft of a large part based on a depth camera comprises the following steps:
step a: thehole part 1 is fixed, thecalibration rod 4 is installed in the inner hole of thehole part 1, the axis of thecalibration rod 4 is coaxial with the axis of thehole part 1, thedepth camera 3 is fixed above thehole part 1, and the positions of thehole part 1 and thedepth camera 3 are kept unchanged in the assembling process. Adjusting the position of adepth camera 3 to enable thedepth camera 3 to acquire a stripe image irradiated on acalibration rod 4 by a structured light projector on the depth camera, performing image processing on the depth image to obtain a three-dimensional point cloud on the upper surface of thecalibration rod 4, and then performing point cloud fitting to obtain an axis OZ of thecalibration rod 4, wherein the axis is the axis of thehole part 1, and the step is to finish the axis calibration of thehole part 1;
step b: taking down thecalibration rod 4 on thehole part 1, keeping the relative positions of thehole part 1 and thedepth camera 3 unchanged, moving the shaft part 6 to be assembled to thehole part 1 with the axis calibrated, collecting stripe images emitted to the upper surface of the shaft part by the structured light projector on the shaft part through thedepth camera 3, processing the depth images and performing point cloud fitting calculation to obtain the axis O1O2 of the shaft part, and completing the axis calculation of the shaft part to be assembled;
step c: calculating the deviation amount between the shaft part axis O1O2 ratio and the hole part axis OZ by taking the hole part axis OZ as a reference, and adjusting the position and the posture of the shaft-provided part according to the deviation amount;
step d: and (c) repeating the step (b) and the step (c) until the axis of the shaft part is coaxial with the axis of the hole part, and finishing the automatic assembly centering measurement of the large-size hole shaft part.
Further, the specific process of obtaining the axis OZ of the perforated part in the step a is as follows:
structured light is projected on the surface of the calibration rod in the assembly system using a structuredlight projector 3b, and a map of the external surface data information of the calibration rod is captured with adepth camera 3a. And converting the information graph data into a point cloud graph according to the camera model. And performing drying and sampling pretreatment on the point cloud picture, and performing cylinder fitting on the pretreated point cloud to obtain axis coordinate information of the fitted cylinder in a depth camera coordinate system.
Further, the step of fitting the point cloud to solve the axis of the calibration rod is as follows:
1) and fitting the cylindrical surface. In order to reduce the influence of noise points on the fitting result, the point cloud is firstly subjected to drying treatment, and then a cylindrical surface fitting algorithm based on a consistency algorithm and a least square method is adopted.
2) And (6) obtaining the axis of the cylinder. And optimizing linear parameters by using a particle swarm algorithm, so that the variance of the distance is as small as possible and the distance is continuously close to the axis.
Further, the specific method for processing the depth image collected by the depth camera into point cloud data comprises the following steps:
and solving the three-dimensional coordinates of any point on the stripes by adopting a line-surface model, and further obtaining point clouds according to a plurality of groups of data or reconstructing the point clouds of the space coordinates by a five-step phase-shifting method.
The invention has the beneficial effects that:
1. the device provided by the invention can be used for measuring the relative pose of the shaft hole to be assembled under the non-contact condition.
2. The depth camera in the device can acquire point cloud data of the inner surface and the outer surface of the large hole shaft part assembly part, and can obtain the relative pose of the hole shaft through the point cloud data.
3. This automatic assembly centering measurement system will effectively improve assembly precision, assembly efficiency and assembly stability among the large-scale spare part hole axle assembling process, avoids the interference of artificial factor in the traditional assembly, shortens assembly cycle, realizes high accuracy, high efficiency automatic assembly centering process between the large-scale spare part hole axle, practices thrift a large amount of human labor and promotes the assembly quality. The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
Drawings
FIG. 1 is a schematic diagram of the automatic assembling, centering and measuring system for the hole axis of the large-scale component based on the depth camera;
FIG. 2 is a schematic view of the axis calibration of the hole feature;
FIG. 3 is a schematic axial measurement of a shaft part;
FIG. 4 is a schematic view of a depth camera measurement axis;
FIG. 5 illustrates the principle of axis calculation by point cloud;
fig. 6 is a principle of posture adjustment of the shaft part.
The system comprises ahole part 1, a holepart fixing frame 2, adepth camera 3, anindustrial camera 3a, astructural light emitter 3b, acalibration rod 4, an axis part posture adjustingplatform 5 and an axis part 6
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention provides a depth camera-based automatic assembly centering measurement method for a hole shaft of a large part, which aims to solve the problems of stability, precision, efficiency and cost of the traditional assembly of the hole shaft of the large part.
The invention adopts the following technical scheme: the automatic assembling method for the hole shaft of the large-scale part comprises the following steps:
step a: thehole part 1 is fixed, thecalibration rod 4 is installed in the inner hole of thehole part 1, the axis of thecalibration rod 4 is coaxial with the axis of thehole part 1, thedepth camera 3 is fixed above thehole part 1, and the positions of thehole part 1 and thedepth camera 3 are kept unchanged in the assembling process. Adjusting the position of adepth camera 3 to enable thedepth camera 3 to acquire a stripe image irradiated on acalibration rod 4 by a structured light sensor on the depth camera, reconstructing a three-dimensional point cloud on the upper surface of thecalibration rod 4 by processing the depth image, and then obtaining an axis OZ of thecalibration rod 4 by point cloud fitting, wherein the axis is the axis of thehole part 1, and the step is to finish the axis calibration of thehole part 1;
step b: taking down the calibration rod on the hole part, keeping the positions of thehole part 1 and thedepth camera 3 unchanged, moving the shaft part to be assembled to the hole part with the calibrated axis, collecting the stripe image emitted to the upper surface of the shaft part by thestructured light sensor 3b on the shaft part through thedepth camera 3a, and processing the depth image to obtain the axis O of the shaft part1O2Completing the axis calculation of the shaft part to be assembled;
step c: calculating the axis O of the shaft part by taking the axis OZ of the hole part as a reference1O2Comparing the deviation with the axis OZ of the hole part, and adjusting the position and the posture of the shaft part according to the deviation;
step d: and (c) repeating the step (b) and the step (c) until the axis of the shaft part is coaxial with the axis of the hole part, and finishing the automatic assembly centering measurement of the large-size hole shaft part.
Further, the specific process of obtaining the axis OZ of the perforated part in the step a is as follows:
example 1
The parts of the assembly system are shown in figure 1 with thedepth camera 3 above theapertured part 1 and thecamera 3 lens towards the front of theapertured part 1 to mark the position of the axis of therod 4. Thecalibration rod 4 is coaxial with the part with thehole 1, and the outer surface of thecalibration rod 4 is tightly attached to the inner surface of the part with thehole 1. A structured light projector is used in the assembly system to project striped light onto the surface of the calibration rod, and a depth camera is used to capture deformed stripes generated by the interaction of the light stripes with the outer surface of the calibration rod, as shown in FIG. 2. And converting the stripe image data into a point cloud image according to the camera model.
The point cloud image is preprocessed to reduce the number of point clouds and improve the processing speed:
1. performing straight-through filtering on the point cloud according to a preset range;
2. sampling the point cloud reduction density according to the point cloud density;
3. deleting outliers
And performing cylinder fitting on the preprocessed point cloud, and projecting the gravity center of the point cloud to the axis of the cylinder to obtain the pose of the column part.
The steps of fitting the point cloud to solve the axis of the calibration rod are as follows:
1) and fitting the cylindrical surface. Noise exists in point cloud data obtained by the depth camera, although partial noise can be removed through the previous outlier removing treatment, some noise is inevitably remained, and in order to reduce the influence of the noise on the fitting result, a cylindrical surface fitting algorithm based on a consistency algorithm and a least square method is adopted.
2) And (6) obtaining the axis of the cylinder. The segmented point cloud data of the cylinder is mainly concentrated on a semi-cylinder close to the camera, the other part of the point cloud data is shielded, and because the variance of the distance from each scattered point to the straight line can reach the minimum value only when the straight line is taken as the axis, the particle swarm algorithm is used for optimizing the parameters of the straight line, so that the variance of the distance is as small as possible, and the point cloud data can continuously approach the axis, and the schematic diagram is shown in fig. 5. The method has the advantages of higher precision and no requirement on whether the scatter point projection has a regular shape.
Example 2
In the automatic assembly centering measurement, the axis pose is measured based on machine vision. The specific implementation steps are as follows:
the acquired data is processed to obtain the circle centers of the front end and the rear end of the partial cylindrical surface of the part 6 with the shaft, and the principle diagram of the invention is shown in figure 6 by taking the
part 1 with the hole as a coordinate system. O is
1(ΔX
1,ΔY
1) And O
2(ΔX
2,ΔY
2) Respectively are the projected coordinates of the centers of the front and rear end surfaces of the point cloud in an XOY plane,
translating a coordinate system O-XYZ of the
hole part 1 in the axial direction of the shaft-provided part 6 to enable the central point of the rear end face of the point cloud to be located on a Z ' shaft after translation to obtain a translated coordinate system O ' -X ' Y ' Z ', and enabling | O
2O
1I is decomposed in the coordinate system O '-X' Y 'Z', O
2A | is | O
2O
1Projection of | in the X ' O ' Z ' plane, | O
2B | is | O
2Projection of A | in the Y ' O ' Z ' plane. Alpha and beta are respectively a pitch angle and a horizontal swing angle of the axis of the shaft part 6 relative to the axis of the
perforated part 1, and the calculation processes of the rotating angles alpha and beta of the shaft part 6 are as follows:
from the pose parameter Δ X2、ΔY2The pose of the alpha and beta adjusting part with the hole is coaxial with the shaft part.
Example 3
In the automatic assembly centering measurement, if the structured light is a collimated light beam, moire fringes are formed by the grating. The specific implementation steps for obtaining the spatial point cloud are as follows:
1) carrying out distortion correction on the depth camera, and carrying out depth calibration to obtain a magnification calibration coefficient along the depth direction;
2) projecting moire fringes on a curved surface to be measured;
3) capturing deformation Moire fringes on a measuring curved surface;
4) carrying out five-step phase shift, and recording a moire fringe image of each phase shift step;
5) the moire fringe image is subjected to image processing and phase unwrapping by an algorithm, wherein noise can be removed by a low-pass filter, and the phase unwrapping can use a branch cut method. And reconstructing a three-dimensional point cloud outline of the curved surface according to the obtained phase information.