An automated assembly method and system based on planar workpiece positioning algorithm

By extracting plane point clouds and calculating assembly poses, efficient, accurate and robust automated assembly of plane workpieces is achieved, solving the problems of insufficient accuracy and robustness in the existing technology, and improving assembly efficiency and accuracy.

CN114742883BActive Publication Date: 2024-09-24HUAZHONG UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210332377.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-09-24
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

Existing machine vision positioning algorithms have problems with insufficient accuracy and robustness during the assembly process. Especially in flat workpiece assembly scenarios, the three-dimensional point cloud method has complex calculations and poor performance.

Method used

By extracting the plane point cloud of the assembled parts, creating a bounding box, calculating the pose of the assembly position relative to the camera and robot base coordinate system, and controlling the robot to complete the assembly, the complex template matching process is avoided and the calculation efficiency is improved.

Benefits of technology

It achieves efficient, accurate and robust automated assembly of planar workpieces, reduces labor costs, improves recognition rate and assembly accuracy, and avoids the influence of factors such as illumination, rotation and scale.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742883B
    Figure CN114742883B
Patent Text Reader

Abstract

The present invention discloses an automated assembly method and system based on a planar workpiece positioning algorithm, and belongs to the field of robot vision. The present invention uses plane detection and outlier removal algorithms to extract several planes, and then determines the plane point cloud pose through a minimum bounding box, and finally uses the length and width constraints of the plane to find the required plane, and guides the industrial robot to move to the correct assembly position. Compared with image-based positioning algorithms, the present invention has higher recognition accuracy in high-dynamic and high-reflection scenes; compared with conventional point cloud-based positioning algorithms, the present invention avoids the complex template matching process, has high computational efficiency, strong robustness, and can be applied to planar workpieces of any shape. The present invention provides a robust solution for scenes where workpiece offset may occur through a combination of three-dimensional vision and industrial robots.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of robot vision, and more specifically, relates to an automatic assembly method and system based on a planar workpiece positioning algorithm. Background Art

[0002] Assembly is a post-production process of product production and plays an important role in the manufacturing industry. In traditional assembly lines, all the actions of industrial robots are pre-set. When the position of the workpiece is offset, the robot cannot complete the assembly work smoothly. With the development of machine vision technology, the mode of combining machine vision positioning algorithms with industrial robots has gradually become the mainstream, and the flexibility and automation level of robot work have been significantly improved.

[0003] The current machine vision positioning algorithms are mainly divided into two categories: based on two-dimensional images and based on three-dimensional point clouds. In the visual positioning algorithms based on two-dimensional images, the two-dimensional image algorithm is affected by factors such as lighting, rotation, and scale, so it lacks accuracy and robustness; while the method based on three-dimensional point cloud registration has poor performance due to the large amount of calculation required for matching and other processes.

[0004] In actual assembly, there are a large number of parts that contain one or several planes as assembly surfaces. The computational overhead of extracting planes in three-dimensional point clouds is relatively low. Therefore, designing a positioning algorithm for such scenarios can make the positioning algorithm have a balance between robustness, accuracy and efficiency. Summary of the invention

[0005] In view of the above defects or improvement needs of the prior art, the present invention provides an automated assembly method and system for planar workpieces, which aims to realize robotic automated assembly of planar parts while taking into account robustness, precision and efficiency.

[0006] To achieve the above object, the present invention provides a robot automated assembly method for planar workpieces, comprising the following steps:

[0007] S1. Extracting the plane point cloud of the assembled parts;

[0008] S2. Create a bounding box based on the plane point cloud obtained in S1, and calculate the pose of the assembly position of the assembled part relative to the camera coordinate system;

[0009] S3. Calculating the pose of the assembly position of the assembled planar part relative to the robot base coordinate system according to the pose of the assembly position of the assembled part relative to the camera coordinate system;

[0010] S4. Control the robot to complete the assembly according to the posture obtained in S3.

[0011] Preferably, the S1 specifically includes:

[0012] S11. Obtaining a three-dimensional point cloud to be processed;

[0013] S12. Randomly select three points from the three-dimensional point cloud and calculate the plane formed by the three points;

[0014] S13. Traverse all points in the three-dimensional point cloud, calculate the distance between each point and the plane obtained in S12, and then count the number of points whose distance to the plane is less than the threshold according to a preset threshold, i.e., the number of inner points;

[0015] S14. Repeat S12-S13 within a preset number of iterations to find the plane with the most inner points as the optimal plane;

[0016] S15. Traverse all points in the three-dimensional point cloud, and retain the points whose distance to the optimal plane is less than a threshold to form a plane point cloud.

[0017] Preferably, the S2 specifically includes:

[0018] S21. Read the plane point cloud obtained by S1 processing;

[0019] S22. Calculate the centroid of the plane point cloud;

[0020] S23. Construct a covariance matrix through the centroid and the plane point cloud, perform QR decomposition, and obtain three real eigenvalues;

[0021] S24. Arrange the real eigenvalues ​​from large to small, and the corresponding three eigenvectors are the directions of the xyz axes of the plane point cloud pose coordinate system;

[0022] S25. Create a pose coordinate system of the plane point cloud with the center of mass as the origin and the coordinate axis generated in S24 as the direction;

[0023] S26. Obtain the maximum and minimum values ​​of the plane point cloud in the xyz direction in its pose coordinate system, and create a bounding box;

[0024] S27. Calculate the pose of the assembled part plane relative to the camera coordinate system through the bounding box vertex information and center information;

[0025] S28. According to the specific position of the assembly position on the plane, the posture obtained in S27 is offset in a direction parallel to the plane to obtain the posture of the assembly position relative to the camera coordinate system.

[0026] Preferably, the S3 specifically includes:

[0027] S31. Perform hand-eye calibration on the camera and the robot to obtain the position and posture of the camera coordinate system in the robot flange coordinate system or the base coordinate system;

[0028] S32. The position and posture of the workpiece relative to the robot base coordinate system is calculated by using the position and posture of the assembly position relative to the camera coordinate system obtained in S28 and the position and posture obtained in S31.

[0029] Preferably, the S4 specifically includes:

[0030] S41. The mobile robot makes the workpiece coordinate system of the assembled part coincide with the coordinate system of the position and posture of the assembled part in the robot base coordinate system;

[0031] S42. In order to prevent the assembling parts and the assembled parts from colliding during the assembly process, the workpiece coordinate system of the assembling parts is moved to a position a certain distance from the coordinate system of the assembly position of the assembled parts along the axis of the assembly direction, and then moved linearly in the assembly direction so that the coordinate systems of the assembling parts and the assembled parts coincide with each other.

[0032] Another aspect of the present invention provides an automated assembly system based on a planar workpiece positioning algorithm, comprising: a computer-readable storage medium and a processor;

[0033] The computer-readable storage medium is used to store executable instructions;

[0034] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the above-mentioned automated assembly method based on the planar workpiece positioning algorithm.

[0035] Through the above technical scheme conceived by the present invention, the labor cost of the assembly link in the production process can be reduced; compared with the existing assembly technology based on image recognition, since the three-dimensional point cloud data based on the present invention will not be affected by factors such as rotation, lighting, and scale; and compared with the conventional point cloud-based positioning algorithm, the present invention avoids the complex template matching process, has high computational efficiency, and can achieve the beneficial effects of high recognition rate and high robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic flow chart of an automated assembly method based on a planar workpiece positioning algorithm provided by the present invention;

[0037] Figure 2 This is a schematic diagram of the robot in the photo taking position;

[0038] Figure 3 This is a schematic diagram of the robot in the assembly position. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0040] The present invention provides a robot automated assembly method for planar workpieces, comprising the following steps:

[0041] S1. Extracting the plane point cloud of the assembled parts;

[0042] S2. Create a bounding box based on the plane point cloud obtained in S1, and calculate the pose of the assembly position of the assembled part relative to the camera coordinate system;

[0043] S3. Calculating the pose of the assembly position of the assembled planar part relative to the robot base coordinate system according to the pose of the assembly position of the assembled part relative to the camera coordinate system;

[0044] S4. Control the robot to complete the assembly according to the posture obtained in S3.

[0045] Example

[0046] like Figure 1 As shown, the present invention provides a robot automated assembly method for planar parts. The above process can be used to realize robot vision-based automation of the assembly process involving planar assembly surfaces. The specific steps can be as follows:

[0047] Deployment system: The system includes a camera system with 3D measurement function, a robot and a computer. The deployment process includes male TCP calibration and robot-camera hand-eye calibration. The specific steps are as follows:

[0048] 1) Male tool coordinate system calibration: This embodiment adopts the "four-point method" to control the TCP to coincide with the fixed point in space from four different directions, and uses the four TCP points in the robot base coordinate system to establish an equation group, thereby solving the translation component between the tool coordinate system and the end flange coordinate system. The specific construction equation is:

[0049]

[0050] in is the position and posture of TCP in the robot base coordinate system, is the position of the end flange in the robot base coordinate system, is the position of TCP in the end flange coordinate system; converting T into the combination of R and t, we can get:

[0051]

[0052] Expand it to get:

[0053]

[0054] Due to the transformation relationship from tool coordinate system to base coordinate system is fixed, and for the four different postures of the robot, there are the following three equations:

[0055]

[0056] remember Represents the translation component to be calibrated, then the above formula can be converted into:

[0057]

[0058] The above formula can be simplified to the form of Ax = b, and the translation component can be solved by singular value decomposition

[0059] It is worth noting that the tooling TCP used in this embodiment is parallel to the robot arm flange, and there are only translation variables but no rotation variables. For embodiments with rotation variables, the eight-point method can be used to obtain the TCP. Since TCP calibration is not the focus of the present invention, the specific content of the eight-point method is not described here.

[0060] 2) Hand-eye calibration: This embodiment adopts an "eye in hand" type robot-camera system, that is, a system in which the camera is fixed on the robot flange; this embodiment uses the matrix vectorization operator method to solve the position and posture of the camera coordinate system in the robot flange coordinate system. The specific process is to control the robot to drive the camera to move to multiple positions and perform image acquisition on the calibration plate at a fixed position. A series of nonlinear equations can be constructed by reading the robot posture and the camera external parameters calculated based on the camera image.

[0061] The above nonlinear equation can be linearized by the matrix vectorization operator method, and then the equation can be solved by the least square method. Since the solution obtained by the least square method often cannot satisfy the orthogonal constraint of the transformation matrix, the solution obtained is also processed by ||R||=1 and QR decomposition to obtain the position and posture of the camera coordinate system in the robot flange coordinate system.

[0062] Since the system adopted in this embodiment is an "eye on hand" system, in addition to this, there is also an "eye outside the hand" system, that is, a system in which the camera is located on a fixed bracket that does not move with the robot. Its method is similar to the calibration method of the "eye on the hand" system; in addition to the matrix vectorization operator method mentioned above, there are many other hand-eye calibration calculation methods; since the hand-eye calibration process does not belong to the protection focus of the present invention, it will not be elaborated on.

[0063] S1. Move the robot to the photo taking position and use the 3D camera to extract the plane point cloud of the assembled parts, such as Figure 2 As shown;

[0064] S2. Extract the plane point cloud in the assembled parts and remove noise: Since the workpiece to be identified is a plane workpiece, the target point cloud can be quickly extracted through the plane detection algorithm. The specific process of the plane detection algorithm is as follows:

[0065] 1) Read the measured point cloud P data .

[0066] 2) From the measured point cloud P data Randomly select three points in the image and calculate the plane formed by these three points.

[0067] 3) Traverse P data Each point p i , calculate point p i The distance d to the plane i , and then according to the preset distance threshold d thres , the statistics satisfy d i <d thres The number of points N i .

[0068] 4) Given the number of iterations IterNum, repeat steps 2)-3) to find the number of inner points N i The plane that corresponds to the most is plane_best.

[0069] 5) Traverse P data Each point p i , calculate point p i The distance d to the optimal plane plane_best i , satisfying d i <d thres The points form a plane point cloud P plane , otherwise the composition retains the point cloud P retain As the original point cloud P for the next plane detection data .

[0070] In actual operation, since the plane to be located may not be the plane with the largest number of points, multiple plane detection operations are required to extract multiple planes, and finally the required plane is selected using the length and width constraints of the plane.

[0071] For the extracted plane point cloud, outliers that may exist in the point cloud will cause errors in the subsequent minimum bounding box calculation, so it is necessary to complete the outlier removal work. The reason why the outlier removal work is placed after the plane detection work is that for scenes with severe noise, it is difficult to completely remove the outliers using the outlier removal algorithm, while the plane detection algorithm can filter out most of the outliers in advance, thereby providing a point cloud data with less noise for the subsequent outlier removal algorithm. The specific process is as follows:

[0072] 1) Read the measured point cloud P plane .

[0073] 2) P plane Build a kd-tree.

[0074] 3) Traverse P plane Each point p i , find the corresponding K neighboring points p j , calculate p according to the following formula i To its nearest neighbor point p j The judgment distance d i ;

[0075]

[0076] 4) Statistically obtain the average judgment distance and variance σ, and according to Calculate the distance threshold d thres , where α is the threshold coefficient.

[0077] 5) Traverse P again plane Each point p i , satisfying d i >d thres The points are identified as outliers and removed.

[0078] S3. Minimum bounding box algorithm: For the denoised planar point cloud, in order to determine the pose of the point cloud relative to the camera coordinate system, the present invention uses the OBB direction bounding box to calculate the local reference coordinate system of the point cloud under the camera. The specific process is as follows:

[0079] 1) Read the plane point cloud P plane .

[0080] 2) Calculate the point cloud centroid p according to the following formula: centroid , where N represents the number of points in the point cloud:

[0081]

[0082] 3) According to point p centroid And point cloud P data , construct the covariance matrix C(p centroid ):

[0083]

[0084] 4) For the covariance matrix C(p centroid ) performs QR decomposition to obtain three real eigenvalues ​​λ1, λ2, λ3 (from large to small) and the corresponding eigenvectors e1, e2, e3. The eigenvectors are the directions of the point cloud coordinate system x, y, z.

[0085] 5) Using the point cloud centroid p centroid And the direction of the point cloud coordinate system, the measured point cloud P is transformed by inverse matrix data Transform to the origin, and the point cloud coordinate system coincides with the origin coordinate system. The transformed point cloud is recorded as P plane ′.

[0086] 6) Get P plane ′, that is, to obtain the maximum and minimum values ​​X in the x, y, and z directions max , X min , Y max , Y min , Z max , Z min , thereby obtaining the coordinates of the eight vertices and the center point p of the bounding box center ’ coordinates and length, width and height information.

[0087] 7) Convert the vertex coordinates and center point coordinates of the bounding box back to the initial measurement point cloud coordinate system, and the center point of the bounding box is denoted as p center .

[0088] By calculating the minimum bounding box of the measured point cloud, the translation component of the measured point cloud coordinate system O relative to the camera coordinate system C can be obtained: And the rotational component Then the transformation matrix from the point cloud coordinate system O to the camera coordinate system C is

[0089] In addition, by using the length and width information of the bounding box, the present invention can filter out the desired plane from multiple plane point clouds. For any plane to be detected, the length and width of its bounding box are l i =X max -X min 、w i =Y max -Y min. Given the distance threshold l in length and width direction thres 、w thres , satisfying the length and width constraints |l i -l truth | <l thres ,|w i -w truth | <w thres The plane is the plane required by the present invention, wherein the true length and width of the required plane are l truth 、w truth It can be obtained through measurement.

[0090] 8) The coordinate system solved above is located at the center of the plane of the assembled part. For parts whose assembly position is not in the center of the plane, it is necessary to offset it according to the actual position of the assembly position to obtain the position and posture of the assembly position relative to the camera coordinate system.

[0091] 9) The pose of the camera coordinate system in the robot flange coordinate system obtained by the hand-eye calibration step in S1 and the pose of the assembly position in the camera coordinate system in the previous step are calculated to obtain the pose of the assembly position relative to the robot base coordinate system.

[0092] S4. Control the robot to grasp: During the assembly process, the male TCP and Coincidence, in a geometric sense, means combining the male and female connectors, e.g. Figure 3 However, if we directly command the robot to move from the photo taking position to During the movement, the male and female heads will collide. Therefore, when designing the path program, it is necessary to move the male workpiece coordinate system to a position where the female assembly position coordinate system is a certain distance along the assembly direction axis, and then move linearly in the assembly direction to make the male and female assembly position coordinate systems coincide. In this embodiment, since the assembly direction is perpendicular to the detection plane direction, it is only necessary to set the assembly direction to The z-axis can be used.

[0093] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A robot automated assembly method for planar workpieces, characterized in that: The following steps are included S1. Extracting the plane point cloud of the assembled parts; S2. Create a bounding box based on the plane point cloud obtained in S1, and calculate the position and posture of the assembly position of the assembled part relative to the camera coordinate system; specifically including: S21. Read the plane point cloud obtained by S1 processing; S22. Calculate the centroid of the plane point cloud; S23. Construct a covariance matrix through the centroid and the plane point cloud, perform QR decomposition, and obtain three real eigenvalues; S24. Arrange the real eigenvalues ​​from large to small, and the corresponding three eigenvectors are the directions of the xyz axes of the plane point cloud pose coordinate system; S25. Create a pose coordinate system of the plane point cloud with the center of mass as the origin and the coordinate axis generated in S24 as the direction; S26. Obtain the maximum and minimum values ​​of the plane point cloud in the xyz direction in its pose coordinate system, and create a bounding box; S27. Calculate the pose of the assembled part plane relative to the camera coordinate system through the bounding box vertex information and center information; S28. According to the specific position of the assembly position on the plane, the posture obtained in S27 is offset in a direction parallel to the plane to obtain the posture of the assembly position relative to the camera coordinate system; S3. Calculate the pose of the assembly position of the assembled planar part relative to the robot base coordinate system according to the pose of the assembly position of the assembled part relative to the camera coordinate system; S4. Control the robot to complete the assembly according to the posture obtained in S3.

2. The method according to claim 1, characterized in that The S1 specifically includes: S11. Obtaining a three-dimensional point cloud to be processed; S12. Randomly select three points from the three-dimensional point cloud and calculate the plane formed by the three points; S13. Traverse all points in the three-dimensional point cloud, calculate the distance between each point and the plane obtained in S12, and then count the number of points whose distance to the plane is less than the threshold according to a preset threshold, i.e., the number of inner points; S14. Repeat S12-S13 within a preset number of iterations to find the plane with the most inner points as the optimal plane; S15. Traverse all points in the three-dimensional point cloud, and retain the points whose distance to the optimal plane is less than a threshold to form a plane point cloud.

3. The method according to claim 1, characterized in that The S3 specifically includes: S31. Perform hand-eye calibration on the camera and the robot to obtain the position and posture of the camera coordinate system in the robot flange coordinate system or the base coordinate system; S32. The position and posture of the workpiece relative to the robot base coordinate system is calculated by using the position and posture of the assembly position relative to the camera coordinate system obtained in S28 and the position and posture obtained in S31.

4. The method according to claim 1, characterized in that: The S4 specifically includes: S41. The mobile robot makes the workpiece coordinate system of the assembled part coincide with the coordinate system of the position and posture of the assembled part in the robot base coordinate system; S42. Move the workpiece coordinate system of the assembly part to a position at a certain distance along the axis of the assembly direction of the coordinate system of the assembly position of the assembled part, and move linearly in the assembly direction to make the coordinate systems of the assembly part and the assembled part coincide.

5. An automated assembly system based on a planar workpiece positioning algorithm, characterized in that: include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the automated assembly method based on the planar workpiece positioning algorithm described in any one of claims 1 to 4.