A visual guidance signal synchronization device and control method for a welding robot
Patent Information
- Application Number
- CN202610885579.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-09-08
AI Technical Summary
[0009]本发明目的是提供一种用于焊接机器人的视觉引导信号同步设备及控制方法,以解决现有技术中因PC软件中转导致触发延迟大、位姿与图像同步精度差、数据对齐复杂的技术问题
[0063] 1. This invention moves the trigger judgment and signal output from PC software to dedicated hardware, reducing the trigger latency from tens of milliseconds in traditional solutions to the microsecond (μs) level, significantly improving the synchronization accuracy between position and image. For the known "forward scanning-backward welding" process, this device can significantly reduce the position error during the scanning phase and improve the trajectory reproduction accuracy during backward welding.
Smart Images

Figure CN122718445A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of industrial robots and machine vision, specifically a visual guidance signal synchronization device and control method for welding robots. Background Technology
[0002] In the field of robotic automated welding, acquiring weld seam trajectories by installing 3D cameras at the end effector of a robot and then using algorithms to achieve teach-free welding has become an important means of intelligent welding. Currently, the industry has widely adopted a "forward scanning, backward welding" process, where the robot moves forward at a low speed, the 3D camera collects weld seam contour data as it moves, obtaining the weld seam trajectory, and then the robot reverses along the same path, with the welding torch igniting and welding along the scanned trajectory. This process effectively avoids the stringent real-time requirements of simultaneous scanning and welding, while also simplifying path planning.
[0003] In the above process, in order to achieve accurate trajectory reproduction, the scanning stage must accurately record the robot pose corresponding to each acquisition point. Traditional solutions typically employ the following architecture: a PC triggers a 3D camera to take pictures via software, while simultaneously reading the pose data from the robot controller via Socket communication or an industrial bus, and then aligning it using software timestamps to generate a weld seam data file.
[0004] However, this traditional architecture has the following technical drawbacks:
[0005] 1. Large trigger delay and poor synchronization: From the time the robot reaches the target position to the time the PC software issues the photo-taking command and then transmits the data to the camera via the network, the entire process involves operating system scheduling and protocol stack processing, with delays typically reaching tens of milliseconds. During this period, the robot is still moving, resulting in a serious mismatch between the "acquired image" and the "actual robot pose," which reduces the accuracy of trajectory reproduction during backward welding.
[0006] 2. Data alignment is complex and error-prone: Pose data and image data are acquired in time-division multiplexing. The PC requires complex software matching algorithms (such as timestamp interpolation) to establish the correspondence. In high-speed or variable-speed scanning scenarios, the matching error rate increases significantly.
[0007] 3. Low data processing efficiency: The PC needs to perform multiple tasks simultaneously, such as image reception, pose reading, data alignment, and file generation. The processing flow is serialized, which can easily lead to data congestion and affect the scanning cycle.
[0008] Therefore, there is an urgent need for a signal synchronization device that can replace PC relay and achieve microsecond-level hardware synchronous acquisition, so as to improve the data foundation quality of the existing "forward scanning-backward welding" process and "local coordinate system calibration-free planning" method. Summary of the Invention
[0009] The purpose of this invention is to provide a vision guidance signal synchronization device and control method for welding robots, solving the technical problems of large trigger delays, poor pose and image synchronization accuracy, and complex data alignment caused by PC software relay in existing technologies. This invention is particularly applicable to, but not limited to, "forward scanning, backward welding" process flows and "local coordinate system calibration-free planning" methods, providing them with high-precision synchronization data support.
[0010] The technical solution adopted by the present invention to achieve the above objectives is: a vision guidance signal synchronization device for welding robots, comprising:
[0011] The industrial bus interface unit is used to passively connect to the industrial robot bus system to obtain real-time pose data broadcast or sent by the robot controller.
[0012] The camera trigger interface unit is used to connect to the hardware trigger input terminal of the 3D camera and output PWM or TTL level signals to control the camera exposure.
[0013] The trigger condition judgment unit is used to compare the current robot pose received from the industrial bus interface unit with the trigger conditions in real time based on the configurable trigger mode; the trigger modes include: equal-space displacement trigger, spatial region trigger, and joint angle threshold trigger.
[0014] The pose latching unit is used to immediately latch the robot pose data received at the current moment when the trigger condition judgment unit determines that the condition is met.
[0015] The timestamp unit is used to generate timestamps for the pose reception time and the trigger signal output time, respectively.
[0016] The data streaming processing and XML generation unit is used to assemble the latched pose data, timestamp information and the corresponding image storage reference address into XML fragments in real time, and append them to the storage medium in the order of acquisition; at the same time, a ping-pong caching mechanism is adopted, setting up two data buffers to alternately perform XML fragment assembly and writing operations to prevent data loss.
[0017] The data output interface is used to provide the final generated complete XML file and image files to an external PC for the weld processing program running on it to read and use.
[0018] The triggering condition judgment unit supports an equal-interval displacement triggering mode, specifically:
[0019] The robot end effector calculates the cumulative distance it has moved from the previous trigger point in real time, and immediately outputs a trigger signal when the cumulative distance reaches a preset threshold ΔD.
[0020] The cumulative distance is calculated as follows:
[0021] set up Let be the Euclidean distance, where For the current pose, To store the previous latched pose, the accumulator is... The accumulator is updated by adding the displacement increment Δ to the current value. ,when Output trigger signal and Clear to zero, and at the same time Updated to ;
[0022] The preset threshold .
[0023] The industrial bus interface unit can be implemented in one of the following two ways:
[0024] Method 1: The industrial bus interface unit is configured as a passive listening node for the EtherCAT bus, i.e.:
[0025] The FPGA unit of the synchronization device is directly connected to the EtherCAT bus via an Ethernet PHY chip, and is connected in parallel with the robot controller and servo driver. The FPGA unit receives all EtherCAT data frames on the bus in real time, and when it detects a data frame containing the robot pose, it parses the end effector pose data from it. Simultaneously, the received timestamp is recorded; the FPGA unit does not send any data frames to the bus.
[0026] Method 2: The industrial bus interface unit is configured as a standard slave device on the EtherCAT bus; that is:
[0027] The synchronization device provides a slave description file for importing into the robot master station setup software. The setup software automatically identifies the synchronization device, adds it to the EtherCAT bus topology, and sets up PDO mapping to map the end effector pose data output by the robot controller to the receiving address of the synchronization device. After powering on, the synchronization device establishes periodic communication with the master station, with a communication period of 1ms to 4ms, and receives robot pose data forwarded by the master station in real time.
[0028] It also includes a delay compensation calculation unit: used to record the fixed delay time from the output of the trigger signal to the return signal from the 3D camera indicating completion of acquisition. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows:
[0029]
[0030] in, Let the velocity vector of the robot's end effector be... , The time interval between the two latches.
[0031] The synchronization device further includes: a field-programmable gate array and an ARM processor;
[0032] The field-programmable gate array is used to implement the displacement accumulation function, pose latch unit, timestamp unit and data buffer FIFO in the industrial bus interface unit and trigger condition judgment unit;
[0033] The ARM processor is used to run the operating system, read data from the data cache FIFO, and perform extensible markup language file assembly, file writing, and network services.
[0034] The storage medium of the synchronization device is an eMMC card or an SD card;
[0035] The data output interface is a gigabit Ethernet interface and supports NFS or SMB network sharing protocols.
[0036] A control method for a vision guidance signal synchronization device for a welding robot includes the following steps:
[0037] Step S1: Set the 3D camera trigger mode, set the equal-interval displacement threshold and image storage location in the synchronization device, and set the synchronization device connection IP and image location in the PC;
[0038] Step S2: The synchronization device passively acquires the real-time pose data stream broadcast or sent by the robot controller;
[0039] Step S3: The trigger condition judgment unit compares the current pose with the trigger condition according to the preset trigger mode. When the trigger condition is met, it immediately outputs a trigger signal to the 3D camera, and at the same time latches the current pose and records the trigger timestamp.
[0040] Step S4: Receive the acquisition completion signal and image metadata returned by the 3D camera, wherein the metadata includes the image storage path and the acquisition completion time;
[0041] Step S5: Assemble the latched pose, trigger timestamp, image completion timestamp, and image path into an XML fragment and append it to the target XML file;
[0042] Step S6: The external PC reads the XML file to obtain the synchronized pose-image data pair, and reads the image file in the synchronization device through NFS; the PC processes the image point cloud to obtain the weld position, and guides the welding robot to weld from back to front.
[0043] In step S2, the specific implementation method for passively acquiring pose data is as follows:
[0044] The bus monitoring method is adopted: the FPGA unit of the synchronization device is connected in parallel to the EtherCAT bus through the Ethernet PHY chip, receives all EtherCAT data frames on the bus in real time, parses the end pose data (X,Y,Z,Rx,Ry,Rz) from them and records the receiving timestamp, without sending any data to the bus; the FPGA internally maintains a displacement accumulator, and each time a new pose is received, it calculates the displacement increment between the previous latched pose and the new pose and adds it to the accumulator.
[0045] Alternatively, the EtherCAT slave mode can be used: the synchronous device provides a slave description file, which is imported into the robot master station setting tool. The synchronous device is then added to the EtherCAT bus topology and PDO mapping is set. After the synchronous device is powered on, it establishes periodic communication with the master station. The communication period is 1ms to 4ms. It receives robot pose data forwarded by the master station in real time and obtains end-effector pose data through PDO mapping.
[0046] The equidistant displacement triggering mode in step S3 specifically includes the following sub-steps:
[0047] Initialization: Set the spacing threshold ,accumulator Last latched pose = Current pose;
[0048] Each time a new pose is received When calculating the displacement increment accumulator The accumulator is updated by adding the displacement increment Δ to the current value. ;
[0049] if If the trigger is executed immediately, a trigger signal is output to the 3D camera, and the latch is activated. As the pose corresponding to this trigger, Updated to and will Clear to zero; otherwise, wait for the next pose.
[0050] Step S5 further includes a delay compensation step, specifically:
[0051] Record the fixed delay time from the output of the trigger signal to the return signal from the 3D camera indicating completion of acquisition. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows:
[0052]
[0053] in, Let the velocity vector of the robot's end effector be... , The time interval between two latches;
[0054] The compensated pose is written into an XML fragment; the spacing threshold .
[0055] Step S6 specifically includes:
[0056] From the obtained synchronized pose-image data pairs, extract continuous pose sequences. , , …, and the corresponding image sequence;
[0057] Calculate the relative motion transformation matrix between adjacent frames:
[0058]
[0059] in, For the robot's kinematic transformation function;
[0060] The relative motion transformation matrix is input into a calibration-free path planning method in a local coordinate system to reconstruct the three-dimensional trajectory of the weld in the camera coordinate system.
[0061] The welding robot is guided to perform welding based on the reconstructed three-dimensional trajectory of the weld.
[0062] The present invention has the following beneficial effects and advantages:
[0063] 1. This invention moves the trigger judgment and signal output from PC software to dedicated hardware, reducing the trigger latency from tens of milliseconds in traditional solutions to the microsecond (μs) level, significantly improving the synchronization accuracy between position and image. For the known "forward scanning-backward welding" process, this device can significantly reduce the position error during the scanning phase and improve the trajectory reproduction accuracy during backward welding.
[0064] 2. This invention ensures that each frame of image naturally corresponds to the robot's pose by using hardware latching and timestamps, eliminating the need for software matching or interpolation on the PC and simplifying system complexity.
[0065] 3. The device of this invention completes data alignment, timestamp marking, and XML file streaming generation internally. The PC only needs to read the synchronized XML file, freeing up the PC's computing power for more advanced image processing or trajectory planning.
[0066] 4. Existing "local coordinate system calibration-free planning" methods heavily rely on precise relative displacement information between adjacent frames. The hardware-level synchronization data (latched pose sequence) provided by this invention can directly calculate high-precision robot relative motion transformations, thereby improving the accuracy and stability of calibration-free reconstruction.
[0067] 5. This invention supports two pose acquisition methods: a bus monitoring method for plug-and-play, zero-intrusion deployment; and an EtherCAT slave method for standardized integration and low development threshold. Users can choose the appropriate method according to their actual engineering needs. Attached Figure Description
[0068] Figure 1 The connection topology diagram of the synchronization device of the present invention with the robot, 3D camera and PC;
[0069] Figure 2 Schematic diagram of the internal functional module structure of the synchronization device of the present invention;
[0070] Figure 3 Flowchart of the signal synchronization control method of the present invention;
[0071] Figure 4 A schematic diagram of the synchronization device of this invention that only listens to the EtherCAT bus connection;
[0072] Figure 5 The present invention provides a schematic diagram of the synchronization device being connected as a slave station on the EtherCAT bus. Detailed Implementation
[0073] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. In this embodiment, the known "forward scanning-backward welding" process is used as an application scenario to illustrate how the synchronization device of this invention improves the data synchronization performance of this process. However, it should be understood that the application of this invention is not limited to this process.
[0074] like Figure 2 The diagram shown is a schematic of the internal functional module structure of the synchronization device of the present invention. The present invention provides a vision guidance signal synchronization device for welding robots, comprising:
[0075] The industrial bus interface unit is used to passively connect to the industrial robot bus system to obtain real-time pose data broadcast or sent by the robot controller.
[0076] The camera trigger interface unit is used to connect to the hardware trigger input terminal of the 3D camera and output PWM or TTL level signals to control the camera exposure.
[0077] The trigger condition judgment unit is used to compare the current robot pose received from the industrial bus interface unit with the trigger condition in real time based on the configurable trigger mode.
[0078] Triggering modes include: equal-space displacement triggering, spatial region triggering, and joint angle threshold triggering.
[0079] The trigger condition judgment unit supports an equal-interval displacement trigger mode, specifically:
[0080] The robot end effector calculates the cumulative distance it has moved from the previous trigger point in real time, and immediately outputs a trigger signal when the cumulative distance reaches a preset threshold ΔD.
[0081] The cumulative distance is calculated as follows:
[0082] set up Let be the Euclidean distance, where For the current pose, To store the previous latched pose, the accumulator is... The accumulator is updated by adding the displacement increment Δ to the current value. ,when Output trigger signal and Clear to zero, and at the same time Updated to ;
[0083] The preset threshold .
[0084] The pose latching unit is used to immediately latch the robot pose data received at the current moment when the trigger condition judgment unit determines that the condition is met.
[0085] The timestamp unit is used to generate timestamps for the pose reception time and the trigger signal output time, respectively.
[0086] The data streaming processing and XML generation unit is used to assemble the latched pose data, timestamp information and the corresponding image storage reference address into XML fragments in real time, and append them to the storage medium in the order of acquisition; at the same time, a ping-pong caching mechanism is adopted, setting up two data buffers to alternately perform XML fragment assembly and writing operations to prevent data loss.
[0087] The data output interface is used to provide the final generated complete XML file and image files to an external PC for the weld processing program running on it to read and use.
[0088] The invention also includes: a delay compensation calculation unit, used to record a fixed delay time from the output of the trigger signal to the return of the acquisition completion signal from the 3D camera. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows:
[0089]
[0090] in, Let the velocity vector of the robot's end effector be... , The time interval between the two latches.
[0091] In this invention, the industrial bus interface unit is implemented in one of the following two ways:
[0092] Method 1: The industrial bus interface unit is configured as a passive listening node for the EtherCAT bus, i.e.:
[0093] The FPGA unit of the synchronization device is directly connected to the EtherCAT bus via an Ethernet PHY chip, and is connected in parallel with the robot controller and servo driver. The FPGA unit receives all EtherCAT data frames on the bus in real time, and when it detects a data frame containing the robot pose, it parses the end effector pose data from it. Simultaneously, the received timestamp is recorded; the FPGA unit does not send any data frames to the bus.
[0094] Method 2: The industrial bus interface unit is configured as a standard slave device on the EtherCAT bus; that is:
[0095] The synchronization device provides a slave description file for importing into the robot master station setup software. The setup software automatically identifies the synchronization device, adds it to the EtherCAT bus topology, and sets up PDO mapping to map the end effector pose data output by the robot controller to the receiving address of the synchronization device. After powering on, the synchronization device establishes periodic communication with the master station, with a communication period of 1ms to 4ms, and receives robot pose data forwarded by the master station in real time.
[0096] The synchronization device of the present invention further includes: a field-programmable gate array and an ARM processor;
[0097] Field-programmable gate arrays are used to implement displacement accumulation functions, pose latch units, timestamp units, and data buffer FIFOs in industrial bus interface units and trigger condition judgment units.
[0098] The ARM processor is used to run the operating system, read data from the data buffer FIFO, perform extensible markup language file assembly, file writing, and network services.
[0099] The storage medium for the synchronization device is an eMMC card or an SD card;
[0100] The data output interface is a gigabit Ethernet interface and supports NFS or SMB network sharing protocols.
[0101] like Figure 3 The diagram shown is a flowchart of the signal synchronization control method of the present invention. The present invention is based on a control method for a vision-guided signal synchronization device for a welding robot, and includes the following steps:
[0102] Step S1: Set the 3D camera trigger mode, set the equal-interval displacement threshold and image storage location in the synchronization device, and set the synchronization device connection IP and image location in the PC;
[0103] Step S2: The synchronization device passively acquires the real-time pose data stream broadcast or sent by the robot controller;
[0104] In step S2, the specific implementation method for passively acquiring pose data is as follows:
[0105] like Figure 4 As shown, a bus monitoring method is adopted: the FPGA unit of the synchronization device is connected in parallel to the EtherCAT bus through the Ethernet PHY chip, receives all EtherCAT data frames on the bus in real time, parses out the end pose data (X,Y,Z,Rx,Ry,Rz) and records the receiving timestamp, and does not send any data to the bus; the FPGA internally maintains a displacement accumulator, and each time a new pose is received, it calculates the displacement increment between the previous latched pose and accumulates it into the accumulator;
[0106] Or, such as Figure 5 As shown, the EtherCAT slave mode is adopted: the synchronous device provides a slave description file, which is imported into the robot master station setting tool. The synchronous device is added to the EtherCAT bus topology and PDO mapping is set. After the synchronous device is powered on, it establishes periodic communication with the master station. The communication period is 1ms to 4ms. It receives the robot pose data forwarded by the master station in real time and obtains the end effector pose data through PDO mapping.
[0107] Step S3: The trigger condition judgment unit compares the current pose with the trigger condition according to the preset trigger mode. When the trigger condition is met, it immediately outputs a trigger signal to the 3D camera, and at the same time latches the current pose and records the trigger timestamp.
[0108] The equidistant displacement triggering mode in step S3 of this invention specifically includes the following sub-steps:
[0109] Initialization: Set the spacing threshold ,accumulator Last latched pose = Current pose;
[0110] Each time a new pose is received When calculating the displacement increment accumulator The accumulator is updated by adding the displacement increment Δ to the current value. ;
[0111] if If the trigger is executed immediately, a trigger signal is output to the 3D camera, and the latch is activated. As the pose corresponding to this trigger, Updated to and will Clear to zero; otherwise, wait for the next pose.
[0112] Step S4: Receive the acquisition completion signal and image metadata returned by the 3D camera, wherein the metadata includes the image storage path and the acquisition completion time;
[0113] Step S5: Assemble the latched pose, trigger timestamp, image completion timestamp, and image path into an XML fragment and append it to the target XML file;
[0114] Step S5 also includes a delay compensation step: recording the fixed delay time from the output of the trigger signal to the return of the acquisition completion signal from the 3D camera. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows:
[0115]
[0116] in, Let the velocity vector of the robot's end effector be... , The time interval between two latches;
[0117] The compensated pose is written into an XML fragment; the spacing threshold .
[0118] Step S6: The external PC reads the XML file to obtain synchronized pose-image data pairs, and reads the image file in the synchronization device via NFS; the PC processes the image point cloud to obtain the weld position and guides the welding robot to weld from back to front.
[0119] Step S6 specifically includes the following steps:
[0120] From the obtained synchronized pose-image data pairs, extract continuous pose sequences. , , …, and the corresponding image sequence;
[0121] Calculate the relative motion transformation matrix between adjacent frames:
[0122]
[0123] in, For the robot's kinematic transformation function;
[0124] The relative motion transformation matrix is input into the local coordinate system calibration-free path planning method to reconstruct the three-dimensional trajectory of the weld in the camera coordinate system; the welding robot is then guided to perform welding based on the reconstructed three-dimensional trajectory of the weld.
[0125] Example 1: Device Hardware Architecture
[0126] like Figure 1 As shown, in this embodiment, the synchronization device is connected to the bus system of the industrial robot at one end and to the 3D camera at the other end via GPIO trigger line, while also being connected to the host PC via Gigabit Ethernet.
[0127] The core hardware platform for the synchronization device can be selected from one of the following two options:
[0128] High-performance solution: Xilinx Zynq-7000 series (FPGA + ARM Cortex-A9), suitable for scenarios requiring bus monitoring or high-speed triggering. The FPGA portion implements the industrial bus interface, pose resolution, displacement accumulation, trigger output, timestamp counting, and data buffer FIFO; the ARM portion runs the Linux operating system and the PREEMPT_RT real-time patch, employing multi-threaded tasks and a double-buffering mechanism to read data from the FPGA FIFO for XML assembly, file writing, and network services. The timestamp unit is implemented using an FPGA counter with a clock frequency of 50MHz and a resolution of 20ns.
[0129] Low-cost solution: STM32H7 series MCU + LAN9252 EtherCAT slave controller, suitable for slave mode scenarios.
[0130] Internal functional modules of the equipment, such as Figure 2 As shown, it includes: an industrial bus interface unit, a trigger condition judgment unit, a pose latch unit, a timestamp unit, a delay compensation calculation unit, a data stream processing and XML generation unit, and a data output interface.
[0131] The storage medium is an eMMC card or SD card, used to store XML files. The data output interface is Gigabit Ethernet, supporting NFS or SMB network sharing protocols for PC reading.
[0132] Software layer: Linux + PREEMPT_RT real-time patching, multi-threaded tasks (data reception, XML assembly, file writing, network services), and a double buffering mechanism to prevent data loss.
[0133] Example 2: Specific implementation of Method 1 (bus monitoring)
[0134] like Figure 4 As shown, in the bus monitoring mode, the FPGA unit of the synchronization device (100) is directly connected to the EtherCAT bus through the Ethernet PHY chip, and is connected in parallel with the robot controller and servo driver.
[0135] Workflow:
[0136] 1. Passive Monitoring: The FPGA unit receives all EtherCAT data frames on the bus in real time, but does not send any data. When a data frame containing the robot's pose is detected, the end-effector pose data (X, Y, Z, Rx, Ry, Rz) is parsed from it, and the reception timestamp is recorded.
[0137] 2. Displacement Accumulation and Triggering: The FPGA internally maintains a displacement accumulator. Each time a new pose is received, the displacement increment (Euclidean distance) between the new pose and the previous latched pose is calculated and accumulated into the accumulator. When the accumulated value reaches a preset threshold (e.g., 0.5mm), a high-level pulse is immediately output through the GPIO to trigger the 3D camera, and the current pose is latched simultaneously.
[0138] 3. Data association and XML generation: After receiving the image path returned by the camera, the ARM unit assembles the latched pose, timestamp, and image path into an XML fragment and appends it to / sdcard / weld_scan.xml.
[0139] Advantages: Zero intrusion into the original system, no need to modify the robot controller configuration, plug and play.
[0140] Example 3: Specific implementation of Method 2 (EtherCAT slave)
[0141] like Figure 5 As shown, in EtherCAT slave mode, the synchronization device is configured as a standard slave device on the bus.
[0142] Integration steps:
[0143] 1. Import configuration file: Users use robot master station configuration software (such as Beckhoff TwinCAT, KUKAWorkVisual) to import the slave station description file (SyncDevice.xml) provided by the synchronization device.
[0144] 2. Add slave station: The configuration software automatically identifies the synchronization device, and the user adds it to the EtherCAT bus topology and sets the PDO mapping - mapping the end effector pose data output by the robot controller to the receiving address of the synchronization device.
[0145] 3. Establish communication: After the synchronization device is powered on, it establishes periodic communication with the master station (the communication period is usually 1ms~4ms) and receives robot pose data forwarded by the master station in real time.
[0146] 4. Triggering and Acquisition: The subsequent displacement accumulation, trigger judgment, pose latching, and XML generation process are the same as in Example 2.
[0147] Advantages: Based on the standard EtherCAT slave protocol stack, it has a low development threshold and stable and reliable communication.
[0148] Example 4: Detailed Procedure for Equal-Gap Displacement Triggering
[0149] This embodiment details the implementation of the "equal-spacing displacement triggering" mode (both methods are applicable):
[0150] (I) Equal-interval displacement triggering process
[0151] Initialization: Set the spacing threshold ΔD = 0.5mm (configurable within the range of 0.2mm to 1.0mm), and the accumulator sum = 0. = Current pose;
[0152] Each time a new pose is received When calculating the displacement increment (Euclidean distance): ;
[0153] if ≥ ΔD:
[0154] Output trigger signal to 3D camera, latch As the pose corresponding to this trigger, Updated to , Clear
[0155] Otherwise: continue waiting.
[0156] Effect: Regardless of how the robot's speed changes, the actual distance the robot moves between two adjacent triggers is always approximately ΔD, ensuring that the sampling points are evenly distributed along the weld.
[0157] (II) Delay Compensation Steps
[0158] In practical applications, there is a fixed delay between the output of the trigger signal and the completion of image acquisition by the 3D camera and the return of the "acquisition complete" signal. .
[0159] The delay compensation calculation unit records the fixed delay time. Based on the robot pose data from the two most recent latches and A uniform motion model is used to extrapolate and compensate for the latched pose.
[0160] The specific calculation method is as follows:
[0161] Let v be the velocity vector of the robot's end effector, calculated from the two most recent latched poses:
[0162]
[0163] in, The time interval between the two latches.
[0164] The compensated pose is:
[0165]
[0166] The compensated pose Replacing the original latch Write the XML fragment.
[0167] Through the aforementioned delay compensation, the pose deviation between the issuance of the trigger signal and the actual completion of the camera acquisition can be further eliminated, thereby improving the pose-image synchronization accuracy.
[0168] Example 5: Providing data support and comparison for calibration-free planning of local coordinate systems
[0169] (I) The specific process by which the device of the present invention provides data support for the calibration-free method
[0170] Background: Existing literature discloses a "calibration-free path planning method based on a local coordinate system." This method utilizes the relative displacement of the robot between adjacent frames (obtained from latched pose differences) and image feature matching to directly reconstruct the 3D trajectory of the weld seam in the camera coordinate system, eliminating the need for hand-eye calibration. The effectiveness of this method strongly depends on the synchronization accuracy of "pose-image" during the scanning phase.
[0171] The specific process of the method for improving the equipment of this invention is as follows:
[0172] (1) After the forward scan is completed, the PC reads the weld_scan.xml file generated by the synchronization device to obtain a continuous pose sequence. , , …, and corresponding images , …, .
[0173] (2) Since the pose of each frame is hardware-locked and the timestamp is precise, the relative motion transformation matrix between adjacent frames is... Can be directly from and Accurate calculation:
[0174]
[0175] in, This is the robot's kinematic transformation function.
[0176] The error in this relative displacement is solely due to the accuracy of the robot's own encoder (at the micrometer level) and is unaffected by PC software latency.
[0177] (3) Input the precise relative displacement data into a known calibration-free reconstruction algorithm to directly reconstruct the three-dimensional trajectory of the weld in the camera coordinate system without the need for hand-eye calibration, thereby obtaining a high-precision weld point cloud and welding torch trajectory, and improving the trajectory reproduction quality of back-retreating welding.
[0178] Table 1 shows a comparison between Examples 1-5 and traditional solutions:
[0179] Table 1 Comparison of the effects of traditional solutions
[0180] Triggering method Software instructions are affected by operating system scheduling. Hardware detection, nanosecond-level response Trigger delay 35ms (typical value) <100μs Position synchronization error Approximately 7mm (@20mm / s) <0.002mm Data alignment Timestamp matching on PC software is complex and error-prone. Hardware latches, naturally aligned System Deployment Communication protocols need to be configured, resulting in a large development workload. Method 1: Plug and play; Method 2: One-click configuration import Support for calibration-free methods Large synchronization error leads to poor reconstruction results. Provides precise relative displacement with good results.
[0181] As shown in Table 1, compared to traditional PC software relay solutions, this invention decentralizes trigger judgment and signal output to dedicated hardware devices, offering significant advantages in trigger latency, position synchronization error, data alignment, system deployment convenience, and support for calibration-free methods. This invention, through FPGA hardware-level pose latching and microsecond-level timestamps, fundamentally eliminates the uncertain delays caused by operating system scheduling and network protocol stacks, ensuring that each frame acquired during the scanning phase precisely corresponds to the robot's actual pose. This provides a highly reliable data foundation for subsequent trajectory reproduction and weld seam planning.
[0182] In summary, based on the embodiments of the present invention, the vision guidance signal synchronization device and control method for welding robots provided by the present invention are not only applicable to the equidistant displacement triggering acquisition scenario in the "forward scanning-backward welding" process, but can also be extended to various triggering modes such as spatial region triggering and joint angle threshold triggering, adapting to the differentiated sampling strategy requirements of different welding processes. Furthermore, the present invention supports both bus monitoring and EtherCAT slave deployment methods, allowing users to flexibly choose according to the fieldbus type and system integration requirements, demonstrating good compatibility and widespread application value.
[0183] Those skilled in the art will understand that the above description is merely a preferred embodiment of the present invention, and the features described in the various embodiments of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. This is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A vision guidance signal synchronization device for a welding robot, characterized in that, include: The industrial bus interface unit is used to passively connect to the industrial robot bus system to obtain real-time pose data broadcast or sent by the robot controller. The camera trigger interface unit is used to connect to the hardware trigger input terminal of the 3D camera and output PWM or TTL level signals to control the camera exposure. The trigger condition judgment unit is used to compare the current robot pose received from the industrial bus interface unit with the trigger condition in real time based on the configurable trigger mode. The triggering modes include: equal-interval displacement triggering, spatial region triggering, and joint angle threshold triggering; The pose latching unit is used to immediately latch the robot pose data received at the current moment when the trigger condition judgment unit determines that the condition is met. The timestamp unit is used to generate timestamps for the pose reception time and the trigger signal output time, respectively. The data streaming processing and XML generation unit is used to assemble the latched pose data, timestamp information and the corresponding image storage reference address into XML fragments in real time, and append them to the storage medium in the order of acquisition; at the same time, a ping-pong caching mechanism is adopted, setting up two data buffers to alternately perform XML fragment assembly and writing operations to prevent data loss. The data output interface is used to provide the final generated complete XML file and image files to an external PC for the weld processing program running on it to read and use.
2. The vision guidance signal synchronization device for a welding robot according to claim 1, characterized in that, The triggering condition judgment unit supports an equal-interval displacement triggering mode, specifically: The robot end effector calculates the cumulative distance it has moved from the previous trigger point in real time, and immediately outputs a trigger signal when the cumulative distance reaches a preset threshold ΔD. The cumulative distance is calculated as follows: set up Let be the Euclidean distance, where For the current pose, To store the previous latched pose, the accumulator is... The accumulator is updated by adding the displacement increment Δ to the current value. ,when Output trigger signal and Clear to zero, and at the same time Updated to ; The preset threshold .
3. The vision guidance signal synchronization device for a welding robot according to claim 1, characterized in that, The industrial bus interface unit can be implemented in one of the following two ways: Method 1: The industrial bus interface unit is configured as a passive listening node for the EtherCAT bus, i.e.: The FPGA unit of the synchronization device is directly connected to the EtherCAT bus via an Ethernet PHY chip, and is connected in parallel with the robot controller and servo driver. The FPGA unit receives all EtherCAT data frames on the bus in real time, and when it detects a data frame containing the robot pose, it parses the end effector pose data from it. Simultaneously, the received timestamp is recorded; the FPGA unit does not send any data frames to the bus. Method 2: The industrial bus interface unit is configured as a standard slave device on the EtherCAT bus; Right now: The synchronization device provides a slave description file for importing into the robot master station setup software. The setup software automatically identifies the synchronization device, adds it to the EtherCAT bus topology, and sets up PDO mapping to map the end effector pose data output by the robot controller to the receiving address of the synchronization device. After powering on, the synchronization device establishes periodic communication with the master station, with a communication period of 1ms to 4ms, and receives robot pose data forwarded by the master station in real time.
4. A vision guidance signal synchronization device for a welding robot according to claim 1, characterized in that, It also includes a delay compensation calculation unit: used to record the fixed delay time from the output of the trigger signal to the return signal from the 3D camera indicating completion of acquisition. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows: in, Let the velocity vector of the robot's end effector be... , The time interval between the two latches.
5. A vision guidance signal synchronization device for a welding robot according to claim 1, characterized in that, The synchronization device further includes: a field-programmable gate array and an ARM processor; The field-programmable gate array is used to implement the displacement accumulation function, pose latch unit, timestamp unit and data buffer FIFO in the industrial bus interface unit and trigger condition judgment unit; The ARM processor is used to run the operating system, read data from the data cache FIFO, and perform extensible markup language file assembly, file writing, and network services. The storage medium of the synchronization device is an eMMC card or an SD card; The data output interface is a gigabit Ethernet interface and supports NFS or SMB network sharing protocols.
6. A control method for a vision guidance signal synchronization device for a welding robot according to any one of claims 1-5, characterized in that, Includes the following steps: Step S1: Set the 3D camera trigger mode, set the equal-interval displacement threshold and image storage location in the synchronization device, and set the synchronization device connection IP and image location in the PC; Step S2: The synchronization device passively acquires the real-time pose data stream broadcast or sent by the robot controller; Step S3: The trigger condition judgment unit compares the current pose with the trigger condition according to the preset trigger mode. When the trigger condition is met, it immediately outputs a trigger signal to the 3D camera, and at the same time latches the current pose and records the trigger timestamp. Step S4: Receive the acquisition completion signal and image metadata returned by the 3D camera, wherein the metadata includes the image storage path and the acquisition completion time; Step S5: Assemble the latched pose, trigger timestamp, image completion timestamp, and image path into an XML fragment and append it to the target XML file; Step S6: The external PC reads the XML file to obtain the synchronized pose-image data pair, and reads the image file in the synchronization device through NFS; the PC processes the image point cloud to obtain the weld position, and guides the welding robot to weld from back to front.
7. The control method for a vision guidance signal synchronization device for a welding robot according to claim 6, characterized in that, In step S2, the specific implementation method for passively acquiring pose data is as follows: The bus monitoring method is adopted: the FPGA unit of the synchronization device is connected in parallel to the EtherCAT bus through the Ethernet PHY chip, receives all EtherCAT data frames on the bus in real time, parses the end pose data (X,Y,Z,Rx,Ry,Rz) from them and records the receiving timestamp, without sending any data to the bus; the FPGA internally maintains a displacement accumulator, and each time a new pose is received, it calculates the displacement increment between the previous latched pose and the new pose and adds it to the accumulator. Alternatively, the EtherCAT slave mode can be used: the synchronous device provides a slave description file, which is imported into the robot master station setting tool. The synchronous device is then added to the EtherCAT bus topology and PDO mapping is set. After the synchronous device is powered on, it establishes periodic communication with the master station. The communication period is 1ms to 4ms. It receives robot pose data forwarded by the master station in real time and obtains end-effector pose data through PDO mapping.
8. The control method for a vision guidance signal synchronization device for a welding robot according to claim 6, characterized in that, The equidistant displacement triggering mode in step S3 specifically includes the following sub-steps: Initialization: Set the spacing threshold ,accumulator Last latched pose = Current pose; Each time a new pose is received When calculating the displacement increment accumulator The accumulator is updated by adding the displacement increment Δ to the current value. ; if If the trigger is executed immediately, a trigger signal is output to the 3D camera, and the latch is activated. As the pose corresponding to this trigger, Updated to and will Clear to zero; otherwise, continue waiting for the next position.
9. A control method for a vision guidance signal synchronization device for a welding robot according to claim 6, characterized in that, Step S5 further includes a delay compensation step, specifically: Record the fixed delay time from the output of the trigger signal to the return signal from the 3D camera indicating completion of acquisition. Based on the robot pose data from the two most recent latches and The latched pose is extrapolated and compensated using a uniform motion model. The compensated pose is as follows: in, Let the velocity vector of the robot's end effector be... , The time interval between two latches; The compensated pose is written into an XML fragment; the spacing threshold The thickness ranges from 0.2mm to 1.0mm.
10. A control method for a vision guidance signal synchronization device for a welding robot according to claim 6, characterized in that, Step S6 specifically includes: From the obtained synchronized pose-image data pairs, extract continuous pose sequences. , , …, and the corresponding image sequence; Calculate the relative motion transformation matrix between adjacent frames: in, For the robot's kinematic transformation function; The relative motion transformation matrix is input into a calibration-free path planning method in a local coordinate system to reconstruct the three-dimensional trajectory of the weld in the camera coordinate system. The welding robot is guided to perform welding based on the reconstructed three-dimensional trajectory of the weld.