A welding gun motion posture optimization method and a computer device

By constructing collision-free motion boundaries and planes for the welding torch head and body, the problem of collision between the welding torch and the workpiece in existing technologies is solved, realizing automated welding torch posture optimization and improving welding efficiency and quality.

CN121179102BActive Publication Date: 2026-02-17FAIR INNOVATION (SUZHOU) ROBOTIC SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511757668.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-17
Estimated Expiration
2045-11-27

AI Technical Summary

Technical Problem

Existing welding torch motion planning technology fails to fully consider the actual shape constraints of the workpiece and the size limitations of the welding torch, resulting in easy collisions between the welding torch and the workpiece, requiring manual adjustment, which affects welding efficiency and quality.

Method used

By acquiring the workpiece point cloud, the collision-free motion boundaries and planes of the welding torch head and body are constructed, and the attitude is optimized to ensure that the welding torch does not collide with the workpiece at each welding point. Automatic detection is then performed in combination with the workpiece shape and welding torch size constraints.

Benefits of technology

It enables automatic avoidance of welding torch collisions during workpiece welding, improving welding efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121179102B_ABST
    Figure CN121179102B_ABST
Patent Text Reader

Abstract

The application provides a welding gun motion posture optimization method and computer equipment, and relates to the technical field of welding control. On the basis of obtaining workpiece point cloud of a target workpiece and welding gun size data (including welding gun head length, gun head gun body connection corner and welding gun body length, etc.) of a target welding gun, the actual shape constraint of the workpiece and the size limitation of the welding gun are comprehensively considered. The workpiece welding gun collision detection is performed for different welding gun motion postures in the workable space range of the welding gun for the target weld (including a target straight line weld or a target curve weld), so as to automatically and quickly determine the optimal welding gun motion posture at each welding point position of the target weld which will not collide with the workpiece, so as to effectively improve the workpiece welding efficiency and the workpiece welding quality in the subsequent workpiece welding implementation stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of welding control technology, and more specifically, to a method for optimizing the motion posture of a welding torch and a computer device. Background Technology

[0002] With the rapid development of welding automation technology, various industries (such as automotive, electronic assembly, metallurgy and chemical industries) have put forward higher requirements for welding precision, welding quality and welding safety. As the core link of automated welding system, the performance of welding torch motion posture planning directly affects the final welding quality and production efficiency.

[0003] Currently, mainstream welding torch motion planning technologies primarily rely on visual sensing or laser scanning to acquire 3D information about the weld seam on the workpiece. Geometric feature parameters of the weld seam (such as weld seam position coordinates, weld seam cross-sectional shape, and weld seam spatial orientation) are extracted using image processing algorithms or point cloud analysis methods. Then, based on preset welding process rules (such as the normal angle between the welding torch and the workpiece surface, the wire extension length, and welding speed), an initial welding torch motion path and attitude parameters are generated. However, it is worth noting that this motion planning method mainly considers the geometrically optimal solution under ideal working conditions, failing to fully incorporate on-site factors such as the actual shape constraints of the workpiece and the size limitations of the welding torch. This can easily lead to collisions between the welding torch and the workpiece during the welding process, requiring operators to rely on experience to manually adjust the welding torch's attitude multiple times, or even replan the local welding torch trajectory, ultimately compromising welding efficiency and quality. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a welding torch motion posture optimization method and computer equipment, which can comprehensively consider the actual shape constraints of the workpiece and the size limitations of the welding torch, and perform workpiece welding torch collision detection for different welding torch motion postures within the working space of the welding torch of the target weld, thereby automatically and quickly determining the optimal welding torch motion posture at each welding point position of the target weld that will not collide with the workpiece, so as to effectively improve the workpiece welding efficiency and workpiece welding quality in the subsequent workpiece welding implementation stage.

[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, this application provides a method for optimizing the motion posture of a welding torch, the method comprising:

[0007] Obtain the workpiece point cloud of the target workpiece, and determine two intersecting planes on the target workpiece that form the target straight weld seam based on the workpiece point cloud;

[0008] A welding torch head movement plane is constructed between the two intersecting planes along the target straight weld seam, and a non-collision movement boundary of the torch head is delineated for the target welding torch along the target straight weld seam within the constructed welding torch head movement plane.

[0009] When the collision-free movement boundary area of ​​the welding torch head is successfully delineated within the movement plane of the welding torch head, a collision-free movement bounded plane is constructed for the target welding torch based on the torch head-body connection corner and the length of the welding torch body, according to the collision-free movement boundary area of ​​the torch head; wherein the welding torch head of the target welding torch does not collide with the target workpiece when moving within the collision-free movement boundary area of ​​the torch head.

[0010] When a collision-free motion bounded plane is successfully constructed for the target welding torch, the actual motion posture of the target welding torch at each welding point of the target straight weld is constrained according to the collision-free motion bounded plane of the torch body and the collision-free motion boundary region of the torch head; wherein the welding torch body of the target welding torch does not collide with the target workpiece when it moves within the collision-free motion bounded plane of the torch body.

[0011] In an optional implementation, the step of delineating the boundary of the welding torch head's collision-free movement along the target straight weld seam within the constructed welding torch head movement plane includes:

[0012] From the workpiece point cloud, extract first point cloud data whose distance from the moving plane of the welding torch head is less than or equal to the cross-sectional radius of the target welding torch;

[0013] Within a preset boundary region tilt angle range, a target tilt angle value is selected. Based on the length of the welding torch head, original motion boundary regions corresponding to various preset quadrilateral shapes are constructed in the motion plane of the welding torch head according to the target tilt angle value. The common boundary between multiple original motion boundary regions is the target straight weld. The boundary length of each of the two first region boundaries connected to the target straight weld in each original motion boundary region is the length of the welding torch head.

[0014] For each original motion boundary region, the welding torch head of the target welding torch is detected to see whether it collides with the target workpiece when moving within the original motion boundary region, based on the first point cloud data.

[0015] If it is detected that the welding torch tip does not collide with the target workpiece in any original motion boundary area, then the original motion boundary area is directly taken as the non-collision motion boundary area of ​​the torch tip; otherwise, the process jumps to the step of selecting a target tilt angle value within the preset boundary area tilt angle range and continues execution.

[0016] In an optional implementation, for each original motion boundary region, the step of detecting whether the welding torch head of the target welding torch collides with the target workpiece when moving within that original motion boundary region based on the first point cloud data includes:

[0017] Filter out discrete points in the first point cloud data whose actual distance to the target straight weld is less than a preset distance threshold to obtain the first candidate point cloud;

[0018] The number of projection points of the first candidate point cloud within the original motion boundary region is counted, as well as the number of spatial points in the first candidate point cloud whose actual distance to each first region boundary of the original motion boundary region is less than the cross-sectional radius of the target welding torch.

[0019] Check whether the number of projection points and the number of spatial points on each of the two first region boundaries of the original motion boundary region are both equal to zero.

[0020] If the number of projection points and the number of spatial points on each of the two first region boundaries are both zero, it is determined that the welding torch head of the target welding torch does not collide with the target workpiece when moving within the original motion boundary area; otherwise, it is determined that the welding torch head of the target welding torch collides with the target workpiece when moving within the original motion boundary area.

[0021] In an optional implementation, the step of constructing a collision-free motion bounded plane for the target welding torch based on the torch head-body connection corner and the torch body length, according to the torch head-body collision-free motion boundary region, includes:

[0022] Within a preset plane rotation angle range, a target plane rotation angle value is selected, and a candidate gun body movement plane is constructed according to the target plane rotation angle value. This candidate gun body movement plane intersects the welding gun head movement plane at the boundary of the second region of the non-collision movement boundary area of ​​the gun head. The actual plane angle between the candidate gun body movement plane and the welding gun head movement plane is the target plane rotation angle value, and the second region boundary is the region boundary of the non-collision movement boundary area of ​​the gun head that is opposite to the target straight weld.

[0023] A quadrilateral boundary is delineated within the candidate gun body motion plane to obtain the corresponding target quadrilateral motion plane; wherein one plane boundary of the target quadrilateral motion plane is the second region boundary, the boundary length of the first plane boundary in the target quadrilateral motion plane that connects to the two endpoints of the second region boundary is the length of the welding gun body, each first plane boundary is directly connected to one of the first region boundaries of the non-collision motion boundary region of the gun head through one endpoint of the second region boundary, and the included angle between the directly connected first plane boundary and the first region boundary is the gun head and gun body connection corner;

[0024] Extract second point cloud data from the workpiece point cloud, where the distance between the workpiece point cloud and the target quadrilateral motion plane is less than or equal to the cross-sectional radius of the target welding torch, and detect whether the welding torch body of the target welding torch collides with the target workpiece when it moves within the target quadrilateral motion plane based on the second point cloud data;

[0025] If it is detected that the welding torch body does not collide with the target workpiece within the target quadrilateral motion plane, then the target quadrilateral motion plane is directly used as the bounded plane for the non-collision motion of the torch body; otherwise, the process jumps to the step of selecting a target plane rotation angle value within the preset plane rotation angle range and continues execution.

[0026] In an optional implementation, the step of detecting whether the welding torch body of the target welding torch collides with the target workpiece when moving within the target quadrilateral motion plane based on the second point cloud data includes:

[0027] The number of projection points of the second point cloud data in the target quadrilateral motion plane is counted, as well as the number of spatial points in the second point cloud data whose actual distance to each first plane boundary is less than the cross-sectional radius of the target welding gun.

[0028] Check whether the number of projection points and the number of spatial points on each of the two first plane boundaries are both equal to zero;

[0029] If the number of projection points and the number of spatial points on each of the two first plane boundaries are both equal to zero, it is determined that the welding torch body of the target welding torch does not collide with the target workpiece when it moves in the target quadrilateral motion plane; otherwise, it is determined that the welding torch body of the target welding torch collides with the target workpiece when it moves in the target quadrilateral motion plane.

[0030] In an optional implementation, the method further includes:

[0031] If a collision-free movement boundary area of ​​the welding torch head cannot be delineated within the movement plane of the welding torch head, or if a collision-free movement bounded plane of the torch body cannot be constructed for the target welding torch, then proceed to the step of constructing the welding torch head movement plane along the target straight weld seam between the two intersecting planes.

[0032] Secondly, this application provides a method for optimizing the motion posture of a welding torch, the method comprising:

[0033] Obtain the workpiece point cloud of the target workpiece, and determine the main plane of the weld seam where the target curve weld seam is located on the target workpiece based on the workpiece point cloud;

[0034] The curve normal vector of each weld point of the target curve weld is determined in the main plane of the weld, wherein the curve normal vector of each weld point points to the welding operation space of the target welding gun in the main plane of the weld.

[0035] For each weld point of the target curve weld, a welding gun movement plane is constructed based on the welding reference plane where the curve normal vector of the weld point is located. The intersecting straight line between the welding gun movement plane and the welding reference plane corresponding to the same weld point passes through the weld point. Both the welding gun movement plane and the welding reference plane corresponding to the same weld point are perpendicular to the main plane of the weld.

[0036] Based on the workpiece point cloud and the length of the welding torch head, the corner connecting the torch head and the welding torch body, and the length of the welding torch body, a collision-free simplified welding torch graphic is constructed in the welding torch movement plane corresponding to the welding point. The graphic endpoints of any simplified welding torch graphic constructed in the welding torch movement plane of the welding point include the welding point.

[0037] If a collision-free simplified welding torch graphic is successfully constructed in the welding torch motion plane corresponding to the welding point, the actual motion posture of the target welding torch at the welding point is constrained according to the collision-free simplified welding torch graphic; otherwise, the process jumps to the above step of constructing the welding torch motion plane based on the welding reference plane where the curve normal vector of the welding point is located and continues to execute.

[0038] In an optional implementation, for each weld point of the target curved weld, the step of constructing a collision-free simplified welding torch graphic within the welding torch movement plane corresponding to that weld point, based on the workpiece point cloud and the welding torch head length, torch head-body connection corner, and welding torch body length of the target welding torch, includes:

[0039] Within a preset simplified graphic pitch angle range, a target pitch angle value is selected, and a corresponding original simplified graphic of the welding gun is constructed in the welding gun movement plane of the weld point according to the target pitch angle value. The original simplified graphic of the welding gun includes a straight segment of the welding gun head and a straight segment of the welding gun body connected to each other. One end of the straight segment of the welding gun head is the weld point. The actual angle between the straight segment of the welding gun head and the straight segment of the welding gun body is the corner connecting the welding gun head and the welding gun body. The length of the line segment of the straight segment of the welding gun head is the length of the welding gun head. The length of the line segment of the straight segment of the welding gun body is the length of the welding gun body. The actual angle between the straight segment of the welding gun head and the main plane of the weld is the target pitch angle value.

[0040] Based on the cross-sectional radius of the target welding torch and the point cloud of the workpiece, detect whether the target welding torch collides with the target workpiece while maintaining the welding torch posture corresponding to the original simplified welding torch graphic;

[0041] If it is detected that the target welding torch does not collide with the target workpiece while maintaining the welding torch posture corresponding to the original simplified welding torch graphic, then the original simplified welding torch graphic is directly used as the collision-free simplified welding torch graphic; otherwise, the process jumps to the step of selecting a target pitch angle value within the preset simplified graphic pitch angle range and continues execution.

[0042] In an optional implementation, the step of detecting whether the target welding torch collides with the target workpiece while maintaining the welding torch posture corresponding to the original simplified welding torch graphic, based on the cross-sectional radius of the target welding torch and the workpiece point cloud, includes:

[0043] The straight segments of the welding torch head and the welding torch body in the simplified original welding torch diagram are respectively taken as the axes of a cylinder, and a cylinder search space is constructed according to the cross-sectional radius.

[0044] Extract the third point cloud data within the constructed search space of all cylinders from the workpiece point cloud, and filter out discrete points in the third point cloud data whose actual distance to the weld point connected to the original simplified welding gun graphic is less than a preset distance threshold, to obtain the second candidate point cloud.

[0045] Detect whether the actual number of spatial points in the second candidate point cloud is equal to zero;

[0046] If the actual number of spatial points in the second candidate point cloud is zero, it is determined that the target welding torch does not collide with the target workpiece when maintaining the welding torch posture corresponding to the original simplified welding torch graphic; otherwise, it is determined that the target welding torch collides with the target workpiece when maintaining the welding torch posture corresponding to the original simplified welding torch graphic.

[0047] Thirdly, this application provides a computer device, including a processor and a memory, wherein the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to implement the welding torch motion posture optimization method described in any one of the foregoing embodiments or the welding torch motion posture optimization method described in any one of the foregoing embodiments.

[0048] In this case, the beneficial effects of the embodiments of this application may include the following:

[0049] This application, after determining two intersecting planes on the target workpiece to form the target straight weld seam based on the workpiece point cloud, constructs a welding torch head movement plane between these two intersecting planes along the target straight weld seam. Based on the length of the target welding torch head, it delineates the boundary of the torch head's collision-free movement along the target straight weld seam within the constructed torch head movement plane. Then, based on the successfully delineated boundary area, it constructs a bounded plane for the torch body's collision-free movement based on the torch head-body connection corner and the torch body length. Finally, it constructs a bounded plane for the torch body's collision-free movement... When the target welding torch is in a bounded plane, the actual motion posture of the target welding torch at each weld point of the target straight weld is constrained by utilizing the bounded plane of the torch body's collision-free motion and the boundary region of the torch head's collision-free motion. This ensures that the final motion posture of the target welding torch at each weld point of the target straight weld will not cause the workpiece to collide with the welding torch, thereby improving the workpiece welding efficiency and welding quality. Specifically, the welding torch head does not collide with the target workpiece when moving within the successfully defined boundary region of the torch head's collision-free motion, and the welding torch body does not collide with the target workpiece when moving within the successfully constructed bounded plane of the torch body's collision-free motion.

[0050] Furthermore, after determining the main plane of the weld seam where the target curved weld seam is located on the target workpiece based on the workpiece point cloud, this application determines the curve normal vector of each weld point of the target curved weld seam pointing to the welding operation space of the target welding torch within the main plane of the weld seam. For each weld point of the target curved weld seam, a welding torch motion plane is constructed based on the welding reference plane where the curve normal vector of the weld point is located. Then, based on the workpiece point cloud and the length of the welding torch head, the corner connecting the torch head and body, and the length of the welding torch body, a collision-free simplified welding torch graphic is constructed within the welding torch motion plane corresponding to the weld point. When the collision-free simplified welding torch graphic is successfully constructed, the actual motion posture of the target welding torch at the weld point is constrained according to the welding torch posture corresponding to the collision-free simplified welding torch graphic. Alternatively, if the collision-free simplified welding torch graphic cannot be constructed, the process jumps back to the aforementioned step of constructing the welding torch motion plane based on the welding reference plane where the curve normal vector of the weld point is located and continues until the final motion posture of the target welding torch at each weld point of the target curved weld seam does not cause workpiece welding torch collision, thereby improving workpiece welding efficiency and workpiece welding quality. Wherein, the intersecting straight line between the welding torch movement plane and the welding reference plane corresponding to any welding point of the target curve weld passes through the welding point, and the welding torch movement plane and the welding reference plane corresponding to the same welding point are both perpendicular to the main plane of the weld, and the graphic endpoints of any simplified welding torch graphic constructed in the welding torch movement plane of a single welding point include the welding point; in the welding torch movement plane of a single welding point, the projection vector of the curve normal vector of the welding point in the welding torch movement plane and the direction vector of the welding point pointing to other graphic endpoints of any simplified welding torch graphic both point to the same side of the welding torch movement plane.

[0051] Therefore, this application can comprehensively consider the actual shape constraints of the workpiece and the size limitations of the welding torch, and perform workpiece and welding torch collision detection for different welding torch movement postures within the working space of the welding torch of the target weld. This allows for the automatic and rapid determination of the optimal welding torch movement posture at each weld point of the target weld that will not collide with the workpiece, thereby effectively improving the workpiece welding efficiency and quality in the subsequent workpiece welding implementation stage.

[0052] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 A schematic diagram of the composition of a computer device provided in the embodiments of this application;

[0055] Figure 2 A flowchart illustrating the first welding torch motion posture optimization method provided in this application embodiment;

[0056] Figure 3 This is a schematic diagram illustrating the distribution of the torch head motion boundary region and the torch body quadrilateral motion plane provided by the first welding torch motion attitude optimization method for straight welds in an embodiment of this application; wherein, Figure 3 Neutron diagram (a) is a schematic diagram showing the distribution of the gun head motion boundary region relative to the quadrilateral motion plane of the gun body when the boundary shape is defined as a right-sloping parallelogram. Figure 3 Neutron diagram (b) is a schematic diagram of the distribution of the gun head motion boundary region with the quadrilateral motion plane of the gun body when the boundary shape is drawn according to the isosceles trapezoidal boundary.

[0057] Figure 4 for Figure 2 A flowchart illustrating the sub-steps included in step S220;

[0058] Figure 5 for Figure 2 A flowchart illustrating the sub-steps included in step S230;

[0059] Figure 6 A flowchart illustrating the second welding torch motion posture optimization method provided in this application embodiment;

[0060] Figure 7 This is a schematic diagram showing the distribution of the welding torch motion plane and the simplified welding torch graphic provided by the second welding torch motion posture optimization method for curved welds in this application embodiment; wherein, Figure 7 Neutron diagram (a) is a schematic diagram of the distribution of the welding torch movement plane corresponding to the curved weld from an overhead view. Figure 7 Neutron diagram (b) is a schematic diagram of the distribution of the welding torch movement plane and the simplified welding torch graphic corresponding to the curved weld from the frontal view.

[0061] Figure 8 for Figure 6 A flowchart illustrating the sub-steps included in step S340.

[0062] Icons: 10-Computer equipment; 11-Memory; 12-Processor; 13-Communication unit. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0064] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0065] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0066] In the description of this application, it should be understood that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are used only for the convenience of describing this application and simplifying the description, and are not intended to indicate or imply that the equipment or component referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0067] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0068] Furthermore, it is understood in the description of this application that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Those skilled in the art will understand the specific meaning of the above terms in this application based on the specific circumstances.

[0069] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0070] Please refer to Figure 1 , Figure 1 This is a schematic diagram of the computer device 10 provided in this application embodiment. In this application embodiment, the computer device 10 can automatically optimize the welding torch movement posture for any straight or curved weld seam on any workpiece to be welded (i.e., the target workpiece), ensuring that the final movement posture of the corresponding welding torch at each weld point position on the straight or curved weld seam does not cause workpiece-welding torch collision, thereby improving the workpiece welding efficiency and workpiece welding quality in the subsequent workpiece welding process. The computer device 10 can be a welding robot equipped with a welding torch, or it can be an independent electronic device communicatively connected to a welding robot equipped with a welding torch. The independent electronic device can be, but is not limited to, a server, personal computer, laptop computer, etc.

[0071] In this embodiment, the computer device 10 may include a memory 11, a processor 12, and a communication unit 13. The memory 11, the processor 12, and the communication unit 13 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.

[0072] In this embodiment, the memory 11 may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory 11 is used to store computer programs, and the processor 12 can execute the computer programs accordingly after receiving execution instructions.

[0073] In this embodiment, the processor 12 can be an integrated circuit chip with signal processing capabilities. The processor 12 can be a general-purpose processor, including at least one of a central processing unit (CPU), graphics processing unit (GPU), network processor (NP), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0074] In this embodiment, the communication unit 13 is used to establish a communication connection between the computer device 10 and other electronic devices through a network, and to send and receive data through the network, wherein the network includes wired communication networks and wireless communication networks. For example, the computer device 10 can obtain the workpiece point cloud (i.e., the real point cloud data of the surface of the target workpiece in three-dimensional space) and the welding torch size data (including the length of the welding torch head, the corner connecting the torch head and body, the length of the welding torch body, the radius of the welding torch cross-section, etc.) of the target welding torch from the visual perception system through the communication unit 13. Based on the workpiece point cloud and the welding torch size data, the welding torch motion posture is automatically optimized for straight welds or curved welds on the target workpiece to ensure that the final motion posture of the target welding torch at each weld point position of the corresponding straight weld or curved weld does not cause workpiece welding torch collision.

[0075] In this embodiment, the computer device 10 can pre-store a specific computer program related to the welding torch motion posture optimization function in the memory 11. By driving the processor 12 to execute the specific computer program, based on the acquisition of the workpiece point cloud of the target workpiece and the welding torch size data of the target welding torch, and comprehensively considering the actual shape constraints of the workpiece (i.e., the spatial distribution of the outer surface shape of the target workpiece) and the welding torch size limitations, workpiece welding torch collision detection is performed for different welding torch motion postures within the working space range of the welding torch for the target weld (including the target straight weld or target curved weld that needs to be welded) (i.e., the movable space of the target welding torch when performing welding operations on the target straight weld or target curved weld). This automatically and quickly determines the optimal welding torch motion posture at each weld point position of the target weld that will not collide with the workpiece, so as to effectively improve the workpiece welding efficiency and workpiece welding quality in the subsequent workpiece welding implementation stage.

[0076] Understandable, Figure 1 The block diagram shown is only a schematic diagram of one configuration of the computer device 10. The computer device 10 may also include components such as... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.

[0077] In this application, to ensure that the computer device 10 can comprehensively consider the actual shape constraints of the workpiece and the size limitations of the welding torch, and to perform workpiece-welding torch collision detection for different welding torch movement postures within the working space of the welding torch for straight welds, so as to automatically and quickly determine the optimal welding torch movement posture at each welding point position of the straight weld without collision with the workpiece, this application embodiment achieves the aforementioned objective by providing a welding torch movement posture optimization method for straight welds. The welding torch movement posture optimization method provided by this application for straight welds will be described in detail below.

[0078] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the first welding torch motion posture optimization method provided in this application embodiment. In this application embodiment, the first welding torch motion posture optimization method is applicable to achieving collision-free welding torch motion posture optimization for straight weld seams, wherein the first welding torch motion posture optimization method may include steps S210 to S250.

[0079] Step S210: Obtain the workpiece point cloud of the target workpiece, and determine the two intersecting planes on the target workpiece that form the target straight weld seam based on the workpiece point cloud.

[0080] In this embodiment, the target straight weld is the straight weld on the target workpiece that requires welding (which can be...). Figure 3 The red line segment p1p2 in subgraph (a) or subgraph (b) represents the target straight weld, where points p1 and p2 are the two weld endpoints of the target straight weld, respectively. When the workpiece point cloud of the target workpiece is obtained and a target straight weld is determined on the target workpiece, local point cloud data in the cylindrical search space associated with the target straight weld (the axis of the cylinder is the target straight weld, and the radius of the bottom surface of the cylinder is a preset search distance value) can be extracted from the workpiece point cloud. Then, a plane segmentation algorithm based on region growing or a RANSAC (Random Sample Consensus) plane fitting algorithm is used to perform cluster analysis on the local point cloud data so as to accurately separate two principal plane point sets from the local point cloud data. Then, the least squares plane fitting algorithm is used to calculate the fitting plane equations corresponding to the two principal plane point sets respectively. At this time, the planes represented by the two fitting plane equations are the two intersecting planes that form the target straight weld (which can be adopted by...). Figure 3 The two black-bordered parallelograms in subgraph (a) or subgraph (b) represent the subgraph, i.e. Figure 3 In sub-figure (a) or sub-figure (b), plane A and plane B), the target straight weld is located on the intersecting straight line between the two intersecting planes.

[0081] Step S220: Construct a welding torch head movement plane along the target straight weld seam between two intersecting planes, and delineate the torch head collision-free movement boundary along the target straight weld seam within the constructed welding torch head movement plane.

[0082] In this embodiment, when two intersecting planes forming the target straight weld are determined, the included angle between these two intersecting planes can be directly calculated. Then, a welding torch head movement plane is constructed along the target straight weld between these two intersecting planes, so that the constructed welding torch head movement plane (which adopts...) Figure 3 The blue dashed-lined parallelogram border in sub-figure (a) or sub-figure (b) intersects the target straight weld seam with the two intersecting planes mentioned above, and the welding torch head movement plane intersects with the reference plane of the two intersecting planes mentioned above (e.g., Figure 3 The angle between the first planes (which is adopted) between planes A in subgraph (a) or subgraph (b) Figure 3 In subgraph (a) or subgraph (b) The first angle range (represented by the above) is [0, the aforementioned fixed plane angle]. In one embodiment of this example, when initially constructing the welding torch head movement plane for any target straight weld, half of the fixed plane angle between the two intersecting planes corresponding to the target straight weld can be used as the first plane angle of the initially constructed welding torch head movement plane.

[0083] Once a welding torch head movement plane is constructed for the target straight weld seam, the welding torch head will be tilted in different ways along the target straight weld seam within this movement plane (which can be achieved by...). Figure 3 In subgraph (a) or subgraph (b) (to be represented) and / or different boundary shapes (e.g.) Figure 3 The blue solid-line parallelogram in neutron diagram (a) represents the "right-sloping parallelogram boundary shape". Figure 3 The blue solid line in neutron diagram (a) represents the "isosceles trapezoid boundary shape," and the shape not shown in the diagram... Figure 3 The torch head movement boundary (as shown in the diagram, such as the "left-tilted parallelogram boundary shape") is delineated, and the torch head of the target welding torch is detected within the delineated torch head movement boundary area (which can be represented by...). Figure 3 The movement within the blue solid-line quadrilaterals p1p2p3p4 in sub-figure (a) or sub-figure (b) determines whether the corresponding torch head movement boundary region can be considered as a non-collision movement boundary region of the torch head within the torch head movement plane. All torch head movement boundary regions constructed within the same torch head movement plane share a common boundary p1p2 (i.e., the target straight weld seam). Each torch head movement boundary region is connected to the target straight weld seam by two first region boundaries (which can be represented by...). Figure 3 The boundaries p1p4 and p2p3 in subgraph (a) or subgraph (b) are represented by their respective boundary lengths, which are the lengths of the welding torch head of the target welding torch. At this time, the actual tilt angle of the first region boundary of any torch head movement boundary area relative to the target straight weld seam (i.e., Figure 3 In subgraph (a) or subgraph (b) The preset boundary region tilt angle range is [0°, 90°].

[0084] In this embodiment, when a non-collision boundary region for the welding torch head is successfully delineated within a constructed welding torch head movement plane (at which time, when the welding torch head of the target welding torch moves within this non-collision boundary region, it does not collide with the target workpiece), the computer device 10 will execute step S230 accordingly, so as to further determine, based on the non-collision boundary region for the welding torch head, whether there exists a non-collision bounded plane for the welding torch body that can ensure that the welding torch body of the target welding torch does not collide with the target workpiece.

[0085] If a collision-free movement boundary region for the welding torch cannot be defined within a certain welding torch head movement plane, it indicates that the target welding torch is highly likely or certain to collide with the target workpiece when moving within that welding torch head movement plane. Therefore, it is necessary to jump to and re-execute step S220, "Constructing a welding torch head movement plane along the target straight weld seam between two intersecting planes," to reconstruct a new welding torch head movement plane. Then, for the new welding torch head movement plane, continue executing the aforementioned step, "Delineating the collision-free movement boundary for the target welding torch along the target straight weld seam within the constructed welding torch head movement plane," until a collision-free movement boundary region for the torch head is finally determined. The included angle of the first plane corresponding to each newly constructed welding torch head movement plane is different from the included angles of the first planes corresponding to each of the previously constructed welding torch head movement planes.

[0086] Alternatively, please refer to Figure 4 , Figure 4 yes Figure 2 The flowchart of step S220 is shown below. In the embodiments of this application, step S220 may include sub-steps S221-224, so as to delineate the collision-free movement boundary area of ​​the welding torch head as much as possible within any welding torch head movement plane.

[0087] Sub-step S221: Extract the first point cloud data from the workpiece point cloud, where the distance between the workpiece point cloud and the moving plane of the welding torch head is less than or equal to the cross-sectional radius of the target welding torch.

[0088] Sub-step S222: Select a target tilt angle value within the preset boundary region tilt angle range, and construct the original motion boundary region corresponding to various preset quadrilateral shapes in the motion plane of the welding torch according to the target tilt angle value based on the length of the welding torch head.

[0089] In this embodiment, the various preset quadrilateral shapes may include, but are not limited to, "right-tilted parallelogram boundary shape," "isosceles trapezoid boundary shape," and "left-tilted parallelogram boundary shape," etc. The "right-tilted parallelogram boundary shape" and "left-tilted parallelogram boundary shape" are suitable for situations where the straight weld has no obstruction on both sides or only one side is obstructed, while the "isosceles trapezoid boundary shape" is suitable for situations where both sides of the straight weld are obstructed. The common boundary between multiple original motion boundary regions (each original motion boundary region is a separate torch movement boundary region p1p2p3p4 corresponding to a preset quadrilateral shape) constructed within the same welding torch head movement plane according to the same target tilt angle value is the target straight weld. The boundary length of each of the two first region boundaries connected to the target straight weld in each original motion boundary region is the length of the welding torch head. In one implementation of this embodiment, for any welding torch head movement plane, 45° can be selected as the target tilt angle value used when initially constructing the original motion boundary region.

[0090] Sub-step S223: For each original motion boundary region, detect whether the welding torch head of the target welding torch collides with the target workpiece when moving within the original motion boundary region based on the first point cloud data.

[0091] In this embodiment, for each original motion boundary region, the step of detecting whether the welding torch head of the target welding torch collides with the target workpiece when moving within the original motion boundary region based on the first point cloud data may include:

[0092] Filter out discrete points in the first point cloud data whose actual distance to the target straight weld is less than a preset distance threshold (e.g., 10 mm) to obtain the first candidate point cloud;

[0093] The number of projection points of the first candidate point cloud within the original motion boundary region is counted (i.e., the total number of all projection points within the original motion boundary region in the projection point cloud of the first candidate point cloud on the motion plane of the welding torch head), and the number of spatial points in the first candidate point cloud whose actual distance to each first region boundary of the original motion boundary region is less than the cross-sectional radius of the target welding torch (i.e., the actual number of spatial points in the first candidate point cloud within the cylindrical search space associated with each of the two first region boundaries (where the axis of the cylinder is a first region boundary and the radius of the bottom surface of the corresponding cylinder is the cross-sectional radius).

[0094] Check whether the number of projection points and the number of spatial points on each of the two first region boundaries of the original motion boundary region are both equal to zero.

[0095] If the number of projection points and the number of spatial points on each of the two first region boundaries are both zero, it is determined that the welding torch head of the target welding torch does not collide with the target workpiece when moving within the original motion boundary area; otherwise, it is determined that the welding torch head of the target welding torch collides with the target workpiece when moving within the original motion boundary area.

[0096] The discrete point filtering operation for the first point cloud data is used to avoid errors in the workpiece welding gun collision detection results caused by the actual point cloud data on the target straight weld (i.e., the aforementioned filtered discrete points). The reason for the error in the workpiece welding gun collision detection results is that the target straight weld belongs to a region boundary of any original motion boundary region, and the two weld endpoints of the target straight weld are each one of the two first region boundaries of the original motion boundary region. Therefore, the number of projection points determined based on the aforementioned actual point cloud data and / or the number of spatial points of each of the two first region boundaries must be greater than zero, resulting in the invalidation of the corresponding workpiece welding gun collision detection results.

[0097] Therefore, this application can organically combine cylinder search detection and point cloud projection distribution detection to perform workpiece welding gun collision detection on multiple original motion boundary regions constructed according to the same target tilt angle value within the same welding gun head motion plane, so as to determine whether there is a non-collision motion boundary region of the gun head in the multiple original motion boundary regions.

[0098] In this embodiment, when it is detected that the welding torch tip of the target welding torch does not collide with the target workpiece within a certain original motion boundary area, the computer device 10 will execute sub-step S224 accordingly; however, when it is detected that the welding torch tip of the target welding torch will collide with the target workpiece in all original motion boundary areas with the same target tilt angle value, the computer device 10 will jump and re-execute the step "select a target tilt angle value within the preset boundary area tilt angle range" in sub-step S222, so as to reconstruct multiple original motion boundary areas with new target tilt angle values ​​within the corresponding welding torch tip motion plane, and then continue to execute sub-step S223 for the reconstructed multiple original motion boundary areas. Specifically, for the same welding torch tip motion plane, each newly selected target tilt angle value is different from the previously selected historical target tilt angle values.

[0099] Sub-step S224: Directly use the original motion boundary region as the collision-free motion boundary region of the gun head.

[0100] In this embodiment, for the same welding torch head movement plane, if the computer device 10 still cannot construct any original movement boundary region that can serve as the non-collision movement boundary region of the torch head after traversing the preset boundary region tilt angle range, it indicates that the non-collision movement boundary region of the torch head cannot be substantially delineated within the welding torch head movement plane.

[0101] Therefore, by executing the above sub-steps S221 to S224, this application can delineate the collision-free movement boundary area of ​​the welding torch head as much as possible within any welding torch head movement plane.

[0102] Step S230: Based on the connection corner of the target welding torch head and body and the length of the welding torch body, construct a bounded plane for the target welding torch body collision-free motion based on the boundary region of the torch head collision-free motion.

[0103] In this embodiment, when the computer device 10 determines a non-collision movement boundary region of the welding torch head within a certain welding torch head movement plane targeting the target straight weld, the computer device 10 will use the second region boundary of the non-collision movement boundary region of the torch head (i.e., the region boundary p3p4 opposite to the target straight weld) as the intersection reference line to construct a welding torch body movement plane intersecting with the welding torch head movement plane (which adopts...). Figure 3 (represented by the orange dashed border parallelogram in sub-figure (a) or sub-figure (b)), wherein the angle between the second plane (which is expressed as...) between the plane of motion of the welding torch body and the plane of motion of the welding torch head is... Figure 3 In subgraph (a) or subgraph (b) The second angle (represented) ranges from [0°, 180°]. In one embodiment of this example, when initially constructing the welding gun body motion plane for any welding gun head motion plane, 0° is used as the included angle of the second plane of the initially constructed welding gun body motion plane.

[0104] Then, after each welding torch body motion plane is constructed, a quadrilateral motion plane of the torch body is delineated within that motion plane, so that the delineated quadrilateral motion plane of the torch body (which can be...) Figure 3 In sub-figure (a) or sub-figure (b), the orange solid-line quadrilateral p3p4p5p6 represents a planar boundary p3p4, which is the second region boundary p3p4 corresponding to the non-collision motion boundary region of the gun head. The first planar boundary (i.e., the first planar boundary in the motion plane of the gun body quadrilateral that connects to the two endpoints of the second region boundary) is... Figure 3The boundary lengths of the planar boundaries p4p5 and p3p6 in subgraph (a) or subgraph (b) are equal to the length of the welding gun body. In this case, each first planar boundary is directly connected to a first region boundary of the non-collision movement boundary region of the welding gun head via one endpoint of the second region boundary (for example, planar boundary p4p5 is directly connected to region boundary p1p4 via endpoint p4, and planar boundary p3p6 is directly connected to region boundary p2p3 via endpoint p3). The included angle between the directly connected first planar boundaries and the first region boundaries (i.e.,...) Figure 3 In subgraph (a) or subgraph (b) ( ) refers to the corner connecting the gun head and the gun body.

[0105] Next, for each quadrilateral motion plane of a welding torch body defined within a certain motion plane, the welding torch body of the target welding torch is tested to determine whether it collides with the target workpiece when it moves within the defined quadrilateral motion plane. This determines whether the corresponding quadrilateral motion plane can be used as a bounded plane for non-collision motion of the welding torch body within the motion plane of that welding torch body (wherein, the welding torch body of the target welding torch does not collide with the target workpiece when it moves within the bounded plane for non-collision motion of the welding torch body).

[0106] In this embodiment, when a collision-free bounded plane for the welding torch body is successfully constructed within a certain welding torch body movement plane, the computer device 10 will execute step S240 accordingly, so as to combine the determined collision-free bounded plane for the welding torch body and the collision-free boundary region of the torch head to constrain the actual movement posture of the target welding torch at each welding point of the target straight weld seam, so as to avoid the phenomenon of workpiece welding torch collision during subsequent workpiece welding process.

[0107] When a collision-free bounded plane for the welding torch body cannot be constructed within a certain welding torch body movement plane, it indicates that the target welding torch is highly likely or certain to collide with the target workpiece while moving within that plane. A new welding torch body movement plane needs to be constructed, and the aforementioned quadrilateral motion plane delineation steps are repeated for this new plane until a collision-free bounded plane is finally determined, or until no collision-free bounded plane can be determined based on the current welding torch head movement plane. The included angle of the second plane corresponding to each newly constructed welding torch body movement plane is different from the included angles of the second planes corresponding to all previously constructed historical welding torch body movement planes.

[0108] When the computer device 10 cannot determine any collision-free bounded plane for the welding torch body based on the current welding torch head movement plane, it indicates that the target welding torch is very likely or certain to collide with the target workpiece when moving within the current welding torch head movement plane. It is necessary to jump to and re-execute step S220, "constructing the welding torch head movement plane along the target straight weld between two intersecting planes", to reconstruct a new welding torch head movement plane. Then, for the new welding torch head movement plane, the remaining steps of step S220 and the remaining steps of step S230 are executed.

[0109] Alternatively, please refer to Figure 5 , Figure 5 yes Figure 2 A flowchart illustrating the sub-steps included in step S230. In this embodiment of the application, step S230 may include sub-steps S231-235, in order to construct, as far as possible, a bounded plane for the collisionless motion of the gun body based on determining a boundary region for the collisionless motion of a certain gun head.

[0110] Sub-step S231: Select a target plane rotation angle value within the preset plane rotation angle range, and construct a candidate gun body motion plane that intersects the second region boundary of the non-collision motion boundary region of the welding gun head with the target plane rotation angle value.

[0111] In this embodiment, the preset plane rotation angle range is the aforementioned second angle value range, the candidate gun body movement plane is the aforementioned welding gun body movement plane, the second region boundary is the region boundary of the non-collision movement boundary region of the gun head opposite to the target straight weld, and the actual plane angle between the candidate gun body movement plane and the welding gun head movement plane (i.e., the aforementioned second plane angle) is... ) represents the rotation angle value of the target plane.

[0112] Sub-step S232: Delineate the quadrilateral boundary within the candidate gun body's motion plane to obtain the corresponding target quadrilateral motion plane.

[0113] The target quadrilateral motion plane is the aforementioned gun body quadrilateral motion plane. One plane boundary of the target quadrilateral motion plane is the boundary of the second region. The boundary length of the first plane boundary in the target quadrilateral motion plane that connects to the two endpoints of the boundary of the second region is the length of the welding gun body. Each first plane boundary is directly connected to a first region boundary of the non-collision motion boundary region of the gun head through one endpoint of the boundary of the second region. The included angle between the directly connected first plane boundary and the first region boundary is the gun head and gun body connection corner.

[0114] Sub-step S233: Extract second point cloud data from the workpiece point cloud. The distance between the workpiece point cloud and the target quadrilateral motion plane is less than or equal to the cross-sectional radius of the target welding torch.

[0115] Sub-step S234: Detect whether the welding torch body of the target welding torch collides with the target workpiece when it moves within the target quadrilateral motion plane, based on the second point cloud data.

[0116] In this embodiment, the step of detecting whether the welding torch body of the target welding torch collides with the target workpiece when moving within the target quadrilateral motion plane based on the second point cloud data may include:

[0117] The number of projection points of the second point cloud data in the target quadrilateral motion plane is counted (i.e., the total number of all projection points within the quadrilateral boundary range of the target quadrilateral motion plane in the projection point cloud of the second point cloud data on the target quadrilateral motion plane), and the number of spatial points in the second point cloud data whose actual distance to each first plane boundary is less than the cross-sectional radius of the target welding torch (i.e., the actual number of spatial points in the second point cloud data within the cylindrical search space associated with each of the two first plane boundaries (where the axis of the cylinder is a first plane boundary and the radius of the corresponding cylinder base is the cross-sectional radius).

[0118] Check whether the number of projection points and the number of spatial points on each of the two first plane boundaries are both equal to zero;

[0119] If the number of projection points and the number of spatial points on each of the two first plane boundaries are both equal to zero, it is determined that the welding torch body of the target welding torch does not collide with the target workpiece when it moves in the target quadrilateral motion plane; otherwise, it is determined that the welding torch body of the target welding torch collides with the target workpiece when it moves in the target quadrilateral motion plane.

[0120] Therefore, this application can organically combine cylinder search detection and point cloud projection distribution detection to perform workpiece welding gun collision detection on each target quadrilateral motion plane within the same welding gun body motion plane, so as to determine whether there is a bounded plane for non-collision motion of the welding gun body within the welding gun body motion plane.

[0121] In this embodiment, when it is detected that the welding torch body does not collide with the target workpiece in a certain target quadrilateral motion plane, the computer device 10 will execute sub-step S235 accordingly; however, when it is detected that the welding torch head will collide with the target workpiece in all target quadrilateral motion planes within the same welding torch body motion plane, the computer device 10 will jump and re-execute the above sub-steps S231 to S234. Specifically, for the same welding torch head motion plane, the newly selected target plane rotation angle value is different from the previously selected historical target plane rotation angle values.

[0122] Sub-step S235 directly uses the target quadrilateral motion plane as the collision-free motion bounded plane of the gun body.

[0123] In this embodiment, for the same welding torch head motion plane, if the computer device 10 still cannot construct any target quadrilateral motion plane that can serve as the collision-free motion bounded plane of the torch body after traversing the preset plane rotation angle range, it indicates that it is not possible to determine any collision-free motion bounded plane of the torch body based on the current welding torch head motion plane.

[0124] Therefore, by executing the above sub-steps S231 to S235, this application can construct a bounded plane for the collisionless motion of the gun body as much as possible based on determining a certain boundary region of the non-collision motion of the gun head.

[0125] Step S240: According to the bounded plane of the non-collision motion of the gun body and the boundary area of ​​the non-collision motion of the gun head, the actual motion posture of the target welding gun at each welding point of the target straight weld seam is constrained.

[0126] In this embodiment, the final motion posture of the target welding torch at each welding point of the target straight weld seam can be composed of the welding torch body motion posture within the bounded plane of the non-collision motion of the torch body and the welding torch head motion posture within the boundary area of ​​the non-collision motion of the torch head, so as to avoid the phenomenon of workpiece welding torch collision during subsequent workpiece welding process.

[0127] Therefore, by performing the above steps S210 to S240, taking into account the actual shape constraints of the workpiece and the size limitations of the welding torch, this application can perform workpiece welding torch collision detection for different welding torch movement postures within the working space of the welding torch for straight welds. This allows for the automatic and rapid determination of the optimal welding torch movement posture at each weld point position of the straight weld that will not collide with the workpiece, thereby improving the workpiece welding efficiency and workpiece welding quality in the subsequent workpiece welding process.

[0128] In this application, to ensure that the computer device 10 can comprehensively consider the actual shape constraints of the workpiece and the size limitations of the welding torch, and to perform workpiece-welding torch collision detection for different welding torch movement postures within the working space of the welding torch for curved welds, so as to automatically and quickly determine the optimal welding torch movement posture at each welding point position of the curved weld that will not collide with the workpiece, this application embodiment achieves the aforementioned objective by providing a welding torch movement posture optimization method for curved welds. The welding torch movement posture optimization method provided by this application for curved welds will be described in detail below.

[0129] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating the second welding torch motion posture optimization method provided in this application embodiment. In this application embodiment, the second welding torch motion posture optimization method is applicable to achieving collision-free welding torch motion posture optimization for curved welds, wherein the second welding torch motion posture optimization method may include steps S310 to S350.

[0130] Step S310: Obtain the workpiece point cloud of the target workpiece, and determine the main plane of the weld seam where the target curve weld seam is located on the target workpiece based on the workpiece point cloud.

[0131] In this embodiment, the target curved weld is the curved weld on the target workpiece that requires welding (which can be...). Figure 7 The red-bordered circle in neutron diagram (a) or Figure 7 (Represented by the red border ellipse in neutron graph (b)); When the workpiece point cloud of the target workpiece is obtained and a target curve weld is determined on the target workpiece, local point cloud data within the sphere search space of multiple weld points on the target curve weld (the center of the sphere is a weld point on the target curve weld and its spatial radius is a preset search distance value) can be extracted from the workpiece point cloud. Then, for each weld point, a plane segmentation algorithm based on region growing or a RANSAC plane fitting algorithm is used to perform cluster analysis on the local point cloud data corresponding to the weld point, so as to accurately separate at least one plane from the corresponding local point cloud data. Then, by performing plane statistics on the sphere search space of all weld points, the plane with the highest frequency of occurrence is selected as the main plane of the weld where the target curve weld is located.

[0132] Step S320: Determine the curve normal vector of each weld point of the target curve weld in the main plane of the weld.

[0133] In this embodiment, the curve normal vector of each weld point of the target curved weld seam in the main plane of the weld seam points towards the welding operation space of the target welding torch. Figure 7Taking neutron graph (a) as an example, when the welding operation space of the target welding torch is outside the target curved weld, for the weld point O on the target curved weld, its corresponding curve normal vector (using...) Figure 7 The green solid arrow in neutron diagram (a) indicates that one end is connected to the weld point O and the other end points to the outside of the target curve weld.

[0134] Step S330: For each weld point of the target curved weld, construct the welding gun movement plane based on the welding reference plane where the curve normal vector of the weld point is located.

[0135] In this embodiment, the welding reference plane corresponding to any weld point on the target curved weld is a plane perpendicular to the main plane of the weld and containing the curve normal vector of the weld point; any welding torch movement plane constructed for a weld point (e.g., weld point O) of the target curved weld intersects with the welding reference plane of that weld point, and the welding torch movement plane is perpendicular to the main plane of the weld; and the intersecting line between the welding torch movement plane corresponding to the same weld point and the welding reference plane passes through that weld point (e.g., Figure 7 In both sub-figures (a) and (b), the welding torch movement plane passes through the weld point O, and the welding torch movement plane is perpendicular to the main plane of the weld seam.

[0136] For each weld point of the target curve weld, a target yaw angle can be selected within a preset yaw angle range (e.g., [-60°, 60°]) as the angle between the welding torch movement plane passing through the weld point and the welding reference plane (which is adopted). Figure 7 In neutron diagram (a) (This is represented). In one embodiment of this example, when initially constructing the welding torch movement plane for any weld point of the target curved weld, 0° can be used as the included angle of the third plane of the initially constructed welding torch movement plane.

[0137] Step S340: Based on the workpiece point cloud and the length of the welding torch head, the corner connecting the torch head and body, and the length of the welding torch body, construct a simplified non-collision welding torch graphic in the welding torch motion plane corresponding to the welding point.

[0138] In this embodiment, after a welding torch movement plane is constructed for a weld point of the target curved weld, simplified welding torch graphics with different placement postures (the endpoints of which include the weld point) are constructed within this welding torch movement plane for the target welding torch. Then, by detecting whether the target welding torch collides with the target workpiece while maintaining the welding torch posture corresponding to each of the different simplified welding torch graphics, it is determined whether a collision-free simplified welding torch graphic exists within the welding torch movement plane (wherein, the target welding torch does not collide with the target workpiece while maintaining the welding torch posture corresponding to the collision-free simplified welding torch graphic). Any simplified welding torch graphic constructed within a single welding torch movement plane includes interconnected straight segments of the welding torch head (e.g.,...). Figure 7 The straight segment Os1 in neutron diagram (b) and the straight segment of the welding torch body (e.g.) Figure 7 In neutron diagram (b), the straight line segments s1 and s2), one end of the straight line segment of the welding torch head is the weld point, and the actual included angle between the straight line segment of the welding torch head and the straight line segment of the welding torch body (i.e., Figure 7 In neutron diagram (b) The angle connecting the welding torch head and body is defined as follows: the length of the straight segment of the welding torch head is the length of the welding torch head, and the length of the straight segment of the welding torch body is the length of the welding torch body; within the welding torch movement plane of a single welding point, the projection vector of the curve normal vector of that welding point onto the welding torch movement plane (which uses...) Figure 7 The green solid arrow in neutron diagram (b) represents the weld point, which points to other graphical endpoints of any simplified welding torch diagram (e.g., Figure 7 The directional vectors of the graphic endpoints s1 and s2 in the neutron diagram (b) both point to the same side of the welding torch's motion plane.

[0139] In this embodiment, for each weld point on the target curved weld, if a collision-free simplified welding torch graphic is successfully constructed in a certain welding torch movement plane corresponding to the weld point, the computer device 10 will execute step S350 accordingly, so as to use the collision-free simplified welding torch graphic to constrain the actual movement posture of the target welding torch at the weld point of the target curved weld, so as to avoid the workpiece welding torch collision phenomenon during the subsequent workpiece welding process.

[0140] For each weld point on the target curved weld seam, if a collision-free simplified welding torch pattern cannot be constructed within a certain welding torch movement plane corresponding to that weld point, it indicates that the target welding torch is highly likely or certain to collide with the target workpiece when moving within that welding torch movement plane. Therefore, a new welding torch movement plane needs to be constructed for that weld point, and step S330 is repeated for this new welding torch movement plane until a collision-free simplified welding torch pattern is finally determined within a new welding torch movement plane. The included angle of the third plane corresponding to each newly constructed welding torch movement plane is different from the included angles of the third planes corresponding to all previously constructed historical welding torch movement planes.

[0141] Alternatively, please refer to Figure 8 , Figure 8 yes Figure 6 A flowchart illustrating the sub-steps included in step S340. In this embodiment, step S340 may include sub-steps S341 to S343, so as to construct a simplified, collision-free welding torch pattern as much as possible within any welding torch movement plane corresponding to each weld point on the curved weld.

[0142] Sub-step S341: Select a target pitch angle value within the preset simplified graphic pitch angle range, and construct the corresponding original simplified graphic of the welding gun in the welding gun movement plane of the welding point according to the target pitch angle value.

[0143] The actual included angle between the straight segment of the welding torch head and the straight segment of the welding torch body in the simplified original welding torch diagram (which adopts...) Figure 7 In neutron diagram (b) The target pitch angle value is represented as [10°, 80°]. The preset simplified graphic pitch angle range can be expressed as [10°, 80°]. In one embodiment of this example, for any welding torch movement plane, 45° can be selected as the target pitch angle value used when initially constructing the original simplified welding torch graphic.

[0144] Sub-step S342: Based on the cross-sectional radius of the target welding torch and the workpiece point cloud, detect whether the target welding torch collides with the target workpiece while maintaining the welding torch posture corresponding to the original simplified welding torch graphic.

[0145] In this embodiment, the step of detecting whether the target welding torch collides with the target workpiece while maintaining the welding torch posture corresponding to the original simplified welding torch graphic, based on the cross-sectional radius of the target welding torch and the workpiece point cloud, may include:

[0146] The straight segments of the welding torch head and the welding torch body in the simplified original welding torch diagram are respectively taken as the axes of a cylinder, and a cylinder search space is constructed according to the cross-sectional radius; wherein, the radius of the bottom surface of the cylinder in the cylinder search space corresponding to the straight segments of the welding torch head and the welding torch body is the cross-sectional radius;

[0147] Extract the third point cloud data within the constructed search space of all cylinders from the workpiece point cloud, and filter out discrete points in the third point cloud data whose actual distance to the weld point connected to the original simplified welding gun graphic is less than a preset distance threshold, to obtain the second candidate point cloud.

[0148] Detect whether the actual number of spatial points in the second candidate point cloud is equal to zero;

[0149] If the actual number of spatial points in the second candidate point cloud is zero, it is determined that the target welding torch does not collide with the target workpiece when maintaining the welding torch posture corresponding to the original simplified welding torch graphic; otherwise, it is determined that the target welding torch collides with the target workpiece when maintaining the welding torch posture corresponding to the original simplified welding torch graphic.

[0150] The discrete point filtering operation for the third point cloud data is used to avoid errors in the workpiece welding gun collision detection results caused by the actual point cloud data on the target curve weld (i.e., the aforementioned filtered discrete points). The reason for the error in the workpiece welding gun collision detection results is that each simplified welding gun graphic at any weld point on the target curve weld is connected to that weld point. Therefore, the number of spatial points counted based on the aforementioned actual point cloud data must be greater than zero, resulting in the invalidation of the corresponding workpiece welding gun collision detection results.

[0151] Therefore, this application can perform workpiece welding gun collision detection for simplified welding gun graphics with different placement postures within the same welding gun movement plane using a cylinder search detection method, so as to determine whether there is a collision-free simplified welding gun graphic within the welding gun movement plane.

[0152] In this embodiment, when it is detected that the target welding torch does not collide with the target workpiece while maintaining the welding torch posture corresponding to a certain original simplified welding torch pattern, the computer device 10 will execute sub-step S343 accordingly; however, when it is detected that the target welding torch collides with the target workpiece while maintaining the welding torch posture of each of the original simplified welding torch patterns in the same welding torch movement plane, the computer device 10 will jump and re-execute the above sub-steps S341 to S342. Specifically, for the same welding torch movement plane, the newly selected target pitch angle value is different from the previously selected historical target pitch angle values.

[0153] Sub-step S343 directly uses the original simplified welding torch graphic as the collision-free simplified welding torch graphic.

[0154] In this embodiment, for the same welding torch movement plane, if the computer device 10 still cannot construct any original simplified welding torch graphic that can be used as the collision-free simplified welding torch graphic after traversing the preset simplified graphic pitch angle range, it indicates that no original simplified welding torch graphic can be determined based on the current welding torch movement plane.

[0155] Therefore, by executing the above sub-steps S341 to S343, this application can construct a simplified welding torch pattern with no collision as much as possible within any welding torch movement plane corresponding to each welding point on the curved weld.

[0156] Step S350: Perform attitude constraints on the actual motion posture of the target welding torch at the welding point according to the simplified diagram of the collision-free welding torch.

[0157] Therefore, this application can, through the above steps S310 to S350, comprehensively consider the actual shape constraints of the workpiece and the size limitations of the welding torch, and perform workpiece and welding torch collision detection for different welding torch movement postures within the working space of the welding torch for curved welds, so as to automatically and quickly determine the optimal welding torch movement posture at each welding point position of the curved weld that will not collide with the workpiece, thereby improving the workpiece welding efficiency and workpiece welding quality in the subsequent workpiece welding process.

[0158] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0159] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the various functions provided in this application are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, including several instructions to cause a computer device (e.g., a laptop computer, a welding robot equipped with a target welding torch, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned readable storage medium includes: USB flash drives, mobile hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0160] The above descriptions are merely various embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of optimizing a welding gun motion pose, the method comprising: The method comprises: acquiring a workpiece point cloud of a target workpiece, and determining two intersecting planes forming a target straight-line weld on the target workpiece based on the workpiece point cloud; constructing a welding torch head movement plane between the two intersecting planes along the target straight-line weld, and defining a head non-collision movement boundary for a target welding torch in the constructed welding torch head movement plane along the target straight-line weld; when the head non-collision movement boundary region is successfully defined in the welding torch head movement plane, constructing a body non-collision movement bounded plane for the target welding torch based on the head non-collision movement boundary region according to a head-body connecting corner of the target welding torch and a welding torch body length, wherein the welding torch head of the target welding torch does not collide with the target workpiece when moving in the head non-collision movement boundary region; when the body non-collision movement bounded plane is successfully constructed for the target welding torch, constraining the actual movement posture of the target welding torch at each welding point of the target straight-line weld according to the body non-collision movement bounded plane and the head non-collision movement boundary region, wherein the welding torch body of the target welding torch does not collide with the target workpiece when moving in the body non-collision movement bounded plane; wherein the step of defining a head non-collision movement boundary for a target welding torch in the constructed welding torch head movement plane along the target straight-line weld comprises: extracting first point cloud data with a distance between the welding torch head movement plane and the first point cloud data being less than or equal to the cross-sectional radius of the target welding torch from the workpiece point cloud; selecting a target inclination angle value in a preset boundary region inclination angle interval, and constructing original movement boundary regions corresponding to a plurality of preset quadrilateral shapes respectively in the welding torch head movement plane according to the target inclination angle value and the welding torch head length of the target welding torch, wherein the common boundary between the plurality of original movement boundary regions is the target straight-line weld, and the boundary length of each of the two first region boundaries of each original movement boundary region connected with the target straight-line weld is the welding torch head length; for each original movement boundary region, detecting whether the welding torch head of the target welding torch collides with the target workpiece when moving in the original movement boundary region according to the first point cloud data; if it is detected that the welding torch head of the target welding torch does not collide with the target workpiece in any one original movement boundary region, directly taking the original movement boundary region as the head non-collision movement boundary region, otherwise jumping to the step of selecting a target inclination angle value in a preset boundary region inclination angle interval for continuous execution; the step of constructing a body non-collision movement bounded plane for the target welding torch based on the head non-collision movement boundary region according to the head-body connecting corner of the target welding torch and the welding torch body length comprises: selecting a target plane rotation angle value within a preset plane rotation angle interval, and constructing a candidate gun body movement plane intersecting a second region boundary of the gun head non-collision movement boundary region at the target straight-line weld according to the target plane rotation angle value, wherein an actual plane included angle between the candidate gun body movement plane and the welding gun head movement plane is the target plane rotation angle value, and the second region boundary is a region boundary of the gun head non-collision movement boundary region opposite to the target straight-line weld; performing quadrilateral boundary delineation in the candidate gun body movement plane to obtain a corresponding target quadrilateral movement plane; wherein one plane boundary of the target quadrilateral movement plane is the second region boundary, and a boundary length of a first plane boundary connected by two end points of the second region boundary in the target quadrilateral movement plane is the welding gun body length, each first plane boundary is directly connected with a first region boundary of the gun head non-collision movement boundary region through one end point of the second region boundary, and a boundary included angle between the directly connected first plane boundary and the first region boundary is the gun head gun body connection corner; extracting second point cloud data with a distance between the target quadrilateral movement plane and the second point cloud data being less than or equal to a cross-sectional radius of the target welding gun from the workpiece point cloud, and detecting whether the target welding gun body collides with the target workpiece when the target welding gun body moves in the target quadrilateral movement plane according to the second point cloud data; if it is detected that the target welding gun body does not collide with the target workpiece when the target welding gun body moves in the target quadrilateral movement plane, directly taking the target quadrilateral movement plane as the gun body non-collision movement bounded plane, otherwise jumping to the step of selecting a target plane rotation angle value within a preset plane rotation angle interval and continuing to execute.

2. The method of claim 1, wherein, For each original movement boundary region, the step of detecting whether the target welding gun head collides with the target workpiece when the target welding gun head moves in the original movement boundary region according to the first point cloud data comprises: filtering out discrete points in the first point cloud data with an actual distance between the discrete points and the target straight-line weld being less than a preset distance threshold to obtain a first candidate point cloud; counting a number of projected points of the first candidate point cloud in the original movement boundary region, and a number of space points in the first candidate point cloud to each first region boundary of the original movement boundary region with an actual distance being less than the cross-sectional radius of the target welding gun; detecting whether the number of projected points and the number of space points of each first region boundary of the original movement boundary region are both equal to zero; if it is detected that the number of projected points and the number of space points of each first region boundary of the original movement boundary region are both equal to zero, determining that the target welding gun head does not collide with the target workpiece when the target welding gun head moves in the original movement boundary region, otherwise determining that the target welding gun head collides with the target workpiece when the target welding gun head moves in the original movement boundary region.

3. The method of claim 1, wherein, The step of detecting whether the welding gun body of the target welding gun collides with the target workpiece when the welding gun body moves in the target quadrilateral motion plane according to the second point cloud data comprises: counting the number of projected points of the second point cloud data in the target quadrilateral motion plane, and the number of space points in the second point cloud data to each first plane boundary that is less than the cross-sectional radius of the target welding gun; detecting whether the number of projected points and the number of space points of each of the two first plane boundaries are both equal to zero; if it is detected that the number of projected points and the number of space points of each of the two first plane boundaries are both equal to zero, it is determined that the welding gun body of the target welding gun does not collide with the target workpiece when the welding gun body moves in the target quadrilateral motion plane, otherwise it is determined that the welding gun body of the target welding gun collides with the target workpiece when the welding gun body moves in the target quadrilateral motion plane.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: when the gun head non-collision motion boundary region cannot be circumscribed in the welding gun head motion plane, or the gun body non-collision motion bounded plane cannot be constructed for the target welding gun, jumping to the above-mentioned step of constructing the welding gun head motion plane between the two intersecting planes along the target straight-line weld to continue execution.

5. A method of optimizing a welding gun motion attitude, characterized in that, The method comprises: obtaining a workpiece point cloud of a target workpiece, and determining a welding seam main plane in which a target curved-line weld on the target workpiece is located based on the workpiece point cloud; determining a curved-line normal vector of each welding point of the target curved-line weld in the welding seam main plane, wherein the curved-line normal vector of each welding point points to a welding operation space of a target welding gun in the welding seam main plane; for each welding point of the target curved-line weld, constructing a welding gun motion plane based on a welding reference plane in which a curved-line normal vector of the welding point is located, wherein an intersecting straight line between the welding gun motion plane and the welding reference plane corresponding to the same welding point passes through the welding point, and the welding gun motion plane and the welding reference plane corresponding to the same welding point are both perpendicular to the welding seam main plane; constructing a non-collision welding gun simplified graph in the welding gun motion plane corresponding to the welding point according to the workpiece point cloud and a welding gun head length, a gun head-gun body connecting corner and a welding gun body length of the target welding gun, wherein a graph end point of any welding gun simplified graph constructed in the welding gun motion plane of the welding point comprises the welding point; if the non-collision welding gun simplified graph is successfully constructed in the welding gun motion plane corresponding to the welding point, constraining a motion posture of the target welding gun at the welding point according to the non-collision welding gun simplified graph, otherwise jumping to the above-mentioned step of constructing the welding gun motion plane based on the welding reference plane in which the curved-line normal vector of the welding point is located to continue execution; wherein, for each welding point of the target curved-line weld, the step of constructing a non-collision welding gun simplified graph in the welding gun motion plane corresponding to the welding point according to the workpiece point cloud and a welding gun head length, a gun head-gun body connecting corner and a welding gun body length of the target welding gun comprises: selecting a target pitch angle value within a preset pitch angle interval of a simplified pattern, and constructing a corresponding original welding gun simplified pattern according to the target pitch angle value in a welding gun movement plane of the welding point, wherein the original welding gun simplified pattern comprises a welding gun head straight line segment and a welding gun body straight line segment connected with each other, one end of the welding gun head straight line segment is the welding point, an actual included angle between the welding gun head straight line segment and the welding gun body straight line segment is a gun head-gun body connecting corner, a line segment length of the welding gun head straight line segment is a welding gun head length, a line segment length of the welding gun body straight line segment is a welding gun body length, and an actual included angle between the welding gun head straight line segment and a welding seam main plane is the target pitch angle value; detecting whether the target welding gun collides with the target workpiece when maintaining the welding gun posture corresponding to the original welding gun simplified pattern according to a cross-sectional radius of the target welding gun and the workpiece point cloud; if it is detected that the target welding gun does not collide with the target workpiece when maintaining the welding gun posture corresponding to the original welding gun simplified pattern, directly taking the original welding gun simplified pattern as the non-collision welding gun simplified pattern, otherwise jumping to the step of selecting a target pitch angle value within a preset pitch angle interval of a simplified pattern and continuing to execute.

6. The method of claim 5, wherein, The step of detecting whether the target welding gun collides with the target workpiece when maintaining the welding gun posture corresponding to the original welding gun simplified pattern according to a cross-sectional radius of the target welding gun and the workpiece point cloud comprises: respectively taking the welding gun head straight line segment and the welding gun body straight line segment in the original welding gun simplified pattern as cylinder axes, and constructing a cylinder search space according to the cross-sectional radius; extracting third point cloud data in all the constructed cylinder search spaces from the workpiece point cloud, and filtering out discrete points in the third point cloud data, which have an actual distance to the welding point connected with the original welding gun simplified pattern less than a preset distance threshold, to obtain a second candidate point cloud; detecting whether an actual space point number of the second candidate point cloud is equal to zero; if it is detected that the actual space point number of the second candidate point cloud is equal to zero, determining that the target welding gun does not collide with the target workpiece when maintaining the welding gun posture corresponding to the original welding gun simplified pattern, otherwise determining that the target welding gun collides with the target workpiece when maintaining the welding gun posture corresponding to the original welding gun simplified pattern.

7. A computer device, comprising: The processor and the memory, the memory stores a computer program capable of being executed by the processor, and the processor can execute the computer program to implement the welding gun movement posture optimization method in any one of claims 1-4 or the welding gun movement posture optimization method in any one of claims 5-6.

Citation Information

Patent Citations

  • Welding gun head automatic obstacle avoidance method for additive manufacturing

    CN114161047A

  • Non-standard welding-oriented robot efficient collision-free path planning method and system

    CN120962227A