《工程科学学报》录用稿,htps:/doi.org/10.13374/i,issn2095-9389.2021.09.02.001©北京科技大学2020 工程科学学报DO: 面向三维复杂焊缝的焊接机器人焊缝跟踪方法 张雨航2),曹学鹏),张弓2,38,侯至丞2,),吴月玉2),徐群华),袁海2,) 1)长安大学,西安7100642)广州先进技术研究所,广州5114583)中国科学院大学,北京100049 ☒通信作者,E-mail:gong.zhang@giat.ac.cn 摘要机器人焊接技术具有质量稳定、效率高等特点,为实现空间内的三维复杂焊缝跟原以提出基手分段扫描、滤波、 特征点采集、路径规划的焊缝四步跟踪方法。通过安装于焊接机器人末端的激光传感器、以分段扫描方式连续多段采 集焊缝数据:为提高跟踪精度,采用组合滤波的方式修正数据,有效降低焊件麦面毛刺数据失真和噪声等影响: 通过特征点采集与坐标系标定确定焊接点:最后结合焊接机器人路径规划获得空间焊接路径。对二维$型焊缝与三 维复杂焊缝进行了实验研究,结果表明提出的四步焊缝跟踪方法可形成完整的焊接路径,两种焊件平均跟踪误差约 为0.296mm和0.292mm,满足机器人焊接跟踪误差低于0.5mm的精度要茉 表明所提出焊接跟踪方法的有效性, 可为复杂焊缝的高精度跟踪和自动焊接研究提供有益参考。 关键词焊缝跟踪:三维复杂焊缝:分段扫描:特征点提取: 路径 分类号TP242.2 Welding seam tracking method, of welding robot oriented to 3D complex welding seam ZHANG Yu-hang 2),CAO Xue-peng,ZHANG Gong HOU Zhi-cheng WU Yue-yu,XU Oun-hua YUAN Hars) 1)Chang'an University,Xi'an 710064,Chin 2) Guangzhou Institute of Advanced Teehne zhou 511458,China 3) University of Chinese Academy Berjing 100049.China Corresponding author,E-mai iat.ac.cn ABSTRACT Welding fobo tis widely used in many kinds and working conditions of welding production in the current machinery manufaeturing industry.It plays an important role in the machinery manufacturing industry.At present,in most industries,welding robets still work by teaching and reproduction.When the welding object or welding conditions change, the robot can not make corresponding adjustments in time,which makes the welding gun deviate from the weld center, resulting in the decline of welding quality.In the future,the realization of automatic welding and intelligent welding is the inevitable trend of development.The application of machine vision in the welding field will promote the transformation of welding technology from rigid welding automation to flexible welding intelligence.The purpose of welding automation and intelligence is to improve the working environment,save labor cost and improve product quality.Robotic welding technology has the characteristics of stable quality and high efficiency.To achieve 3D complex weld tracking in space,a four-step welding seam tracking method is proposed based on segmented scanning,filtering,feature points extraction,and path 收稿日期: 基金项目:国家重点研发计划(2018YFA0902903)、国家自然科学基金(62073092)、广东省自然科学基金 (2021A1515012638)、陕西省重点研发计划(2021 ZDLGY09-02)、广州市基础研究计划(202002030320)
工程科学学报 DOI: 面向三维复杂焊缝的焊接机器人焊缝跟踪方法1 张雨航 1,2),曹学鹏 1),张弓 2,3),侯至丞 2,3),吴月玉 2),徐群华 2),袁海 2,3) 1) 长安大学,西安 710064 2) 广州先进技术研究所,广州 511458 3) 中国科学院大学,北京 100049 通信作者,E-mail: gong.zhang@giat.ac.cn 摘 要 机器人焊接技术具有质量稳定、效率高等特点,为实现空间内的三维复杂焊缝跟踪,提出基于分段扫描、滤波、 特征点采集、路径规划的焊缝四步跟踪方法。通过安装于焊接机器人末端的激光传感器,以分段扫描方式连续多段采 集焊缝数据;为提高跟踪精度,采用组合滤波的方式修正数据,有效降低焊件表面毛刺、数据失真和噪声等影响; 通过特征点采集与坐标系标定确定焊接点;最后结合焊接机器人路径规划获得空间焊接路径。对二维 S 型焊缝与三 维复杂焊缝进行了实验研究,结果表明提出的四步焊缝跟踪方法可形成完整的焊接路径,两种焊件平均跟踪误差约 为 0.296 mm 和 0.292 mm,满足机器人焊接跟踪误差低于 0.5 mm 的精度要求。表明所提出焊接跟踪方法的有效性, 可为复杂焊缝的高精度跟踪和自动焊接研究提供有益参考。 关键词 焊缝跟踪;三维复杂焊缝;分段扫描;特征点提取;路径规划 分类号 TP242.2 Welding seam tracking method of welding robot oriented to 3D complex welding seam ZHANG Yu-hang1,2) , CAO Xue-peng1) , ZHANG Gong2,3) , HOU Zhi-cheng2,3) , WU Yue-yu2) , XU Qun-hua2) , YUAN Hai2,3) 1) Chang’an University, Xi’an 710064, China 2) Guangzhou Institute of Advanced Technology, Guangzhou 511458, China 3) University of Chinese Academy of Sciences, Beijing 100049, China Corresponding author, E-mail: gong.zhang@giat.ac.cn ABSTRACT Welding robot is widely used in many kinds and working conditions of welding production in the current machinery manufacturing industry. It plays an important role in the machinery manufacturing industry. At present, in most industries, welding robots still work by teaching and reproduction. When the welding object or welding conditions change, the robot can not make corresponding adjustments in time, which makes the welding gun deviate from the weld center, resulting in the decline of welding quality. In the future, the realization of automatic welding and intelligent welding is the inevitable trend of development. The application of machine vision in the welding field will promote the transformation of welding technology from rigid welding automation to flexible welding intelligence. The purpose of welding automation and intelligence is to improve the working environment, save labor cost and improve product quality. Robotic welding technology has the characteristics of stable quality and high efficiency. To achieve 3D complex weld tracking in space, a four-step welding seam tracking method is proposed based on segmented scanning, filtering, feature points extraction, and path 1收稿日期: 基金项目:国家重点研发计划(2018YFA0902903)、国家自然科学基金(62073092)、广东省自然科学基金 (2021A1515012638)、陕西省重点研发计划(2021ZDLGY09-02)、广州市基础研究计划(202002030320) 《工程科学学报》录用稿,https://doi.org/10.13374/j.issn2095-9389.2021.09.02.001 ©北京科技大学 2020 录用稿件,非最终出版稿
planning.Through the laser sensor installed at the end of the welding robot,the welding seam data is continuously collected in multiple segments in a segmented scanning manner.In order to improve the tracking accuracy,a combined filtering method is used to correct the data to reduce the effects of burrs,data distortion and noise on the surface of the weldment. Then the feature points are collected and the coordinate system is calibrated to determine the welding points.Finally,the spatial welding path is obtained by path planning.Experimental investigations are carried out for two-dimensional type S and 3D complex welding.The results show that the proposed method can form a complete welding path.The average errors of the two weldments are about 0.296 mm and 0.292 mm respectively,which could fulfill the required accuracy of 0.5 mm.It shows that the proposed tracking method is effective and can provide reference for the research of high-precision tracking and automatic welding. KEY WORDS seam tracking:3D complex welding:segmented scanning:feature points extraction;path planning 随着制造业和工业技术的进步,焊接机器人逐渐替代传统手工焊接,泛应用于各种场合, 大大提高了制造效率山。应用于焊接机器人的焊缝跟踪技术可实现焊接的自动花与智能化。目前焊 缝跟踪技术存在跟踪精度不高,跟踪实时性不强等问题,国内外学者对此展了研究。 Chang等开发出差分特征点检测算法与折线式路径规划方法,搭建了便携式机器人跟踪焊接 系统,成功应用于双壳船壁结构。Zhao等l提出基于ERFNet网络算法的焊缝跟踪系统,解决了强 背景噪声下的焊缝特征点提取,实现在线路径规划与偏差实时修企,实验验证误差在0.25m内。 Banafian等开发出基于激光和立体视觉结构光的焊缝跟踪系统,利佣改进的图像处理方式实现精 确跟踪,实验验证误差小于0.4mm。Zhang等I针对复杂儿维焊缝进行焊接实验研究,对特征点精 确定位后,焊接路径的平均误差为0.387mm。针对焊接时焊枪与焊缝中心线不对中的情况,Park等 提出基于移动平均算法的模块化焊缝跟踪系统,成应用于海上管道焊接,并控制误差在0.3mm 内。对于跟踪过程中产生的噪声干扰,Z0山等提出基深度学习的高鲁棒性焊缝检测器,实现了连 续强噪声干扰下的高精度焊缝跟踪。 上述研究促进了焊缝跟踪技术的发展,但研究对象大多以二维平面焊缝为主山,空间焊缝仅 面向螺旋线、相贯线等规则曲线2,对空间内任意复杂焊缝的研究较为缺乏。为此,本文以三维复 杂焊缝为研究对象,提出一种焊缝四步跟踪法,通过分段扫描的方式采集三维焊缝数据,并利用二 阶导数最值法与组合滤波的方法提取特征点,通过三次非均匀有理B样条拟合(NURBS)的方式 实现焊枪的路径规划,完成焊缝跟踪。 1组成与原理 焊缝跟踪系统包含机器入、激光传感器、焊接设备、工控机、控制柜等,其构成原理如图1所示。 本文使用基于结构光的激光传感器作为视觉工具,具有响应快、抗干扰能力强等优点
planning. Through the laser sensor installed at the end of the welding robot, the welding seam data is continuously collected in multiple segments in a segmented scanning manner. In order to improve the tracking accuracy, a combined filtering method is used to correct the data to reduce the effects of burrs, data distortion and noise on the surface of the weldment. Then the feature points are collected and the coordinate system is calibrated to determine the welding points. Finally, the spatial welding path is obtained by path planning. Experimental investigations are carried out for two-dimensional type S and 3D complex welding. The results show that the proposed method can form a complete welding path. The average errors of the two weldments are about 0.296 mm and 0.292 mm respectively, which could fulfill the required accuracy of 0.5 mm. It shows that the proposed tracking method is effective and can provide reference for the research of high-precision tracking and automatic welding. KEY WORDS seam tracking; 3D complex welding; segmented scanning; feature points extraction; path planning 随着制造业和工业技术的进步,焊接机器人逐渐替代传统手工焊接,并广泛应用于各种场合, 大大提高了制造效率[1]。应用于焊接机器人的焊缝跟踪技术可实现焊接的自动化与智能化[2]。目前焊 缝跟踪技术存在跟踪精度不高,跟踪实时性不强等问题,国内外学者对此开展了研究。 Chang 等[3]开发出差分特征点检测算法与折线式路径规划方法,搭建了便携式机器人跟踪焊接 系统,成功应用于双壳船壁结构。Zhao 等[4]提出基于 ERFNet 网络算法的焊缝跟踪系统,解决了强 背景噪声下的焊缝特征点提取,实现在线路径规划与偏差实时修正,实验验证误差在 0.25 mm 内 。 Banafian 等[5]开发出基于激光和立体视觉结构光的焊缝跟踪系统,利用改进的图像处理方式实现精 确跟踪,实验验证误差小于 0.4 mm。Zhang 等[6]针对复杂二维焊缝进行焊接实验研究,对特征点精 确定位后,焊接路径的平均误差为 0.387 mm。针对焊接时焊枪与焊缝中心线不对中的情况,Park 等 [7]提出基于移动平均算法的模块化焊缝跟踪系统,成功应用于海上管道焊接,并控制误差在 0.3 mm 内。对于跟踪过程中产生的噪声干扰,Zou 等[8]提出基于深度学习的高鲁棒性焊缝检测器,实现了连 续强噪声干扰下的高精度焊缝跟踪。 上述研究促进了焊缝跟踪技术的发展,但研究对象大多以二维平面焊缝为主[9-11],空间焊缝仅 面向螺旋线、相贯线等规则曲线[12-14],对空间内任意复杂焊缝的研究较为缺乏。为此,本文以三维复 杂焊缝为研究对象,提出一种焊缝四步跟踪法,通过分段扫描的方式采集三维焊缝数据,并利用二 阶导数最值法与组合滤波的方法提取特征点,通过三次非均匀有理 B 样条拟合(NURBS)的方式 实现焊枪的路径规划,完成焊缝跟踪。 1 组成与原理 焊缝跟踪系统包含机器人、激光传感器、焊接设备、工控机、控制柜等,其构成原理如图 1 所示。 本文使用基于结构光的激光传感器作为视觉工具,具有响应快、抗干扰能力强等优点[15]。 录用稿件,非最终出版稿
Groove data Industrial PC ↓Pose signal sensor Seam tracking method Welding power Robot control Robot welding systen cabinet Robot 圖1焊缝跟踪系统构成图 Fig.1 Structure diagram of seam tracking system 从图中可以看出,六轴机器人、控制器与焊接设备组成机器人焊接系统,微光传感器装配于机 器人末端,并由机器人带动采集信息,焊缝信息通过激光传感器上位机间的连接传输,经过焊缝 跟踪方法的运算输出焊接路径,信息传输至机器人控制器指挥焊搂( 从而实现焊缝跟踪。 2焊缝跟踪方法 本文提出的焊缝跟踪系统通过分段扫描、组合滤波处理/特征点提取、焊接路径规划四个步骤实 现三维复杂焊缝的跟踪。首先通过分段扫描采集焊缝坡原始数据;经过Lowess平滑处理u6去除毛 刺及失真,还原焊缝坡口轮廓形貌:随后进行连续两次求导与高斯叨、限幅滤波获取传感器坐标 系下坡口特征点坐标:通过标定,将位于传感器坐标系下的特征点二维坐标转化为基坐标系下三维 坐标u920:将一系列焊接点进行NURBS拟合®处理,形成焊接路径,整体流程如图2所示。 Step.3 Feature points extraction Start d/dt Step.I Scanning Step.2 Combined filtering First Derivative Filtering Step.4 Path planning 帝 Segmented scanning d/dt Sensor calibration Change ting Gaussian Obtain groove data threshold Second Derivative NURBS waypoints interpolation N Extreme point=3 录用 End Output extreme points 圆2焊缝跟踪流程图 Fig.2 Flow chart of welding seam tracking 2.1分段归描与组合滤被 分段扫描的目的在于提取三维空间焊缝数据,是实现三维复杂焊缝跟踪的基础。机器人带动激 光传感器以折线分段的方式连续扫描焊缝,获取原始数据。本文实验对象为平面S型焊缝与三维复 杂焊缝(通过直线焊缝与S型焊缝搭接而成),其中,S型焊缝的分段扫描原理及效果如图3所示
图 1 焊缝跟踪系统构成图 Fig.1 Structure diagram of seam tracking system 从图中可以看出,六轴机器人、控制器与焊接设备组成机器人焊接系统,激光传感器装配于机 器人末端,并由机器人带动采集信息,焊缝信息通过激光传感器与上位机间的连接传输,经过焊缝 跟踪方法的运算输出焊接路径,信息传输至机器人控制器指挥焊接,从而实现焊缝跟踪。 2 焊缝跟踪方法 本文提出的焊缝跟踪系统通过分段扫描、组合滤波处理、特征点提取、焊接路径规划四个步骤实 现三维复杂焊缝的跟踪。首先通过分段扫描采集焊缝坡口原始数据;经过 Lowess 平滑处理[16]去除毛 刺及失真,还原焊缝坡口轮廓形貌;随后进行连续两次求导与高斯[17]、限幅[18]滤波获取传感器坐标 系下坡口特征点坐标;通过标定,将位于传感器坐标系下的特征点二维坐标转化为基坐标系下三维 坐标[19-20];将一系列焊接点进行 NURBS 拟合[21]处理,形成焊接路径,整体流程如图 2 所示。 图 2 焊缝跟踪流程图 Fig.2 Flow chart of welding seam tracking 2.1 分段扫描与组合滤波 分段扫描的目的在于提取三维空间焊缝数据,是实现三维复杂焊缝跟踪的基础。机器人带动激 光传感器以折线分段的方式连续扫描焊缝,获取原始数据。本文实验对象为平面 S 型焊缝与三维复 杂焊缝(通过直线焊缝与 S 型焊缝搭接而成),其中,S 型焊缝的分段扫描原理及效果如图 3 所示。 录用稿件,非最终出版稿
(a) (d)c) 820 780 850 790 800 Y/mm 1250 1300 5 7501150 1200 x/mm 1160 1180 1200 1220 1240 1260 m Depth/mm ■3分段扫描原理.(a)实物扫描图,(b)原始数据图像:(©风点云图d伪彩图 Fig.3 Segmented scanning:(a)weldment scanning:(b)raw data;(c)point cloud.(d)pseudo-color picture 激光传感器采集数据时受到自然光线、焊件表面反光、毛刺凸起等影响, 导致采集的数据失真。 组合滤波采用Low℃ss滤波、限幅滤波、高斯滤波三种方法人以平滑修正数据图形。 Lowess滤波为加权线性最小二乘结合一阶多项式模型, 能较好的平滑处理波动性数据,用于 处理焊件表面毛刺等失真。坡口数据经由式(1)进行平均回归,过程中引入式(2)加权平滑,推导得 Lowess估计值公式(3)。 f(x)=4ve(y N.(x) (1) ∫)=∑场y/∑K(x) (2) 式中:K(,)=D压-x以,=Q751-)当川<1,入为窗口宽度。 f()=∑o,(xo)y (3) 式中:o,()为权重。 限幅滤波原理如式④ 是然因素引定泸 y=y b.-yalsar yn1yn-yn->△T (4) 式中:与为采样值,△T为阈值。 高斯滤波可有效抑制正态分布的干扰信号,防止检测到局部峰值,高斯函数的一维表达如式 (5): 1- f(x)=- ar e (5) 处理三维空间焊缝坡口过程中,Lowess滤波用于平滑焊件坡口原始图形,限幅、高斯滤波用于 处理一阶、二阶导数,使局部极大极小值更为显著。组合滤波效果如图4所示
图 3 分段扫描原理.(a)实物扫描图; (b)原始数据图像; (c) 点云图; (d) 伪彩图 Fig.3 Segmented scanning: (a) weldment scanning; (b) raw data; (c) point cloud; (d) pseudo-color picture 激光传感器采集数据时受到自然光线、焊件表面反光、毛刺凸起等影响,导致采集的数据失真。 组合滤波采用 Lowess 滤波、限幅滤波、高斯滤波三种方法,以平滑修正数据图形。 Lowess 滤波为加权线性最小二乘结合一阶多项式模型,能较好的平滑处理波动性数据,用于 处理焊件表面毛刺等失真。坡口数据经由式(1)进行平均回归,过程中引入式(2)加权平滑,推导得 Lowess 估计值公式(3)。 f x Ave y x N x i i k i (1) 0 0 0 1 1 = , , N N i i i i i f x K x x y K x x (2) 式中: K x x D x x 0 0 , = i i , 2 D t t 0.75 1 当 t 1,λ 为窗口宽度。 0 0 i i i f x x y (3) 式中: i 0 x 为权重。 限幅滤波原理如式(4),用于处理偶然因素引起的脉冲干扰。 -1 -1 -1 n n n n n n y y y T y y y y T (4) 式中:yn与 yn-1为采样值, T 为阈值。 高斯滤波可有效抑制正态分布的干扰信号,防止检测到局部峰值,高斯函数的一维表达如式 (5): 2 2 ( ) 2 1 ( ) 2 x f x e (5) 处理三维空间焊缝坡口过程中,Lowess 滤波用于平滑焊件坡口原始图形,限幅、高斯滤波用于 处理一阶、二阶导数,使局部极大极小值更为显著。组合滤波效果如图 4 所示。 录用稿件,非最终出版稿
(b)(a) 目[Raw data Original image Smooth image 10 0 0 10 10 Before filtering 0 -10 100 5 0 10 After filtering -15 .10 沙 051015 -10 Width/mm -10 10 ■4滤波效果.(a)Lowess滤波;(b)限幅、高斯滤波 Fig.4 Filter effect:(a)Lowess filtering.(b)Limiting,Gaussian filtering 2.2特征点提取 特征点提取的速度与精度影响焊缝跟踪最终效果。针对三维复杂焊缝,特征点提取算法包括五 个步骤,如图5所示。首先Low©ss滤波平滑焊缝坡口:求导得焊缝坡口轮廓的阶导数:使用限幅、 高斯滤波平滑一阶导数:求二阶导并平滑处理:寻找全局极大、极小值确定特征点坐标。 220 processing 215 210 1 17 18 19 20 21 First derivative after Limiting,Gaussian filtering 19 3.Second derivative 40 23 24 4.Second derivative after Limiting,Gaussian filtering 5.Find the global Max.and Min. 22 2324 25 Width/mm 圆5特征点提取 Fig.5 Feature points extraction 2.3略径规划 各坐标系的经间转换关系是后续研究与计算的基础,通过坐标转换,可实现将实验数据从传感 器坐标系S的维坐标转化为基坐标系B}下的三维坐标,从而进行路径规划。转换过程涉及到 末端坐标系E}与焊枪坐标系T},机器人工作站中各坐标系如图6所示
图 4 滤波效果. (a) Lowess 滤波; (b) 限幅、高斯滤波 Fig.4 Filter effect: (a) Lowess filtering; (b) Limiting, Gaussian filtering 2.2 特征点提取 特征点提取的速度与精度影响焊缝跟踪最终效果。针对三维复杂焊缝,特征点提取算法包括五 个步骤,如图 5 所示。首先 Lowess 滤波平滑焊缝坡口;求导得焊缝坡口轮廓的一阶导数;使用限幅、 高斯滤波平滑一阶导数;求二阶导并平滑处理;寻找全局极大、极小值确定特征点坐标。 图 5 特征点提取 Fig.5 Feature points extraction 2.3 路径规划 各坐标系的空间转换关系是后续研究与计算的基础,通过坐标转换,可实现将实验数据从传感 器坐标系{S}下的二维坐标转化为基坐标系{B}下的三维坐标,从而进行路径规划。转换过程涉及到 末端坐标系{E}与焊枪坐标系 录用稿件,非最终出版稿 {T},机器人工作站中各坐标系如图 6 所示