Multi-welding-seam welding control method and device, electronic equipment and storage medium
By automatically controlling the target endpoints and common intersections of the welding gap, adjusting the posture of the welding robot arm, the complex posture adjustment of the welding robot arm in multi-pass weld operation is solved, improving welding efficiency and quality, and reducing manual intervention and safety risk.
Patent Information
- Application Number
- CN202411374272.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
The posture adjustment of the welding robot arm during the continuous welding of multi-pass welds is complicated, which leads to changes in the geometry and welding conditions of the workpiece, and the posture of the robot arm needs to be adjusted in real time, which increases the operational complexity and reduces the welding quality.
Through the automated control method, the target welding endpoint and common intersection of each gap to be welded are determined, the teaching weld is selected and the welding gun is moved, and the mechanical arm posture is adjusted according to the anti-collision point strategy to ensure the safety and efficiency of the welding process.
The welding process is automated, the welding efficiency and quality are improved, manual intervention and error are reduced, and the probability of equipment damage and safety accidents is reduced.
Smart Images

Figure CN119216885A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of welding control technology, and in particular to a control method, device, electronic equipment and storage medium for multi-weld welding. Background Art
[0002] In modern manufacturing, welding technology is widely used in various industrial fields, especially in the fields of automobiles, ships, construction, and aerospace. The introduction of welding robot arms has greatly improved the efficiency and consistency of the welding process. However, with the increasing complexity of the welding process, especially when performing continuous welding operations of multiple welds, the posture adjustment of the robot arm has become a technical problem that needs to be solved urgently.
[0003] At present, the operation of welding robot arms usually relies on pre-set postures to ensure the quality and uniformity of the weld. However, in practical applications, due to changes in the geometry of the workpiece, welding position and welding conditions, the established posture of the robot arm may not always be applicable. This leads to the need for real-time adjustment and calibration of the robot arm's posture during the welding process, which must rely on manual intervention. This not only increases the complexity of the operation, but also greatly reduces work efficiency. In addition, the manual adjustment process is prone to introduce errors, thereby affecting the welding quality. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a control method, device, electronic equipment and storage medium for multi-weld welding, which can automatically control to achieve precise welding work, reduce welding defects caused by human factors, and further improve welding work efficiency and welding quality.
[0005] The present application provides a control method for multi-weld welding, the control method comprising:
[0006] Determine the target welding end points of each seam to be welded and the common intersection point formed by all seams to be welded;
[0007] Select a gap to be welded as a teaching weld, and control the welding gun on the robot arm to move to the target welding end point of the teaching weld;
[0008] Controlling the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld;
[0009] Determine the second anti-collision point on each of the remaining seams to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy;
[0010] For each remaining seam to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the seam to be welded;
[0011] The robot arm is controlled to move so that the welding gun starts from the second anti-collision point on the gap to be welded and moves along the gap to be welded toward the target welding end point of the gap to be welded for welding.
[0012] Optionally, controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld includes:
[0013] Obtaining the initial end position of the welding gun end and the initial posture of the robot arm;
[0014] Determine, according to the initial end position, the target welding end point of the teaching weld, and the initial posture of the robot arm, the movement posture of the robot arm when the end of the welding gun is moved to the target welding end point of the teaching weld;
[0015] The mechanical arm is controlled to move according to the moving posture.
[0016] Optionally, the first anti-collision point is determined by the following steps:
[0017] Real-time identification of the end position of the welding gun during mobile welding to determine the current end position of the welding gun;
[0018] Determining a current distance between two points based on the current end position and the common intersection point;
[0019] When the current distance reaches a preset safety distance, the current end position is determined as a first anti-collision point.
[0020] Optionally, the determining of the respective second anti-collision points on each remaining seam to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and a preset anti-collision strategy includes:
[0021] Determine, according to the first anti-collision point, all target welding endpoints, and the common intersection, a first distance between the first anti-collision point and the target welding endpoint on the teaching weld, and a second distance between each target welding endpoint and the common intersection;
[0022] For each seam to be welded, determining a first direction vector of the seam to be welded according to a second distance corresponding to the seam to be welded, a target welding end point on the seam to be welded, and the common intersection point;
[0023] Determine a second vector pointing from the coordinate origin to a second anti-collision point on the gap to be welded according to the first direction vector of the gap to be welded, the first distance, and a first vector pointing from the coordinate origin to the common intersection;
[0024] According to the second vector, a second anti-collision point on the gap to be welded is determined.
[0025] Optionally, when controlling the welding gun to move from the first anti-collision point to the second anti-collision point of the gap to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes:
[0026] Calculate the first normal vector of the target welding end point of the teaching weld, the common intersection point and the target welding end point of the next gap to be welded on the first reference plane; the next gap to be welded is the gap to be welded after the current gap to be welded is welded;
[0027] Calculate a first unit vector of an intersection line between a plane having a first direction vector of the gap to be welded as a normal vector and a first reference plane;
[0028] According to the third distance between the first center point and the common intersection point, and the fourth distance between the first reference point and the common intersection point, the first unit vector is corrected to determine the first target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector;
[0029] Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix;
[0030] Determine, according to the initial rotation matrix, the first initial reference vector and the first target vector, a first target rotation matrix corresponding to the movement of the robot arm from the first anti-collision point to the second anti-collision point of the gap to be welded;
[0031] According to the first target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
[0032] Optionally, when controlling the welding gun to move from the target welding end point to the second anti-collision point of the gap to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes:
[0033] Calculate a second normal vector on a second reference plane where a target welding end point of the teaching weld, the common intersection point, and a target welding end point of a previous weld gap are located;
[0034] Calculate a second unit vector of an intersection line between a plane having a second direction vector of the gap to be welded as a normal vector and a second reference plane;
[0035] According to the fifth distance between the second center point and the common intersection point, and the sixth distance between the second reference point and the common intersection point, the second unit vector is corrected to determine the second target vector; wherein the second center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the previous gap to be welded, and the second reference point is a point determined according to the second center point, the fifth distance and the second unit vector;
[0036] Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix;
[0037] Determine, according to the initial rotation matrix, the first initial reference vector and the first target vector, a second target rotation matrix corresponding to the movement of the robot arm from the target welding end point to the second anti-collision point of the gap to be welded;
[0038] According to the second target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
[0039] Optionally, the control method further includes:
[0040] Identify whether the welding gun has traversed all target welding end points;
[0041] If so, it is determined that the multi-weld welding task is completed, and an end instruction is sent to the robotic arm.
[0042] The embodiment of the present application also provides a control device for multi-weld welding, the control device comprising:
[0043] A first determination module is used to determine the target welding end point of each seam to be welded and the common intersection point formed by all the seams to be welded;
[0044] A selection module is used to select a gap to be welded as a teaching weld and control the welding gun on the robot arm to move to the target welding end point of the teaching weld;
[0045] A first control module is used to control the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld;
[0046] A second determination module is used to determine the respective second anti-collision points on each remaining seam to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy;
[0047] A second control module is used to control the movement of the robot arm for each remaining seam to be welded, so that the welding gun moves to the second anti-collision point of the seam to be welded;
[0048] The third control module is used to control the movement of the robot arm so that the welding gun starts from the second anti-collision point on the gap to be welded and moves along the gap to be welded to the target welding end point of the gap to be welded for welding.
[0049] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the control method described above are performed.
[0050] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the control method described above are executed.
[0051] The embodiments of the present application provide a control method, device, electronic device and storage medium for multi-weld welding. The control method includes: determining the target welding end point of each seam to be welded and the common intersection formed by all the seams to be welded; selecting a seam to be welded as a teaching weld, and controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld; controlling the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld to the common intersection for welding until it moves to the first anti-collision point on the teaching weld; determining the second anti-collision point of each of the remaining seams to be welded except the teaching weld according to the first anti-collision point, all the target welding end points, the common intersection and the preset anti-collision strategy; for each of the remaining seams to be welded, controlling the movement of the robot arm so that the welding gun moves to the second anti-collision point of the seam to be welded; controlling the movement of the robot arm so that the welding gun starts from the second anti-collision point on the seam to be welded and moves along the seam to the target welding end point of the seam to be welded for welding.
[0052] In this way, by predetermining the target welding endpoints and common intersections of each seam to be welded, the welding process becomes more efficient and production efficiency is improved. In addition, the teaching weld is automatically selected and welded, which reduces the need for manual intervention, improves the automation level of the welding process, and reduces the possibility of human error. In addition, by setting anti-collision points to ensure safety during the welding process, the risk of interference between the robot arm and other components is reduced, thereby reducing the probability of equipment damage and safety accidents. Therefore, this solution has significant technical advantages in improving welding efficiency, safety and quality consistency.
[0053] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flow chart of a control method for multi-weld welding provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a plurality of seams to be welded provided in the present application;
[0057] Figure 3 A schematic diagram of the structure of a control device for multi-weld welding provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0060] In modern manufacturing, welding technology is widely used in various industrial fields, especially in the fields of automobiles, ships, construction, and aerospace. The introduction of welding robot arms has greatly improved the efficiency and consistency of the welding process. However, with the increasing complexity of the welding process, especially when performing continuous welding operations of multiple welds, the posture adjustment of the robot arm has become a technical problem that needs to be solved urgently.
[0061] At present, the operation of welding robot arms usually relies on pre-set postures to ensure the quality and uniformity of the weld. However, in practical applications, due to changes in the geometry of the workpiece, welding position and welding conditions, the established posture of the robot arm may not always be applicable. This leads to the need for real-time adjustment and calibration of the robot arm's posture during the welding process, which must rely on manual intervention. This not only increases the complexity of the operation, but also greatly reduces work efficiency. In addition, the manual adjustment process is prone to introduce errors, thereby affecting the welding quality.
[0062] Based on this, the embodiments of the present application provide a control method, device, electronic device and storage medium for multi-weld welding, which can automatically control to achieve precise welding work, reduce welding defects caused by human factors, and further improve welding work efficiency and welding quality.
[0063] See also Figure 1 , Figure 1 This is a flow chart of a control method for multi-weld welding provided in an embodiment of the present application. Figure 1 As shown in , the control method provided by the embodiment of the present application includes:
[0064] S101, determining the target welding end point of each seam to be welded and the common intersection point formed by all the seams to be welded.
[0065] S102, selecting a gap to be welded as a teaching weld, and controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld.
[0066] S103, controlling the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld.
[0067] S104, determining a second anti-collision point on each remaining seam to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and a preset anti-collision strategy.
[0068] S105. For each remaining seam to be welded, control the robot arm to move so that the welding gun moves to the second anti-collision point of the seam to be welded.
[0069] S106, controlling the movement of the robot arm so that the welding gun starts from the second anti-collision point on the gap to be welded, and moves along the gap to be welded toward the target welding end point of the gap to be welded for welding.
[0070] With respect to step S101, the solution is applied to welding of multiple seams to be welded (generally more than 3 seams), wherein the multiple seams to be welded have the same common intersection point, and each welding seam generally has only one target welding endpoint.
[0071] It should be noted that all welds to be welded are located within the working range of the robot arm.
[0072] For examples, see Figure 2 , Figure 2 A schematic diagram of multiple gaps to be welded provided in this application. Figure 2 As shown, D is the common intersection point, a, b, c are the target welding end points of the gaps to be welded, line segment aD is the selected teaching weld, a ′ is the first anti-collision point, b ′ and c ′ is the second anti-collision point, Ea is the initial Euler angle, and Eb and Ec are the target Euler angles.
[0073] With respect to step S102, the selection of the teaching weld may be performed manually or automatically for reference welding.
[0074] When controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld, it includes: controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld according to the initial Euler angle.
[0075] The initial Euler angles and the corresponding initial rotation matrix may be determined manually or automatically.
[0076] In one embodiment provided in the present application, the controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld includes:
[0077] S1021. Obtaining the initial end position of the welding gun end and the initial posture of the robot arm.
[0078] S1022. Determine the movement posture of the robot arm when the end of the welding gun is moved to the target welding end point of the teaching weld according to the initial end position, the target welding end point of the teaching weld and the initial posture of the robot arm.
[0079] S1023. Control the movement of the robotic arm according to the movement posture.
[0080] With respect to step S1021, position sensors (such as laser displacement sensors or encoders) may be installed on the end of the welding gun and the robotic arm to obtain the initial end position of the welding gun and the posture information of the robotic arm in real time.
[0081] For step S1022, when determining to move the welding gun tip to the target welding end point of the teaching weld according to the initial end position, the target welding end point of the teaching weld and the initial posture of the robot arm, the movement posture of the robot arm can be determined using a mathematical model and kinematic analysis (inverse kinematics algorithm).
[0082] The moving posture includes information such as initial Euler angles and initial rotation matrix.
[0083] With respect to step S1023, a motor control instruction is determined according to the moving posture, and the movement of each joint of the robot arm is accurately controlled according to the motor control instruction, so that the welding gun moves to the target welding end point of the teaching weld.
[0084] With respect to step S103, in this step, the welding gun is controlled to move from the target welding end point of the teaching weld to the common intersection and perform welding until it reaches the first anti-collision point, thereby ensuring the safety of the welding process and reducing the risk of collision.
[0085] In an implementation manner provided in the present application, the first anti-collision point is determined by the following steps:
[0086] S201, real-time identification of the end position of the welding gun during mobile welding to determine the current end position of the welding gun.
[0087] S202, determining a current distance between two points according to the current end position and the common intersection point;
[0088] S203: When the current distance reaches a preset safety distance, the current end position is determined as a first anti-collision point.
[0089] For step S201, for example, the position of the welding gun is continuously monitored by a sensor or a visual system to ensure that its precise coordinates in space can be acquired in real time to determine the current end position of the welding gun.
[0090] With respect to step S202, the current distance between the two points is determined according to the current end position and the common intersection point, which may be obtained by calculating the straight-line distance between the current end position of the welding gun and the common intersection point.
[0091] For example, continue to refer to Figure 2 ,A distance sensor can also be installed on the robotic arm to determine the current distance between two points.
[0092] With respect to step S203, the safety distance may be adaptively set according to actual conditions.
[0093] For examples, please continue to refer to Figure 2 , turn on the robotic arm and make it move along the preset welding track. The distance sensor is installed on the welding gun to detect the distance between the welding gun and the welding plate on the side corresponding to the adjacent weld. When the distance sensor detects that the distance between the welding gun and the welding plate on the side corresponding to the adjacent weld is ≤50mm (30mm-100mm), the alarm condition of the distance sensor is triggered. After the controller receives the alarm signal of the distance sensor, it controls the robotic arm to stop moving. At this time, the fixed position of the welding gun is marked as a' (a' is the first anti-collision point), and the distance between a' and D is defined as the dangerous distance.
[0094] With respect to step S104, in an embodiment provided in the present application, the second anti-collision point on each remaining seam to be welded except the teaching weld is determined according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy, including:
[0095] S1041. Determine, based on the first anti-collision point, all target welding endpoints, and the common intersection, a first distance between the first anti-collision point and the target welding endpoint on the teaching weld, and a second distance between each target welding endpoint and the common intersection.
[0096] S1042. For each seam to be welded, determine a first direction vector of the seam to be welded according to a second distance corresponding to the seam to be welded, a target welding end point on the seam to be welded, and the common intersection point.
[0097] S1043, determining a second vector pointing from the coordinate origin to a second anti-collision point on the gap to be welded according to the first direction vector of the gap to be welded, the first distance, and the first vector whose coordinate origin points to the common intersection;
[0098] S1044. Determine the position information of the second anti-collision point on the gap to be welded according to the second vector.
[0099] Here, continue to refer to Figure 2 The determination process from step S1041 to step S1044 is described in detail through the following content.
[0100] |Da'| (first distance), |aD| (second distance), |bD| (second distance), |cD| (second distance) are calculated by the following formula:
[0101]
[0102] Calculate the direction vectors Va (first direction vector), Vb (first direction vector), and Vc (first direction vector) of the three welds:
[0103] Va=(Oa-OD) / |aD|
[0104] Vb=(Ob-OD) / |bD|
[0105] Vc=(Oc-OD) / |cD|
[0106] Wherein, point O is the origin of the base coordinate system, Oa, Ob, Oc, and OD are the vectors from point O to points a, b, c, and D, respectively.
[0107] Calculate b', c':
[0108] Ob'=OD+|Da'|*Vb
[0109] Oc'=OD+|Da'|*Vc
[0110] Wherein: Ob' and Oc' are vectors (second vectors) pointing from point O to points b' and c', respectively. Thus, the coordinates of point O are (0,0,0). The position information of the second anti-collision point can be determined based on Ob' and Oc'.
[0111] With respect to step S105, here, when controlling the movement of the robot arm to move the welding gun to the second anti-collision point of the gap to be welded, the present application provides two implementation methods.
[0112] In an embodiment provided in the present application, when the welding gun is controlled to move from the first anti-collision point to the second anti-collision point of the gap to be welded, the controlling the mechanical arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes:
[0113] S10511. Calculate the first normal vector on the first reference plane of the target welding endpoint of the teaching weld, the common intersection, and the target welding endpoint of the next gap to be welded; the next gap to be welded is the gap to be welded after the current gap to be welded is welded.
[0114] S10512. Calculate the first unit vector of the intersection line between the plane with the first direction vector of the gap to be welded as the normal vector and the first reference plane.
[0115] S10513. Correct the first unit vector according to the third distance between the first center point and the common intersection point, and the fourth distance between the first reference point and the common intersection point, to determine the first target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector.
[0116] S10514. Obtain an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix.
[0117] S10515. Determine, based on the initial rotation matrix, the first initial reference vector and the first target vector, a first target rotation matrix corresponding to the movement of the robotic arm from the first anti-collision point to the second anti-collision point of the gap to be welded.
[0118] S10516. Determine a target Euler angle according to the first target rotation matrix, and control the movement of the robotic arm according to the target Euler angle.
[0119] Regarding step S10511, here, the first reference plane can be understood as a virtual plane used to refer to the movement of the robot arm.
[0120] For step S10512, the first unit vector is the direction of the welding gap in space. By calculating the intersection line between the direction vector of the weld to be welded and the reference plane, it is determined how the welding gun should move along the weld.
[0121] With respect to step S10513, the first reference point is a point determined after calculating the position information according to a predetermined calculation formula based on the first center point, the third distance, and the first unit vector.
[0122] For step S10514, the initial rotation matrix is a description of the current posture of the robot arm, including how the robot arm rotates in three-dimensional space. The initial reference vector is a reference direction based on the initial posture, which is used to adjust the posture later.
[0123] The initial rotation matrix may be used to determine initial Euler angles.
[0124] For step S10515, the first target rotation matrix represents a matrix of how the robot arm needs to rotate so as to be able to move from the first anti-collision point to the second anti-collision point.
[0125] For step S10516, the Euler angle is used to represent the angle of rotation direction of the robot arm.
[0126] In this way, the target rotation matrix is calculated to determine the angles along which the robotic arm needs to rotate, and then the movement of the robotic arm is controlled according to these angles to complete the movement between the anti-collision points.
[0127] For example, continue to refer to Figure 2 The determination process from step S10511 to step S10516 is described in detail through the following content.
[0128] Calculate the normal vector Nb (first normal vector) of face aDc:
[0129] Nb=Va x Vc
[0130] Calculate the direction vector Zb of the intersection line between the plane (first reference plane) with Vb as the normal vector and the surface aDc:
[0131] Zb=Nb xVb
[0132] Calculate the modulus length of Zb |Zb|
[0133]
[0134] Convert Zb to a unit vector (first unit vector):
[0135] Zb=Zb / |Zb|
[0136] Let point Cb be the center point of the line segment connecting point a' and point c' (the first center point):
[0137] OCb=1 / 2*(Oa'+Oc')
[0138] OCb is the vector from point O to point Cb.
[0139] Calculate the distance from Cb to the common intersection D (third distance)
[0140]
[0141] Make a point Tb (first reference point)
[0142] OTb=OCb+|CbD| / 4*Zb
[0143] OTb is the vector from point O to point Tb, and the distance |TbD| (the fourth distance) from Tb to the common intersection point D is calculated.
[0144]
[0145] If |TbD|<|CbD|, then the direction of Zb points to the common intersection D and needs to be reversed;
[0146] (First target vector) Zb = -1*Zb
[0147] If |TbD|≥|CbD|, Zb is directly determined as the first target vector.
[0148] The initial posture is recorded as Ea (RXa, RYa, RZa) in Euler angles, and the initial posture is converted from Euler angles Ea to rotation matrix R0a (initial rotation matrix).
[0149]
[0150] Then the Z-axis direction Za corresponding to the initial posture R0a is:
[0151]
[0152] Find the rotation axis M(Xm,Ym,Zm) from Za to Zb
[0153] M=Za×Zb
[0154] Find the angle θ of Za rotating around M to Zb:
[0155]
[0156] Then find the rotation matrix Rab from Za to Zb:
[0157]
[0158] Find the rotation matrix R0b (first target rotation matrix) of the tool coordinate system corresponding to Zb relative to the base coordinate system.
[0159] R0b=R0a*Rab
[0160] The Euler angle Eb (RXb, RYb, RZb) (target Euler angle) of the tool coordinate system corresponding to Zb relative to the base coordinate system.
[0161] RX b =arctan(Y M *Z M *(1-cosθ)+X M *sinθ,Z M 2 *(1-cosθ)+cosθ)
[0162] temp=(Y M *Z M *(1cosθ)+X M *sinθ) 2 +(Z M 2 *(1-cosθ)+cosθ) 2
[0163]
[0164] R b =arctan(X M *Y M *(1-cosθ)+Z M *sinθ,Y M 2 *(1-cosθ)+cosθ)
[0165] In this way, according to the determined Euler angle, the robot arm is controlled to move from point a~ to point b~.
[0166] In another embodiment provided by the present application, when controlling the welding gun to move from the target welding end point to the second anti-collision point of the gap to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes:
[0167] S10521. Calculate the second normal vector of the target welding endpoint of the teaching weld, the common intersection, and the target welding endpoint of the previous weld gap on the second reference plane.
[0168] S10522. Calculate the second unit vector of the intersection line between the plane with the second direction vector of the gap to be welded as the normal vector and the second reference plane.
[0169] S10523. Correct the second unit vector according to the fifth distance between the second center point and the common intersection point, and the sixth distance between the second reference point and the common intersection point, to determine the second target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector.
[0170] S10524. Obtain an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix.
[0171] S10525, according to the initial rotation matrix, the first initial reference vector and the first target vector, determining the second target rotation matrix corresponding to the movement of the robot arm from the target welding end point to the second anti-collision point of the gap to be welded.
[0172] S10526. Determine a target Euler angle according to the second target rotation matrix, and control the movement of the robotic arm according to the target Euler angle.
[0173] Here, when controlling the welding gun to move from the target welding end point to the second anti-collision point of the gap to be welded, specifically, in addition to the teaching weld, after welding one gap to be welded, it moves to another weld to be welded.
[0174] With respect to step S10521, the previous gap to be welded is the weld just after the welding task is completed.
[0175] For example, suppose there are A, B, and C. Assume that A is the teaching weld. If B has been welded, when C needs to be welded, B is the previous weld to be welded.
[0176] For example, continue to refer to Figure 2 The determination process from step S10521 to step S10526 is described in detail through the following content.
[0177] Calculate the normal vector Nc (second normal vector) of face aDb:
[0178] Nc=Va×Vb
[0179] Calculate the direction vector Zc of the intersection line between the plane (second reference plane) with Vc as the normal vector and the surface aDb:
[0180] Zc=Nc xVc
[0181] Calculate the modulus length |Zc| of Zc:
[0182]
[0183] Convert Zc to a unit vector:
[0184] Zc=Zc / |Zc|
[0185] Let point Cc be the center point (second center point) of the line segment connecting point a' and point b'.
[0186] OCc=1 / 2*(Oa'+Ob')
[0187] Where: OCc is the vector from point O to point Cc.
[0188] Calculate the distance from Cc to the PR intersection point D (fifth distance)
[0189]
[0190] Make a point Tc (second reference point), and the calculation formula is:
[0191] OTc=OCc+|CcD| / 4*Zc
[0192] Where: OTc is the vector from point O to point Tc.
[0193] Calculate the distance from Tc to the common intersection point D |TcD| (sixth distance):
[0194]
[0195] If |TcD|<|CcD|, the direction of Zc points to the common intersection D and needs to be reversed:
[0196] (Second target vector) Zc = -1*Zc
[0197] If |TcD|≥|CcD|, Zc is directly determined as the first target vector.
[0198] Find the rotation axis Mc(Xmc,Ymc,Zmc) from Za to Zc
[0199] Mc=Za×Zc
[0200] Find the rotation angle θc of Za around Mc to Zc:
[0201]
[0202] Then find the rotation matrix Rac from Za to Zc:
[0203]
[0204] Find the rotation matrix R0c of the tool coordinate system corresponding to Zc relative to the base coordinate system:
[0205] (Second target matrix) R0c = R0a*Rac
[0206] The Euler angle Ec (RXc, RYc, RZc) of the tool coordinate system corresponding to Zc relative to the base coordinate system (target Euler angle):
[0207]
[0208] In this way, automatic welding of the remaining welds to be welded except the taught weld can be achieved.
[0209] For step S106, after controlling the robot arm to move toward the target welding end point of the gap to be welded, the control method further includes: identifying whether the welding gun has traversed all target welding end points; if so, determining that the multi-weld welding task is completed, and sending an end instruction to the robot arm.
[0210] Here, if it is determined that all target welding end points have not been traversed, the recognition will continue, so that the task can be determined to be over in time, avoiding the robot arm from doing useless work.
[0211] In this way, by predetermining the target welding endpoints and common intersections of each seam to be welded, the welding process becomes more efficient and production efficiency is improved. In addition, the teaching weld is automatically selected and welded, which reduces the need for manual intervention, improves the automation level of the welding process, and reduces the possibility of human error. In addition, by setting anti-collision points to ensure safety during the welding process, the risk of interference between the robot arm and other components is reduced, thereby reducing the probability of equipment damage and safety accidents. Therefore, this solution has significant technical advantages in improving welding efficiency, safety and quality consistency.
[0212] Based on the same inventive concept, a control device corresponding to the control method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned control method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0213] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a control device for multi-weld welding provided in an embodiment of the present application. Figure 3 As shown in , the control device 300 includes:
[0214] A first determination module 310 is used to determine the target welding end point of each gap to be welded and the common intersection point formed by all the gaps to be welded;
[0215] A selection module 320 is used to select a gap to be welded as a teaching weld, and control the welding gun on the robot arm to move to the target welding end point of the teaching weld;
[0216] A first control module 330 is used to control the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld;
[0217] A second determination module 340 is used to determine a second anti-collision point on each of the remaining seams to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and a preset anti-collision strategy;
[0218] The second control module 350 is used to control the movement of the robot arm for each remaining gap to be welded, so that the welding gun moves to the second anti-collision point of the gap to be welded;
[0219] The third control module 360 is used to control the movement of the robot arm so that the welding gun starts from the second anti-collision point on the gap to be welded and moves along the gap to be welded toward the target welding end point of the gap to be welded for welding.
[0220] Optionally, when the selection module is used to control the welding gun on the robot arm to move to the target welding end point of the teaching weld, the selection module is used to:
[0221] Obtaining the initial end position of the welding gun end and the initial posture of the robot arm;
[0222] Determine, according to the initial end position, the target welding end point of the teaching weld, and the initial posture of the robot arm, the movement posture of the robot arm when the end of the welding gun is moved to the target welding end point of the teaching weld;
[0223] The mechanical arm is controlled to move according to the moving posture.
[0224] Optionally, the control device further includes a third determination module (not shown in the figure), and the third determination module is used to determine the first anti-collision point through the following steps:
[0225] Real-time identification of the end position of the welding gun during mobile welding to determine the current end position of the welding gun;
[0226] Determining a current distance between two points based on the current end position and the common intersection point;
[0227] When the current distance reaches a preset safety distance, the current end position is determined as a first anti-collision point.
[0228] Optionally, when the second determination module 340 is used to determine the second anti-collision point on each remaining seam to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy, the second determination module 340 is used to:
[0229] Determine, according to the first anti-collision point, all target welding endpoints, and the common intersection, a first distance between the first anti-collision point and the target welding endpoint on the teaching weld, and a second distance between each target welding endpoint and the common intersection;
[0230] For each seam to be welded, determining a first direction vector of the seam to be welded according to a second distance corresponding to the seam to be welded, a target welding end point on the seam to be welded, and the common intersection point;
[0231] Determine a second vector pointing from the coordinate origin to a second anti-collision point on the gap to be welded according to the first direction vector of the gap to be welded, the first distance, and a first vector pointing from the coordinate origin to the common intersection;
[0232] According to the second vector, a second anti-collision point on the gap to be welded is determined.
[0233] Optionally, when the welding gun is controlled to move from the first anti-collision point to the second anti-collision point of the gap to be welded, the second control module 350 is used to control the movement of the robot arm to move the welding gun to the second anti-collision point of the gap to be welded, and the second control module 350 is used to:
[0234] Calculate the first normal vector of the target welding end point of the teaching weld, the common intersection point and the target welding end point of the next gap to be welded on the first reference plane; the next gap to be welded is the gap to be welded after the current gap to be welded is welded;
[0235] Calculate a first unit vector of an intersection line between a plane having a first direction vector of the gap to be welded as a normal vector and a first reference plane;
[0236] According to the third distance between the first center point and the common intersection point, and the fourth distance between the first reference point and the common intersection point, the first unit vector is corrected to determine the first target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector;
[0237] Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix;
[0238] Determine, according to the initial rotation matrix, the first initial reference vector and the first target vector, a first target rotation matrix corresponding to the movement of the robot arm from the first anti-collision point to the second anti-collision point of the gap to be welded;
[0239] According to the first target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
[0240] Optionally, when controlling the welding gun to move from the target welding end point to the second anti-collision point of the gap to be welded, the second control module 350 is used to control the movement of the robot arm so that the welding gun moves to the second anti-collision point of the gap to be welded, and the second control module 350 is used to:
[0241] Calculate a second normal vector on a second reference plane where a target welding end point of the teaching weld, the common intersection point, and a target welding end point of a previous weld gap are located;
[0242] Calculate a second unit vector of an intersection line between a plane having a second direction vector of the gap to be welded as a normal vector and a second reference plane;
[0243] According to the fifth distance between the second center point and the common intersection point and the sixth distance between the second reference point and the common intersection point, the second unit vector is corrected to determine the second target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector;
[0244] Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix;
[0245] Determine, according to the initial rotation matrix, the first initial reference vector and the first target vector, a second target rotation matrix corresponding to the movement of the robot arm from the target welding end point to the second anti-collision point of the gap to be welded;
[0246] According to the second target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
[0247] Optionally, the control device further includes an identification module (not shown in the figure), and the identification module is used to:
[0248] Identify whether the welding gun has traversed all target welding end points;
[0249] If so, it is determined that the multi-weld welding task is completed, and an end instruction is sent to the robotic arm.
[0250] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0251] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 as well as Figure 2 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0252] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Figure 2The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.
[0253] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0254] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0255] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0256] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0257] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0258] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A control method for multi-weld welding, characterized in that: The control method comprises: Determine the target welding end points of each seam to be welded and the common intersection point formed by all seams to be welded; Select a gap to be welded as a teaching weld, and control the welding gun on the robot arm to move to the target welding end point of the teaching weld; Controlling the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld; Determine the second anti-collision point on each of the remaining seams to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy; For each remaining seam to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the seam to be welded; The robot arm is controlled to move so that the welding gun starts from the second anti-collision point on the gap to be welded and moves along the gap to be welded toward the target welding end point of the gap to be welded for welding.
2. The control method according to claim 1, characterized in that: The controlling the welding gun on the robot arm to move to the target welding end point of the teaching weld includes: Obtaining the initial end position of the welding gun end and the initial posture of the robot arm; Determine, according to the initial end position, the target welding end point of the teaching weld, and the initial posture of the robot arm, the movement posture of the robot arm when the end of the welding gun is moved to the target welding end point of the teaching weld; The mechanical arm is controlled to move according to the moving posture.
3. The control method according to claim 1, characterized in that: The first anti-collision point is determined by the following steps: Real-time identification of the end position of the welding gun during mobile welding to determine the current end position of the welding gun; Determining a current distance between two points based on the current end position and the common intersection point; When the current distance reaches a preset safety distance, the current end position is determined as a first anti-collision point.
4. The control method according to claim 1, characterized in that: The method of determining the respective second anti-collision points on each of the remaining seams to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy comprises: Determine, according to the first anti-collision point, all target welding endpoints, and the common intersection, a first distance between the first anti-collision point and the target welding endpoint on the teaching weld, and a second distance between each target welding endpoint and the common intersection; For each seam to be welded, determining a first direction vector of the seam to be welded according to a second distance corresponding to the seam to be welded, a target welding end point on the seam to be welded, and the common intersection point; Determine a second vector pointing from the coordinate origin to a second anti-collision point on the gap to be welded according to the first direction vector of the gap to be welded, the first distance, and the first vector pointing from the coordinate origin to the common intersection; According to the second vector, a second anti-collision point on the gap to be welded is determined.
5. The control method according to claim 4, characterized in that: When the welding gun is controlled to move from the first anti-collision point to the second anti-collision point of the gap to be welded, the controlling the mechanical arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes: Calculate the first normal vector of the target welding end point of the teaching weld, the common intersection point and the target welding end point of the next gap to be welded on the first reference plane; the next gap to be welded is the gap to be welded after the current gap to be welded is welded; Calculate a first unit vector of an intersection line between a plane having a first direction vector of the gap to be welded as a normal vector and a first reference plane; According to the third distance between the first center point and the common intersection point, and the fourth distance between the first reference point and the common intersection point, the first unit vector is corrected to determine the first target vector; wherein the first center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the next gap to be welded, and the first reference point is a point determined according to the first center point, the third distance and the first unit vector; Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix; Determine a first target rotation matrix corresponding to the movement of the robot arm from the first anti-collision point to the second anti-collision point of the gap to be welded according to the initial rotation matrix, the first initial reference vector and the first target vector; According to the first target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
6. The control method according to claim 1, characterized in that: When controlling the welding gun to move from the target welding end point to the second anti-collision point of the gap to be welded, controlling the robot arm to move so that the welding gun moves to the second anti-collision point of the gap to be welded includes: Calculate a second normal vector on a second reference plane where a target welding end point of the teaching weld, the common intersection point, and a target welding end point of a previous weld gap are located; Calculate a second unit vector of an intersection line between a plane having a second direction vector of the gap to be welded as a normal vector and a second reference plane; According to the fifth distance between the second center point and the common intersection point, and the sixth distance between the second reference point and the common intersection point, the second unit vector is corrected to determine the second target vector; wherein the second center point is the midpoint of a continuous line segment formed by the first anti-collision point and the second anti-collision point of the previous gap to be welded, and the second reference point is a point determined according to the second center point, the fifth distance and the second unit vector; Acquire an initial rotation matrix determined according to the initial posture of the robotic arm, and a first initial reference vector corresponding to the initial rotation matrix; Determine, according to the initial rotation matrix, the first initial reference vector and the first target vector, a second target rotation matrix corresponding to the movement of the robot arm from the target welding end point to the second anti-collision point of the gap to be welded; According to the second target rotation matrix, a target Euler angle is determined, and the movement of the robotic arm is controlled according to the target Euler angle.
7. The control method according to claim 1, characterized in that: The control method further comprises: Identify whether the welding gun has traversed all target welding end points; If so, it is determined that the multi-weld welding task is completed, and an end instruction is sent to the robotic arm.
8. A control device for multi-weld welding, characterized in that: The control device comprises: A first determination module is used to determine the target welding end point of each seam to be welded and the common intersection point formed by all the seams to be welded; A selection module is used to select a gap to be welded as a teaching weld and control the welding gun on the robot arm to move to the target welding end point of the teaching weld; A first control module is used to control the movement of the robot arm so that the welding gun starts from the target welding end point on the teaching weld and moves along the teaching weld toward the common intersection for welding until it moves to the first anti-collision point on the teaching weld; A second determination module is used to determine the respective second anti-collision points on each remaining seam to be welded except the teaching weld according to the first anti-collision point, all target welding end points, the common intersection point and the preset anti-collision strategy; A second control module is used to control the movement of the robot arm for each remaining seam to be welded, so that the welding gun moves to the second anti-collision point of the seam to be welded; The third control module is used to control the movement of the robot arm so that the welding gun starts from the second anti-collision point on the gap to be welded and moves along the gap to be welded to the target welding end point of the gap to be welded for welding.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the control method according to any one of claims 1 to 7 are executed.
