Method for generating a welding trajectory, welding system and storage medium
By generating synchronous movement trajectories of the welding torch and the workpiece, and utilizing Bézier curve and B-spline curve models, the problem of synchronous smooth movement during collaborative welding by multiple robots was solved, thereby improving welding efficiency and quality.
Patent Information
- Application Number
- CN202511018642.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-07-23
AI Technical Summary
In existing technologies, it is difficult to ensure synchronous and smooth movement while maintaining efficiency when multiple robots are welding collaboratively, which cannot meet the process requirements for welding complex workpieces.
By acquiring the discrete control point attitude data of the welding torch and the workpiece, and combining the Bézier curve model and B-spline curve, a synchronous movement trajectory of the welding torch and the workpiece is generated to ensure that the welding robot and the positioning robot move synchronously and smoothly.
It improves the efficiency and smoothness of collaborative welding by multiple robots, and meets the process requirements for welding complex workpieces.
Smart Images

Figure CN120848367B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial control, and particularly relates to a welding trajectory generation method, a welding system and a storage medium. BACKGROUND
[0002] Industrial automation can generally automatically produce products through machine devices without direct human intervention. For example, welding can be automatically implemented by a welding robot moving according to a predetermined trajectory. However, as the requirement for product quality is getting higher and higher, new requirements are put forward for the welding process, especially in the process of welding a complex workpiece, the pose of the workpiece often needs to be synchronously transformed, and therefore multiple robots need to be coordinated with each other. However, in the prior art, in the multiple-robot coordination scenario, trajectory planning and control are often independently performed by each robot, and it is difficult to ensure that the multiple robots can synchronously and smoothly move while taking into account the efficiency, so as to meet the requirements of the welding process. Therefore, there is an urgent need for a trajectory planning method that can take into account the welding efficiency while enabling the multiple robots to synchronously and smoothly move when performing collaborative welding. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a welding trajectory generation method, a welding system and a storage medium, which can take into account the welding efficiency while enabling the multiple robots to synchronously and smoothly move when performing collaborative welding.
[0004] To achieve the above-mentioned purpose, a first aspect of the embodiments of the present application provides a welding trajectory generation method, comprising: acquiring welding gun pose data corresponding to discrete welding gun control points in a preset welding direction and workpiece pose data of discrete workpiece control points; the discrete welding gun control points and the discrete workpiece control points are one-to-one correspondingly arranged; combining the welding gun pose data and the corresponding workpiece pose data one-to-one to obtain target pose data of a reference control point corresponding to the discrete welding gun control points; taking each two adjacent reference control points in the welding direction as a trajectory segment starting point and a trajectory segment ending point of a same trajectory segment, respectively, calling a preset Bezier curve model to solve control points of the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment to obtain target pose data of a plurality of target control points of the same trajectory segment; wherein the Bezier curve model represents that the speed of the trajectory segment starting point, a trajectory segment intermediate point and the trajectory segment ending point in the same trajectory segment is the same; constructing a B-spline curve according to the target pose data of the plurality of target control points of the same trajectory segment to generate a target trajectory segment; and determining a welding gun welding trajectory and a workpiece movement trajectory according to the target trajectory segment.
[0005] To achieve the above object, a second aspect of the embodiment of the present application provides a welding system, comprising a welding robot, a positioner robot and a controller, the controller executes the welding trajectory generation method according to any one of the first aspect to obtain a welding torch welding trajectory and a workpiece movement trajectory; wherein the welding robot moves according to the welding torch welding trajectory; the positioner robot moves according to the workpiece movement trajectory.
[0006] To achieve the above object, a third aspect of the embodiment of the present application provides a computer readable storage medium, the storage medium stores a computer program, the computer program is executed by a processor to implement the welding trajectory generation method according to any one of the first aspect.
[0007] The welding trajectory generation method, the welding system and the storage medium provided by the present application can ensure that the welding robot and the positioner robot can move synchronously, and the movement control efficiency of the welding robot and the positioner robot is higher based on the target control point for B-spline curve planning to obtain the welding torch welding trajectory and the workpiece movement trajectory, thereby improving the welding efficiency. Therefore, the welding trajectory generation method based on the embodiment of the present application can take into account the welding efficiency while enabling multiple robots to move synchronously and smoothly during collaborative welding. BRIEF DESCRIPTION OF DRAWINGS
[0008] Figure 1 is a flowchart of the welding trajectory generation method provided by the embodiment of the present application;
[0009] Figure 2 is a flowchart of one embodiment of the welding trajectory method provided by the embodiment of the present application;
[0010] Figure 3 is a structural diagram of the welding system provided by the embodiment of the present application;
[0011] Figure 4 is a structural diagram of the hardware structure corresponding to the control method provided by the embodiment of the present application. DETAILED DESCRIPTION
[0012] To make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0013] It should be noted that although the functional modules are divided in the device schematic diagram, the logical order is shown in the flowchart, but in some cases, the steps shown or described can be performed in a manner different from the module division in the device or the order in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0014] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this application is for the purpose of describing the embodiments of the application only, and is not intended to limit the application.
[0015] First, the meanings of several terms involved in the present application are explained:
[0016] Yaw: rotation around a vertical axis (such as the Z axis), corresponding to left and right turning in the horizontal direction (similar to changing the heading).
[0017] Pitch: rotation around a horizontal axis (such as the Y axis), corresponding to turning in the up-down direction (similar to raising or lowering the head).
[0018] Roll: rotation around a longitudinal axis (such as the X axis), corresponding to rotation around the forward direction of the body (similar to tilting).
[0019] Industrial control automation refers to the measurement, manipulation, and process control of information processing and process control without direct human intervention, according to the intended target. With the increasing maturity of industrial control automation, more and more industries use industrial control automation to process products. For example, in the case of welding products, welding automation is achieved by planning the welding trajectory. However, as the quality requirements for welded products become higher and higher, new requirements are also put forward for the welding production process, especially in the process of welding complex workpieces, it is often necessary to transform the pose of the workpiece during welding, and the weld seam needs to be continuous and uniform (i.e. the movement of the welding gun needs to be smooth). Therefore, for complex welding workpieces, at least two robots such as welding robots and position changing robots need to be cooperatively controlled. However, in the prior art, in the multi-robot cooperative scenario, each robot independently plans and controls the trajectory, which is difficult to ensure that multiple robots can move smoothly and synchronously while taking into account efficiency, so as to meet the requirements of the welding process. Based on this, the embodiments of the present application provide a welding trajectory generation method, a welding system, and a storage medium, which can take into account welding efficiency while enabling multiple robots to move smoothly and synchronously during cooperative welding.
[0020] It can be understood that the above description is only a specific implementation of the present application, and the present application is not limited to the above description. Figure 1As shown, the welding trajectory generation method provided by the embodiment of the present application comprises:
[0021] In step S100, welding gun posture data corresponding to welding gun discrete control points in a preset welding direction and workpiece posture data of workpiece discrete control points are acquired; the welding gun discrete control points and the workpiece discrete control points are set in one-to-one correspondence;
[0022] In step S200, the welding gun posture data and the corresponding workpiece posture data are combined in one-to-one correspondence to obtain target posture data of reference control points corresponding to the welding gun discrete control points in one-to-one correspondence;
[0023] In step S300, every two adjacent reference control points in the welding direction are respectively taken as a trajectory segment starting point and a trajectory segment ending point of a same trajectory segment, a preset Bezier curve model is called to solve control points of the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment to obtain target posture data of a plurality of target control points of the same trajectory segment; wherein the Bezier curve model represents that the speeds of the trajectory segment starting point, a trajectory segment intermediate point and the trajectory segment ending point in the same trajectory segment are all the same;
[0024] In step S400, a B-spline curve is constructed according to the target posture data of the plurality of target control points of the same trajectory segment to generate a target trajectory segment;
[0025] In step S500, the welding gun welding trajectory and the workpiece movement trajectory are determined according to the target trajectory segment.
[0026] Therefore, by combining the welding gun posture data and the corresponding workpiece posture data in one-to-one correspondence to obtain the target posture data of the new reference control points, and planning the target control points based on the target posture data of the reference control points and the Bezier curve model, the control points of the welding robot moving based on the welding gun discrete control points and the positioner robot moving based on the workpiece discrete control points can be jointly planned to move, so as to ensure that the welding robot and the positioner robot can be synchronized, and at the same time, the welding gun welding trajectory and the workpiece movement trajectory are obtained by planning the B-spline curve based on the target control points, which is more efficient in moving control of the welding robot and the positioner robot, thereby improving the welding efficiency. Therefore, the welding trajectory generation method based on the embodiment of the present application can take into account the welding efficiency while enabling multiple robots to move smoothly and synchronously during collaborative welding.
[0027] The welding gun discrete control points are key path points obtained by discretizing a teaching path of the welding robot. The workpiece discrete control points are key path points obtained by discretizing a teaching path of the positioner robot.
[0028] The welding gun posture data represents spatial position information of a corresponding welding gun discrete control point, and includes at least one of position coordinates and Euler angles, wherein the position coordinates include at least two coordinate axis directions, and the Euler angles correspond to the coordinate axes one by one, for example, the position coordinates include an x-axis coordinate and a y-axis coordinate, and the Euler angles include an Euler angle around the x-axis and an Euler angle around the y-axis.
[0029] The workpiece posture data represents joint parameters of the position of a corresponding workpiece discrete control point of the variable position robot. In some embodiments, the variable position robot includes a two-axis joint, and the workpiece posture data includes a one-axis joint angle and a two-axis joint angle. The welding gun posture data and the workpiece posture data are data in the same coordinate system.
[0030] For example, the welding robot is a six-axis robot, and the variable position robot is a two-link robot. The posture data of the six-axis robot is converted into data based on the end coordinate system of the variable position robot to obtain the welding gun posture data [x, y, z, u, v, w]. The workpiece posture data of the variable position robot is [j1, j2], and the target posture data of the reference control point [x, y, z, j1, j2, u, v, w] is obtained by combination. Path planning is performed based on the target posture data [x, y, z, j1, j2, u, v, w] of the reference control point.
[0031] The number of target control points of the same trajectory segment is at least four, wherein the plurality of target control points of the same trajectory segment includes reference control points located at the end points (i.e., the start point of the trajectory segment and the end point of the trajectory segment).
[0032] The present application does not limit the order of the Bezier curve model, and the skilled person can selectively set it according to actual needs.
[0033] The target trajectory segment is a B-spline curve planned based on two adjacent reference control points and target control points located between the reference control points. The number of target trajectory segments is the number of reference control points minus one.
[0034] The welding direction represents the moving direction of the welding robot, which determines the order of the welding robot passing through each reference control point.
[0035] The Bezier curve model represents a Bezier curve segment planned based on the start point of the trajectory segment and the end point of the trajectory segment. The intermediate point in the trajectory segment is a point at the intermediate position on the Bezier curve, and the independent variable of the Bezier curve model takes a value of 0.5.
[0036] For example, the welding trajectory is and , wherein, represents the first One key point, The first part represents the expected welding trajectory of the displacement robot. Key points. These key points are the minimum number of control points required to satisfy the expected welding trajectory control. In some embodiments, the two welding trajectories can be discretized separately; and in some embodiments, the point density is increased during discretization, thus obtaining... Workpiece attitude data and discrete control points of each workpiece , ,according to The transformation relationship from the end effector of the displacement robot to the base coordinate system of the six-axis robot can be determined. ,according to and ,Will Transform to the base coordinate system to obtain the welding torch attitude data of each discrete control point of the welding torch. ,Will One-to-one correspondence Combine, obtain One benchmark control point Then Each pair of adjacent reference control points The trajectory segment control points are solved by using a set of reference control points as a group, resulting in each set of reference control points. The corresponding multiple target control points, with the first group of reference control points, that is... For example, multiple target control points of the first set of reference control points can be obtained. ,in, The starting points of the trajectory segments corresponding to the first group of reference control points are respectively and the end point of the trajectory segment , These are the target control points obtained based on the Bézier curve model. At this point, based on... Solving for the B-spline curve yields the target trajectory segment corresponding to the first set of reference control points. Similarly, for the second set of reference control points, i.e. The reference control point group can be planned using the method described above. This allows for the creation of a welding trajectory composed of multiple independently controlled target trajectory segments by planning each reference control point in pairs. In some embodiments, when the number of key points on the welding trajectory meets the requirements, it is not necessary to increase the point density. Those skilled in the art can selectively set this according to actual needs.
[0037] Understandably, the Bézier curve model is a third-order Bézier curve model. By calling a preset Bézier curve model to solve for the control points at the start and end points of the same trajectory segment, target attitude data for multiple target control points of the same trajectory segment is obtained, including:
[0038] According to the first derivative model, a first expression relationship between the first intermediate control point and the start point of the trajectory segment and a second expression relationship between the second intermediate control point and the end point of the trajectory segment are determined respectively;
[0039] According to the first derivative model, a third expression relationship between the intermediate point of the trajectory segment and the start point, the end point, the first intermediate control point and the second intermediate control point of the trajectory segment is determined;
[0040] According to the first expression relationship, the second expression relationship and the third expression relationship, the speed is determined;
[0041] According to the first expression relationship, the speed, the target attitude data of the start point of the trajectory segment and the control point tangent vector, the target attitude data of the first intermediate control point is obtained;
[0042] According to the second expression relationship, the speed, the target attitude data of the end point of the trajectory segment and the control point tangent vector, the target attitude data of the second intermediate control point is obtained;
[0043] The first intermediate control point, the second intermediate control point, the start point of the trajectory segment and the end point of the trajectory segment are all target control points.
[0044] By setting the Bezier curve model as a third-order Bezier curve model, the trajectory planning requirements can be met while ensuring the trajectory planning efficiency.
[0045] The control point tangent vector can be obtained by solving a preset tangent vector constraint model. In some embodiments, the tangent vector constraint model includes a start point tangent vector calculation model, an end point tangent vector calculation model and an intermediate node tangent vector calculation model, which are respectively used to define the relationship between the control point tangent vector of the first reference control point in the welding direction and the control point tangent vector of the adjacent reference control point, the relationship between the control point tangent vector of the last reference control point in the welding direction and the control point tangent vector of the adjacent reference control point, and the tangent vector relationship between the adjacent two reference control points except the first reference control point and the last reference control point. In other embodiments, the tangent vector can also be directly configured, and the embodiments of the present application do not limit this, and the person skilled in the art can selectively set according to the actual situation.
[0046] The first derivative model is obtained by first-order derivation of the Bezier curve model corresponding curve.
[0047] The first expression relationship represents the coordinate vector mapping relationship between the first intermediate control point and the start point of the trajectory segment. The second expression relationship represents the coordinate vector mapping relationship between the second intermediate control point and the end point of the trajectory segment.
[0048] In some embodiments, the third-order Bezier curve model is as follows:
[0049] Equation 1-1
[0050] wherein, are parameters of the third-order Bezier curve model. denotes target pose data of a trajectory segment start point of the trajectory segment to which the target pose data belongs, denotes target pose data of a trajectory segment end point of the trajectory segment to which the target pose data belongs, denotes target pose data of a first intermediate control point of the trajectory segment to which the target pose data belongs; denotes target pose data of a second intermediate control point of the trajectory segment to which the target pose data belongs. For example, when the target pose data of two adjacent reference control points are and , the target pose data of the trajectory segment start point is taken as and denoted as , the target pose data of the trajectory segment end point is taken as and denoted as , the target pose data of the first intermediate control point is denoted as , and the target pose data of the second intermediate control point is denoted as .
[0051] At this time, a first-order derivative model is obtained based on Equation 1-1 as follows:
[0052] Equation 1-2
[0053] Since the velocities of the trajectory segment start point, the trajectory segment intermediate point, and the trajectory segment end point of each trajectory segment are the same, a constraint condition can be obtained based on Equation 1-2 as shown in the following equation:
[0054] Equation 1-3
[0055] wherein, is the velocity, and is a value to be solved. Wherein, corresponds to the velocity of the trajectory segment start point, corresponds to the velocity of the trajectory segment end point, corresponds to the velocity of the trajectory segment intermediate point;
[0056] At this time, when , based on Equation 1-3 and Equation 1-2, the following can be obtained: , so that can be obtained. Wherein, since is a unit vector along the direction of , therefore, denotes the vector ; at this time, according to the calculation method of the vector, the first expression relationship Similarly, when , the second expression relationship can be obtained, wherein, is the control point tangent vector of , and is the control point tangent vector of .
[0057] At this time, for the middle point of the trajectory segment, the third expression can be obtained according to and formula 1-2; the following formula is obtained based on the first expression, the second expression and the third expression: .
[0058] At this time, square calculation is performed on to obtain:
[0059] Formula 1-4
[0060] wherein, , are known quantities, and can be obtained based on a preset tangent vector constraint model or preconfigured known quantities. At this time, substituting , , and into formula 1-4 for solving can obtain two positive and negative roots, and the positive root is taken as the value of .
[0061] At this time, based on the solved and the first expression relationship, the target attitude data of the first intermediate control point can be obtained, and based on the solved and the second expression, the target attitude data of the second intermediate control point can be obtained.
[0062] It can be understood that when the trajectory segment starting point is the first reference control point in the welding direction; the control point tangent vector of the trajectory segment starting point is obtained through the starting point tangent vector calculation model by performing the following steps:
[0063] obtaining the control point tangent vector of the next reference control point of the trajectory segment starting point as the first control point tangent vector and obtaining the first curve smoothing index of the next reference control point of the trajectory segment starting point through the starting point tangent vector calculation model;
[0064] performing weighted difference operation on the first control point tangent vector and the first curve smoothing index through the starting point tangent vector calculation model to obtain the control point tangent vector; the curve smoothing index represents the curvature change relationship between the reference control point and the previous reference control point.
[0065] In some embodiments, the start tangent calculation model is as follows:
[0066] Equation 1-5
[0067] wherein, is a first curve smoothness index, represents the control point tangent vector of the first reference control point, , ; ; N represents the number of reference control points, represents the k+1th reference control point, represents the kth reference control point. represents the node vector scalar of the trajectory segment with the kth reference control point as the start point. represents the control point tangent vector of the next reference control point of the first reference control point, i.e., the control point tangent vector of the second reference control point.
[0068] It can be understood that when the trajectory segment end point is the last reference control point in the welding direction, the control point tangent vector of the trajectory segment end point is determined by the end tangent calculation model through the following steps:
[0069] The control point tangent vector of the previous reference control point of the trajectory segment end point is obtained by the end tangent calculation model and taken as the second control point tangent vector;
[0070] The second control point tangent vector and the curve smoothness index of the trajectory segment end point are subjected to weighted difference operation by the end tangent calculation model to obtain the control point tangent vector.
[0071] The weighted difference operation represents subtraction after weighting of the second control point tangent vector and the curve smoothness index, respectively.
[0072] Exemplarily, the end tangent calculation model is as follows:
[0073] Equation 1-6
[0074] wherein, represents the second control point tangent vector, and the control point tangent vector of the previous reference control point of the last reference control point; is a curve smoothness index of the last reference control point, . Wherein, The weighting coefficient (i.e., 2 in Equation 1-6) of the control point tangent vector can be selectively adjusted according to actual conditions.
[0075] It can be understood that the control point tangent vectors of the trajectory segment start point and the trajectory segment end point are both determined by the intermediate node tangent calculation model through the following steps:
[0076] obtaining the curve smoothness index of the current reference control point and the curve smoothness index of the next reference control point through the intermediate node tangent vector calculation model, and taking the curve smoothness index of the current reference control point and the curve smoothness index of the next reference control point as the third curve smoothness index and the fourth curve smoothness index respectively;
[0077] obtaining the node scalar variation coefficient of the current reference control point through the intermediate node tangent vector calculation model, the node scalar variation coefficient representing the relationship between the node scalar difference of the current reference control point and the node scalar difference of the next reference control point;
[0078] performing weighted summation calculation on the node scalar variation coefficient, the third curve smoothness index and the fourth curve smoothness index through the intermediate node tangent vector calculation model to determine the control point tangent vector of the current reference control point;
[0079] wherein the trajectory segment starting point is the reference control point except the first reference control point, and the trajectory segment ending point is the reference control point except the last reference control point.
[0080] In some embodiments, the intermediate node tangent vector calculation model is as follows:
[0081] Formula 1-7
[0082] wherein, is the node scalar variation coefficient, is the third curve smoothness index (i.e. the curve smoothness index of the current reference control point), is the fourth curve smoothness index (i.e. the curve smoothness index of the next reference control point of the current reference control point); .
[0083] In some embodiments, the node scalar variation coefficient satisfies the following formula:
[0084] Formula 1-8
[0085] For example, assuming that the current reference control point is the second reference control point, then ; assuming that the current reference control point is the third reference control point, then .
[0086] wherein, since the target attitude data of each reference control point is known, in the case that the node vector scalar corresponding to each reference control point is determined, the control point tangent vector of the trajectory segment starting point and the trajectory segment ending point of each trajectory segment can be calculated based on the formula 1-5 to 1-8; and the first intermediate control point and the second intermediate control point can be obtained by solving the first expression, the second expression and the third expression of the third order Bezier model.
[0087] It can be understood that the curve smoothing index is the ratio of the coordinate vector difference between two adjacent reference control points and the node scalar difference; the node scalar change coefficient is the ratio of the node scalar difference of the current reference control point and the node total vector difference, and the node total vector difference is the sum of the node scalar difference of the current reference control point and the node scalar difference of the next reference control point.
[0088] It can be understood that the B-spline curve is constructed according to the target pose data of the plurality of target control points of the same trajectory segment, and the target trajectory segment is generated, comprising:
[0089] The target pose data of the reference control points of different trajectory segments is input into a preset node scalar constraint model to obtain a node vector corresponding to the trajectory segment where the starting point of the trajectory segment is located.
[0090] According to the node vector and the target pose data of the plurality of target control points corresponding to the node vector, a B-spline curve is constructed.
[0091] The node scalar constraint model represents the relationship between the node vectors of two B-spline curves with coinciding endpoints at a preset order.
[0092] In some embodiments, the node scalar constraint model is as follows:
[0093] Formula 1-9
[0094] Wherein, represents the node vector of the K+2th target trajectory segment, that is, the node vector scalar. and represents the target pose data of the starting point and the ending point of the K+1th target trajectory segment.
[0095] For example, two groups of target control points obtained based on a third-order Bezier curve model are , For example, wherein, is a continuous reference control point, when k=1, is , is , that is, For example, when k=2, is , is , that is, .
[0096] Therefore, by constructing the node scalar constraint model between the adjacent two target trajectory segments, it is further ensured that the planned welding trajectory path is smoother.
[0097] The embodiments of the present application do not make too much repetition on how to construct the B-spline curve. In the case of known target posture data of control points and corresponding tangent vectors, those skilled in the art can refer to the existing B-spline curve construction method for construction.
[0098] For example, referring to FIG. 1, the welding trajectory generation process of the embodiments of the present application is described as follows: Figure 2
[0099] S1, obtaining the welding gun posture data of the welding gun discrete control points on the expected welding trajectory and the workpiece posture data of the workpiece discrete control points
[0100] S2, combining the welding gun posture data and the corresponding workpiece posture data one by one to obtain the target posture data of the reference control points
[0101] S3, combining every two adjacent reference control points in the preset welding direction as the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment respectively to obtain a group of reference control points, for example, taking the first group of reference control points as an example, that is , the target posture data of the trajectory segment starting point corresponding to the first group of reference control points is recorded as ; the target posture data of the trajectory segment ending point corresponding to the first group of reference control points is recorded as ; and the target posture data of the first intermediate control point and the second intermediate control point corresponding to the trajectory segment of the first group of reference control points is recorded as
[0102] S4, calling a third-order Bezier curve model to determine the speed control point relationship model, that is, obtaining the speed control point relationship model (i.e., formula 1-4) based on formula 1-2 and formula 1-3;
[0103] S5, determining the control point tangent vector of the trajectory segment starting point and the trajectory segment ending point based on the starting point tangent vector calculation model, the ending point tangent vector calculation model and the intermediate node tangent vector calculation model;
[0104] S6, obtaining the target posture data of the first intermediate control point based on the speed control point relationship model (i.e., formula 1-4), the target posture data of the trajectory segment starting point , the target posture data of the trajectory segment ending point , and the control point tangent vector of the trajectory segment starting point and the trajectory segment ending point Target pose data of the second intermediate control point ;
[0105] S7, call the node scalar constraint model to determine the node vector of each target trajectory segment to be calculated respectively; and obtain the target trajectory segment according to the node vector of the same trajectory segment, the target pose data of the trajectory segment starting point and the trajectory segment ending point.
[0106] It can be understood that, as shown in Figure 3 The welding system provided by the embodiment of the present application comprises:
[0107] A welding robot;
[0108] A positioner robot,
[0109] A controller, which performs the following steps:
[0110] Obtain welding gun pose data corresponding to welding gun discrete control points in a preset welding direction and workpiece pose data of workpiece discrete control points; the welding gun discrete control points and the workpiece discrete control points are one-to-one corresponding;
[0111] Combine the welding gun pose data and the corresponding workpiece pose data one-to-one to obtain target pose data of reference control points corresponding to the welding gun discrete control points;
[0112] Take every two adjacent reference control points in the welding direction as a trajectory segment starting point and a trajectory segment ending point of the same trajectory segment respectively, call a preset Bezier curve model to solve the control points of the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment, and obtain target pose data of multiple target control points of the same trajectory segment; wherein the speeds of the trajectory segment starting point, a trajectory segment intermediate point and the trajectory segment ending point of each trajectory segment are the same;
[0113] Construct a B-spline curve according to the target pose data of the multiple target control points of the same trajectory segment to generate a target trajectory segment;
[0114] Determine a welding gun welding trajectory and a workpiece movement trajectory according to the target trajectory segment.
[0115] The welding robot moves according to the welding gun welding trajectory; the positioner robot moves according to the workpiece movement trajectory.
[0116] The controller can be integrated in the welding robot or independent of the welding robot and the positioner robot, and the embodiment of the present application does not limit this, and a person skilled in the art can selectively set according to the actual situation.
[0117] It can be understood that the welding robot is a six-axis robot, the welding gun pose data comprises coordinates of multiple coordinate axes and Euler angles, and the workpiece pose data comprises a one-axis joint angle and a two-axis joint angle.
[0118] wherein the Euler angles include at least one of a yaw angle, a pitch angle, and a roll angle. The plurality of coordinate axes include at least one of an X-axis, a Y-axis, and a Z-axis.
[0119] The embodiment of the present application further provides an electronic device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the welding track generation method when executing the computer program. The welding system can be any smart terminal, such as a tablet computer or a vehicle-mounted computer.
[0120] Please refer to Figure 4 , Figure 4 The hardware structure of the electronic device of another embodiment is illustrated, which comprises:
[0121] The processor 401 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.
[0122] The memory 402 can be a NAND flash, and related program codes are saved in the memory 402 and executed by the processor 401 to implement the welding track generation method of the embodiments of the present application.
[0123] The input / output interface 403 is used to realize information input and output.
[0124] The communication interface 404 is used to realize the communication interaction between the device and other devices, and can realize communication through a wired manner (for example, a USB, a network cable, etc.) or a wireless manner (for example, a mobile network, WIFI, Bluetooth, etc.).
[0125] The bus 405 is used to transmit information between various components (for example, the processor 401, the memory 402, the input / output interface 403, and the communication interface 404) of the device.
[0126] The processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are connected to each other through the bus 405 to realize communication connection within the device.
[0127] The embodiment of the present application further provides a computer readable storage medium, which is a computer readable storage medium. The storage medium stores a computer program, and the computer program is executed by the processor to implement the welding track generation method.
[0128] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include a high-speed random access memory and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory disposed remotely from the processor, which can be connected to the processor through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0129] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0130] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than shown in the figures, or combine certain steps, or different steps.
[0131] The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0132] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the functional modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.
[0133] The terms "first", "second", "third", "fourth" and the like used in the specification of the present application and the above-described drawings, if any, are used to distinguish similar objects, and do not necessarily have to be used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0134] It should be understood that, in the application, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can represent three cases of only A, only B and A and B existing at the same time, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the front and rear associated objects. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b and c can be single or multiple.
[0135] In several embodiments provided in the application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the above units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0136] The units described above as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0137] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0138] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.
[0139] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, and are not limited to the scope of the embodiments of the present application. Any modifications, equivalent replacements and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.
Claims
1. A method of generating a weld trajectory, characterized by, The method comprises: acquiring welding gun posture data corresponding to welding gun discrete control points in a preset welding direction and workpiece posture data of workpiece discrete control points; the welding gun discrete control points and the workpiece discrete control points are one-to-one corresponding; combining the welding gun posture data and the corresponding workpiece posture data one-to-one to obtain target posture data of reference control points corresponding to the welding gun discrete control points; taking each two adjacent reference control points in the welding direction as a trajectory segment starting point and a trajectory segment ending point of a same trajectory segment respectively, calling a preset Bezier curve model to solve control points of the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment to obtain target posture data of a plurality of target control points of the same trajectory segment; wherein the Bezier curve model represents that the velocity of the trajectory segment starting point, a trajectory segment intermediate point and the trajectory segment ending point in the same trajectory segment is the same; constructing a B-spline curve according to the target posture data of the plurality of target control points of the same trajectory segment to generate a target trajectory segment; determining a welding gun welding trajectory and a workpiece movement trajectory according to the target trajectory segment.
2. The method of generating a weld trajectory according to claim 1, wherein, The Bezier curve model is a third-order Bezier curve model, and the calling of the preset Bezier curve model to solve the control points of the trajectory segment starting point and the trajectory segment ending point of the same trajectory segment to obtain the target posture data of the plurality of target control points of the same trajectory segment comprises: determining a first expression relationship between a first intermediate control point and the trajectory segment starting point and a second expression relationship between a second intermediate control point and the trajectory segment ending point according to a first derivative model of the third-order Bezier curve model; determining a third expression relationship between the trajectory segment intermediate point and the trajectory segment starting point, the trajectory segment ending point, the first intermediate control point and the second intermediate control point according to the first derivative model; determining the velocity according to the first expression relationship, the second expression relationship and the third expression relationship; obtaining the target posture data of the first intermediate control point according to the first expression relationship, the velocity, the target posture data of the trajectory segment starting point and a control point tangent vector; obtaining the target posture data of the second intermediate control point according to the second expression relationship, the velocity, the target posture data of the trajectory segment ending point and a control point tangent vector; wherein the first intermediate control point, the second intermediate control point, the trajectory segment starting point and the trajectory segment ending point are all target control points.
3. The method of generating a weld trajectory of claim 2, wherein, When the trajectory segment starting point is the first reference control point in the welding direction; the control point tangent vector of the trajectory segment starting point is obtained through a starting point tangent vector calculation model as follows: obtaining the control point tangent vector of the next reference control point of the trajectory segment starting point as a first control point tangent vector and obtaining a first curve smoothness index of the next reference control point of the trajectory segment starting point through the starting point tangent vector calculation model; The first control point tangent vector is obtained by performing a weighted difference operation on the first control point tangent vector and the first curve smoothness index through the start point tangent calculation model; the curve smoothness index represents a curvature variation relationship between the reference control point and a previous reference control point.
4. The method of generating a weld trajectory according to claim 3, wherein, When the trajectory segment endpoint is the last reference control point in the welding direction, the control point tangent vector of the trajectory segment endpoint is determined through the endpoint tangent calculation model by performing the following steps: The control point tangent vector of the previous reference control point of the trajectory segment endpoint is obtained through the endpoint tangent calculation model and taken as a second control point tangent vector; The control point tangent vector is obtained by performing a weighted difference operation on the second control point tangent vector and the curve smoothness index of the trajectory segment endpoint through the endpoint tangent calculation model.
5. The method of generating a weld trajectory according to claim 3 or 4, characterized in that, The control point tangent vector of the trajectory segment endpoint and the control point tangent vector of the trajectory segment endpoint are both determined through the intermediate node tangent calculation model by performing the following steps: The curve smoothness index of the current reference control point and the curve smoothness index of a next reference control point are obtained through the intermediate node tangent calculation model and taken as a third curve smoothness index and a fourth curve smoothness index, respectively; The node scalar variation coefficient of the current reference control point is obtained through the intermediate node tangent calculation model, and the node scalar variation coefficient represents a relationship between a node scalar difference of the current reference control point and a node scalar difference of the next reference control point; The control point tangent vector of the current reference control point is determined by performing a weighted summation calculation on the node scalar variation coefficient, the third curve smoothness index, and the fourth curve smoothness index through the intermediate node tangent calculation model. The trajectory segment endpoint is a reference control point other than the last reference control point.
6. The method of generating a weld trajectory of claim 5, wherein, The curve smoothness index is a ratio of a coordinate vector difference between two adjacent reference control points and a node scalar difference; the node scalar variation coefficient is a ratio of the node scalar difference of the current reference control point and a node total vector difference, and the node total vector difference is a sum of the node scalar difference of the current reference control point and the node scalar difference of the next reference control point.
7. The method of generating a weld trajectory of claim 1, wherein, The B-spline curve is constructed according to the target pose data of the plurality of target control points of the same trajectory segment, and the target trajectory segment is generated, including: The target pose data of the reference control points of different trajectory segments are respectively input into a preset node scalar constraint model to obtain a node vector corresponding to a trajectory segment in which the trajectory segment start point is located; The B-spline curve is constructed according to the node vector and the target pose data of the plurality of target control points corresponding thereto.
8. A welding system characterized by, It includes: A welding robot; A positioner robot, A controller, which performs the welding trajectory generation method according to any one of claims 1 to 7 to obtain a welding torch welding trajectory and a workpiece movement trajectory; The welding robot moves according to the welding torch welding trajectory; the positioner robot moves according to the workpiece movement trajectory.
9. The welding system of claim 8, wherein, The welding robot is a six-axis robot, the welding gun posture data includes coordinates of multiple coordinate axes and Euler angles; and the workpiece posture data includes a one-axis joint angle and a two-axis joint angle.
10. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the welding trajectory generation method of any one of claims 1 to 7.
Citation Information
Patent Citations
Planning method and system for determining robot track through using virtual reality handle
CN107214702A
Coordination motion control method for eight-freedom-degree welding-track online generation system
CN108972547A