| Nowadays,the shaped workpiece are mainly welded by the people,but the welding efficiency and welding quality can not be guaranteed,the actual welding track of the shaped workpiece is indefinite due to its thermal deformation or clamping error,so "Teach-Reproduction" of the welding mode does not adapt to the actual welding.Therefore,it is necessary that the welding track of the shaped workpiece is generated online.To this end,this paper presented a subpixel contour extraction method based on machine vision.By using a two-axis positioner with visual system and a subpixel extraction method based on Zernike moments in a traditional six-axis robot,the sub-pixel profile of the shaped workpiece was extracted online.Then,the subpixel profile was smoothed by the fitting method of least-squares NURBS and the movement path of six-axis robot and two-axis positioned were received after the welding track was disintegrated by motion control program.the movement paths were sent to the robot controller to guide the robot to complete the automatic welding process.The calibration methods between robot,two-axis positioned and the visual inspection system were studied,and the conversions between the robot coordinate system,the positioner coordinate system and the camera coordinate system were achieved.Firstly,Halcon software was used to calibrate the internal and external parameters of the camera,laying the foundation for positioner calibration and eye-to-hand calibration.In order to realize the conversion of the shaped workpiece welding point between the positioner coordinate system and the robot coordinate system,the "five-point calibration method" was proposed to get the homogeneous matrix between the positioner and the robot coordinate system.Aiming at the "Eye-to-Hand" system of the robot and the vision detection system,a calibration method was proposed,and parameters of the homogeneous matrix between them were obtained,Thus,any conversion of the coordinate values between the camera coordinate system,the positioner coordinate system,and the robot coordinate system was completed.In order to improve the extraction accuracy of the shaped workpieces,the extraction of sub-pixel contours for shaped workpieces was studied.The original image of the shaped workpieces was obtained through the visual inspection system,the basic contour of the shaped workpieces was obtained after the original image was preprocessed morphologically by using the operators in Halcon.By analyzing the principle of Zernike moments,the sub-pixel contour extraction algorithm was written with the Halcon,and the initial welding track of the shaped workpieces was obtained.In order to ensure the coordinated movement between the robot and the positioned system,the method of smoothing the welding trajectory of the shaped workpiece and the algorithm of the welding trajectory system were studied.The welding trajectory extracted by the contour extraction algorithm based on Zernike moments would inevitably appear dead points and sharp points,which leaded to the decline of welding quality and even the failure of welding.By studying the principle of NURBS curve fitting,the global approximation algorithm was proposed.The smooth data points could not be directly input into the on-line robot trajectory generation system consisting of six-axis robots and two-axis positioners.Therefore,a motion control algorithm for the system was proposed.The algorithm decomposed the motion path of the six-axis robot and the two-axis positioner,and inputed it into the robot controller,and guided the system to complete the welding of the shaped workpiece.A robot welding platform consisting of a six-axis robot and a two-axis positioner system was designed to verify the extraction algorithm based on Zernike moments,as well as the method of smoothing the welding trajectory of the shaped workpiece and the motion control algorithm.The hardware system mainly included Yaskawa robot and self-made two-axis positioner with visual inspection system.The control system included Yaskawa DX200 controller and programs running on Window system.The platform carried on the comparative experiment of contour extraction between conventional pixel-level method and the sub-pixel method based on Zernike moments.The experimental showed that the sub-pixel method based on Zernike moments has great advantages,the error of the sub-pixel mthod was between0.052-0.214 mm,the average error was 0.145 mm.The error of conventional method was between 0.22-0.36 mm,the average error was 0.309 mm.This paper also carried on the experiment of the motion control algorithm,the result showed that the error between the welding torch's moving path and weld meet the the requirements of actual welding situation,which was proved by the final experiment. |