CN111452038B - High-precision workpiece assembly and assembly method of high-precision workpiece assembly - Google Patents
High-precision workpiece assembly and assembly method of high-precision workpiece assembly Download PDFInfo
- Publication number
- CN111452038B CN111452038B CN202010139320.0A CN202010139320A CN111452038B CN 111452038 B CN111452038 B CN 111452038B CN 202010139320 A CN202010139320 A CN 202010139320A CN 111452038 B CN111452038 B CN 111452038B
- Authority
- CN
- China
- Prior art keywords
- workpiece
- image
- computer
- robot
- assembly
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Program-controlled manipulators
- B25J9/16—Program controls
- B25J9/1602—Program controls characterised by the control system, structure, architecture
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J13/00—Controls for manipulators
- B25J13/08—Controls for manipulators by means of sensing devices, e.g. viewing or touching devices
- B25J13/087—Controls for manipulators by means of sensing devices, e.g. viewing or touching devices for sensing other physical parameters, e.g. electrical or chemical properties
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J15/00—Gripping heads and other end effectors
- B25J15/08—Gripping heads and other end effectors having finger members
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Program-controlled manipulators
- B25J9/16—Program controls
- B25J9/1694—Program controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
- B25J9/1697—Vision controlled systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Human Computer Interaction (AREA)
- Automation & Control Theory (AREA)
- Manipulator (AREA)
Abstract
Description
技术领域technical field
本发明涉及高精度工件组件装配技术领域,具体地说,是一种高精度工件组件及高精度工件组件的装配方法。The invention relates to the technical field of high-precision workpiece assembly assembly, in particular to a high-precision workpiece assembly and a method for assembling the high-precision workpiece assembly.
背景技术Background technique
在现代化工业生产中,大多数工件组件的装配过程均有机械臂完成,其中,在涉及到高精度工件组件装配时,视觉定位方法精度低的缺点经常出现对工件组件定位不准确导致机器人不能准确夹取工件组件,因而不能无法完成后续工件组件的装配,从而降低装配系统稳定性,降低成品率,影响生产效率;并且计算机在进行高精度工件组件装配时,计算机还出现多次校准装配位置,但是依然无法完成工件组件装配,甚至还会导致计算机崩溃而引发装配进程卡滞,延长装配周期。In modern industrial production, the assembly process of most workpiece components is completed by robotic arms. Among them, when it comes to the assembly of high-precision workpiece components, the disadvantage of low accuracy of the visual positioning method often occurs that the positioning of the workpiece components is inaccurate, resulting in the inaccuracy of the robot. The workpiece components are clamped, so the subsequent assembly of the workpiece components cannot be completed, thereby reducing the stability of the assembly system, reducing the yield, and affecting the production efficiency; and when the computer is assembling the high-precision workpiece components, the computer also calibrates the assembly position many times. However, it is still impossible to complete the assembly of the workpiece components, and even cause the computer to crash, causing the assembly process to be stuck and prolonging the assembly cycle.
根据现有技术的缺陷,需要一种能对高精度工件组件精准定位,还能快捷、准确、稳定的完成工件组件的装配的方法。According to the deficiencies of the prior art, there is a need for a method that can precisely locate a high-precision workpiece assembly, and can also quickly, accurately and stably complete the assembly of the workpiece assembly.
发明内容SUMMARY OF THE INVENTION
为了解决上述问题,本发明提出一种高精度工件组件及高精度工件组件的装配方法,所述工件组件的装配方法能对工件组件精准定位,还能快捷、准确、稳定的完成工件组件的装配。In order to solve the above problems, the present invention proposes a high-precision workpiece assembly and an assembly method of the high-precision workpiece assembly. The assembly method of the workpiece assembly can precisely locate the workpiece assembly, and can also quickly, accurately and stably complete the assembly of the workpiece assembly. .
为达到上述目的,本发明采用的具体技术方案如下:一种高精度工件组件的装配方法,其关键在于,包括工件组件,所述工件组件包括工件M和工件N,所述工件M和工件N按照以下步骤进行装配:In order to achieve the above object, the specific technical solution adopted in the present invention is as follows: a method for assembling a high-precision workpiece assembly, the key point of which is to include a workpiece assembly, and the workpiece assembly includes a workpiece M and a workpiece N, and the workpiece M and the workpiece N Assemble as follows:
预处理:将工件M放置在待抓取工装上,工件N放置在对接工装上;图像采集器和六维传感器安装在机器人上,并分别设定图像采集器对工件M和工件N的固定拍照点;在计算机中设定机器人夹爪对工件M的对准位置和抓取位置,设定工件M与工件N的预对接位置和对接位置;设置机器人的初始点;分别设定工件M与工件N的图像ROI区域;设定单位向量(xe,ye)。Preprocessing: place the workpiece M on the tooling to be grasped, and place the workpiece N on the docking tooling; install the image collector and the six-dimensional sensor on the robot, and set the image collector to take pictures of the workpiece M and the workpiece N respectively. point; set the alignment position and grasping position of the robot gripper on the workpiece M in the computer, set the pre-joint position and the docking position of the workpiece M and the workpiece N; set the initial point of the robot; set the workpiece M and the workpiece respectively The image ROI region of N; set the unit vector (x e , y e ).
S1:初始化,机器人移动至初始点,机器人与计算机建立通讯。S1: Initialization, the robot moves to the initial point, and the robot establishes communication with the computer.
S2:机器人带动图像采集器移动至工件M的固定拍照点,采集的工件M的图像,并将该工件M的图像传输至计算机,计算机分析工件M的图像,并确定工件M的中心点PM的特征基图像坐标和旋转角θM,所述旋转角θM为所述工件M的中心点PM指向工件M的图像ROI区域中心点构成向量与所述单位向量(xe,ye)之间的夹角。S2: The robot drives the image collector to move to the fixed photographing point of the workpiece M, collects the image of the workpiece M, transmits the image of the workpiece M to the computer, and the computer analyzes the image of the workpiece M and determines the center point P M of the workpiece M The feature base image coordinates and rotation angle θ M , the rotation angle θ M is the center point P M of the workpiece M that points to the center point of the image ROI area of the workpiece M constitutes the angle between the vector and the unit vector (x e , y e ).
S3:机器人根据上一步计算出的工件M的中心点PM的特征基图像坐标和旋转角θM,自身调整夹爪并移动到工件M的对准位置后开始下降,直至到达抓取位置,机器人控制夹爪抓住工件M。S3: The robot adjusts the gripper itself and moves to the alignment position of the workpiece M according to the feature base image coordinates and rotation angle θ M of the center point PM of the workpiece M calculated in the previous step, and starts to descend until it reaches the grasping position. The robot controls the gripper to grasp the workpiece M.
S4:机器人带动图像采集器移动至工件N的固定拍照点,采集的工件N的图像,并将该工件N的图像传输至计算机,计算机分析工件N的图像,并确定工件N的中心点PN的特征基图像坐标和旋转角θN,所述旋转角θN为所述工件N的中心点PN指向工件N的图像ROI区域中心点构成向量与所述单位向量(xe,ye)之间的夹角。S4: The robot drives the image collector to move to the fixed photographing point of the workpiece N, collects the image of the workpiece N, transmits the image of the workpiece N to the computer, and the computer analyzes the image of the workpiece N and determines the center point P N of the workpiece N The feature base image coordinates and rotation angle θ N , the rotation angle θ N is the center point P N of the workpiece N pointing to the center point of the image ROI area of the workpiece N constitutes the angle between the vector and the unit vector (x e , y e ).
S5:机器人根据上一步计算出的工件N的中心点PN的特征基图像坐标和旋转角θN,机器人将工件M移动至预对接位置,该预对接位置设置在所述工件N的正上方。S5: The robot moves the workpiece M to a pre-docking position, which is set directly above the workpiece N according to the feature base image coordinates and the rotation angle θ N of the center point P N of the workpiece N calculated in the previous step .
S6:机器人控制工件M与工件N进行对接,六维传感器检测工件M与工件N对接时的检测数据,计算机根据检测数据控制机器人反复调整工件M的位置,直至检测数据小于安装阈值后,控制工件M与工件N完成对接,其中,安装阈值至少包括力矩阈值和力阈值。S6: The robot controls the workpiece M to connect with the workpiece N, the six-dimensional sensor detects the detection data when the workpiece M and the workpiece N are docked, and the computer controls the robot to repeatedly adjust the position of the workpiece M according to the detection data until the detection data is smaller than the installation threshold, and controls the workpiece. M is docked with the workpiece N, wherein the installation threshold includes at least a torque threshold and a force threshold.
S7:机器人控制夹爪松开工件M,并返回初始点,待下一次装配。S7: The robot controls the gripper to release the workpiece M, and returns to the initial point for the next assembly.
采用上述设计,计算机通过图像采集器采集工件M和工件N的图像,并根据机器人与图像采集器之间空间坐标的转换关系,分别确定工件M和工件N中用于对准的中心点特征基图像坐标和图像ROI区域中心基坐标,从而确定两工件的旋转角;在工件上设定图像ROI区域,即可对用于标定工件位置便于工件抓取或工件对接,还设定工件核心部件为图像ROI区域,从而检测工件的生产质量;机器人根据两个工件各自的中心点特征基图像坐标和旋转角,实现工件的抓取,计算机通过六维传感器的检测数据,机器人反复调节工件M的位置,直至工件M与工件N实现对接;使用该方法装配工件组件,实现自动化流程,并且工件M与工件N在设定对接位置调整,在满足对接阈值后再完成对接,减少工件组件对接部分的摩擦损伤,防止工件组件直接完全对接导致工件组件损伤报废,降低产品损耗率,从而降低生产成本。With the above design, the computer collects the images of the workpiece M and the workpiece N through the image collector, and determines the center point feature base for alignment in the workpiece M and the workpiece N according to the transformation relationship between the robot and the image collector. The image coordinates and the center base coordinates of the image ROI area can determine the rotation angle of the two workpieces; setting the image ROI area on the workpiece can be used to calibrate the workpiece position to facilitate workpiece grasping or workpiece docking, and also set the core components of the workpiece as The image ROI area is used to detect the production quality of the workpiece; the robot realizes the grasping of the workpiece according to the image coordinates and rotation angle of the center point feature of the two workpieces. The computer uses the detection data of the six-dimensional sensor, and the robot repeatedly adjusts the position of the workpiece M. , until the workpiece M and the workpiece N are docked; using this method to assemble the workpiece components to realize the automatic process, and the workpiece M and the workpiece N are adjusted in the set docking position, and the docking is completed after the docking threshold is met, reducing the friction of the docking part of the workpiece components It can prevent the workpiece components from being damaged and scrapped directly and completely, thereby reducing the product loss rate, thereby reducing the production cost.
进一步描述,所述工件M的中心点PM、工件M的图像ROI区域中心点工件N的中心点PN、工件N的图像ROI区域中心点机器人初始点、图像采集器的位置通过建立空间坐标系进行标定。Further description, the center point P M of the workpiece M, the center point of the image ROI area of the workpiece M The center point P N of the workpiece N, the center point of the image ROI area of the workpiece N The initial point of the robot and the position of the image collector are calibrated by establishing a space coordinate system.
其中,所述图像采集器中在任意位置采集的图片中均设置有图像坐标系,对应图片中的所有特征均对应设置有一个特征图像坐标,所述机器人中设置在基坐标系内,所述特征图像坐标经坐标系转换矩阵Aij转换后得到基坐标系中的特征基图像坐标。Wherein, an image coordinate system is set in the picture collected at any position in the image collector, and a feature image coordinate is correspondingly set for all the features in the corresponding picture, and the robot is set in the base coordinate system, and the The feature image coordinates are transformed by the coordinate system transformation matrix A ij to obtain the feature base image coordinates in the base coordinate system.
采用上述方案,让计算机对工件M、工件N、机器人和图像采集器的位置进行标定,方便定位;其中工件M和工件N中心点和图像ROI区域中心点的位置标定用于对工件的抓取和对接。Using the above scheme, the computer can calibrate the positions of the workpiece M, the workpiece N, the robot and the image collector, which is convenient for positioning; the position calibration of the center point of the workpiece M and the workpiece N and the center point of the image ROI area is used for grasping the workpiece. and docking.
再进一步描述,步骤S2和S4中确定工件的中心点的特征基图像坐标、图像ROI区域中心点的特征基图像坐标均为求取图像中对应轮廓中的质心坐标,具体为:Further description, in steps S2 and S4, the feature base image coordinates of the center point of the workpiece and the feature base image coordinates of the center point of the image ROI area are both to obtain the centroid coordinates in the corresponding contour in the image, specifically:
S-A1:计算机将图像采集器采集图像进行镜头畸变校正,得到镜头畸变校正后的图像,具体为:S-A1: The computer performs lens distortion correction on the image collected by the image collector to obtain the image after lens distortion correction, specifically:
其中,畸变校正前像素点的原始坐标为畸变校正后的像素点的坐标为(u,v),(k1,k2,k3,p1,p2)是畸变系数,r是图像采集器镜头半径,计算机通过棋盘格获取W1组相对应的像素点,利用最小二乘法就求出所有的畸变系数,得到镜头畸变校正后的图像。Among them, the original coordinates of the pixel points before distortion correction are The coordinates of the pixel point after distortion correction are (u, v), (k 1 , k 2 , k 3 , p 1 , p 2 ) is the distortion coefficient, r is the radius of the image collector lens, and the computer obtains W 1 through the checkerboard For the corresponding pixel points of the group, all the distortion coefficients are obtained by the least square method, and the image after lens distortion correction is obtained.
S-A2:计算机将镜头畸变校正后的图像从RGB颜色空间转化到HSV颜色空间,并将转换后的图像进行多重阈值分割和逻辑与运算,得到工件粗略轮廓。S-A2: The computer converts the image after lens distortion correction from RGB color space to HSV color space, and performs multiple threshold segmentation and logical AND operation on the converted image to obtain the rough outline of the workpiece.
S-A3:计算机对工件粗略轮廓进行光滑处理,将转换成HSV图像转换为二值图,再将二值图依次进行图像腐蚀和图像膨胀的图像形态学处理:S-A3: The computer smoothes the rough outline of the workpiece, converts the converted HSV image into a binary image, and then performs image morphological processing of image erosion and image expansion on the binary image in turn:
图像腐蚀: Image erosion:
图像膨胀: Image inflation:
其中,是处理过后的图像,f(x,y)是原始图像,是结构元素,使图像中工件轮廓更为光滑。in, is the processed image, f(x,y) is the original image, It is the structural element that makes the contour of the workpiece in the image smoother.
S-A4:计算机利用Canny算法提取出步骤S-A3中得到的图像中的所有轮廓,然后根据面积阈值得到图像中的精准轮廓。S-A4: The computer uses the Canny algorithm to extract all the contours in the image obtained in step S-A3, and then obtains the precise contours in the image according to the area threshold.
S-A5:计算机利用灰度重心法得到图像中的精准轮廓的中心点在ROI区域f的质心坐标 S-A5: The computer uses the gray centroid method to obtain the centroid coordinates of the center point of the precise contour in the image in the ROI area f
其中,质心坐标为图像坐标系中的特征图像坐标。Among them, the center of mass coordinates is the feature image coordinate in the image coordinate system.
采用上述方案,计算机从工件图像中获取到工件中心点和图像ROI区域中心点的特征图像坐标,对工件进行定位。With the above solution, the computer obtains the characteristic image coordinates of the workpiece center point and the image ROI area center point from the workpiece image, and locates the workpiece.
再进一步描述,步骤S-A2中计算机将镜头畸变校正后的图像从RGB颜色空间转化到HSV颜色空间具体步骤为:To further describe, in step S-A2, the computer converts the image after lens distortion correction from the RGB color space to the HSV color space. The specific steps are:
S-B1,计算转换系数:S-B1, calculate the conversion factor:
Δ=Cmax-Cmin Δ= Cmax - Cmin
其中,(RP,GP,BP)为P点在RGB颜色空间内像素值。Among them, (R P , G P , B P ) is the pixel value of point P in the RGB color space.
S-B2,H计算:S-B2, H calculation:
S-B3,S计算:S-B3, S calculation:
S-B4,V计算:S-B4, V calculation:
VP=Cmax VP = Cmax
从而,计算机就能获取P点在HSV颜色空间中的数值(HP,SP,VP)。Thus, the computer can obtain the value (H P , S P , V P ) of point P in the HSV color space.
S-B5,计算机根据需要提取轮廓的颜色,在HSV颜色空间中设定颜色的范围。S-B5, the computer extracts the color of the outline as needed, and sets the color range in the HSV color space.
从而得到转换成HSV的图像,再多重阈值分割,进行逻辑与运算,得到含有工件粗略轮廓的图像。Thereby, the image converted into HSV is obtained, and then multiple thresholds are divided, and the logical AND operation is performed to obtain the image containing the rough outline of the workpiece.
采用上述方案,计算机镜头畸变校正后的图像从RGB颜色空间转化到HSV颜色空间,能让图像中工件轮廓表达色彩,色调,以及鲜艳程度更表达直观,让计算机获取工件轮廓更简单;其中,可以根据需要得到轮廓的颜色,设定HSV颜色空间的颜色的范围,就可以按需求提取到图像中需要轮廓。Using the above scheme, the image after computer lens distortion correction is converted from RGB color space to HSV color space, which can make the contour of the workpiece in the image express the color, tone, and degree of vividness more intuitively, and make it easier for the computer to obtain the contour of the workpiece; among them, you can According to the need to obtain the color of the contour, set the color range of the HSV color space, and then the contour can be extracted into the image as required.
再进一步描述,所述坐标系转换矩阵Aij为Eye In Hand手眼标定中的坐标系转换系数,该坐标系转换系数采用DLT方法求取,具体为:Describing further, the coordinate system conversion matrix A ij is the coordinate system conversion coefficient in the Eye In Hand hand-eye calibration, and the coordinate system conversion coefficient is obtained by the DLT method, specifically:
S-C1:计算机采集图像中的至少三个点的特征图像坐标,并根据图像采集器工作原理建立图像坐标系与基坐标系的关系:S-C1: The computer collects the characteristic image coordinates of at least three points in the image, and establishes the relationship between the image coordinate system and the base coordinate system according to the working principle of the image collector:
其中,(u,v)是特征图像坐标,(Xr,Yr,Zr,1)是机器人基坐标,f是焦距,dx和dy分别表示每个像素在X轴和Y轴的物理尺寸,(u0,v0)是主点坐标。where (u, v) are the feature image coordinates, (X r , Y r , Z r , 1) are the base coordinates of the robot, f is the focal length, and dx and dy represent the physical dimensions of each pixel on the X and Y axes, respectively , (u 0 , v 0 ) are the coordinates of the principal point.
S-C2:由于机器人带动图像采集器在同一高度对工件拍照,图像中特征图像坐标Z值均为一个常数,将上述公式进行化简得到:S-C2: Since the robot drives the image collector to take pictures of the workpiece at the same height, the Z value of the characteristic image coordinate in the image is a constant, and the above formula is simplified to get:
其中,为坐标系转换矩阵Aij。in, is the coordinate system transformation matrix A ij .
S-C3:计算机将采集的特征图像坐标带入S-C21中:S-C3: The computer brings the collected feature image coordinates into S-C21:
将步骤S-C1中采集的特征图像坐标中X轴的坐标值带入S-C21中:Bring the coordinate value of the X-axis in the feature image coordinates collected in step S-C1 into S-C21:
得到坐标系转换矩阵Aij中第一行系数;同理,将采集的图像坐标中Y轴的坐标带入S-C21中,得到完整的系数矩阵Aij;图像坐标系的特征图像坐标左乘坐标系转换矩阵Aij转换为基坐标系的特征基图像坐标。Obtain the first row of coefficients in the coordinate system conversion matrix A ij ; Similarly, the coordinates of the Y-axis in the collected image coordinates are brought into S-C21 to obtain a complete coefficient matrix A ij ; The characteristic image coordinates of the image coordinate system take the left The standard system transformation matrix A ij is converted into the feature base image coordinates of the base coordinate system.
采用上述方案,计算机通过DLT方法求取将机器人所在的基坐标系与图像采集器中图像坐标系之间的坐标系转换矩阵,实现基坐标系与图像采集器坐标转换,从而,图像采集器采集图像中的特征图线坐标可以直接转换为基坐标系中的特征基图像坐标进行定位。Using the above scheme, the computer obtains the coordinate system transformation matrix between the base coordinate system where the robot is located and the image coordinate system in the image collector through the DLT method, and realizes the coordinate transformation between the base coordinate system and the image collector. The feature map line coordinates in the image can be directly converted into the feature base image coordinates in the base coordinate system for positioning.
再进一步描述,所述工件上工件中心点PX到图像ROI区域中心点组成的有向线段所述旋转角θX为所述有向线段与单位向量(xe,ye)之间的夹角,所述旋转角具体为:Further description, the workpiece center point P X on the workpiece to the image ROI area center point directed line segment The rotation angle θ X is the directional line segment The included angle with the unit vector (x e , y e ), the rotation angle is specifically:
其中,机器人根据旋转角θX调整工件对接位置;或是夹取位置;或是对准位置;或是预对接位置。Among them, the robot adjusts the workpiece docking position according to the rotation angle θ X ; or the clamping position; or the alignment position; or the pre-docking position.
采用上述方案,计算机分别得到工件M和工件N的旋转角,计算机通过两个旋转角的数值,控制机器人调节工件M的位置,让两个旋转角一致,即工件M与工件N对准。Using the above scheme, the computer obtains the rotation angles of the workpiece M and the workpiece N respectively, and the computer controls the robot to adjust the position of the workpiece M through the values of the two rotation angles, so that the two rotation angles are consistent, that is, the workpiece M and the workpiece N are aligned.
再进一步描述,步骤S6中机器人控制工件M与工件N进行对接,六维传感器检测工件M与工件N对接部分的检测数据,计算机根据检测数据控制机器人反复调整工件M的位置,直至检测数据小于安装阈值后,控制工件M与工件N完成对接的具体步骤为:Describing further, in step S6, the robot controls the workpiece M and the workpiece N to dock, the six-dimensional sensor detects the detection data of the docking part of the workpiece M and the workpiece N, and the computer controls the robot to repeatedly adjust the position of the workpiece M according to the detection data, until the detection data is smaller than the installation. After the threshold value, the specific steps for controlling workpiece M and workpiece N to complete the docking are:
S-D1:机器人将工件M从预对接位置向下移动,直至到达对接位置,计算机读六维传感器的检测数据。S-D1: The robot moves the workpiece M downward from the pre-docking position until it reaches the docking position, and the computer reads the detection data of the six-dimensional sensor.
S-D2:计算机判断六维传感器的检测数据是否均小于安装阈值;若是,进入步骤S-D5;若否,进入步骤S-D3。S-D2: The computer judges whether the detection data of the six-dimensional sensor are all smaller than the installation threshold; if so, go to step S-D5; if not, go to step S-D3.
S-D3:计算机分析六维传感器的检测数据,PID控制器接收六维传感器的检测数据给出当前调整值,机器人将工件M向上移动W2,机器人根据当前调整值调整工件M的位置,机器人向下移动工件M,再到达对接位置,计算机读取六维传感器的检测数据。S-D3: The computer analyzes the detection data of the six-dimensional sensor, the PID controller receives the detection data of the six-dimensional sensor and gives the current adjustment value, the robot moves the workpiece M upward W 2 , the robot adjusts the position of the workpiece M according to the current adjustment value, the robot Move the workpiece M downward, and then reach the docking position, and the computer reads the detection data of the six-dimensional sensor.
S-D4:计算机判断六维传感器的检测数据是否均小于安装阈值;若是,进入步骤S-D5;若否,返回步骤S-D3。S-D4: The computer judges whether the detection data of the six-dimensional sensor are all smaller than the installation threshold; if so, go to step S-D5; if not, return to step S-D3.
S-D5:机器人将工件M下移W3,完成工件M与工件N的对接。S-D5: The robot moves the workpiece M down W 3 to complete the docking of the workpiece M and the workpiece N.
采用上述方案,机器人通过PID控制器反复调节工件M的位置,最终让工件M与工件N精准对接;通过PID控制器的稳定性和高性价比,让工件组件装配系统更稳定,还降低成本。With the above solution, the robot repeatedly adjusts the position of the workpiece M through the PID controller, and finally makes the workpiece M and the workpiece N accurately docked; through the stability and high cost performance of the PID controller, the workpiece assembly system is more stable and costs are reduced.
再进一步描述,所述根据调整策略通过PID控制器调整工件M的具体步骤为:Describing further, the described concrete steps of adjusting workpiece M by PID controller according to the adjustment strategy are:
S-D41:计算机根据PID控制的控制原理:S-D41: The control principle of the computer according to the PID control:
Δu(k)=KP[e(k)-e(k-1)]+KIe(k)+KD[e(k)-2e(k-1)+e(k-2)]Δu(k)=K P [e(k)-e(k-1)]+K I e(k)+K D [e(k)-2e(k-1)+e(k-2)]
其中,Δu(k)为当前调整量,e(k)表示当前误差,e(k-1)表示上一次误差,e(k-2)表示上上次误差,KP比例系数,KI积分系数,KD是微分系数。Among them, Δu(k) is the current adjustment amount, e(k) is the current error, e(k-1) is the last error, e(k-2) is the last error, K P proportional coefficient, K I integral coefficient, K D is the differential coefficient.
S-D42:计算机为了缩短整定周期,去掉微分环节,上述公式简化为:S-D42: In order to shorten the setting period, the computer removes the differential link, and the above formula is simplified to:
Δu(k)=KP[e(k)-e(k-1)]+KIe(k);Δu(k)=K P [e(k)-e(k-1)]+K I e(k);
S-D43:其中:S-D43: Of which:
e(k)=D(k)-De(k)=D(k)-D
其中,D(k)为六维力传感器的当前度数,D为理想值。Among them, D(k) is the current degree of the six-dimensional force sensor, and D is the ideal value.
S-D44:计算机为了避免噪声响应,计算机将连续获取W4个六维传感器的检测数据取平均值后作为D(k),具体为:S-D44: In order to avoid noise response, the computer will continuously obtain the detection data of W 4 six-dimensional sensors and take the average value as D(k), specifically:
S-D45:设定D=0,则上述公式简化为:S-D45: Set D=0, the above formula is simplified to:
Δu(k)=KP[D(k)-D(k-1)]+KID(k)Δu(k)=K P [D(k)-D(k-1)]+K I D(k)
其中,机器人根据当前调整量Δu(k)反复调整工件M的位置,直至六维传感器的检测数据小于安装阈值。The robot repeatedly adjusts the position of the workpiece M according to the current adjustment amount Δu(k) until the detection data of the six-dimensional sensor is smaller than the installation threshold.
采用上述方案,机器人通过PID控制,在控制过程中适用性好;PID控制原理简单明了,各个控制参数相对独立,计算机运算速度快,还能动态纠正偏差,反映迅速,提高了工件组件对接的效率;PID控制器能根据工件组件历史的对接数据,对PID控制器中的参数进行修正,优化工件组件的整个对接过程。Using the above scheme, the robot is controlled by PID, which has good applicability in the control process; the PID control principle is simple and clear, each control parameter is relatively independent, the computer operation speed is fast, and the deviation can be dynamically corrected, the response is rapid, and the efficiency of the workpiece component docking is improved. ; The PID controller can correct the parameters in the PID controller according to the historical docking data of the workpiece components to optimize the entire docking process of the workpiece components.
一种高精度工件组件,其关键在于,包括所述工件M和工件N,所述工件M为圆柱体,该工件M的一底面为被夹取面,所述工件M的另一底面为对接面,所述工件M的被夹取面沿径向延伸出至少三个限位法兰,该限位法兰沿所述工件M轴向开有限位通孔,所述工件M的对接面沿径向延伸出至少三个对接法兰,该对接法兰沿所述工件M轴向开有对接通孔,所述圆柱体的对接面上开有至少一个对接盲孔。A high-precision workpiece assembly, the key is that it includes the workpiece M and the workpiece N, the workpiece M is a cylinder, one bottom surface of the workpiece M is a clamped surface, and the other bottom surface of the workpiece M is a butt joint At least three limit flanges extend radially from the clamped surface of the workpiece M, the limit flanges open limit through holes along the axial direction of the workpiece M, and the abutting surface of the workpiece M extends along the axial direction of the workpiece M. At least three butt flanges extend radially, the butt flanges are provided with butt through holes along the axial direction of the workpiece M, and at least one butt blind hole is opened on the butt surface of the cylinder.
所述工件N为圆柱体,并所述工件N的一底面为被对接面,该被对接面与所述对接面大小形状相适应,所述工件N的被对接面沿径向延伸出至少三个被对接法兰,该被对接法兰沿所述工件N轴向开有被对接通孔,该被对接通孔孔径与所述对接通孔孔径相适应,所述被对接面还设置有与所述工件N同轴的对接圆柱,该对接圆柱与所述工件N一体成形,所述对接圆柱的底面半径与所述对接盲孔的孔径,所述对接圆柱的上底面开有安装盲孔。The workpiece N is a cylinder, and a bottom surface of the workpiece N is a butted surface, and the butted surface is adapted to the size and shape of the butted surface, and the butted surface of the workpiece N extends radially out at least three times. A butted flange is provided with a butted through hole along the N-axis of the workpiece, the diameter of the butted through hole is adapted to the diameter of the butted through hole, and the butted surface is also A butt cylinder coaxial with the workpiece N is provided, the butt cylinder and the workpiece N are integrally formed, the bottom surface radius of the butt cylinder is the same as the diameter of the butt blind hole, and the upper bottom surface of the butt cylinder is provided with a mounting plate. Blind hole.
所述工件M经对接盲孔与对接圆柱配合与所述工件N对接,并且所述对接通孔的设置位置与所述被对接通孔的设置位置一一对应。The workpiece M is butted with the workpiece N through a butting blind hole and a butting cylinder, and the setting positions of the abutting through holes are in a one-to-one correspondence with the setting positions of the butted through holes.
本发明的有益效果:机器人带动图像采集器分别采集工件组件的图像,计算机图像采集器采集的图像对工件组件进行精准定位,机器人根据工件位置信息实现对工件组件抓取和装配;在工件组件装配中,计算机根据六维传感器的检测数据,通过PID控制器精准、平稳的控制机器人反复调节工件组件之间的相对位置,直至工件组件完成装配;机器人完成工件组件的装配操作均由计算机自动控制,使装配更智能化;通过PID控制器控制机器人,可以使工件组件装配过程更稳定、更精准,并且PID控制原理简单明了,计算机运算速度快,能根据历史的对接数据调整PID控制器的参数,优化工件组件的装配过程,降低生产成本,提高生产效率。The beneficial effects of the invention are as follows: the robot drives the image collector to collect the images of the workpiece components respectively, the images collected by the computer image collector precisely locate the workpiece components, and the robot realizes grasping and assembling of the workpiece components according to the workpiece position information; According to the detection data of the six-dimensional sensor, the computer controls the robot to repeatedly adjust the relative position between the workpiece components through the PID controller accurately and smoothly until the workpiece components are assembled; the robot completes the assembly operation of the workpiece components is automatically controlled by the computer, Make the assembly more intelligent; controlling the robot through the PID controller can make the assembly process of the workpiece components more stable and accurate, and the PID control principle is simple and clear, the computer operation speed is fast, and the parameters of the PID controller can be adjusted according to the historical docking data. Optimize the assembly process of workpiece components, reduce production costs and improve production efficiency.
附图说明Description of drawings
图1是本发明中高精度工件组件的装配方法的流程图;Fig. 1 is the flow chart of the assembling method of the high-precision workpiece assembly in the present invention;
图2是本发明中机器人控制工件M与工件N完成对接的流程图;Fig. 2 is the flow chart that robot controls workpiece M and workpiece N to complete docking among the present invention;
图3是本发明中高精度工件组件的示意图;Fig. 3 is the schematic diagram of the high-precision workpiece assembly in the present invention;
图4是本发明中高精度工件组件未对接的剖视图;Fig. 4 is the sectional view of the high-precision workpiece assembly in the present invention that is not butted;
图5是本发明中高精度工件组件完成对接的剖视图。FIG. 5 is a cross-sectional view of the high-precision workpiece assembly in the present invention after the docking is completed.
具体实施方式Detailed ways
下面结合附图对本发明的具体实施方式以及工作原理作进一步详细说明。The specific embodiments and working principles of the present invention will be further described in detail below with reference to the accompanying drawings.
本实施例中,W1=15,W2=10mm,W3=4mm,W4=100。In this embodiment, W 1 =15, W 2 =10 mm, W 3 =4 mm, and W 4 =100.
从图1可以看出,一种高精度工件组件的装配方法,包括工件组件,工件组件包括工件M和工件N,工件M和工件N按照以下步骤进行装配:As can be seen from Figure 1, a method for assembling a high-precision workpiece assembly includes a workpiece assembly, and the workpiece assembly includes a workpiece M and a workpiece N, and the workpiece M and the workpiece N are assembled according to the following steps:
预处理:将工件M放置在待抓取工装上,工件N放置在对接工装上;图像采集器和六维传感器安装在机器人上,并分别设定图像采集器对工件M和工件N的固定拍照点;在计算机中设定机器人夹爪对工件M的对准位置和抓取位置,设定工件M与工件N的预对接位置和对接位置;设置机器人的初始点;分别设定工件M与工件N的图像ROI区域;设定单位向量(xe,ye)。Preprocessing: place the workpiece M on the tooling to be grasped, and place the workpiece N on the docking tooling; install the image collector and the six-dimensional sensor on the robot, and set the image collector to take pictures of the workpiece M and the workpiece N respectively. point; set the alignment position and grasping position of the robot gripper on the workpiece M in the computer, set the pre-joint position and the docking position of the workpiece M and the workpiece N; set the initial point of the robot; set the workpiece M and the workpiece respectively The image ROI region of N; set the unit vector (x e , y e ).
S1:初始化,机器人移动至初始点,本实施例中,机器人与计算机建立Socket通讯。S1: Initialization, the robot moves to the initial point. In this embodiment, the robot establishes Socket communication with the computer.
S2:机器人带动图像采集器移动至工件M的固定拍照点,采集的工件M的图像,并将该工件M的图像传输至计算机,计算机分析工件M的图像,并确定工件M的中心点PM的特征基图像坐标和旋转角θM,所述旋转角θM为所述工件M的中心点PM指向工件M的图像ROI区域中心点构成向量与所述单位向量(xe,ye)之间的夹角。S2: The robot drives the image collector to move to the fixed photographing point of the workpiece M, collects the image of the workpiece M, transmits the image of the workpiece M to the computer, and the computer analyzes the image of the workpiece M and determines the center point P M of the workpiece M The feature base image coordinates and rotation angle θ M , the rotation angle θ M is the center point P M of the workpiece M that points to the center point of the image ROI area of the workpiece M constitutes the angle between the vector and the unit vector (x e , y e ).
S3:机器人根据上一步计算出的工件M的中心点PM的特征基图像坐标和旋转角θM,自身调整夹爪并移动到工件M的对准位置后开始下降,直至到达抓取位置,机器人控制夹爪抓住工件M。S3: The robot adjusts the gripper itself and moves to the alignment position of the workpiece M according to the feature base image coordinates and rotation angle θ M of the center point PM of the workpiece M calculated in the previous step, and starts to descend until it reaches the grasping position. The robot controls the gripper to grasp the workpiece M.
S4:机器人带动图像采集器移动至工件N的固定拍照点,采集的工件N的图像,并将该工件N的图像传输至计算机,计算机分析工件N的图像,并确定工件N的中心点PN的特征基图像坐标和旋转角θN,所述旋转角θN为所述工件N的中心点PN指向工件N的图像ROI区域中心点构成向量与所述单位向量(xe,ye)之间的夹角。S4: The robot drives the image collector to move to the fixed photographing point of the workpiece N, collects the image of the workpiece N, transmits the image of the workpiece N to the computer, and the computer analyzes the image of the workpiece N and determines the center point P N of the workpiece N The feature base image coordinates and rotation angle θ N , the rotation angle θ N is the center point P N of the workpiece N pointing to the center point of the image ROI area of the workpiece N constitutes the angle between the vector and the unit vector (x e , y e ).
S5:机器人根据上一步计算出的工件N的中心点PN的特征基图像坐标和旋转角θB,机器人将工件M移动至预对接位置,该预对接位置设置在工件N的正上方。S5 : The robot moves the workpiece M to a pre-docking position, which is set just above the workpiece N, according to the feature base image coordinates and the rotation angle θ B of the center point P N of the workpiece N calculated in the previous step.
S6:机器人控制工件M与工件N进行对接,六维传感器检测工件M与工件N对接时的检测数据,计算机根据检测数据控制机器人反复调整工件M的位置,直至检测数据小于安装阈值后,控制工件M与工件N完成对接,其中,安装阈值至少包括力矩阈值和力阈值,本实施例中,力矩阈值为10NM,力阈值为30N。S6: The robot controls the workpiece M to connect with the workpiece N, the six-dimensional sensor detects the detection data when the workpiece M and the workpiece N are docked, and the computer controls the robot to repeatedly adjust the position of the workpiece M according to the detection data until the detection data is smaller than the installation threshold, and controls the workpiece. M is docked with the workpiece N, wherein the installation threshold includes at least a torque threshold and a force threshold. In this embodiment, the torque threshold is 10NM and the force threshold is 30N.
S7:机器人控制夹爪松开工件M,并返回初始点,待下一次装配。S7: The robot controls the gripper to release the workpiece M, and returns to the initial point for the next assembly.
结合图1可以看出,工件M的中心点PM、工件M的图像ROI区域中心点工件N的中心点PN、工件N的图像ROI区域中心点机器人初始点、图像采集器的位置通过建立空间坐标系进行标定。It can be seen in conjunction with Fig. 1 that the center point P M of the workpiece M and the center point of the image ROI area of the workpiece M The center point P N of the workpiece N, the center point of the image ROI area of the workpiece N The initial point of the robot and the position of the image collector are calibrated by establishing a space coordinate system.
其中,图像采集器中在任意位置采集的图片中均设置有图像坐标系,对应图片中的所有特征均对应设置有一个特征图像坐标,机器人中设置在基坐标系内,特征图像坐标经坐标系转换矩阵Aij转换后得到基坐标系中的特征基图像坐标。Among them, the image collected at any position in the image collector is set with an image coordinate system, and all features in the corresponding picture are set with a corresponding feature image coordinate, which is set in the base coordinate system in the robot, and the feature image coordinates are set through the coordinate system. After the transformation matrix A ij is transformed, the feature base image coordinates in the base coordinate system are obtained.
结合图1可以看出,步骤S2和S4中确定工件的中心点的特征基图像坐标、图像ROI区域中心点的特征基图像坐标均为求取图像中对应轮廓中的质心坐标,具体为:It can be seen in conjunction with Fig. 1 that in steps S2 and S4, the feature base image coordinates of the center point of the workpiece and the feature base image coordinates of the center point of the image ROI area are both to obtain the centroid coordinates in the corresponding contour in the image, specifically:
S-A1:计算机将图像采集器采集图像进行镜头畸变校正,得到镜头畸变校正后的图像,具体为:S-A1: The computer performs lens distortion correction on the image collected by the image collector to obtain the image after lens distortion correction, specifically:
其中,畸变校正前像素点的原始坐标为畸变校正后的像素点的坐标为(u,v),(k1,k2,k3,p1,p2)是畸变系数,r是图像采集器镜头半径,本实施例中,计算机通过棋盘格获取15组相对应的像素点,利用最小二乘法就求出所有的畸变系数,得到镜头畸变校正后的图像。Among them, the original coordinates of the pixel points before distortion correction are The coordinates of the pixel point after distortion correction are (u, v), (k 1 , k 2 , k 3 , p 1 , p 2 ) is the distortion coefficient, and r is the radius of the image collector lens. The checkerboard obtains 15 groups of corresponding pixel points, and uses the least squares method to obtain all the distortion coefficients to obtain the image after lens distortion correction.
S-A2:计算机将镜头畸变校正后的图像从RGB颜色空间转化到HSV颜色空间,并将转换后的图像进行多重阈值分割和逻辑与运算,得到工件粗略轮廓。S-A2: The computer converts the image after lens distortion correction from RGB color space to HSV color space, and performs multiple threshold segmentation and logical AND operation on the converted image to obtain the rough outline of the workpiece.
S-A3:计算机对工件粗略轮廓进行光滑处理,将转换成HSV图像转换为二值图,再将二值图依次进行图像腐蚀和图像膨胀的图像形态学处理:S-A3: The computer smoothes the rough outline of the workpiece, converts the converted HSV image into a binary image, and then performs image morphological processing of image erosion and image expansion on the binary image in turn:
图像腐蚀: Image erosion:
图像膨胀: Image inflation:
其中,是处理过后的图像,f(x,y)是原始图像,是结构元素,使图像中工件轮廓更为光滑。in, is the processed image, f(x,y) is the original image, It is the structural element that makes the contour of the workpiece in the image smoother.
S-A4:计算机利用Canny算法提取出步骤S-A3中得到的图像中的所有轮廓,然后根据面积阈值得到图像中的精准轮廓。S-A4: The computer uses the Canny algorithm to extract all the contours in the image obtained in step S-A3, and then obtains the precise contours in the image according to the area threshold.
S-A5:计算机利用灰度重心法得到图像中的精准轮廓的中心点在ROI区域f的质心坐标 S-A5: The computer uses the gray centroid method to obtain the centroid coordinates of the center point of the precise contour in the image in the ROI area f
其中,质心坐标为图像坐标系中的特征图像坐标。Among them, the center of mass coordinates is the feature image coordinate in the image coordinate system.
结合图1可以看出,步骤S-A2中计算机将镜头畸变校正后的图像从RGB颜色空间转化到HSV颜色空间具体步骤为:It can be seen from Figure 1 that in step S-A2, the computer converts the image after lens distortion correction from the RGB color space to the HSV color space. The specific steps are:
S-B1,计算转换系数:S-B1, calculate the conversion factor:
Δ=Cmax-Cmin Δ= Cmax - Cmin
其中,(RP,GP,BP)为P点在RGB颜色空间内像素值;Among them, (R P , G P , B P ) is the pixel value of point P in the RGB color space;
S-B2,H计算:S-B2, H calculation:
S-B3,S计算:S-B3, S calculation:
S-B4,V计算:S-B4, V calculation:
VP=Cmax VP = Cmax
从而,计算机就能获取P点在HSV颜色空间中的数值(HP,SP,VP)。Thus, the computer can obtain the value (H P , S P , V P ) of point P in the HSV color space.
S-B5,计算机根据需要提取轮廓的颜色,在HSV颜色空间中设定颜色的范围。S-B5, the computer extracts the color of the outline as needed, and sets the color range in the HSV color space.
从而得到转换成HSV的图像,再多重阈值分割,进行逻辑与运算,得到含有工件粗略轮廓的图像。Thereby, the image converted into HSV is obtained, and then multiple thresholds are divided, and the logical AND operation is performed to obtain the image containing the rough outline of the workpiece.
本实施例中,工件M和工件M的颜色均为黑色,对接工装和待抓取工装的颜色均红色,工件M和工件N的图像ROI区域分别设置在限位法兰和被对接法兰上,且工件M和工件N中图像ROI区域的颜色均为绿色,在获取工件M和工件N的中心点的图像坐标时,在HSV颜色空间中,设定红色范围为:In this embodiment, the color of the workpiece M and the workpiece M are both black, the color of the docking tool and the tool to be grasped are both red, and the image ROI areas of the workpiece M and the workpiece N are respectively set on the limit flange and the butted flange. , and the color of the image ROI area in workpiece M and workpiece N is green, when obtaining the image coordinates of the center point of workpiece M and workpiece N, in the HSV color space, the red range is set as:
在获取工件M和工件N的图像ROI区域中心点的图像坐标时,在HSV颜色空间中,设定绿色范围为:When obtaining the image coordinates of the center point of the image ROI area of workpiece M and workpiece N, in the HSV color space, the green range is set as:
结合图1可以看出,坐标系转换矩阵Aij为Eye In Hand手眼标定中的坐标系转换矩阵,该坐标系转换矩阵采用DLT方法求取,具体为:It can be seen from Figure 1 that the coordinate system transformation matrix A ij is the coordinate system transformation matrix in the Eye In Hand hand-eye calibration, and the coordinate system transformation matrix is obtained by the DLT method, specifically:
S-C1:本实施例中,计算机采集图像中的9个点的特征图像坐标,并根据图像采集器工作原理建立图像坐标系与基坐标系的关系:S-C1: In this embodiment, the computer collects the characteristic image coordinates of 9 points in the image, and establishes the relationship between the image coordinate system and the base coordinate system according to the working principle of the image collector:
其中,(u,v)是特征图像坐标,(Xr,Yr,Zr,1)是机器人基坐标,f是焦距,dx和dy分别表示每个像素在X轴和Y轴的物理尺寸,(u0,v0)是主点坐标。where (u, v) are the feature image coordinates, (X r , Y r , Z r , 1) are the base coordinates of the robot, f is the focal length, and dx and dy represent the physical dimensions of each pixel on the X and Y axes, respectively , (u 0 , v 0 ) are the coordinates of the principal point.
S-C2:由于机器人带动图像采集器在同一高度对工件拍照,图像中特征图像坐标Z值均为一个常数,将上述公式进行化简得到:S-C2: Since the robot drives the image collector to take pictures of the workpiece at the same height, the Z value of the characteristic image coordinate in the image is a constant, and the above formula is simplified to get:
其中,为坐标系转换矩阵Aij。in, is the coordinate system transformation matrix A ij .
S-C3:计算机将采集的特征图像坐标带入S-C21中:S-C3: The computer brings the collected feature image coordinates into S-C21:
将步骤S-C1中采集的特征图像坐标中X轴的坐标值带入S-C21中:Bring the coordinate value of the X-axis in the feature image coordinates collected in step S-C1 into S-C21:
得到坐标系转换矩阵Aij中第一行系数;同理,将采集的图像坐标中Y轴的坐标带入S-C21中,得到完整的系数矩阵Aij;图像坐标系的特征图像坐标左乘坐标系转换矩阵Aij转换为基坐标系的特征基图像坐标。Obtain the first row of coefficients in the coordinate system conversion matrix A ij ; Similarly, the coordinates of the Y-axis in the collected image coordinates are brought into S-C21 to obtain a complete coefficient matrix A ij ; The characteristic image coordinates of the image coordinate system take the left The standard system transformation matrix A ij is converted into the feature base image coordinates of the base coordinate system.
结合图1可以看出,工件上工件中心点PX到图像ROI区域中心点组成的有向线段旋转角θX为有向线段与单位向量(xe,ye)之间的夹角,旋转角具体为:Combining with Figure 1, it can be seen that the workpiece center point P X on the workpiece to the center point of the image ROI area directed line segment The rotation angle θ X is the directed line segment The included angle with the unit vector (x e , y e ), the rotation angle is specifically:
其中,机器人根据旋转角θX调整工件对接位置;或是夹取位置;或是对准位置;或是预对接位置。Among them, the robot adjusts the workpiece docking position according to the rotation angle θ X ; or the clamping position; or the alignment position; or the pre-docking position.
从图1和图2可以看出,步骤S6中机器人控制工件M与工件N进行对接,六维传感器检测工件M与工件N对接部分的检测数据,计算机根据检测数据控制机器人反复调整工件M的位置,直至检测数据小于安装阈值后,控制工件M与工件N完成对接的具体步骤为:As can be seen from Figure 1 and Figure 2, in step S6, the robot controls the workpiece M to connect with the workpiece N, the six-dimensional sensor detects the detection data of the butting part of the workpiece M and the workpiece N, and the computer controls the robot to repeatedly adjust the position of the workpiece M according to the detection data. , until the detection data is less than the installation threshold, the specific steps for controlling the workpiece M and the workpiece N to complete the docking are:
S-D1:机器人将工件M从预对接位置向下移动,直至到达对接位置,计算机读六维传感器的检测数据。S-D1: The robot moves the workpiece M downward from the pre-docking position until it reaches the docking position, and the computer reads the detection data of the six-dimensional sensor.
S-D2:计算机判断六维传感器的检测数据是否均小于安装阈值;若是,进入步骤S-D5;若否,进入步骤S-D3。S-D2: The computer judges whether the detection data of the six-dimensional sensor are all smaller than the installation threshold; if so, go to step S-D5; if not, go to step S-D3.
S-D3:计算机分析六维传感器的检测数据,PID控制器接收六维传感器的检测数据给出当前调整值,机器人将工件M向上移动10mm,机器人根据当前调整值调整工件M的位置,机器人向下移动工件M,再到达对接位置,计算机读取六维传感器的检测数据。S-D3: The computer analyzes the detection data of the six-dimensional sensor, the PID controller receives the detection data of the six-dimensional sensor and gives the current adjustment value, the robot moves the workpiece M upward by 10mm, and the robot adjusts the position of the workpiece M according to the current adjustment value. Move the workpiece M down, and then reach the docking position, and the computer reads the detection data of the six-dimensional sensor.
S-D4:计算机判断六维传感器的检测数据是否均小于安装阈值;若是,进入步骤S-D5;若否,返回步骤S-D3。S-D4: The computer judges whether the detection data of the six-dimensional sensor are all smaller than the installation threshold; if so, go to step S-D5; if not, return to step S-D3.
S-D5:机器人将工件M下移4mm,完成工件M与工件N的对接。S-D5: The robot moves the workpiece M down by 4mm to complete the docking between the workpiece M and the workpiece N.
结合图1和图2可以看出,根据调整策略通过PID控制器调整工件M的具体步骤为:Combining Figure 1 and Figure 2, it can be seen that the specific steps for adjusting the workpiece M through the PID controller according to the adjustment strategy are:
S-D41:计算机根据PID控制的控制原理:S-D41: The control principle of the computer according to the PID control:
Δu(k)=KP[e(k)-e(k-1)]+KIe(k)+KD[e(k)-2e(k-1)+e(k-2)]Δu(k)=K P [e(k)-e(k-1)]+K I e(k)+K D [e(k)-2e(k-1)+e(k-2)]
其中,Δu(k)为当前调整量,e(k)表示当前误差,e(k-1)表示上一次误差,e(k-2)表示上上次误差,KP比例系数,KI积分系数,KD是微分系数。Among them, Δu(k) is the current adjustment amount, e(k) is the current error, e(k-1) is the last error, e(k-2) is the last error, K P proportional coefficient, K I integral coefficient, K D is the differential coefficient.
S-D42:计算机为了缩短整定周期,去掉微分环节,上述公式简化为:S-D42: In order to shorten the setting period, the computer removes the differential link, and the above formula is simplified to:
Δu(k)=KP[e(k)-e(k-1)]+KIe(k);Δu(k)=K P [e(k)-e(k-1)]+K I e(k);
S-D43:其中:S-D43: Of which:
e(k)=D(k)-De(k)=D(k)-D
其中,D(k)为六维力传感器的当前度数,D为理想值。Among them, D(k) is the current degree of the six-dimensional force sensor, and D is the ideal value.
S-D44:计算机为了避免噪声响应,计算机将连续获取100个六维传感器的检测数据取平均值后作为D(k),具体为:S-D44: In order to avoid noise response, the computer will obtain the average value of the detection data of 100 six-dimensional sensors as D(k), specifically:
S-D45:设定D=0,则上述公式简化为:S-D45: Set D=0, the above formula is simplified to:
Δu(k)=KP[D(k)-D(k-1)]+KID(k)Δu(k)=K P [D(k)-D(k-1)]+K I D(k)
其中,机器人根据当前调整量Δu(k)反复调整工件M的位置,直至六维传感器的检测数据小于安装阈值。The robot repeatedly adjusts the position of the workpiece M according to the current adjustment amount Δu(k) until the detection data of the six-dimensional sensor is smaller than the installation threshold.
结合图3-5可以看出,一种高精度工件组件,包括工件M和工件N,工件M为圆柱体,该工件M的一底面为被夹取面,工件M的另一底面为对接面,本实施例中,工件M的被夹取面沿径向延伸出12个限位法兰11,该限位法兰沿工件M轴向开有限位通孔12,本实施例中,工件M的对接面沿径向延伸出4个对接法兰13,该对接法兰沿工件M轴向开有对接通孔14,圆柱体的对接面上开有至少一个对接盲孔15。3-5, it can be seen that a high-precision workpiece assembly includes a workpiece M and a workpiece N, the workpiece M is a cylinder, one bottom surface of the workpiece M is the clamped surface, and the other bottom surface of the workpiece M is the butting surface. , In this embodiment, 12
工件N为圆柱体,并工件N的一底面为被对接面,该被对接面与对接面大小形状相适应,本实施例中,工件N的被对接面沿径向延伸出4个被对接法兰21,该被对接法兰沿工件N轴向开有被对接通孔22,该被对接通孔22孔径与对接通孔14孔径相适应,被对接面还设置有与工件N同轴的对接圆柱23,该对接圆柱与工件N一体成形,对接圆柱23的底面半径与对接盲孔15的孔径,对接圆柱23的上底面开有安装盲孔24。The workpiece N is a cylinder, and a bottom surface of the workpiece N is a butted surface, and the butted surface is adapted to the size and shape of the butted surface. In this embodiment, the butted surface of the workpiece N extends radially with four butted surfaces. The
工件M经对接盲孔15与对接圆柱23配合与工件N对接,并且对接通孔14的设置位置与被对接通孔22的设置位置一一对应。The workpiece M is matched with the butting
本发明的工作原理:The working principle of the present invention:
工件组件的定位:Positioning of workpiece components:
计算机根据图像采集器在机器人上的安装位置,结合机器人所在的基坐标系坐标,根据DLT方法采集9个参考点,计算出坐标系转换矩阵Aij。The computer collects 9 reference points according to the DLT method according to the installation position of the image collector on the robot and the coordinates of the base coordinate system where the robot is located, and calculates the coordinate system transformation matrix A ij .
计算机将从固定位置采集的工件M的图像,经镜头畸变校正消除因图像采集器镜头导致的失真和畸变。The computer will remove the distortion and distortion caused by the lens of the image collector through the lens distortion correction of the image of the workpiece M collected from the fixed position.
计算机将畸变校正后的图像从RGB颜色空间转化到HSV颜色空间,让图像中工件轮廓表达色彩,色调,以及鲜艳程度更表达直观,其中,工件M和工件M的颜色均为黑色,对接工装和待抓取工装的颜色均红色,工件M和工件N的图像ROI区域分别设置在限位法兰和被对接法兰上,且工件M和工件N中图像ROI区域的颜色均为绿色,根据设定的不同颜色取值范围,提取出所需要的轮廓,若设定HSV颜色空间的取值范围为红色取值范围,再将转换的HSV图像经过多重阈值分割,进行逻辑与运算,得到含工件M或工件N粗略轮廓的图像,若设定HSV颜色空间的取值范围为绿色取值范围,就能得到工件M和工件N中图像ROI区域的粗略轮廓,再将转换的HSV图像经过多重阈值分割,进行逻辑与运算,得到含工件M或工件N中图像ROI区域的粗略轮廓的图像。The computer converts the distortion-corrected image from the RGB color space to the HSV color space, so that the outline of the workpiece in the image can express the color, tone, and vividness more intuitively. The colors of the tooling to be grabbed are all red, the image ROI areas of workpiece M and workpiece N are respectively set on the limit flange and the butted flange, and the color of the image ROI areas in workpiece M and workpiece N are both green. Determine the value range of different colors, and extract the required contour. If the value range of the HSV color space is set as the red value range, the converted HSV image is divided by multiple thresholds, and the logical AND operation is performed to obtain the workpiece M. Or the image of the rough outline of workpiece N, if the value range of the HSV color space is set to the green value range, the rough outline of the image ROI area in workpiece M and workpiece N can be obtained, and then the converted HSV image is divided by multiple thresholds. , and perform logical AND operation to obtain an image containing the rough outline of the image ROI area in workpiece M or workpiece N.
计算机将得到的粗略轮廓的图像转换为二值图,并将二值图依次进行图像腐蚀和图像膨胀,让图像中的轮廓更光滑;再利用Canny算法提取出图像的所有轮廓,然后根据面积阈值得到图像中的精准轮廓。The computer converts the obtained rough outline image into a binary image, and sequentially performs image erosion and image expansion on the binary image to make the contours in the image smoother; then use the Canny algorithm to extract all the contours of the image, and then use the Canny algorithm to extract all the contours of the image, and then according to the area threshold Get precise contours in the image.
计算机利用灰度重心法得到图像中的精准轮廓的中心点在ROI区域的质心坐标,即得到工件中心点的特征图像坐标和工件图像ROI区域中心点的特征图像坐标,再将工件中心点的特征图像坐标和工件图像ROI区域中心点的特征图像坐标根据坐标系转换矩阵Aij转换为基坐标系下的特征基图像坐标。The computer uses the gray centroid method to obtain the centroid coordinates of the center point of the precise contour in the image in the ROI area, that is, the characteristic image coordinates of the workpiece center point and the characteristic image coordinates of the center point of the workpiece image ROI area, and then the characteristics of the workpiece center point are obtained. The image coordinates and the feature image coordinates of the center point of the ROI area of the workpiece image are converted into the feature base image coordinates in the base coordinate system according to the coordinate system transformation matrix A ij .
工件组件的抓取:Grabbing of workpiece components:
工件中心点与图像ROI区域中心点形成工件的有向线段,并计算该有向线段与设定单位向量的夹角得到工件的旋转角The center point of the workpiece and the center point of the image ROI area form the directional line segment of the workpiece, and the angle between the directional line segment and the set unit vector is calculated to obtain the rotation angle of the workpiece
计算机根据工件M中心点PM的特征基图像坐标和图像ROI区域中心点的特征基图像坐标以及旋转角,控制机器人抓取工件M,再根据工件N中心点PN的特征基图像坐标和图像ROI区域中心点的特征基图像坐标以及旋转角,让工件M位于工件N的正上方的预对接位置。According to the feature base image coordinates of the center point P M of the workpiece M and the center point of the image ROI area, the computer According to the feature base image coordinates and rotation angle, control the robot to grab the workpiece M, and then according to the feature base image coordinates of the center point P N of the workpiece N and the center point of the image ROI area The feature base image coordinates and rotation angle of , let the workpiece M be located in the pre-docking position just above the workpiece N.
工件组件的装配:Assembly of workpiece components:
机器人将工件M下移至对接位置,让工件M与工件N充分接触,六维传感器检测工件M和工件N之间的力矩和力的大小,计算机读取六维传感器的检测数据,并对比设定的阈值即力矩阈值为10NM,力阈值为30N;若超过设定阈值,计算机通过PID控制器制定调整策略,同时机器人将工件M上移10mm,机器人根据PID控制器给出的当前调整值调整工件M的位置,再将工件M移动到对接位置后,六维传感器再次检测,计算机再判断检测数据,若大于设定阈值,则机器人再根据PID控制器调节工件M的位置,直至六维传感器的检测数据小于设定阈值,若否,机器人将工件M下移4mm,完成工件M和工件N的对接,机器人返回初始点,等待下一次工件组件对接。The robot moves the workpiece M down to the docking position to make the workpiece M fully contact with the workpiece N. The six-dimensional sensor detects the torque and force between the workpiece M and the workpiece N. The computer reads the detection data of the six-dimensional sensor and compares the settings. The set threshold value is the torque threshold value of 10NM and the force threshold value of 30N; if it exceeds the set threshold value, the computer formulates an adjustment strategy through the PID controller, and the robot moves the workpiece M up by 10mm, and the robot adjusts according to the current adjustment value given by the PID controller. The position of the workpiece M, and then move the workpiece M to the docking position, the six-dimensional sensor detects again, and the computer determines the detection data. If it is greater than the set threshold, the robot adjusts the position of the workpiece M according to the PID controller until the six-dimensional sensor If the detected data is less than the set threshold, if not, the robot will move the workpiece M down by 4mm to complete the docking between the workpiece M and the workpiece N. The robot will return to the initial point and wait for the next workpiece assembly docking.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010139320.0A CN111452038B (en) | 2020-03-03 | 2020-03-03 | High-precision workpiece assembly and assembly method of high-precision workpiece assembly |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010139320.0A CN111452038B (en) | 2020-03-03 | 2020-03-03 | High-precision workpiece assembly and assembly method of high-precision workpiece assembly |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111452038A CN111452038A (en) | 2020-07-28 |
| CN111452038B true CN111452038B (en) | 2021-08-24 |
Family
ID=71672895
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010139320.0A Active CN111452038B (en) | 2020-03-03 | 2020-03-03 | High-precision workpiece assembly and assembly method of high-precision workpiece assembly |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111452038B (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113160187B (en) * | 2021-04-27 | 2022-02-15 | 圣名科技(广州)有限责任公司 | Fault detection method and device of equipment |
| CN113112541A (en) * | 2021-04-28 | 2021-07-13 | 西南大学 | Silkworm pupa body pose measuring and calculating method and system based on image processing |
| CN113473830B (en) * | 2021-07-02 | 2022-07-22 | 重庆大学 | Intelligent switching electromagnetic manufacturing device based on parameter perception |
| CN114036747B (en) * | 2021-11-08 | 2024-08-06 | 北京华航唯实机器人科技股份有限公司 | Method and device for building model assembly, electronic equipment and storage medium |
| CN114998334B (en) * | 2022-08-02 | 2023-05-26 | 苏州华兴源创科技股份有限公司 | Workpiece through hole position calibration method and detection device |
| CN115411898A (en) * | 2022-09-30 | 2022-11-29 | 广东利元亨智能装备股份有限公司 | Magnetic steel assembling system, method and device, control system and readable storage medium |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10835333B2 (en) * | 2015-08-25 | 2020-11-17 | Kawasaki Jukogyo Kabushiki Kaisha | Remote control robot system |
| CN107263468B (en) * | 2017-05-23 | 2020-08-11 | 陕西科技大学 | A SCARA Robot Assembly Method Using Digital Image Processing Technology |
| CN110666801A (en) * | 2018-11-07 | 2020-01-10 | 宁波赛朗科技有限公司 | Grabbing industrial robot for matching and positioning complex workpieces |
| CN110516618B (en) * | 2019-08-29 | 2022-04-12 | 苏州大学 | Assembly robot and assembly method and system based on vision and force-position hybrid control |
| CN110712202B (en) * | 2019-09-24 | 2021-07-16 | 鲁班嫡系机器人(深圳)有限公司 | Special-shaped component grabbing method, device and system, control device and storage medium |
| CN110842928B (en) * | 2019-12-04 | 2022-02-22 | 中科新松有限公司 | Visual guiding and positioning method for compound robot |
-
2020
- 2020-03-03 CN CN202010139320.0A patent/CN111452038B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN111452038A (en) | 2020-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111452038B (en) | High-precision workpiece assembly and assembly method of high-precision workpiece assembly | |
| CN111322967B (en) | An alignment method for the assembly process of stepped shafts and holes | |
| CN111775146A (en) | A visual alignment method under the multi-station operation of an industrial manipulator | |
| CN102922521A (en) | Mechanical arm system based on stereo visual serving and real-time calibrating method thereof | |
| CN113277314B (en) | Panel offset adjusting device and method based on FPGA image detection control | |
| CN104915957A (en) | Matching rectification method for improving three dimensional visual sense identification precision of industrial robot | |
| CN113118604B (en) | High-precision projection welding error compensation system based on robot hand-eye visual feedback | |
| CN104827480A (en) | Automatic calibration method of robot system | |
| CN107014291B (en) | Visual positioning method of material precision transshipment platform | |
| CN110238820A (en) | Hand and eye calibrating method based on characteristic point | |
| CN110276799A (en) | Coordinate calibration method, calibration system and mechanical arm | |
| CN108858202A (en) | The control method of part grabbing device based on " to quasi- approach-crawl " | |
| CN114012716A (en) | An industrial robot shaft hole assembly method based on visual positioning and force control | |
| CN113554713B (en) | Visual positioning and detection method for hole making by mobile robot in aircraft skin | |
| CN114119773A (en) | Camera automatic focusing method for intelligent grabbing detection of industrial robot | |
| CN113119107A (en) | Method for planning adjustable adsorption points and adsorption system | |
| CN115205511A (en) | Rudder wing deflection angle detection method and system based on computer vision | |
| CN116652543B (en) | Visual impedance control methods and systems for automated product assembly, and robots | |
| CN116038607B (en) | A bearing positioning system and method for a rail vehicle door hanger assembly workstation | |
| CN115661271B (en) | A Vision-Based Guided Method for Robotic Nucleic Acid Sampling | |
| CN114782533A (en) | Monocular vision-based cable reel axis pose determination method | |
| CN116766201A (en) | Industrial robot control system based on machine vision | |
| CN114147704B (en) | Mechanical arm accurate positioning and grabbing method based on depth vision and incremental closed loop | |
| CN113240751B (en) | Calibration method for robot tail end camera | |
| CN114770502A (en) | Quick calibration method for tail end pose of mechanical arm tool |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20241030 Address after: 400000, No. 8 Ranjun Road, Shuangfu Street, Jiangjin District, Chongqing Patentee after: CHONGQING YINGQI VEHICLE PARTS CO.,LTD. Country or region after: China Address before: No.174, shazheng street, Shapingba District, Chongqing Patentee before: Chongqing University Country or region before: China |
|
| TR01 | Transfer of patent right |























































































