Background
The welding technology plays an important role in the manufacturing industry, and is widely applied to various industries such as mechanical manufacturing, petrochemical industry, aerospace and the like. With the rapid development of the manufacturing industry, welding products are diversified, welding structures are more and more complex, higher requirements are provided for the quality and reliability of the welding products, and welding relying on manual experience cannot adapt to the current high-quality welding requirements more and more. Spatter, smoke, arc light, radiation and the like in the welding process can cause great health threat to workers engaged in welding work for a long time, and the stability and consistency of welding quality are difficult to maintain in manual welding.
Aiming at the problems of high labor intensity, low welding efficiency, difficult operation and dangerous operation of manual welding in a complex environment, such as welding of a cabin or a large-scale chemical equipment pipeline, especially a welding section in a narrow space or a high altitude, a welder is not safe and difficult to weld, and an autonomous mobile robot with small volume and convenient movement can be used for welding the welding section in the complex space. The welding method of the autonomous mobile welding robot has the characteristics of high efficiency, high quality, low cost and the like, can avoid danger possibly brought to an operator in the welding process, can also ensure the unification of welding standards, and improves the welding precision, the welding quality and the welding efficiency. The research of the autonomous mobile welding robot is applied to the welding in the fields of mechanical manufacturing, petrochemical industry, aerospace and even other industries, and has important scientific significance and engineering application prospect.
In order to avoid the influence of weldment deformation, welding robot motion deviation and the like caused by high temperature in the welding process on the welding position, the accurate control of the welding process is realized, the welding quality is ensured, and the real-time acquisition and processing of welding seam size information are needed during welding. Based on the laser vision sensor, the advantages of high laser vision precision, strong anti-interference capability and the like can be utilized, and the size information of the welding seam can be conveniently and accurately acquired. Therefore, an embedded visual control system of the autonomous mobile welding robot is built, the acquisition and processing of welding seam images in the welding process are realized, the automatic control of welding is completed, and the autonomous mobile welding robot has important significance in realizing autonomous welding.
Disclosure of Invention
The invention aims to provide a vision control system of an autonomous mobile welding robot. The system adapts to the complex welding requirements of large-scale welding industry, reduces the labor intensity of workers in welding operation, and ensures the welding quality, the welding efficiency and the welding consistency.
The invention provides a vision control system of an autonomous mobile welding robot, wherein the welding robot comprises a mobile trolley, a transverse swing guide rail, a welding gun arranged at the tail end of the transverse swing guide rail and a welding machine; respectively, the moving trolley realizes crawling along a weldment through a stepping motor, the transverse swinging guide rail realizes horizontal movement, and the welding gun realizes up-and-down movement; the vision control system comprises a processor, an industrial camera and a line laser which are arranged on a moving trolley, wherein the industrial camera and the line laser are arranged at the tail end of a horizontal swinging guide rail, the optical axis of the industrial camera and the plane of the center of a welding gun are parallel to the crawling direction of the system and are vertical to the direction of the horizontal swinging guide rail, and a certain included angle is formed between the optical axis of the camera and the optical plane of the line laser; the processor is communicated with the industrial camera through a GigE gigabit network, acquires a welding seam image, acquires the center position and the size of the welding seam through an image processing algorithm, and drives the stepping motor to realize the movement of the welding robot in three directions; the processor and the welding machine simultaneously control the welding machine to set welding current, welding voltage, wire feeding, air feeding and arc striking actions through a 485 bus in a Modbus protocol communication mode.
The processor is ARM Cortex-A8.
The control system of the invention has three functions: and the welding line is positioned through visual sensing, the welding line is tracked, and the real-time deviation correction and the welding control are carried out. Or, the invention provides a control method based on the control system, which comprises three aspects of positioning the welding seam through visual sensing, tracking the welding seam, correcting deviation in real time and controlling welding.
When the welding seam is positioned by visual sensing, an industrial camera is used for collecting a laser stripe image projected to the welding seam by line laser, a searched welding seam stripe image T (W, H) is formed, the W and the H are the width and the height of the welding seam stripe image, inclined laser stripes generated by the groove depth change at the left and the right of the welding seam are designed into two deflection stripe template images T (M, N), the M and the N are the sizes of the template images and are 100x100, and the template images areThe graph is translated on the searched graph, and the template covers the regional calling subgraph S of the searched graphijAnd i and j are an abscissa and an ordinate of the lower left corner of the subgraph on the searched graph S, and since the width direction of the welding seam is the yaw movement of the welding gun, only the abscissa of the deflection position needs to be extracted, and the search is carried out only along the abscissa direction, wherein the search range is as follows: i is more than or equal to 1 and less than or equal to W, and the position j of the vertical coordinate during searching is the median of the longitudinal position of the laser stripe;
the search results are measured by the similarity D (i, j) of formula (1) for subgraphs and templates T and SijSimilarity of (c):
by finding out the position with the maximum similarity as a welding seam deflection point, according to the two template graphs, the edges ileft and iright at the left and right ends of the welding seam can be located, the center position icenter of the welding seam is (ileft + iright)/2, and the width of the welding seam is nwidth-iright-ileft.
When a welding seam is tracked and corrected in real time, the processor drives the stepping motor to realize crawling and yawing two-axis linkage motion according to the obtained welding seam position and size information, so that the bottom of the welding gun tracks the welding seam according to a zigzag motion track, a crawling stroke and a crawling speed can be set and changed in the welding motion process, the yawing amplitude and speed and delay time when the welding gun moves to the edge of the welding seam can be set and changed, and the height positions of the welding gun and an arc starting point of the welding seam are adjusted according to the welding process;
the welding method includes the steps that due to welding high temperature, weldment deformation and influence of welding robot movement deviation on a welding position need to be conducted in real time correction according to the obtained position and seam width of a welding seam, specifically, before welding, an original point of the welding seam initial position is photographed firstly, the initial position icenter0 of the center of the welding seam and the initial width nwidth0 of the welding seam are obtained, during welding, according to the actually obtained welding seam center position icenter, the correction amount Delta center is calculated to be icenter-icenter0, a yaw movement stepping motor is driven to determine the correction direction according to the positive and negative of the correction amount, movement correction is conducted according to the correction amount Delta center, and meanwhile, the yaw movement swing is corrected to be the obtained current seam width nwidth of the welding seam.
During welding control, the processor and the welding machine are communicated with each other through a 485 bus according to a Modbus protocol to control the action of the welding machine, so that welding current and voltage are set, gas is supplied, wire feeding and arc starting welding are realized.
The invention designs an embedded vision control system of an autonomous mobile welding robot, which realizes the functions of core image acquisition, processing and automatic welding control by using a system based on ARMCortex-A8 on the basis of the autonomous mobile welding robot. The control system can acquire the welding line image information of the laser vision sensor, then measure the welding line position and size information in real time according to the image information, and control the crawling and the horizontal swinging of the mobile robot, and perform automatic welding control and real-time deviation correction through the control system. The embedded system can greatly reduce the overall complexity and the equipment volume of the system, and improve the adaptability of the autonomous mobile welding robot to the industrial field welding. The welding device is suitable for complex welding requirements of large-scale welding industry, reduces labor intensity of workers in welding operation, and ensures welding quality, welding efficiency and welding consistency.
Detailed Description
The structure of the embedded vision control system of the autonomous mobile welding robot built by the invention is shown in figure 1. The welding robot comprises a moving trolley, a transverse swing guide rail, a welding gun arranged at the tail end of the transverse swing guide rail and a welding machine; respectively, the moving trolley realizes crawling along a weldment through a stepping motor, the transverse swinging guide rail realizes horizontal movement, and the welding gun realizes up-and-down movement; the vision control system comprises an ARM Cortex-A8 processor, an industrial camera and a line laser, wherein the ARM Cortex-A8 processor is installed on a moving trolley, the industrial camera and the line laser are installed at the tail end of a horizontal swinging guide rail, the optical axis of the industrial camera is parallel to the crawling direction of the system with the plane of the center of a welding gun and is vertical to the direction of the horizontal swinging guide rail, and a certain included angle exists between the optical axis of the camera and the optical plane of the line laser; the processor is communicated with the industrial camera through a GigE gigabit network, acquires a welding seam image, acquires the center position and the size of the welding seam through an image processing algorithm, and drives the stepping motor to realize the movement of the welding robot in three directions; the processor and the welding machine simultaneously control the welding machine to set welding current, welding voltage, wire feeding, air feeding and arc striking actions through a 485 bus in a Modbus protocol communication mode.
The moving trolley is a magnetic adsorption type four-wheel trolley. The welding robot has three degrees of freedom of movement in the system creep (x), welding gun yaw (y), and welding gun up-and-down movement (z) as shown by the double arrows in fig. 1, and is driven to move inside by a stepping motor. And a visual sensor consisting of an industrial camera and a line laser and a welding gun are arranged at the tail end of the yaw guide rail 6 and used for acquiring the size and position information of the welding seam and positioning the relative positions of the welding gun 5 and the welding seam 7 in the welding process. The plane where the optical axis of the industrial camera and the center of the welding gun are located is parallel to the crawling direction (x) of the system and perpendicular to the transverse swinging direction (y) of the welding gun, and therefore crawling of the moving trolley and transverse swinging of the welding gun can be guaranteed, and scanning of a welding seam can be achieved. The distance and the relative angle between the visual sensor and the welding gun can be adjusted, the welding gun tip part is ensured to be close to the welding seam position characteristics obtained by the visual sensor as much as possible, and the accuracy of welding control is ensured. In the welding process, the processor processes the obtained position and size information of the welding line according to the obtained welding line image information, controls the welding gun to move, and can realize manual and automatic correction of the welding process according to the deviation value of the welding line position. The core of the control system is ARMCortex-A8, the weld image of the visual sensor is collected through a GigE gigabit network, the position and size information of the weld is acquired through a weld image processing algorithm, and the movement of the welding robot in three directions is controlled by driving a stepping motor. The motion simultaneous processor can communicate with the welding machine 8 through a 485 serial port bus to control the arc striking of the welding gun, and the purpose of autonomous welding is achieved.
Industrial cameras and line lasers constitute vision sensors. According to the principle of the laser triangulation method, when a certain included angle exists between the optical axis of the camera and the optical plane of the line laser, the laser stripe image projected to the weld by the line laser collected by the camera deviates due to the change of the depth of the groove of the weld, as shown in fig. 2 (a). Therefore, the center position and the seam width size of the seam can be located by extracting the deflection point positions of the left end and the right end of the laser stripe image through a seam image processing algorithm, as shown in fig. 2 (b).
The arc light and the splash generated during welding can interfere the laser stripes, the left end and the right end of the laser stripe image of the welding seam are accurately positioned, and the positioning is carried out by adopting a template matching algorithm according to the stripe deflection characteristics. The template matching algorithm is a statistical result of the overall characteristics of the stripes within a certain area range, so that noise can be suppressed, and the anti-interference capability is improved. Specifically, the searched seam stripe patterns T (W, H) are widths and heights of the seam stripe patterns. A template map T (M, N) of deflection stripes designed based on oblique laser stripes generated by the depth change of the left and right grooves of the weld, where M and N are the size of the template map and 100 × 100, as shown in fig. 2(c, d). The template map is translated on the searched map, and the template covers the area of the searched map to be called sub-map SijAnd i, j are the abscissa and ordinate of the lower left corner of the subgraph on the searched graph S. Because the width direction of the welding seam is in the yaw motion during welding, only the abscissa of the deflection position needs to be extracted, so that the search can be carried out only along the abscissa direction, and the search range is as follows: i is more than or equal to 1 and less than or equal to W. The position j of the ordinate during the search is the median of the longitudinal positions of the laser stripes. The search results are measured for subgraphs and template graphs T and S using the similarity D (i, j) of equation (1) belowijSimilarity of (c):
and finding the position with the maximum similarity as a welding seam deflection point. From the two template maps, the edges ileft and iright at the left and right ends of the weld can be located. The center position of the welding seam is (ileft + iright)/2, and the width of the welding seam is nwidth (iright-ileft).
Because the similarity technology has a large amount of accumulation operation, the image processing time needs to be reduced as much as possible in order to ensure the real-time performance of welding seam feature extraction in the welding process. Therefore, a multi-scale matching algorithm is adopted, coarse positioning is carried out through large-scale mobile search, and then single-pixel mobile search is carried out on the basis of the coarse positioning to carry out accurate positioning.
In the implementation process, the image acquisition is realized by building a linux operating system on an ARM processor, realizing the image acquisition of the GigE camera by configuring an industrial camera image acquisition library, realizing a template matching algorithm by utilizing Opencv and displaying an image processing result by utilizing QT.
The ARM processor can realize the movement in three directions of crawling (x), welding gun horizontal swinging (y) and welding gun vertical moving (z) by driving the stepping motor. The ARM processor and the welding machine are communicated with each other through a 485 bus by a Modbus protocol to control the welding machine to set welding current, welding voltage, wire feeding, air feeding and arc striking.
The weld tracking control is schematically shown in fig. 3, the size and position information of the weld are obtained according to a weld extraction algorithm, and the bottom of the welding gun tracks the weld according to a zigzag movement track shown in the figure through two-axis linkage movement of crawling and yawing during welding. The welding can set and change the creeping stroke and the creeping speed during the welding movement, the amplitude and the speed of the yawing and the delay time when moving to the edge of the welding seam. The height positions of the welding gun and the arc starting point of the welding seam can be adjusted according to the welding process by the up-and-down movement of the welding gun. In order to avoid arc interference, a metal baffle plate is added between the vision sensor and the welding gun, so that the phenomenon that arc and splashed liquid drops enter the photographing range of the vision sensor during welding is reduced. Meanwhile, a pass band filter in the wavelength range of the laser is added in the visual sensor, so that the influence of arc light of other wave bands is filtered.
During actual welding, due to the influences of weldment deformation caused by high welding temperature, welding robot motion deviation and the like on a welding position, the position and the width of a welding seam acquired by a visual sensor need to be corrected in real time. Specifically, as shown in fig. 4, before welding, the initial position of the weld joint is photographed at the origin to obtain the initial position icenter0 of the center of the weld joint and the initial width nwidth0 of the weld joint. During welding, according to the actually obtained center position icenter of the welding seam, calculating the deviation correction amount DeltaCenter-icenter 0, driving the yaw motion stepping motor to determine the deviation correction direction according to the positive and negative deviation correction values, performing movement deviation correction according to the deviation correction amount DeltaCenter, and correcting the yaw motion swing to obtain the current seam width nwidth of the welding seam. Accordingly, the weld joint is automatically tracked when welding is completed. The welding robot reserves a manual deviation rectifying function to make up the function of manual adjustment if a large deviation occurs during actual use of the welding seam during autonomous welding, and the convenience and the reliability of the use and operation of the welding robot in an industrial field are improved.
In the implementation process, the movement of the welding robot in three directions is realized by performing PWM modulation on the GPIO port of the ARM to realize the movement control of the displacement and the speed of the stepping motor, and the ARM is used for performing communication control on the 485 serial port to control the motor to act.
The control system of the present invention has the functions of:
1) visual sensing function:
a) the system adopts an embedded linux system to complete compiling and transplanting of a Pylon image acquisition library and an Opencv image processing library;
b) the real-time acquisition and processing of the welding seam image realize the real-time acquisition of the welding seam image and the real-time processing of the welding seam information, and have the real-time visual deviation rectifying function.
c) And (5) positioning algorithm of the welding seam image. The control system adopts a welding seam positioning algorithm based on template matching, reduces the interference of arc light on the welding seam positioning algorithm, ensures the accurate extraction of welding seams, and reserves an algorithm interface for transplanting other algorithms.
2) The motion control function:
a) and (5) controlling crawling motion. The manual and automatic forward and backward crawling movement of the robot is realized, and the setting of the stroke and the speed can be realized.
b) And controlling the welding gun yaw motion. The welding gun transverse swinging movement realizes manual and automatic movement and backswing control, and the transverse swinging amplitude, speed and the retention time of the edge of the welding seam can be set according to the welding process.
c) And controlling the welding gun to move up and down. The up-and-down movement of the welding gun is realized.
d) And (4) linkage control of welding crawling and yawing. According to the actual welding needs, the control of simultaneous movement of two shafts, namely creeping of a welding robot and yawing of a welding gun, can be realized, and autonomous welding is realized.
e) Manual deviation correction and visual deviation correction of welding control. During welding movement of the welding robot, manual deviation rectification control can be performed according to manual observation of welding deviation, and automatic visual deviation rectification can be performed on a welding seam positioning result relative to an initial origin position deviation value according to image processing of a visual sensor, so that the welding process quality is improved.
3) And (3) a welding control function:
the control system and the welding machine control the action of the welding machine through the 485 bus in a Modbus protocol communication mode, and the following functions can be realized:
a) setting welding current and voltage;
b) air supply and wire feeding;
c) and (5) arc starting welding.
Before welding, the autonomous mobile welding robot firstly tests the image acquisition of a control system, processes the characteristics of a welding seam and controls the movement in three directions without faults, and aims a welding gun at the arc striking position of the center of the welding seam. And then setting the seam width of the welding seam according to the size of the groove of the welding seam, and carrying out origin photographing to determine the initial central position of the welding seam and the seam width of the welding seam in an image coordinate system. And starting the autonomous welding function of the control system, and starting the welding machine to perform automatic welding while the crawling and the horizontal swinging two-axis linkage motion are performed. And a control system automatically corrects the deviation according to the welding seam center position and the welding seam width extracted in real time by the vision sensing image by adopting vision correction. The welding process is monitored manually, and if deviation occurs in automatic deviation correction, the welding can be guaranteed to be reliable through manual deviation correction. The welding process parameters such as climbing speed, yaw amplitude, welding current, welding voltage and the like during welding are optimized through a welding experiment, and the welding quality is improved.
The invention designs an embedded vision control system of an autonomous mobile welding robot, which realizes the functions of core image acquisition, processing and automatic welding control by using a system based on ARM Cortex-A8 on the basis of the welding robot. The control system can acquire the welding line image information of the laser vision sensor, and then measure the welding line position and size information in real time according to the image information to control the crawling and the horizontal swinging of the mobile robot, perform automatic welding control and correct the deviation in real time. The embedded system can greatly reduce the overall complexity and the equipment volume of the system, and improve the adaptability of the autonomous mobile welding robot to the industrial field welding.