An automatic positioning assembly system

By setting circular marks on the target workpiece and using a 3D camera for ellipse fitting, the problem of poor positioning accuracy in vision positioning assembly systems is solved, achieving high-precision and highly flexible automatic positioning assembly, adapting to assembly tasks in complex environments.

CN119609601BActive Publication Date: 2025-12-12BEIJING XINGHANG MECHANICAL ELECTRICAL EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411955663.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-28
Publication Date
2025-12-12
Estimated Expiration
2044-12-28

AI Technical Summary

Technical Problem

Existing vision-based positioning and assembly systems suffer from poor positioning accuracy due to the susceptibility of geometric feature extraction to noise, failing to meet the precision requirements of workpiece assembly. Furthermore, the systems lack sufficient positioning stability and adaptability.

Method used

A circular mark is set on the target workpiece, and an image is captured using a 3D camera and ellipse fitting is performed to obtain the positional deviation of the workpiece. The control device coordinates the transportation device and the assembly robot arm to achieve high-precision positioning.

Benefits of technology

It improves the positioning accuracy and flexibility of the assembly system, enhances the system's robustness and adaptability, and can stably extract coordinate information in complex environments, ensuring the efficiency and accuracy of the assembly process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119609601B_ABST
    Figure CN119609601B_ABST
Patent Text Reader

Abstract

The application relates to an automatic positioning assembly system and belongs to the technical field of positioning assembly, and solves the problem of low positioning precision in the prior art. The system comprises a marking device, a conveying device, an assembly mechanical arm, a 3D camera and a control device; wherein after at least three circular marks are arranged on a target workpiece, the control device controls the conveying device to move the target workpiece with the circular marks to an assembly position, after the target workpiece is preliminarily positioned, the 3D camera is controlled to shoot an image of the target workpiece at the current position as a target image; the control device obtains a translation deviation and a rotation deviation based on elliptical fitting processing on the circular marks on the target image; and the control device controls the conveying device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation. The automatic assembly positioning system has high positioning precision and is beneficial to improving assembly quality and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of positioning assembly, and in particular to an automatic positioning assembly system. BACKGROUND

[0002] In industrial production, the automatic positioning assembly system is one of the key technologies to realize efficient and precise assembly. The traditional assembly system mainly relies on manual operation, which has problems such as low efficiency, unstable precision, and high labor intensity.

[0003] With the development of automation technology, various automatic positioning assembly systems have appeared, such as visual positioning assembly systems, but there are still some deficiencies in practical application. Specifically, the existing visual positioning assembly system identifies the geometric features on the target workpiece image of the workpiece to determine the current position information of the target workpiece, and then compares it with the expected position to determine the position error for compensation, but the geometric feature extraction is easily affected by noise, resulting in low accuracy of the obtained position information, poor positioning accuracy of the system, and inability to meet the precision requirements of the workpiece assembly. It is also not conducive to the stability and adaptability of assembly. SUMMARY

[0004] In view of the above analysis, the embodiments of the present application aim to provide an automatic positioning assembly system to solve the technical problem of poor positioning accuracy of the existing positioning assembly system.

[0005] In one aspect, the embodiments of the present application provide an automatic positioning assembly system, which comprises:

[0006] A marking device is used to set a circular mark on the target workpiece;

[0007] A transport device includes a positioning table for carrying the target workpiece, which transports the target workpiece to the assembly position through translational motion and / or rotational motion;

[0008] A 3D camera is arranged above the assembly position, which is used to shoot an image of the target workpiece;

[0009] A control device is connected with the transport device, the assembly robot and the 3D camera respectively;

[0010] The marking device sets at least three circular marks on the target workpiece, and then the control device controls the conveying device to move the target workpiece with the circular marks to an assembly position; after the control device detects that the target workpiece is preliminarily positioned, the control device controls the 3D camera to shoot an image of the target workpiece at the current position as a target image; the control device obtains a translation deviation and a rotation deviation between the current position and the assembly position of the target workpiece by performing ellipse fitting processing on the circular marks in the target image; and the control device controls the conveying device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation.

[0011] Further improvement based on the above system, the assembly position is provided with a proximity switch connected with the control device.

[0012] When the proximity switch senses that the target workpiece moves to the assembly position, the proximity switch sends a positioning signal to the control device, and the control device judges that the target workpiece is preliminarily positioned after receiving the positioning signal, and then controls the 3D camera to shoot an image of the target workpiece at the current position as a target image.

[0013] Further improvement based on the above system, the conveying device further comprises a mounting platform, the positioning table comprises a sliding table and a rotating table, the rotating table is rotatably arranged on the sliding table, and a clamp for fixing the target workpiece is arranged on the rotating table.

[0014] A linear slide rail is arranged on the mounting platform, and the bottom of the sliding table is slidably connected to the linear slide rail.

[0015] Further improvement based on the above system, the conveying device further comprises a first driving mechanism and a second driving mechanism; the first driving mechanism drives the sliding table to reciprocally move along the linear slide rail; and the second driving mechanism drives the rotating table to rotate clockwise or counterclockwise on the sliding table.

[0016] After the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends the translation instruction to the first driving mechanism, the first driving mechanism drives the sliding table to translate by a corresponding distance according to the translation instruction, the control device generates a rotation instruction according to the rotation deviation and sends the rotation instruction to the second driving mechanism, and the second driving mechanism drives the rotating table to rotate by a corresponding angle according to the rotation instruction.

[0017] Further improvement based on the above system, the first driving mechanism comprises a first servo motor, a screw rod and a linear slide block.

[0018] The length direction of the lead screw is parallel to the extension direction of the linear slide rail, the linear slide block is fixedly connected to the bottom of the slide table, and the lead screw is threadedly connected with the linear slide block;

[0019] The control device is connected with the first servo motor, and the rotating shaft of the first servo motor is connected with one end of the lead screw to drive the lead screw to rotate.

[0020] Based on the further improvement of the above system, the second driving mechanism comprises a second servo motor, a worm and a turbine,

[0021] The turbine is fixedly connected to the bottom of the rotary table, the gear teeth of the turbine are meshedly connected with the thread teeth of the worm, the control device is connected with the second servo motor, and the rotating shaft of the second servo motor is connected with one end of the worm to drive the turbine to rotate.

[0022] Based on the further improvement of the above system, the control device obtains the translational deviation and rotational deviation between the current position and the assembly position based on the elliptical fitting processing of the circular marks on the target image, and comprises the following steps:

[0023] The target image is subjected to binaryzation processing to obtain a binaryzation image;

[0024] Based on the elliptical fitting processing of the circular marks on the binaryzation image, the three-dimensional coordinates of each circular mark in the image coordinate system are obtained;

[0025] The coordinates of the circular marks in the image coordinate system are converted into the coordinates of the positioning table coordinate system;

[0026] The obtained three-dimensional coordinates of the circular marks in the positioning table coordinate system are recorded to form target point cloud data;

[0027] The target point cloud is matched with a reference point cloud to obtain the translational deviation and rotational deviation between the current position and the assembly position; the reference point cloud is a workpiece point cloud of the assembly position collected under a template posture.

[0028] Based on the further improvement of the above system, the elliptical fitting processing of the circular marks on the binaryzation image to obtain the three-dimensional coordinates of each circular mark in the image coordinate system comprises the following steps:

[0029] The contour of each circular mark on the binaryzation image is subjected to elliptical fitting to obtain the elliptic equation of each circular mark contour and the coordinates of each elliptic center;

[0030] The plane fitting is performed according to the coordinates of each elliptic center to obtain a fitting plane equation and a normal vector of the fitting plane;

[0031] An affine transformation matrix is calculated according to the elliptic equation of the circular mark and the normal vector of the fitting plane;

[0032] The coordinates of each elliptic center are converted into corresponding circular center coordinates by the affine transformation matrix, and the circular center coordinates are taken as the circular mark in the three-dimensional coordinates of the image coordinate system.

[0033] Based on the further improvement of the above system, the conversion of the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning table coordinate system comprises the following steps:

[0034] The coordinates of the circular mark in the image coordinate system are converted into the coordinates of the camera coordinate system according to the intrinsic matrix of the 3D camera.

[0035] The coordinates of the circular mark in the image coordinate system are converted into the coordinates of the positioning table coordinate system according to the extrinsic matrix of the 3D camera.

[0036] Based on the further improvement of the above system, the matching of the target point cloud with the reference point cloud based on the iterative closest point algorithm to obtain the translational deviation and the rotational deviation between the current position and the assembly position comprises the following steps:

[0037] An initial translational deviation and an initial rotational deviation are set;

[0038] For each point in the target point cloud, a nearest neighbor search algorithm is used to find the closest point in the reference point cloud, and the corresponding two points are taken as a matching point pair;

[0039] According to the matching point pair, the error between the target point cloud and the reference point cloud is calculated.

[0040] The translational deviation and the rotational deviation are optimized and adjusted to minimize the error between the target point cloud and the reference point cloud, so as to obtain the optimal translational deviation and rotational deviation as the translational deviation and rotational deviation of the current position and the assembly position.

[0041] Compared with the prior art, the present application can at least achieve one of the following beneficial effects:

[0042] 1、The automatic assembly system of the present application sets circular marks on the target workpiece, uses a 3D camera to take images and performs elliptic fitting processing to accurately obtain the positional deviation of the target workpiece, and then uses a control device to coordinate a transportation device and an assembly mechanical arm to realize high-precision positioning of the target workpiece, which has the advantages of high positioning precision, high flexibility, high automation degree, real-time feedback adjustment, etc., can effectively improve the assembly efficiency and quality, and reduce the labor cost.

[0043] 2. The transport device of the present application, by setting a linear slide rail on the mounting platform, and slidingly connecting the slide table bottom with a rotatable rotary table on the linear slide rail, so that the target workpiece can realize translation and rotation at the same time, cooperate with the clamp on the rotary table to fix the target workpiece, realize flexible positioning and accurate movement of the target workpiece in the assembly process, improve the flexibility and precision of assembly.

[0044] 3. In the present application, the control device obtains the translation deviation and rotation deviation between the current position and the assembly position of the target workpiece based on the elliptical fitting of the circular mark on the target image, wherein the elliptical fitting can accurately determine the position of the circular mark in the image, thereby obtaining high-precision coordinate information, and the elliptical fitting method is suitable for circular marks of various shapes and sizes, and can well handle the case that the circular mark in the image is presented as an ellipse due to changes in viewing angle, lens distortion, etc., thereby stably extracting coordinate information in different application scenarios and complex environments. This way not only helps to improve the positioning compensation accuracy, but also enhances the robustness and adaptability of the system, effectively handles assembly tasks in complex environments and different postures, and ensures efficient and accurate assembly process.

[0045] In the present application, the above technical solutions can be combined with each other to realize more preferred combination schemes. Other features and advantages of the present application will be described in the subsequent specification, and some advantages will become apparent from the specification, or will be understood by implementing the present application. The purpose and other advantages of the present application can be achieved and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0046] The accompanying drawings are included to provide a further understanding of the embodiments, and are incorporated in and constitute a part of this specification, illustrate embodiments of the application, and together with the description serve to explain the principles of the application, and should not be considered limiting of the present application's scope as it is encompassed by the appended claims.

[0047] Figure 1 Structure schematic view of the automatic positioning assembly system of the embodiment of the present application;

[0048] Figure 2 Structure schematic view of the mounting platform, slide table and first driving mechanism of the embodiment of the present application;

[0049] Figure 3 Structure schematic view of the rotary table and the second driving mechanism of the embodiment of the present application.

[0050] Reference signs:

[0051] 1 - target workpiece; 2 - 3D camera; 3 - transport device; 4 - mechanical arm;

[0052] 101 - circular mark;

[0053] 301-mounting platform; 302-sliding table; 303-rotary table; 304-first servo motor;

[0054] 305-screw rod; 306-linear slider; 307-second servo motor; 308-turbine;

[0055] 309-worm; 310-proximity switch. DETAILED DESCRIPTION

[0056] The preferred embodiments of the present application will be described in detail below with reference to the drawings, which form a part of this application. The drawings illustrate embodiments of the application and, together with the description, serve to explain the principles of the application, and are not intended to limit the scope of the application.

[0057] The present application provides an automatic positioning assembly system, as shown in Figure 1 The system comprises:

[0058] a marking device for setting circular marks 101 on a target workpiece to be assembled;

[0059] a conveying device 3 comprising a positioning table for carrying the target workpiece, which is conveyed to an assembly position through translational and / or rotational movement;

[0060] a 3D camera 2 for taking images of the target workpiece;

[0061] a control device connected with the conveying device 3, the assembly robot 4 and the 3D camera 2 respectively;

[0062] After the marking device sets at least three circular marks 101 on the target workpiece, the control device controls the conveying device 3 to move the target workpiece with the circular marks 101 to the assembly position; after the control device detects that the target workpiece is preliminarily positioned, it controls the 3D camera 2 to take an image of the target workpiece at the current position as a target image; based on the elliptic fitting processing of the circular marks 101 on the target image, the control device obtains the translational and rotational deviations between the current position and the assembly position of the target workpiece; and the control device controls the conveying device 3 to move the target workpiece to the assembly position according to the translational and rotational deviations.

[0063] In implementation, the marking device sets at least three circular marks 101 distributed along a circle on the target workpiece; the 3D camera 2 is arranged at the end of a mechanical arm 4, so that the 3D camera 2 is located above the target workpiece through the mechanical arm 4 to take images. In addition, after the conveying device 3 moves the target workpiece to the assembly position, another mechanical arm is used to mount the workpiece to be assembled on the target workpiece.

[0064] Compared with the prior art, the automatic assembly system of the embodiment of the present application can accurately obtain the position deviation of the target workpiece by setting a circular mark 101 on the target workpiece, using a 3D camera 2 to shoot an image and performing ellipse fitting processing, and then coordinating the transport device 3 and the assembly robot arm 4 by the control device to realize high-precision positioning of the target workpiece, thereby having the advantages of high positioning precision, high flexibility, high automation degree, real-time feedback adjustment and the like, and being capable of effectively improving the assembly efficiency and quality and reducing the labor cost.

[0065] In the embodiment of the present application, the control device obtains the translation deviation and the rotation deviation between the current position and the assembly position of the target workpiece based on the ellipse fitting of the circular mark 101 on the target image, wherein the ellipse fitting can accurately determine the position of the circular mark 101 in the image, thereby obtaining high-precision coordinate information, and the ellipse fitting method is suitable for circular marks 101 of various shapes and sizes and can well process the case that the circular mark 101 appears as an ellipse in the image due to changes in viewing angle, lens distortion and the like, thereby stably extracting coordinate information in different application scenarios and complex environments. This way not only helps to improve the positioning compensation precision, but also enhances the robustness and adaptability of the system, and can effectively cope with assembly tasks in complex environments and different postures, ensuring the efficiency and accuracy of the assembly process.

[0066] It should be noted that the positioning table of the embodiment of the present application transports the target workpiece through translation and rotation movements, and the transport device 3 receives the control instruction to transport the target workpiece to the assembly position, but since there is a positioning deviation, the positioning table cannot accurately stop at the assembly position, thereby causing the positioning of the target workpiece to deviate, i.e., there is a deviation between the current position and the assembly position of the target workpiece.

[0067] Specifically, a proximity switch 310 is arranged at the assembly position, and the proximity switch 310 is connected with the control device. When the proximity switch 310 senses that the target workpiece moves to the assembly position, the proximity switch 310 sends a to-position signal to the control device, and the control device judges that the target workpiece is preliminarily positioned after receiving the to-position signal, and then controls the 3D camera 2 to shoot an image of the target workpiece at the current position as a target image.

[0068] In the embodiment, the proximity switch 310 senses the target workpiece to determine that the target workpiece is preliminarily positioned, and triggers the 3D camera 2 to shoot and obtain the target image.

[0069] In one embodiment, as shown in Figure 2As shown, the conveying device 3 further comprises a mounting platform 301, the positioning table comprises a sliding table 302 and a rotating table 303, the rotating table 303 is rotatably arranged on the sliding table 302, and a clamp for fixing a target workpiece is arranged on the rotating table 303. A linear sliding rail is arranged on the mounting platform 301, and the bottom of the sliding table 302 is slidingly connected to the linear sliding rail.

[0070] In implementation, the target workpiece is a cabin body, and the clamp on the rotating table 303 is used to position the cabin body.

[0071] The conveying device 3 of the embodiment of the present application can realize the translation and rotation of the target workpiece at the same time by arranging the linear sliding rail on the mounting platform 301 and slidingly connecting the bottom of the sliding table 302 with the rotatable rotating table 303 to the linear sliding rail, and the flexible positioning and accurate movement of the target workpiece in the assembly process are realized by fixing the target workpiece with the clamp on the rotating table 303, thereby improving the flexibility and accuracy of the assembly.

[0072] Specifically, the conveying device 3 further comprises a first driving mechanism and a second driving mechanism; the first driving mechanism drives the sliding table 302 to reciprocate along the linear sliding rail; and the second driving mechanism drives the rotating table 303 to rotate clockwise or counterclockwise on the sliding table 302.

[0073] After the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first driving mechanism, the first driving mechanism drives the sliding table 302 to translate by a corresponding distance according to the translation instruction; and the control device generates a rotation instruction according to the rotation deviation and sends it to the second driving mechanism, the second driving mechanism drives the rotating table 303 to rotate by a corresponding angle according to the rotation instruction.

[0074] Further specifically, as shown in the figure, Figure 2 The first driving mechanism comprises a first servo motor 304, a lead screw 305 and a linear slide 306, the length direction of the lead screw 305 is parallel to the extension direction of the linear sliding rail, the linear slide 306 is fixedly connected to the bottom of the sliding table 302, and the lead screw 305 is threadedly connected with the linear slide 306. The control device is connected with the first servo motor 304, and the rotating shaft of the first servo motor 304 is connected with one end of the lead screw 305 to drive the lead screw 305 to rotate.

[0075] In implementation, after the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first servo motor 304, and the first servo motor 304 rotates by a corresponding angle according to the translation instruction to drive the sliding table 302 to translate by a corresponding distance.

[0076] Further specifically, as shown in Figure 3 The second driving mechanism includes a second servo motor 307, a worm 309, and a turbine 308. The turbine 308 is fixedly connected to the bottom of the rotating table 303, and the gear teeth of the turbine 308 are in meshing connection with the threaded teeth of the worm 309. The control device is connected to the second servo motor 307, and the rotating shaft of the second servo motor 307 is connected to one end of the worm 309 to drive the turbine 308 to rotate.

[0077] In implementation, after the control device obtains the translation deviation and the rotation deviation, the control device generates a rotation instruction according to the rotation deviation and sends it to the second servo motor 307, and the second servo motor 307 rotates by a corresponding angle according to the rotation instruction to drive the rotating table 303 to rotate by a corresponding angle.

[0078] In one embodiment, the control device obtains the translation deviation and the rotation deviation between the current position and the assembly position based on the ellipse fitting processing of the circular marks 101 on the target image, including the following steps:

[0079] Step 1: Perform binaryzation processing on the target image to obtain a binaryzation image.

[0080] Step 2: Obtain the three-dimensional coordinates of each circular mark 101 in the image coordinate system based on the ellipse fitting processing of the circular marks 101 on the binaryzation image.

[0081] Step 3: Convert the coordinates of the circular marks 101 in the image coordinate system into the coordinates in the positioning table coordinate system.

[0082] Step 4: Record the obtained three-dimensional coordinates of the circular marks 101 in the positioning table coordinate system to form target point cloud data.

[0083] Step 5: Match the target point cloud with a reference point cloud to obtain the translation deviation and the rotation deviation between the current position and the assembly position. The reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

[0084] In the embodiment of the present application, high-precision positioning of the circular mark 101 can be realized through binarization processing and ellipse fitting. The binarization processing simplifies the gray value of the image into two values, usually 0 and 255. The binarization processing has the effects of simplifying the image, enhancing the contrast, reducing the noise, etc., which facilitates the subsequent ellipse fitting and edge detection.

[0085] Step 1, performing binarization processing on the target image to obtain a binarized image.

[0086] Specifically, the binarization processing on the target image to obtain a binarized image comprises:

[0087] For each pixel point in the target image, a neighborhood is defined with the pixel point as the center;

[0088] The local threshold corresponding to the pixel point is calculated according to the pixel values of the neighborhood;

[0089] The current pixel value of each pixel point is compared with the local threshold thereof. If the current pixel value is greater than the threshold, the pixel value of the pixel point is set to the maximum value. If the current pixel value of the pixel point is less than the threshold, the pixel value of the pixel point is set to zero, thereby obtaining the binarized image.

[0090] In the embodiment of the present application, the adaptive threshold processing technology is used when performing the binarization processing, and a changing threshold is used to complete the threshold processing of the image. The adaptive threshold processing adaptively determines the threshold for different local regions, and the result is more accurate, the segmentation accuracy of the image is improved, and the detail information of the image can be better preserved.

[0091] Specifically, the formula for calculating the local threshold corresponding to the pixel point according to the pixel values of the neighborhood is:

[0092]

[0093]

[0094] In the formula, T(x, y) is the local threshold corresponding to the pixel point (x, y), W(x, y) represents the neighborhood with the pixel point (x, y) as the center, I(i, j) is the pixel value corresponding to the pixel point (i, j), ω(i, j) is the weight corresponding to the pixel point (i, j), and σ is the standard deviation of the Gaussian distribution.

[0095] In the embodiment of the present application, the local threshold is obtained by calculating the weighted average value of the adjacent regions around each pixel point, and the threshold is used to process the current pixel point.

[0096] After binarization processing, the image only contains two pixel values in the image, reduces the complexity of the image, and highlights the contour and shape features in the image, which can improve the accuracy of subsequent ellipse fitting.

[0097] In step 2, based on the ellipse fitting processing of the circular mark 101 on the binarized image, the three-dimensional coordinates of each circular mark 101 in the image coordinate system are obtained, including the following steps:

[0098] The contour of the circular mark 101 on the binarized image is fitted with an ellipse to obtain an ellipse equation of each circular mark 101 contour and a coordinate of each ellipse center;

[0099] A plane fitting is performed according to the coordinate of each ellipse center to obtain a fitting plane equation and a normal vector of the fitting plane;

[0100] An affine transformation matrix is calculated according to the ellipse equation of the circular mark 101 and the normal vector of the fitting plane;

[0101] The coordinate of each ellipse center is converted into a corresponding center coordinate of a circle by the affine transformation matrix, and the center coordinate of the circle is taken as the three-dimensional coordinate of the circular mark 101 in the image coordinate system.

[0102] It should be noted that the 3D camera 2 can obtain a plane image and depth information of the photographed object, i.e. three-dimensional position information.

[0103] Further specifically, the contour of the circular mark 101 on the binarized image is fitted with an ellipse to obtain an ellipse equation of each circular mark 101 contour and a coordinate of each ellipse center, including the following steps:

[0104] An edge detection algorithm is used to extract edge point coordinates of the circular mark 101 on the binarized image, and a least squares method is used to fit the edge point coordinates to obtain an ellipse equation of the circular mark 101 contour;

[0105] The coordinate of the ellipse center is obtained based on the ellipse equation of the circular mark 101 contour.

[0106] The standard equation of the ellipse is:

[0107] Ax 2 +bxy+Cy 2 +Dx+Ey+F=0;

[0108] The quadratic form of the standard equation of the ellipse is:

[0109] x T Qx=0;

[0110]

[0111]

[0112] The objective function for fitting the edge point coordinates by least square method is:

[0113] X opt = argmin(E ellipse );

[0114]

[0115] In the formula, X opt is an optimization target, E ellipse is an error; u i and v i are respectively the coordinates of the i-th edge point of the extracted center mark of the circle; u projected and v projected are respectively the coordinates of the i-th edge point to be solved.

[0116] Further specifically, the fitting plane equation and the normal vector of the fitting plane are obtained according to the coordinates of each circular mark 101 in the image coordinate system, comprising:

[0117] Taking two circular marks 101 as a group, the direction vectors of the lines connecting the centers of the two circular marks 101 are calculated;

[0118] Based on the cross product of the direction vectors of the two lines, the normal vector of the fitting plane is solved by least square method, and the fitting plane equation is obtained.

[0119] The fitting plane equation is: n x X+n y Y+n z Z=0.

[0120] The plane normal vector is:

[0121] Wherein, X, Y, Z are respectively the coordinates of the X axis, the Y axis and the Z axis in the image coordinate system, n x , n y , n z are respectively the components of the normal vector of the fitting plane in the X axis, the Y axis and the Z axis.

[0122] The normal vector of the fitting plane can be obtained by the cross product of the direction vectors of any two lines, and the formula is:

[0123] Since the direction vectors of any two lines can be calculated, the least square method is used for fitting to obtain the optimal value of the normal vector of the fitting plane. ​

[0124] Further specifically, the step of calculating the affine transformation matrix between the image coordinate system and the positioning table coordinate system according to the ellipse equation of the circular mark 101 and the normal vector of the fitting plane comprises the steps of:

[0125] determining the major axis a and the minor axis b of the ellipse according to the ellipse equation of the circular mark 101;

[0126] calculating the included angle θ between the normal vector of the fitting plane and the normal vector of the positioning table plane;

[0127] calculating the affine transformation matrix T between the image coordinate system and the positioning table coordinate system according to the major axis a and the minor axis b of the ellipse and the included angle θ, and the formula is T s :

[0128]

[0129] r = 0.5 * (a + b);

[0130] In the formula, r is the average radius of the ellipse.

[0131] It should be noted that the normal vector of the positioning table plane is It is known that

[0132] The step 3 of converting the coordinates of the circular mark 101 in the image coordinate system into the coordinates in the positioning table coordinate system comprises the following steps:

[0133] converting the coordinates of the circular mark 101 in the image coordinate system into the coordinates in the camera coordinate system according to the intrinsic matrix of the 3D camera 2;

[0134] converting the coordinates of the circular mark 101 in the image coordinate system into the coordinates in the positioning table coordinate system according to the extrinsic matrix of the 3D camera 2.

[0135] The coordinates of the circular mark 101 in the image coordinate system are converted into the coordinates in the camera coordinate system according to the intrinsic matrix of the 3D camera 2, and the formula is as follows:

[0136]

[0137] In the formula, [u v 1] T is the coordinate expression of the circular mark 101 in the image coordinate system, [x c y c z c ] T is the coordinate expression of the circular mark 101 in the camera coordinate system, and K is the intrinsic matrix.

[0138] The company of the intrinsic matrix is:

[0139] According to the extrinsic matrix of the 3D camera 2, the coordinates of the circular mark 101 in the image coordinate system are converted into the coordinates in the positioning table coordinate system, and the formula is:

[0140]

[0141] In the formula, left [x w y w z w 1] T is the coordinate point expression of the circular mark 101 in the positioning table coordinate system, [x c y c z c 1] T is the coordinate point expression of the ellipse in the camera coordinate system, and T is the extrinsic matrix.

[0142] The formula of the extrinsic matrix is:

[0143]

[0144] Wherein, R is a 3*3 rotation matrix, and t is a 3*1 translation matrix.

[0145] In implementation, the intrinsic matrix and the extrinsic matrix of the 3D camera 2 can be obtained through calibration.

[0146] Step 5, matching the target point cloud with the reference point cloud to obtain the translation deviation and the rotation deviation between the current position and the assembly position; the reference point cloud is the workpiece point cloud of the assembly position collected under the template posture.

[0147] Specifically, the target point cloud is matched with the reference point cloud based on the iterative closest point algorithm to obtain the translation deviation and the rotation deviation between the current position and the assembly position, including the following steps:

[0148] Set the initial translation deviation and the rotation deviation;

[0149] For each point in the target point cloud, use the nearest neighbor search algorithm to find the nearest point in the reference point cloud, and take the corresponding two points as a matching point pair;

[0150] According to the matching point pair, the error between the target point cloud and the reference point cloud is calculated;

[0151] The translation deviation and the rotation deviation are optimized and adjusted to minimize the error between the target point cloud and the reference point cloud, so as to obtain the optimal translation deviation and rotation deviation as the translation deviation and rotation deviation of the current position and the assembly position.

[0152] Define the reference point cloud as P = (p1, p2, p3, ..., p N The coordinates of each point in the reference point cloud are p. i =(x i ,y i ,z i ) T The target point cloud is Q = (q1, q2, q3, ..., q N The coordinates of each point in the target point cloud are q. i =(x i ′,y i ′,z i ′) T .

[0153] The formula for the error between the target point cloud and the reference point cloud is:

[0154]

[0155] q i =Rp i +t;

[0156] In the formula, E(R,t) is the error, and p i Let q be the coordinates of the i-th point in the reference point cloud. i Let R be the coordinates of the i-th point in the target point cloud, R be the rotation deviation, and t be the translation deviation.

[0157] During implementation, the least squares method is used to optimize and adjust the translational deviation and the rotational deviation.

[0158] The formulas for the translational deviation and the rotational deviation are:

[0159] R = VU T ;

[0160]

[0161] Among them, U and V T These are the left and right singular vector matrices of the covariance matrix H, respectively. and These are the centroids of the reference point cloud and the target point cloud, respectively. They are calculated using the following steps:

[0162] Calculate the centroids of the reference point cloud and the target point cloud. and

[0163]

[0164]

[0165] Centralized data:

[0166]

[0167]

[0168] Compute the covariance matrix H:

[0169]

[0170] Singular value decomposition:

[0171] H = U∑V T ;

[0172] Singular value decomposition (SVD) is performed on the covariance matrix H to obtain the left singular vector matrix U, the singular value matrix∑, and the right singular vector matrix V T .

[0173] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiment methods can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer readable storage medium. The computer readable storage medium is a disk, an optical disk, a read-only memory, a random access memory, etc.

[0174] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.

Claims

1. An automated positioning assembly system, characterized by, The system comprises: a marking device for setting circular marks on a target workpiece; a conveying device comprising a positioning table for carrying the target workpiece, the positioning table conveying the target workpiece to an assembly position through translational and / or rotational movement; an installation platform, the positioning table comprising a sliding table and a rotating table, the rotating table being rotatably arranged on the sliding table, the rotating table being provided with a clamp for fixing the target workpiece; the installation platform being provided with a linear slide rail, the bottom of the sliding table being slidably connected to the linear slide rail; the conveying device further comprising a first driving mechanism and a second driving mechanism; the first driving mechanism driving the sliding table to reciprocate along the linear slide rail; the second driving mechanism driving the rotating table to rotate clockwise or counterclockwise on the sliding table; a 3D camera arranged above the assembly position, the 3D camera being used for shooting an image of the target workpiece, the 3D camera being arranged at the end of an assembly robot arm; a control device connected to the conveying device, the assembly robot arm and the 3D camera respectively; wherein, after the marking device sets at least three circular marks on the target workpiece, the control device controls the conveying device to move the target workpiece with the circular marks to the assembly position; after the control device detects that the target workpiece is preliminarily positioned, the control device controls the 3D camera to shoot an image of the target workpiece at the current position as a target image; the control device acquires translational and rotational deviations between the current position and the assembly position of the target workpiece based on elliptical fitting processing of the circular marks on the target image, including the following steps: performing binaryzation processing on the target image to obtain a binaryzation image; acquiring three-dimensional coordinates of each circular mark in an image coordinate system based on elliptical fitting processing of the circular marks on the binaryzation image, including: performing elliptical fitting on the contour of each circular mark on the binaryzation image to obtain an elliptical equation of each circular mark contour and coordinates of each elliptical center; performing plane fitting according to the coordinates of each elliptical center to obtain a fitting plane equation and a normal vector of the fitting plane; calculating an affine transformation matrix according to the elliptical equation of each circular mark and the normal vector of the fitting plane; converting the coordinates of each elliptical center into corresponding circular center coordinates through the affine transformation matrix, and taking the circular center coordinates as the three-dimensional coordinates of the circular marks in the image coordinate system; converting the coordinates of the circular marks in the image coordinate system into coordinates in a positioning table coordinate system; recording the acquired three-dimensional coordinates of the circular marks in the positioning table coordinate system to form target point cloud data; matching the target point cloud with reference point cloud to acquire translational and rotational deviations between the current position and the assembly position, including: setting initial translational and rotational deviations; for each point in the target point cloud, finding the nearest point in the reference point cloud using a nearest neighbor search algorithm, and taking the corresponding two points as a matching point pair; calculating an error between the target point cloud and the reference point cloud according to the matching point pair; The translation deviation and the rotation deviation are optimized to minimize the error between the target point cloud and the reference point cloud, so as to obtain optimal translation deviation and rotation deviation as the translation deviation and rotation deviation of the current position and the assembly position; The reference point cloud is a workpiece point cloud in an assembly position collected under a template posture; The control device controls the transportation device to move the target workpiece to the assembly position according to the translation deviation and the rotation deviation.

2. The system of claim 1, wherein, The assembly position is provided with a proximity switch connected with the control device; When the proximity switch senses that the target workpiece moves to the assembly position, it sends a signal to the control device that the target workpiece is in place, and then the control device controls the 3D camera to capture an image of the target workpiece in the current position as a target image.

3. The system of claim 1, wherein, After the control device obtains the translation deviation and the rotation deviation, the control device generates a translation instruction according to the translation deviation and sends it to the first driving mechanism, and the first driving mechanism drives the sliding table to translate a corresponding distance according to the translation instruction. The control device generates a rotation instruction according to the rotation deviation and sends it to the second driving mechanism, and the second driving mechanism drives the rotating table to rotate a corresponding angle according to the rotation instruction.

4. The system of claim 1, wherein, The first driving mechanism includes a first servo motor, a screw rod and a linear slide block, The length direction of the screw rod is parallel to the extension direction of the linear slide rail, the linear slide block is fixedly connected to the bottom of the sliding table, and the screw rod is threadedly connected with the linear slide block; The control device is connected with the first servo motor, and the rotating shaft of the first servo motor is connected with one end of the screw rod to drive the screw rod to rotate.

5. The system of claim 1, wherein, The second driving mechanism includes a second servo motor, a worm and a turbine, The turbine is fixedly connected to the bottom of the rotating table, the gear teeth of the turbine are meshingly connected with the thread teeth of the worm, and the control device is connected with the second servo motor, and the rotating shaft of the second servo motor is connected with one end of the worm to drive the turbine to rotate.

6. The system of claim 1, wherein, The method for converting the coordinates of the circular mark in the image coordinate system into the coordinates of the positioning table coordinate system comprises the following steps: The coordinates of the circular mark in the image coordinate system are converted into the coordinates of the camera coordinate system according to the intrinsic matrix of the 3D camera; The coordinates of the circular mark in the image coordinate system are converted into the coordinates of the positioning table coordinate system according to the extrinsic matrix of the 3D camera.

Citation Information

Patent Citations

  • Grabbing positioning method of robot

    CN111645074A

  • Assembly hole positioning method based on machine vision

    CN113838127A