A robot welding tongs electrode rod straightening positioning method based on machine vision

By using a machine vision closed-loop straightening and positioning system, the problems of algorithm accuracy and real-time performance, environmental adaptability and system integration in the straightening of the electrode rod of the robotic welding gun were solved, realizing the precise positioning and straightening of the electrode rod, and improving welding quality and production efficiency.

CN122199679APending Publication Date: 2026-06-12CHINA FAW CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA FAW CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies for straightening and positioning electrode rods in robotic welding clamps suffer from several problems, including difficulty in balancing algorithm accuracy and real-time performance, poor environmental adaptability, insufficient system integration, and poor adaptability to complex deformations. These issues result in low positioning accuracy and low production efficiency.

Method used

A closed-loop straightening and positioning system based on machine vision is adopted, including an industrial image acquisition module, a vision processing module, a straightening execution module, and a data decision module. Through image preprocessing, feature recognition, and straightening judgment, adaptive straightening parameters are generated, and real-time monitoring and feedback are provided to achieve precise positioning and straightening of the electrode rod.

🎯Benefits of technology

It improves the accuracy and production efficiency of electrode rod straightening, enhances the adaptability and stability of the system, is applicable to straightening devices of different types and specifications, and ensures welding quality and the reliability of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199679A_ABST
    Figure CN122199679A_ABST
Patent Text Reader

Abstract

The application discloses a robot welding tongs electrode rod straightening positioning method based on machine vision, and relates to the field of cockpit system development.The method comprises the following steps: P1, system construction: a closed-loop straightening positioning system is built; wherein, based on ensuring that the welding tongs electrode rod is always in the range of the collected field of view, the industrial image collection module is arranged at a preset position of a welding station; P2, coordinate calibration: based on the power-on initialization of the closed-loop straightening positioning, the mapping relationship between the image coordinate system of the industrial image collection module and the robot base coordinate system is established; wherein, the electrode rod coordinates are converted and expressed in the two coordinate systems according to the mapping relationship; and P3, image collection and processing: based on the working condition scene after the robot welding tongs completes the welding operation, the industrial image collection module collects the electrode rod image, and the vision processing module performs preprocessing, such as noise reduction, enhancement and contour extraction, on the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cockpit system development, and in particular to a machine vision-based method for straightening and positioning a robot welding gun electrode rod, a machine vision-based system for straightening and positioning a robot welding gun electrode rod, electronic devices, storage media, and a robot hand-eye calibration platform. Background Technology

[0002] Existing technologies mainly acquire images of the electrode rods using a vision camera, rely on open-source computer vision libraries, and use algorithms such as Hough transform to extract the features of the electrode rods. They then combine data analysis to obtain offset parameters, which are fed back to the straightening device by a data monitoring platform. Positioning and straightening are achieved through a linear servo module and a clamping mechanism. Another technology uses a passive vision sensor, corrects distortion through image calibration, fits the center features through algorithms such as filtering and sub-pixel extraction, and uses a PLC to achieve error correction.

[0003] Existing problems include: First, it is difficult to balance algorithm accuracy and real-time performance, resulting in low feature extraction efficiency under complex working conditions and difficulty in adapting to high-speed production; second, it has poor environmental adaptability, with strong welding light and reflections easily leading to image quality degradation and affecting positioning accuracy; third, the system integration is insufficient, with delayed closed-loop control response in visual inspection and straightening execution; and fourth, it has poor adaptability to complex deformation of the electrode rod, mainly targeting single offset scenarios with low versatility.

[0004] Therefore, a robot welding clamp electrode rod straightening and positioning strategy based on machine vision is designed to improve positioning accuracy, increase production efficiency, enhance adaptability, and achieve real-time monitoring and feedback. Summary of the Invention

[0005] The purpose of this invention is to provide a closed-loop system for intelligent driving data based on retrieval enhancement, a closed-loop method for intelligent driving data based on retrieval enhancement, an electronic device, a storage medium, and a vehicle platform, thereby solving at least one of a number of technical problems.

[0006] Key technical challenges: improving positioning accuracy; increasing production efficiency; enhancing adaptability; and achieving real-time monitoring and feedback.

[0007] This invention provides the following solution:

[0008] According to a first aspect of the present invention, a machine vision-based method for straightening and positioning a robotic welding clamp electrode rod is provided, comprising:

[0009] Step P1, System Construction:

[0010] Establish a closed-loop straightening and positioning system;

[0011] The closed-loop straightening and positioning system includes an industrial image acquisition module, a vision processing module, a straightening execution module, a data decision module, and a robot control module;

[0012] Among them, to ensure that the welding electrode rod is within the acquisition field of view throughout the entire process, the industrial image acquisition module is deployed at a preset position in the welding station;

[0013] Step P2, coordinate calibration:

[0014] Based on the closed-loop straightening and positioning power-on initialization, the mapping relationship between the image coordinate system of the industrial image acquisition module and the robot base coordinate system is established;

[0015] Among them, the electrode rod coordinates rely on the coordinate system mapping relationship and are expressed by transformation between two coordinate systems;

[0016] Step P3, Image Acquisition and Processing:

[0017] Based on the working conditions after the robot welding gun completes the welding operation, the industrial image acquisition module acquires the image of the electrode rod, and the vision processing module performs preprocessing on the image, including noise reduction, enhancement and contour extraction.

[0018] Step P4, Feature Recognition and Straightening Judgment:

[0019] The vision processing module acquires feature data on the curvature, position, and angle of the electrode rod;

[0020] The data decision module compares the feature data with preset standards to determine whether the electrode rod needs to be straightened.

[0021] Step P5, Straightening parameter adaptation:

[0022] If straightening is required, the data decision module generates adaptive straightening parameters based on the feature data;

[0023] The straightening parameters include the displacement, clamping force, and holding time of the straightening execution module;

[0024] Step P6, Positioning and straightening execution:

[0025] The robot control module adjusts the welding clamp posture so that the electrode rod is aligned with the clamping center of the straightening execution module;

[0026] The straightening execution module acts according to the straightening parameters, applying a straightening force to the electrode rod and maintaining it for the duration specified by the parameters.

[0027] Step P7, closed-loop verification:

[0028] After straightening is completed, the robot drives the electrode rod back to the inspection station and repeats steps P3-P4 to perform secondary feature detection to determine whether it is qualified.

[0029] If it passes the test, return to the welding station;

[0030] If it fails, repeat steps P5-P6 until it meets the standard.

[0031] Furthermore, including:

[0032] The visual processing module performs image preprocessing, including grayscale conversion, histogram equalization enhancement, median filtering for noise reduction, adaptive threshold segmentation, and edge detection.

[0033] Furthermore, including:

[0034] The median filter kernel size is 3×3, and the edge detection uses the Canny operator;

[0035] The optimized feature extraction algorithm is an improved Hough transform algorithm;

[0036] In the improved Hough transform algorithm, the step size of θ is 0.1°, the step size of ρ is 1 pixel, the cumulative voting threshold is dynamically adjusted by the average number of votes × 1.2.

[0037] Furthermore, including:

[0038] After feature extraction, straight line filtering is also included: retaining straight lines with a length ≥ 80% of the actual length of the electrode rod and an angle ≤ 5° with the theoretical axis of the electrode rod, and then obtaining the center line of the electrode rod through a second fitting using the least squares method.

[0039] Furthermore, including:

[0040] The preset standards are: curvature ≤ 0.1mm and axis offset ≤ 0.05mm.

[0041] Furthermore, including:

[0042] Adaptive straightening parameters are generated using an adaptive algorithm, including the following steps:

[0043] Characteristic parameter normalization: normalize the curvature, axis offset, and angular deviation to the [0,1] interval respectively;

[0044] Weight allocation: The weights of each feature parameter are determined using the analytic hierarchy process (AHP).

[0045] Comprehensive evaluation: A comprehensive evaluation index is calculated based on the weighted features;

[0046] Parameter mapping: Straightening parameters are generated based on the comprehensive evaluation index, and the parameters do not exceed the rated range of the straightening execution module.

[0047] According to a second aspect of the present invention, a machine vision-based robotic welding clamp electrode rod straightening and positioning system is provided, comprising:

[0048] Industrial image acquisition module: used to acquire real-time images of the welding clamp electrode rod at a preset position deployed at the welding station;

[0049] The vision processing module is used to preprocess and extract features from the acquired images, and output data on the bending degree, position and angle of the electrode rod.

[0050] Data decision module: used to receive feature data and compare it with preset standards to determine whether straightening is needed. If straightening is needed, it generates adaptive straightening parameters.

[0051] Straightening execution module: includes mounting base plate, linear drive module and clamping assembly, used to perform straightening action on electrode rod according to straightening parameters;

[0052] Robot control module: Used to adjust the welding clamp posture through coordinate mapping relationship, realize the alignment of the electrode rod with the straightening execution module and the switching of work positions.

[0053] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0054] The memory stores a computer program, which, when executed by the processor, causes the processor to perform steps such as the straightening and positioning method for the electrode rod of a robotic welding clamp based on machine vision.

[0055] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, comprising: storing a computer program executable by an electronic device, wherein when the computer program is run on the electronic device, the electronic device causes the electronic device to perform steps such as a machine vision-based robotic welding clamp electrode rod straightening and positioning method.

[0056] According to a fifth aspect of the present invention, a robot hand-eye calibration platform is provided, comprising:

[0057] Electronic equipment for implementing steps such as a machine vision-based robotic welding clamp electrode rod straightening and positioning method;

[0058] The processor runs a program, and when the program runs, it executes steps such as a machine vision-based robotic welding electrode rod straightening and positioning method based on data output from electronic devices.

[0059] Storage medium for storing programs that, when running, perform steps such as a machine vision-based robotic welding clamp electrode rod straightening and positioning method based on data output from an electronic device.

[0060] The above solution achieves the following beneficial technical effects:

[0061] This application utilizes machine vision technology to achieve precise positioning of the straightening device by the robotic welding clamp, avoiding errors caused by manual positioning, improving the accuracy of electrode rod straightening, and thus ensuring welding quality.

[0062] This application automates the straightening of the electrode rod in robotic welding clamps, reducing manual intervention, shortening straightening time, and improving welding production efficiency.

[0063] This application is applicable to straightening devices and robotic welding clamps of different types and specifications, and has strong versatility and adaptability, and can be applied in different welding production scenarios.

[0064] This application monitors the deformation of the electrode rod in real time during the straightening process and adjusts the straightening operation in a timely manner based on feedback information to ensure the best straightening effect and improve the stability and reliability of the production process. Attached Figure Description

[0065] Figure 1 This is a flowchart of a robot welding clamp electrode rod straightening and positioning method based on machine vision, provided by one or more embodiments of the present invention.

[0066] Figure 2 This is a structural diagram of a robot welding clamp electrode rod straightening and positioning system based on machine vision, provided by one or more embodiments of the present invention.

[0067] Figure 3 This is a schematic diagram of a three-dimensional structure for straightening a robot welding clamp electrode rod based on machine vision, provided in a specific embodiment of the present invention.

[0068] Figure 4 This is a schematic diagram of a robot and camera hand-eye calibration according to a specific embodiment of the present invention.

[0069] Figure 5 This is a schematic diagram of a robot welding clamp electrode rod detection method provided in a specific embodiment of the present invention.

[0070] Figure 6 This is a structural block diagram of an electronic device for a machine vision-based robotic welding clamp electrode rod straightening and positioning method provided in one or more embodiments of the present invention. Detailed Implementation

[0071] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0072] Figure 2This is a structural diagram of a robot welding clamp electrode rod straightening and positioning system based on machine vision, provided by one or more embodiments of the present invention.

[0073] like Figure 2 The machine vision-based robotic welding clamp electrode rod straightening and positioning system shown includes:

[0074] Industrial image acquisition module: used to acquire real-time images of the welding clamp electrode rod at a preset position deployed at the welding station;

[0075] The vision processing module is used to preprocess and extract features from the acquired images, and output data on the bending degree, position and angle of the electrode rod.

[0076] Data decision module: Used to receive feature data and compare it with preset standards to determine whether straightening is needed. If straightening is needed, it generates adaptive straightening parameters.

[0077] Straightening execution module: includes a mounting base, a linear drive module and a clamping assembly, used to perform straightening actions on the electrode rod according to the straightening parameters;

[0078] Robot control module: Used to adjust the welding clamp posture through coordinate mapping relationship, realize the alignment of the electrode rod with the straightening execution module and the switching of work positions.

[0079] In this embodiment, the industrial image acquisition module is an industrial CCD camera with a resolution of not less than 1920×1080 and a frame rate of not less than 30fps; the positioning accuracy of the linear drive module is not less than ±0.03mm and the repeatability is not less than ±0.01mm.

[0080] The data decision module communicates with other modules via EtherCAT bus; the clamping component of the clamping assembly is a wear-resistant alloy steel concave semi-circular structure with a tolerance of ±0.02mm to the outer diameter of the electrode rod.

[0081] Specifically, the robot welding electrode rod straightening and positioning system based on machine vision can be defined as a closed-loop straightening and positioning system. It simultaneously positions and straightens, continuously feeding back the correction results, and then repositions until the preset straightening target, including threshold targets, is achieved. The positioning process utilizes visual processing to calibrate the position data to be straightened, the degree of curvature to be straightened, etc., generating data to drive the straightening execution. Under the mechanical force applied by the robotic arm, fixture, servo motor, etc., the deformation is brought closer to the preset standard.

[0082] Figure 1 This is a flowchart of a robot welding clamp electrode rod straightening and positioning method based on machine vision, provided by one or more embodiments of the present invention.

[0083] like Figure 1The machine vision-based robotic welding clamp electrode rod straightening and positioning method shown includes:

[0084] Step P1, System Construction: Build a closed-loop straightening and positioning system;

[0085] The closed-loop straightening and positioning system includes an industrial image acquisition device (industrial image acquisition module), a vision processing unit (vision processing module), a straightening actuator (straightening execution module), a data decision module, and a robot control module;

[0086] Among them, to ensure that the welding electrode rod is within the field of view throughout the entire process, the industrial image acquisition equipment is deployed at a preset position in the welding station;

[0087] Step P2, coordinate calibration:

[0088] Based on closed-loop straightening and positioning power-on initialization, the mapping relationship between the image coordinate system of the industrial image acquisition device and the robot base coordinate system can be established through hand-eye calibration;

[0089] Among them, the electrode rod coordinates rely on the coordinate system mapping relationship and are expressed by transformation between two coordinate systems;

[0090] (For example, based on a unified base coordinate system, a mapping relationship can be established between the robot's base coordinate system and the camera coordinate system. Under this mapping relationship, the robot's end effector coordinate system will be in a common base coordinate system.)

[0091] Step P3, Image Acquisition and Processing:

[0092] Based on the working conditions after the robot welding gun completes the welding operation, the industrial image acquisition equipment acquires the image of the electrode rod, and the vision processing unit performs preprocessing on the image, including noise reduction, enhancement and contour extraction.

[0093] Step P4, Feature Recognition and Straightening Judgment:

[0094] The vision processing unit can use an optimized feature extraction algorithm to obtain feature data on the curvature, position, and angle of the electrode rod;

[0095] The data decision module compares the feature data with preset standards to determine whether the electrode rod needs to be straightened.

[0096] Step P5, Straightening parameter adaptation:

[0097] If straightening is required, the data decision module generates adaptive straightening parameters based on the feature data;

[0098] The straightening parameters include the displacement, clamping force, and holding time of the straightening actuator;

[0099] Step P6, Positioning and straightening execution:

[0100] The robot control module can adjust the welding clamp posture according to the coordinate mapping relationship so that the electrode rod is aligned with the clamping center of the straightening actuator;

[0101] The straightening actuator operates according to the straightening parameters, applying a straightening force to the electrode rod and maintaining the force for the duration specified by the parameters.

[0102] Step P7, closed-loop verification:

[0103] After straightening is completed, the robot drives the electrode rod back to the inspection station and repeats steps P3-P4 to perform secondary feature detection to determine whether it is qualified.

[0104] If it passes the test, return to the welding station;

[0105] If it fails, repeat steps P5-P6 until it meets the standard.

[0106] In one embodiment, the industrial image acquisition device is an industrial CCD camera with a resolution of not less than 1920×1080 and a frame rate of not less than 30fps. The industrial CCD camera is fixed by an adjustable bracket at a height of 1.5-2.0m, with the horizontal angle at 30-45° to the trajectory of the welding clamp to ensure unobstructed acquisition.

[0107] In one embodiment, the visual processing unit is developed based on an open-source computer vision library, and the image preprocessing includes grayscale conversion, histogram equalization enhancement, median filtering for noise reduction, adaptive threshold segmentation, and edge detection steps.

[0108] Preferably, the median filter kernel size is 3×3, and the edge detection uses the Canny operator;

[0109] The optimized feature extraction algorithm is an improved Hough transform algorithm; in the improved Hough transform algorithm, the step size of θ is 0.1°, the step size of ρ is 1 pixel, and the cumulative voting threshold is dynamically adjusted according to "average number of votes × 1.2".

[0110] After feature extraction, straight line filtering is also included: retaining straight lines with a length ≥ 80% of the actual length of the electrode rod and an angle ≤ 5° with the theoretical axis of the electrode rod, and then obtaining the precise center line of the electrode rod through a second fitting using the least squares method.

[0111] In one embodiment, the preset standard can be set as follows: curvature ≤ 0.1 mm and axial offset ≤ 0.05 mm.

[0112] In one embodiment, the adaptive straightening parameters are generated using an adaptive algorithm, including the following steps:

[0113] Characteristic parameter normalization: normalize the curvature, axis offset, and angular deviation to the [0,1] interval respectively;

[0114] Weight allocation: The weights of each feature parameter are determined using the analytic hierarchy process (AHP).

[0115] Comprehensive evaluation: A comprehensive evaluation index is calculated based on the weighted features;

[0116] Parameter mapping: Straightening parameters are generated based on the comprehensive evaluation index, and the parameters do not exceed the rated range of the straightening actuator.

[0117] The normalization formulas are: B_norm = B / 1.0, O_norm = O / 0.2, A_norm = A / 5.0;

[0118] The weights are: curvature 0.5, axis offset 0.3, and angle deviation 0.2.

[0119] The formula for generating the straightening parameters is: displacement L = 20 × S + 0.5 mm, clamping force F = 5 × S + 5 kN, holding time T = 5 × S + 5 s, and L ≤ 50 mm, F ≤ 10 kN, T ≤ 10 s.

[0120] In one embodiment, the straightening actuator includes a mounting base, at least two sets of linear drive modules, and at least two sets of clamping assemblies; the linear drive modules are symmetrically deployed on the mounting base, and the clamping assemblies are slidably connected to the linear drive modules.

[0121] The mounting base plate is made of Q235 steel plate with a thickness of 20-30mm and is fixed to the ground with expansion bolts; the linear drive module is a linear servo module with a positioning accuracy of not less than ±0.03mm and a repeatability of not less than ±0.01mm.

[0122] The clamping components of the clamping assembly have a concave semi-circular structure and are made of wear-resistant alloy steel. The inner diameter of the clamping components is within ±0.02mm of the outer diameter of the electrode rod to be straightened. The clamping components are evenly distributed along the longitudinal direction of the mounting base plate, with an adjacent spacing of 50-80mm, and the axes of all clamping components are coplanar.

[0123] The data decision module communicates with the robot control module and the straightening actuator via an industrial bus, which is an EtherCAT bus.

[0124] Specifically, one embodiment discloses a machine vision-based method for straightening and positioning a robotic welding electrode rod, comprising the following steps:

[0125] T1. System initialization: The machine vision module, straightening device, data monitoring platform and robot control system are powered on synchronously, the vision camera completes self-calibration, and the straightening device is reset to the initial state.

[0126] T2. Hand-eye calibration: Solve the transformation matrix between the camera coordinate system and the robot base coordinate system, establish the calibration equation AX=XB and solve to obtain the transformation matrix X, so as to achieve accurate transformation from camera coordinates to robot motion coordinates; T3. Visual inspection and feature extraction: The robot welding gun moves to the inspection station, the camera acquires the electrode rod image, and the preprocessing is completed by grayscale conversion, contrast enhancement, noise reduction, threshold segmentation and edge detection;

[0127] An improved Hough linear transform algorithm was used to extract the bending degree, axis offset, angle parameters, and X / Y / Z axis coordinates of the electrode rod.

[0128] T4. Adaptive Straightening Decision: Normalize the curvature, axis offset, and angle deviation, assign weights using the Analytic Hierarchy Process (AHP), and calculate the comprehensive evaluation index S; based on the nonlinear mapping relationship between S and the straightening parameters, generate the linear motion mechanism's travel distance, clamping force, and straightening holding time.

[0129] T5. Collaborative Positioning and Straightening: The data monitoring platform sends positioning and straightening commands through the Ether CAT bus. The robot control system adjusts the welding clamp posture, the straightening device drives the clamping mechanism to align with the electrode rod axis, and the robot sends the electrode rod into the clamping position.

[0130] T6. Clamping, straightening and effect review: The straightening device clamps the electrode rod according to preset parameters to complete the straightening;

[0131] After straightening is completed, the camera will collect images for re-inspection. If the images are qualified, the machine will return to the welding station; otherwise, the straightening process will be repeated.

[0132] The optimization strategy for the improved Hough linear transform algorithm in step T3 is as follows:

[0133] Set the θ step size to 0.1° and the ρ step size to 1 pixel; introduce an adaptive voting threshold, threshold = average number of votes × 1.2; perform length filtering (retaining length ≥ 80% of the actual length of the electrode rod) and angle filtering (retaining the angle with the theoretical axis ≤ 5°) on the fitted straight line, and obtain the accurate center line through quadratic fitting using the least squares method.

[0134] The image preprocessing in step T3 specifically includes: converting RGB images to single-channel grayscale images, histogram equalization to enhance contrast, 3×3 median filtering for noise reduction, adaptive threshold segmentation, and Canny operator edge detection.

[0135] The normalization formula in step T4 is: B_norm=B / 1.0, O_norm=O / 0.2, A_norm=A / 5.0;

[0136] Where B is curvature, O is axis offset, and A is angle deviation; the weighting is: curvature 0.5, axis offset 0.3, angle deviation 0.2, and the comprehensive evaluation index S = 0.5 × B_norm + 0.3 × O_norm + 0.2 × A_norm.

[0137] The nonlinear mapping relationship in step T4 is: the linear motion mechanism moves a distance L = 20 × S + 0.5 (mm);

[0138] The clamping force of the bidirectional hydraulic cylinder is F = 5 × S + 5 (kN); the straightening holding time is T = 5 × S + 5 (s); and the parameters are subject to boundary constraints: L ≤ 50 mm, F ≤ 10 kN, T ≤ 10 s.

[0139] The characteristic parameters in step T3 are calculated as follows: curvature = ∫√(1+k²)dx − theoretical length; axis offset = average Euclidean distance between the two ends of the center line and the standard axis; angle θ = arctan(k), where k is the slope of the center line straight line equation.

[0140] The straightening qualification criteria in step T6 are: curvature ≤ 0.1 mm and axial offset ≤ 0.05 mm.

[0141] The vision camera is an industrial CCD camera with a resolution of ≥1920×1080 and a frame rate of ≥30fps; the installation height is 1.5-2.0m, and the horizontal angle between the camera and the welding clamp movement trajectory is 30-45°.

[0142] The method in this embodiment operates on a machine vision-based robotic welding clamp electrode rod straightening and positioning system, including:

[0143] The machine vision module is equipped with an industrial CCD camera and a vision inspection unit for image acquisition, preprocessing, and electrode rod feature extraction.

[0144] The straightening device consists of a mounting plate, a linear movement mechanism, and a clamping mechanism. The linear movement mechanism uses a linear servo module for clamping and straightening the electrode rod.

[0145] The data monitoring platform is used for feature data parsing, straightening decision calculation, instruction issuance, and effect monitoring.

[0146] The robot control system communicates with the data monitoring platform via EtherCAT bus to control the posture and movement of the robot welding gun.

[0147] The linear motion mechanism has a servo motor with a rated power of ≥400W, a ball screw lead of 10mm, a positioning accuracy of ±0.03mm, and a repeatability of ±0.01mm; the clamping mechanism has a clamping force range of 5-10kN and a straightening holding time of 5-10s; each module works together to execute the straightening and positioning method of this embodiment.

[0148] It is worth noting that although this system / device only discloses the above-mentioned modules / units, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It cannot be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.

[0149] In one specific embodiment, a machine vision-based robotic welding electrode rod straightening and positioning system is disclosed, including a machine vision module, a straightening device, a data monitoring platform, and a robot control system. These modules work collaboratively to achieve the detection, positioning, and straightening of the electrode rod. This includes:

[0150] Machine vision module:

[0151] ① Vision Hardware: An industrial CCD camera with a resolution of no less than 1920×1080 and a frame rate of no less than 30fps is selected to ensure the clarity and real-time performance of image acquisition. The camera is fixed to the welding robot's workstation via an adjustable bracket at a height of 1.5-2.0m, with the horizontal angle at 30-45° to the welding clamp's movement trajectory, ensuring that the welding clamp electrode rod is always within the camera's field of view without obstruction during the welding process.

[0152] ② Visual Inspection System: Developed based on the OpenCV open-source computer vision library, it includes an image preprocessing unit, a feature extraction unit, and a data transmission unit. The image preprocessing unit performs grayscale conversion, enhancement, noise reduction, threshold segmentation, and edge detection on the color images acquired by the camera, removing interference factors such as ambient light and welding fumes to obtain a clear outline image of the electrode rod. The feature extraction unit uses Hough transform technology to extract the shape parameters (bending degree, radius of curvature), position parameters (X / Y / Z axis coordinates), and angle parameters (angle with the horizontal plane) of the electrode rod from the outline image, and transmits the extracted feature data to the data monitoring platform via EtherCAT bus.

[0153] Straightening device:

[0154] Overall Structure: Composed of a mounting plate, two sets of linear motion mechanisms, and two sets of clamping mechanisms. The mounting plate is made of Q235 steel plate with a thickness of 20-30mm and is fixed to the ground foundation next to the welding station with expansion bolts to ensure the stability of the device. The two sets of linear motion mechanisms are symmetrically installed on both sides of the top of the mounting plate, and the two sets of clamping mechanisms are fixedly connected to the slides of the linear motion mechanisms, allowing them to move synchronously laterally along the mounting plate. The mounting plate (Q235 steel plate) serves as the base and the fixed foundation for the entire device. The functions of each component are as follows: The left and right sets of linear motion mechanisms (servo modules) drive the clamping mechanisms to precisely move laterally; the clamping mechanisms (clamping rollers) have concave semi-circular clamping surfaces that precisely match the outer diameter of the electrode rod; the welding electrode rod (bent and to be straightened) extends along the axis into the clamping center to complete the straightening; the machine vision CCD camera (detection and positioning) acquires images in real time and positions the electrode rod. See details. Figure 3 .

[0155] In another specific embodiment, a specific implementation method operating on the above-mentioned machine vision-based robotic welding clamp electrode rod straightening and positioning system is disclosed (e.g.) Figure 5 (as shown)

[0156] S1. System Initialization: When the robot welding production line is started, the machine vision module, straightening device, data monitoring platform and robot control system are simultaneously powered on and initialized; the vision camera performs self-calibration to eliminate the influence of installation errors; the linear movement mechanism of the straightening device is reset to the initial position (the clamping mechanism is in the maximum open state), and the hydraulic rod of the bidirectional hydraulic cylinder is retracted to the shortest stroke.

[0157] S2, Hand-eye alignment (e.g.) Figure 4 (as shown)

[0158] When the electrode rod under test moves to the detection position, a point P0 in the camera coordinate system can be transformed to point P1 in the camera coordinate system based on the known camera extrinsic parameters (transformation matrix T1). Then, based on the hand-eye calibration matrix to be determined (transformation matrix X), it can be transformed to point P2 in the end effector coordinate system of the robot arm. Finally, based on the known robot's own parameters (transformation matrix T3), it can be transformed to point P3 in the base coordinate system of the robot arm. Therefore, the following relationship can be obtained:

[0159] (1)

[0160] When the robotic arm is moved, for the same point, the coordinate values ​​of P0 and P3 remain unchanged, only the coordinate values ​​of P1 and P2 change. The above relationship becomes as follows:

[0161] (2)

[0162] In the formula, and are also known parameters from the second measurement. Combining equations (1) and (2), we can obtain the following relationship:

[0163] (3)

[0164] Transforming equation (3), we get:

[0165] (4)

[0166] Equation (4) can be viewed as an equation in the form of AX=XB, and the matrices “A=" and “B=" are known. Solving the calibration equation AX=XB yields the transformation matrix X.

[0167] Using the aforementioned transformation matrix X, the coordinates of each point on the electrode rod under test are converted into the movement coordinates of the robotic arm. This enables the robotic arm to move the vision unit above the electrode rod, and the solder joint is adjusted to the center of the vision unit's field of view using alignment technology, so that a clear image can be formed on the vision unit's image acquisition card.

[0168] Algorithm selection:

[0169] After completing a welding operation, the robotic welding gun moves to a preset inspection station; the vision camera acquires real-time images of the electrode rod at a preset frame rate and transmits them to the vision inspection system; the image preprocessing unit performs grayscale conversion (converting RGB images to single-channel grayscale images), contrast enhancement (using histogram equalization algorithm), noise reduction (using median filtering algorithm with a filter kernel size of 3×3), threshold segmentation (using adaptive threshold algorithm to determine the segmentation threshold), and edge detection (using Canny operator to extract contours) to obtain a clear electrode rod contour image.

[0170] The feature extraction unit employs the Hough linear transform algorithm. The traditional Hough transform uses a (ρ, θ) parameter space (ρ is the distance from the origin to the line, and θ is the angle between the line and the x-axis). This algorithm optimizes the step size of θ to 0.1° and the step size of ρ to 1 pixel, thereby improving parameter resolution. At the same time, an adaptive threshold mechanism is introduced, and the cumulative voting threshold is dynamically adjusted according to the image noise intensity (threshold = average number of votes × 1.2) to avoid missed or false detections. The improved Hough linear transform algorithm fits the centerline of the electrode rod from the contour image, calculates the curvature of the centerline (curvature = actual centerline length - theoretical straight line length), radius of curvature, and angle with the horizontal plane; simultaneously, it calculates the X / Y / Z axis coordinates of the electrode rod end through the calibration relationship between image pixels and actual dimensions (calibration coefficient = actual distance / pixel distance); after receiving the above feature data, the data monitoring platform compares it with preset standard parameters: if the curvature is ≤0.1mm and the axis offset is ≤0.05mm, it is determined that the electrode rod does not need to be straightened, and the robot welding gun returns to the welding station to continue the operation; if the curvature is >0.1mm or the axis offset is >0.05mm, it is determined that the electrode rod needs to be straightened, and proceeds to the next step.

[0171] Line Fitting and Screening: For peak points in the parameter space that exceed the threshold, restore them to the linear equation y=kx+b in the image space; eliminate interfering lines by length screening (retaining lines whose length is ≥ 80% of the actual length of the electrode rod) and angle screening (retaining lines whose angle with the theoretical axis of the electrode rod is ≤ 5°); use the least squares method to perform a second fitting on the screened lines to obtain the accurate center line of the electrode rod.

[0172] Feature parameter calculation: Based on the straight line equation of the center line, calculate the curvature of the electrode rod (curvature = ∫√(1+k²)dx - theoretical length, the integration interval is the pixel range of the electrode rod image), the axis offset (mean Euclidean distance between the two ends of the center line and the standard axis) and the angle with the horizontal plane (θ = arctan(k)).

[0173] S3. Straightening Decision Generation: Adaptive Straightening Parameter Generation Algorithm Based on Feature Parameters

[0174] Characteristic parameter normalization: The curvature (B: 0-1mm), axis offset (O: 0-0.2mm), and angular deviation (A: 0-5°) are normalized to the [0,1] interval, using the following formula:

[0175] B_norm=B / 1.0,O_norm=O / 0.2,A_norm=A / 5.0 (5)

[0176] Weighting and Calculation of Comprehensive Evaluation Index: The Analytic Hierarchy Process (AHP) is used to determine the weights of each parameter: curvature weight 0.5, axis offset weight 0.3, and angle deviation weight 0.2; the comprehensive evaluation index is then calculated.

[0177] S=0.5×B_norm+0.3×O_norm+0.2×A_norm (6)

[0178] Straightening parameter mapping: Establish a nonlinear mapping relationship between S and the straightening parameters, which is obtained by fitting experimental data;

[0179] Linear moving mechanism travel distance:

[0180] L=20×S+0.5 (unit: mm, suitable electrode rod diameter 5-20mm) (7)

[0181] Two-way hydraulic cylinder clamping force:

[0182] F = 5 × S + 5 (Unit: kN, clamping force range 5-10kN) (8)

[0183] Straightening retention time:

[0184] T = 5 × S + 5 (unit: s, holding time range 5-10 s) (9)

[0185] Boundary constraint correction: Boundary constraints are applied to the mapped parameters to ensure that L≤50mm, F≤10kN, and T≤10s, so as to avoid exceeding the rated parameters of the equipment.

[0186] S4. Straightening Parameter Command Generation: Based on the extracted electrode rod position parameters (X / Y / Z axis coordinates) and angle parameters (angle with the horizontal plane), combined with the installation position of the straightening device, the data monitoring platform generates the movement command (movement distance of the linear movement mechanism) and the motion trajectory parameters of the robot welding clamp; simultaneously, based on the curvature of the electrode rod, it generates the hydraulic rod extension length parameter of the bidirectional hydraulic cylinder (the greater the curvature, the longer the extension length, and the greater the clamping force); the above positioning parameters are synchronously sent to the robot control system and the straightening device driver via the EtherCAT bus.

[0187] S5. Electrode rod delivered to designated position: After receiving the positioning parameters, the robot control system controls the robot welding clamp to move along the preset trajectory and adjusts the welding clamp posture to align the electrode rod axis with the clamping center of the clamping roller; at the same time, the straightening device driver receives the movement command and drives the servo motor of the linear movement mechanism to run, driving the clamping mechanism to move laterally along the guide rail until the clamping center of the clamping roller coincides with the electrode rod axis; the robot welding clamp continues to move, slowly extending the electrode rod between the two sets of clamping rollers until the end of the electrode rod reaches the preset limit position.

[0188] S6. Straightening Action Execution: After the electrode rod is in place, the straightening device driver issues a clamping command, and the hydraulic rod of the bidirectional hydraulic cylinder extends synchronously, driving the clamping roller to move towards the electrode rod until the concave semi-circular surface of the clamping roller is in close contact with the electrode rod; multiple sets of clamping rollers apply clamping force synchronously along the longitudinal direction of the electrode rod (the clamping force range is 5-10kN, which is adaptively adjusted according to the curvature), and the clamping force restores the bent electrode rod to a straight state; during the straightening process, the displacement sensor provides real-time feedback on the extension length of the hydraulic rod, and the data monitoring platform monitors in real-time whether the clamping force reaches the preset value to ensure the straightening effect.

[0189] S7. Straightening Result Inspection: After the straightening operation is completed (holding position for 5-10 seconds), the hydraulic rod of the bidirectional hydraulic cylinder retracts, and the clamping mechanism releases the electrode rod; the robot welding gun moves the electrode rod to the inspection station, and the vision camera collects the image of the electrode rod again. Repeat steps S2-S3 to verify the straightening effect: if the curvature is ≤0.1mm and the axis offset is ≤0.05mm, the straightening is deemed qualified, and the robot welding gun returns to the welding station to continue the operation; if the standard is not met, repeat steps S4-S6 until the straightening is qualified; the linear movement mechanism of the straightening device resets to the initial position, waiting for the next straightening operation.

[0190] The improvement in this embodiment involves the Hough transform, as shown in Table 1. The improved Hough transform significantly improves accuracy compared to the traditional Hough transform.

[0191] The improvement in this embodiment also involves a straightening generation algorithm. As shown in Table 2, the straightening results (success rate and adaptability) under the adaptive straightening generation algorithm are significantly better than those of the traditional algorithm.

[0192] Table 1. Results of Core Experiments

[0193] Types of deformation Mean of fitting error Maximum error Curvature calculation error Axis offset error Traditional Hough Transform ±0.058mm ±0.12mm ±0.035mm ±0.022mm Improved Hough Transform ±0.017mm ≤±0.03mm ±0.009mm ±0.006mm

[0194] Table 2. Results of Straightening and Positioning Tests

[0195] Types of Deformation Straightening and positioning one-time alignment success rate Adaptability Traditional Algorithm 59.6% ≤58.5% Adaptive straightening generation algorithm 99.5% ≥98.5%

[0196] Figure 6 This is a structural block diagram of an electronic device for a machine vision-based robotic welding clamp electrode rod straightening and positioning method provided in one or more embodiments of the present invention.

[0197] like Figure 6 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0198] The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of a machine vision-based robotic welding electrode rod straightening and positioning method.

[0199] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a machine vision-based robotic welding clamp electrode rod straightening and positioning method.

[0200] This application also provides a robot hand-eye calibration platform, including:

[0201] Electronic equipment for implementing the steps of a machine vision-based robotic welding clamp electrode rod straightening and positioning method;

[0202] The processor runs a program that, when running, executes the steps of a machine vision-based robotic welding electrode rod straightening and positioning method based on data output from electronic devices.

[0203] Storage medium for storing a program that, when running, executes the steps of a machine vision-based robotic welding clamp electrode rod straightening and positioning method based on data output from an electronic device.

[0204] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0205] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.

[0206] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.

[0207] Electronic devices can also obtain reset commands corresponding to the storage media. The reset commands corresponding to the storage media are provided by the supplier. The reset commands corresponding to different storage media can be the same or different, and no restrictions are imposed here.

[0208] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.

[0209] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0210] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0211] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0212] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A robot welding torch electrode stick straightening positioning method based on machine vision, characterized by, The machine vision-based robotic welding electrode rod straightening and positioning method includes: Step P1, System Construction: Build a closed-loop straightening and positioning system; Step P2, coordinate calibration: Based on the closed-loop straightening and positioning power-on initialization, establish the mapping relationship between the image coordinate system and the robot base coordinate system; Step P3, Image Acquisition and Processing: Acquire images of the electrode rods and perform preprocessing such as noise reduction, enhancement, and contour extraction on the images; Step P4, Feature Recognition and Straightening Judgment: Obtain feature data on the curvature, position, and angle of the electrode rod; compare the feature data with preset standards to determine whether the electrode rod needs straightening; Step P5, straightening parameter adaptation: If straightening is required, then generate adaptive straightening parameters based on the feature data; Step P6, Positioning and Straightening Execution: Based on the straightening parameters, apply straightening force to the electrode rod and maintain it for the duration specified by the parameters; Step P7, closed-loop verification: Repeat steps P3-P4 to perform secondary feature detection to determine whether it is qualified; If it passes the test, return to the welding station; If it fails, repeat steps P5-P6 until it meets the standard.

2. The machine vision-based robot welding gun electrode stick straightening positioning method of claim 1, wherein, include: The image preprocessing in the visual processing module includes grayscale conversion, histogram equalization enhancement, median filtering for noise reduction, adaptive threshold segmentation, and edge detection steps.

3. The method for straightening and positioning the electrode rod of a robot welding clamp based on machine vision according to claim 2, characterized in that, include: The median filter kernel size is 3×3, and the edge detection uses the Canny operator; The optimized feature extraction algorithm is an improved Hough transform algorithm; In the improved Hough transform algorithm, the step size of θ is 0.1°, the step size of ρ is 1 pixel, the cumulative voting threshold is dynamically adjusted by the average number of votes × 1.

2.

4. The method for straightening and positioning the electrode rod of a robot welding clamp based on machine vision according to claim 3, characterized in that, include: After feature extraction, straight line filtering is also included: retaining straight lines with a length ≥ 80% of the actual length of the electrode rod and an angle ≤ 5° with the theoretical axis of the electrode rod, and then obtaining the center line of the electrode rod through a second fitting using the least squares method.

5. The robot welding clamp electrode rod straightening and positioning method based on machine vision according to claim 4, characterized in that, include: The preset standards are: curvature ≤ 0.1 mm and axial offset ≤ 0.05 mm.

6. The method for straightening and positioning the electrode rod of a robot welding clamp based on machine vision according to claim 5, characterized in that, include: The adaptive straightening parameters are generated using an adaptive algorithm. Includes the following steps: Characteristic parameter normalization: normalize the curvature, axis offset, and angular deviation to the [0,1] interval respectively; Weight allocation: The weights of each feature parameter are determined using the analytic hierarchy process (AHP). Comprehensive evaluation: A comprehensive evaluation index is calculated based on the weighted features; Parameter mapping: Straightening parameters are generated based on the comprehensive evaluation index, and the parameters do not exceed the rated range of the straightening execution module.

7. A robot welding clamp electrode rod straightening and positioning system based on machine vision, characterized in that, include: Industrial image acquisition module: used to acquire real-time images of the welding clamp electrode rod at a preset position deployed at the welding station; The vision processing module is used to preprocess and extract features from the acquired images, and output data on the bending degree, position and angle of the electrode rod. Data decision module: Used to receive feature data and compare it with preset standards to determine whether straightening is needed. If straightening is needed, it generates adaptive straightening parameters. Straightening execution module: includes a mounting base, a linear drive module and a clamping assembly, used to perform straightening actions on the electrode rod according to the straightening parameters; Robot control module: Used to adjust the welding clamp posture through coordinate mapping relationship, realize the alignment of the electrode rod with the straightening execution module and the switching of work positions.

8. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by a processor, causes the processor to perform the steps of the machine vision-based robotic welding clamp electrode rod straightening and positioning method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, include: The device stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the machine vision-based robotic welding clamp electrode rod straightening and positioning method as described in any one of claims 1 to 6.

10. A robot hand-eye calibration platform, characterized in that, include: An electronic device for implementing the steps of the machine vision-based robot welding clamp electrode rod straightening and positioning method as described in any one of claims 1 to 6; The processor runs a program that, when the program is running, executes the steps of the machine vision-based robotic welding clamp electrode rod straightening and positioning method as described in any one of claims 1 to 6 from data output by the electronic device. A storage medium for storing a program that, when running, performs the steps of the machine vision-based robotic welding clamp electrode rod straightening and positioning method as described in any one of claims 1 to 6 on data output from an electronic device.