A welding robot teaching and trajectory planning method and device based on multi-view optical motion capture
By establishing a unified coordinate mapping and singular point detection through multi-view motion capture technology, the problems of low efficiency and unstable trajectory in the teaching process of complex welds are solved, realizing efficient and accurate welding trajectory planning and execution, and improving welding quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI UNIV OF TECH
- Filing Date
- 2026-06-26
- Publication Date
- 2026-07-31
AI Technical Summary
Existing welding robots suffer from problems such as low efficiency of point-by-point teaching during the teaching process of complex weld seams, excessive noise and redundancy in trajectory data, difficulty in accurately converting the taught trajectory into an executable trajectory for the robot, and the impact of singular configurations on trajectory stability.
A welding robot teaching and trajectory planning method based on multi-view optical motion capture is adopted. By constructing a unified coordinate mapping of the welding robot base coordinate system, virtual welding gun coordinate system and motion capture world coordinate system, and combining virtual welding gun tip calibration and hand-eye calibration, a continuous and smooth welding trajectory is generated. Singular point detection and hierarchical processing are performed to achieve accurate trajectory conversion and smooth execution.
It improves the teaching efficiency and trajectory conversion accuracy of complex welds, obtains continuous and smooth welding trajectories, and enhances the reproducibility and stability of welding trajectories and the quality of weld formation.
Smart Images

Figure CN122480993A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotic welding and intelligent manufacturing technology, and in particular to a method and equipment for teaching and trajectory planning of welding robots based on multi-view optical motion capture. Background Technology
[0002] Welding robots have been widely used in automated production scenarios such as engineering machinery, rail transportation, and shipbuilding. As the manufacturing industry develops towards small-batch, multi-variety, and customized production, the demand for rapid teaching and flexible welding of complex workpiece welds is becoming increasingly prominent. Existing methods for acquiring welding trajectories mainly include manual welding, traditional teaching and reproduction, and vision or laser-guided methods. Among these, manual welding, while flexible, suffers from poor weld quality consistency and high labor intensity. Traditional teaching and reproduction methods typically rely on a teach pendant to record the trajectory point by point. When dealing with long welds, spatially curved welds, and welds in complex assemblies, these methods suffer from large teaching workloads, long programming cycles, and poor adaptability to changeovers. While vision or laser-guided methods can achieve weld detection and tracking, they are still prone to difficulties in extracting weld features, insufficient adaptability, and decreased robustness under conditions of strong arc light, fumes, spatter, and obstruction.
[0003] Furthermore, existing complex weld trajectory planning methods still struggle to balance teaching efficiency, trajectory accuracy, posture continuity, and robot executability. Teaching data often contains noise, abrupt jumps, and redundant points. If directly used for trajectory fitting, it can easily lead to local jitter, abrupt posture changes, or speed instability during robot end-effector execution. At the same time, the welding trajectory is also affected by the robot's workspace boundaries, joint limits, and singular configurations during execution, thereby reducing the smoothness of the welding process and the quality of weld formation. Summary of the Invention
[0004] To address the problems of low point-to-point teaching efficiency, excessive noise and redundancy in trajectory data, difficulty in accurately converting the taught trajectory into a robot-executable trajectory, and the impact of singular configurations on the smooth execution of the trajectory in the teaching process of complex welds, the primary objective of this invention is to provide a welding robot teaching and trajectory planning method based on multi-view optical motion capture that improves the teaching efficiency of complex welds, enhances the accuracy of converting the taught trajectory into a robot-executable trajectory, obtains a continuous and smooth welding trajectory that meets the robot's execution requirements, and improves the stability of welding trajectory reproduction and weld formation quality.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: a teaching and trajectory planning method for welding robots based on multi-view optical motion capture, the method comprising the following sequential steps:
[0006] (1) Construct a welding teaching platform consisting of a welding robot, a multi-view optical motion capture system, a virtual welding torch and a host machine, and establish the welding robot base coordinate system, the welding robot end flange coordinate system, the actual welding torch tool coordinate system, the virtual welding torch rigid body coordinate system and the motion capture world coordinate system to construct the kinematic model of the welding robot.
[0007] (2) Perform TCP calibration on the actual welding torch and tip calibration on the virtual welding torch to obtain the tip calibration results. Furthermore, the coordinate transformation relationship between the motion capture world coordinate system and the welding robot base coordinate system is obtained through hand-eye calibration.
[0008] (3) The operator holds the virtual welding torch and teaches along the target weld. The multi-view motion capture system collects the rigid body posture data of the virtual welding torch in real time and calculates the results based on the cusp calibration. Determine the trajectory of the virtual welding torch tip;
[0009] (4) Convert the virtual welding torch tip trajectory to the welding robot base coordinate system to obtain the converted trajectory, and preprocess the converted trajectory to obtain the teaching trajectory;
[0010] (5) Based on the teaching trajectory, position trajectory planning is performed. An analytical trajectory model is established for regular welds, and the trajectory is reconstructed by segmented cubic B-splines for free curve welds. A sequence of position interpolation points is generated based on equal arc length resampling.
[0011] (6) Construct a local coordinate system for the weld seam based on the weld seam tangent and the workpiece surface normal. Set the welding gun working angle and travel angle on the basis of the local coordinate system for the weld seam, and use the quaternion interpolation method to interpolate adjacent key attitudes to generate continuous attitude trajectories.
[0012] (7) The position interpolation point sequence and the continuous attitude trajectory are combined one by one according to the same interpolation sequence number or arc length parameter to form a planned trajectory; the planned trajectory is solved by inverse kinematics and singular point detection according to the kinematic model of the welding robot, and the welding segment and transition segment are graded according to the trajectory point type to generate an executable welding trajectory; the trajectory point type includes welding trajectory points and transition trajectory points, wherein the welding trajectory points include the arc starting point and the arc ending point, and the transition trajectory points include the starting safety point, the approach point, the weld transition point and the exit safety point;
[0013] (8) Send the executable welding trajectory to the control end of the welding robot to complete the trajectory reproduction and target weld welding.
[0014] In step (1), the origin of the end flange coordinate system of the welding robot is established at the geometric center of the end flange mounting surface of the sixth axis of the welding robot. The Z-axis of the end flange coordinate system of the welding robot is along the normal of the end flange mounting surface and points to the actual welding torch extension direction. The X-axis of the end flange coordinate system of the welding robot is determined by the line connecting the centers of the flange positioning holes or the zero position direction of the sixth axis of the welding robot. The Y-axis of the end flange coordinate system of the welding robot is determined according to the right-hand rule.
[0015] The construction of the kinematic model of the welding robot refers to establishing the homogeneous transformation relationship between the coordinate systems of adjacent links of a six-degree-of-freedom serial welding robot based on the DH method.
[0016] The pose of the actual welding torch tool coordinate system relative to the welding robot base coordinate system is determined by the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system, and the fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system. The fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system is obtained by the actual welding torch TCP calibration. Combining the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system with the fixed transformation yields the pose of the actual welding torch tool coordinate system in the welding robot base coordinate system.
[0017] The virtual welding torch includes a virtual welding torch body, a hand handle, a virtual welding torch tip, a target rigid support, and multiple optical target points. The virtual welding torch body is a rigid rod-shaped structure simulating the shape and length of an actual welding torch. Multiple weight-reducing holes are provided along the length of the virtual welding torch body to reduce structural weight while ensuring the overall rigidity and teaching stability of the virtual welding torch. These weight-reducing holes are circular through holes. A conical virtual welding torch tip is provided at the front end of the virtual welding torch body for approaching or pointing towards the target weld and indicating the teaching sampling point. The hand handle is fixed to the rear of the virtual welding torch body for the operator to hold and control the teaching posture. The rigid support includes a large sphere and multiple rod-shaped arms extending along the spherical surface of the large sphere in different spatial directions. The large sphere is fixed on the virtual welding gun body. Multiple small spherical optical target points are installed at the ends of the arms. The multiple optical target points are arranged in a non-collinear spatial arrangement, enabling the multi-optical motion capture system to recognize the rigid body posture of the virtual welding gun. The virtual welding gun body, hand handle, virtual welding gun tip, target rigid support, and optical target points are rigidly connected. The rigid body coordinate system of the virtual welding gun is determined by the spatial layout of the multiple optical target points. The fixed offset of the virtual welding gun tip relative to the rigid body coordinate system of the virtual welding gun is obtained through tip calibration.
[0018] In step (2), the tool center point TCP calibration of the actual welding gun specifically refers to: using a multi-posture calibration method, recording the end flange pose corresponding to the tip of the welding gun in multiple different postures, and solving the fixed transformation relationship between the actual welding gun tool coordinate system and the end flange coordinate system of the welding robot.
[0019] The virtual welding torch tip calibration specifically refers to: maintaining the virtual welding torch tip fixed, changing the virtual welding torch posture and collecting multiple sets of rigid body pose data, constructing an overdetermined set of equations, and using the least squares method to solve for the tip calibration result, i.e., the fixed offset of the virtual welding torch tip relative to the virtual welding torch rigid body coordinate system. Specifically, this means:
[0020] Let the first During this measurement, the rotation matrix and translation vector of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system are respectively... and If the fixed coordinates of the cusp in the motion capture world coordinate system are c, then the j-th measurement satisfies the measurement equation:
[0021] ;
[0022] In the formula, Indicates the measurement sequence number in the cusp calibration. =1,2,…,M; M is the number of measurements for cusp calibration; The fixed offset of the virtual welding torch tip relative to the virtual welding torch rigid body coordinate system is the tip calibration result.
[0023] To facilitate a unified solution for multiple sets of measurement data, the above measurement equation is rearranged and rewritten in matrix form. Then, the M sets of measurement data are stacked row by row to obtain: ; ;
[0024] ;
[0025] In the formula, I is a 3×3 identity matrix; For each group The coefficient matrix formed by stacking rows; For each group A constant vector formed by stacking rows; Let be the unknown vector to be determined; Let be the rotation matrix of the virtual welding torch rigid body coordinate system relative to the dynamic capture world coordinate system during the Mth measurement; For the Mth measurement, the translation vector of the origin of the virtual welding torch rigid body coordinate system in the dynamic world coordinate system is given.
[0026] For the coefficient matrix Perform singular value decomposition and obtain the least squares solution:
[0027] ;
[0028] ;
[0029] In the formula, Coefficient matrix The left singular vector matrix; Coefficient matrix The singular value diagonal matrix; Coefficient matrix The right singular vector matrix; A singular value diagonal matrix The generalized inverse matrix; the superscript T denotes the matrix transpose;
[0030] The obtained unknown vector The first three components , , composition =[ ;
[0031] The hand-eye calibration refers to rigidly fixing a calibration rigid body with multiple non-collinear optical target points to the end of a welding robot, and simultaneously acquiring the pose of the end flange in the welding robot's base coordinate system and the pose of the calibration rigid body in the motion capture world coordinate system when the welding robot moves to multiple different poses.
[0032] The welding robot-side relative motion matrix A is formed by the end flange poses obtained from two consecutive acquisitions, and the motion capture-side relative motion matrix B is formed by the calibration rigid body poses obtained from two consecutive acquisitions. The welding robot-side relative motion matrix A and the motion capture-side relative motion matrix B together form a set of relative motion matrices, and the following hand-eye calibration model is established:
[0033] AX = XB;
[0034] In the formula, A represents the relative motion between two adjacent poses of the end flange in the welding robot base coordinate system; B represents the relative motion between two adjacent poses of the calibration rigid body in the motion capture world coordinate system; X is the hand-eye transformation matrix to be determined, which represents the fixed coordinate transformation relationship between the welding robot end flange coordinate system and the calibration rigid body coordinate system; X is solved by multiple sets of relative motion matrices, and the coordinate transformation relationship between the motion capture world coordinate system and the welding robot base coordinate system is further obtained.
[0035] In step (3), obtaining the virtual welding torch tip trajectory based on the tip calibration results specifically refers to the multi-view optical motion capture system outputting the pose of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system at the kth sampling time. The pose includes a rotation matrix. Translation vector The cusp calibration result is the fixed offset of the virtual welding torch cusp in the virtual welding torch rigid body coordinate system. Then, the position of the virtual welding torch tip in the motion capture world coordinate system at the kth sampling time is... for:
[0036] ;
[0037] Arrange the positions of each tip in chronological order of sampling time to obtain the virtual welding torch tip trajectory:
[0038] ;
[0039] Where P is the set of virtual welding torch tip trajectories arranged in chronological order of sampling time, p1, p2, ..., These represent the virtual welding torch tip positions at sampling times 1 to N, where N is the number of sampling points.
[0040] In step (4), the preprocessing of the converted trajectory specifically refers to: smoothing the position data using a discrete filtering method, smoothing the attitude data in the quaternion space; judging abnormal jump points by the distance threshold between adjacent sampling points, and correcting them by neighborhood interpolation or mean method; removing redundant points using the Douglas-Peucker algorithm, and extracting feature points by combining local turning angle or local curvature index, and forming the teaching trajectory from the feature points.
[0041] Step (5) specifically refers to: when the weld is a regular weld that is a straight line, arc or full circle, an analytical trajectory model is established based on the geometric characteristics of the weld and the teaching trajectory; when the weld is a free curve weld, the curve parameter values are assigned to the feature points in the teaching trajectory using chord length parameterization, and the teaching trajectory is continuously reconstructed using piecewise cubic B-splines; after the trajectory reconstruction is completed, the continuous position trajectory is resampled with equal arc length to generate a sequence of position interpolation points that meet the target welding speed requirements.
[0042] In step (7), the singularity detection specifically refers to: calculating the Jacobian matrix corresponding to each trajectory point based on the kinematic model of the welding robot, and then calculating the singularity of the trajectory points and determining the risk based on the obtained Jacobian matrix; using one or more of the operability index, condition number index, and singularity factor index to determine the trajectory singularity risk; when the trajectory point belongs to the transition section, avoiding the singularity risk by adding transition points, adjusting the local posture, or using joint space smoothing; when the trajectory point belongs to the welding section, reducing the singularity risk by posture fine-tuning, segmented execution of the weld, or adjustment of the workpiece placement posture.
[0043] The transition segment refers to the non-arc-starting movement segment of the welding robot between the starting safety point and the welding start point, between adjacent welds or adjacent welding segments, and between the welding end point and the exit safety point; the welding segment refers to the trajectory segment of the welding robot performing actual welding along the target weld from the arc-starting point to the arc-ending point.
[0044] Another object of the present invention is to provide an electronic device comprising:
[0045] A processor; and a memory storing computer program instructions that, when executed by the processor, cause the processor to perform the welding robot teaching and trajectory planning method based on multi-view motion capture as described above.
[0046] The present invention also provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, cause the processor to perform the welding robot teaching and trajectory planning method based on multi-view motion capture as described above.
[0047] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention uses virtual welding torch teaching and multi-view motion capture pose acquisition to replace the traditional point-by-point teaching method, which can improve the teaching efficiency of complex welds; by establishing a unified coordinate mapping relationship through actual welding torch TCP calibration, virtual welding torch tip calibration and hand-eye calibration, the accuracy of the conversion of the teaching trajectory to the robot execution trajectory can be improved; Second, by filtering and smoothing, redundant point elimination, feature point extraction, segmented cubic B-spline reconstruction and equal arc length interpolation, a continuous and smooth welding trajectory that meets the robot execution requirements can be obtained; Third, by combining robot kinematic analysis and singular point hierarchical processing strategies, welding accuracy and trajectory executability can be balanced, improving the stability of welding trajectory reproduction and weld formation quality. Attached Figure Description
[0048] Figure 1 This is a flowchart of the method of the present invention;
[0049] Figure 2 This is a general framework diagram of the welding teaching platform in this invention;
[0050] Figure 3 A schematic diagram of the structure of the virtual welding torch and optical target;
[0051] Figure 4 This is a schematic diagram of feature point extraction and piecewise cubic B-spline reconstruction.
[0052] Figure 5 This is a schematic diagram of the local coordinate system of the weld and the posture planning of the welding torch. Detailed Implementation
[0053] like Figure 1As shown, a teaching and trajectory planning method for welding robots based on multi-view motion capture is presented. This method includes the following sequential steps:
[0054] (1) Construct a welding teaching platform consisting of a welding robot, a multi-view optical motion capture system, a virtual welding torch, and a host computer, such as Figure 2 As shown, a kinematic model of the welding robot is constructed by establishing the base coordinate system of the welding robot, the end flange coordinate system of the welding robot, the actual welding torch tool coordinate system, the virtual welding torch rigid body coordinate system, and the motion capture world coordinate system.
[0055] (2) Perform TCP calibration on the actual welding torch and tip calibration on the virtual welding torch to obtain the tip calibration results. Furthermore, the coordinate transformation relationship between the motion capture world coordinate system and the welding robot base coordinate system is obtained through hand-eye calibration.
[0056] (3) The operator holds the virtual welding torch and teaches along the target weld. The multi-view motion capture system collects the rigid body posture data of the virtual welding torch in real time and calculates the results based on the cusp calibration. Determine the trajectory of the virtual welding torch tip;
[0057] (4) Convert the virtual welding torch tip trajectory to the welding robot base coordinate system to obtain the converted trajectory, and preprocess the converted trajectory to obtain the teaching trajectory;
[0058] (5) Based on the teaching trajectory, position trajectory planning is performed. An analytical trajectory model is established for regular welds, and the trajectory is reconstructed by segmented cubic B-splines for free curve welds. A sequence of position interpolation points is generated based on equal arc length resampling.
[0059] (6) Construct a local coordinate system for the weld seam based on the weld seam tangent and the workpiece surface normal. Set the welding torch working angle and travel angle based on this local coordinate system, such as... Figure 5 As shown, quaternion interpolation is used to interpolate adjacent key attitudes to generate continuous attitude trajectories.
[0060] (7) The position interpolation point sequence and the continuous attitude trajectory are combined one by one according to the same interpolation sequence number or arc length parameter to form a planned trajectory; the planned trajectory is solved by inverse kinematics and singular point detection according to the kinematic model of the welding robot, and the welding segment and transition segment are graded according to the trajectory point type to generate an executable welding trajectory; the trajectory point type includes welding trajectory points and transition trajectory points, wherein the welding trajectory points include the arc starting point and the arc ending point, and the transition trajectory points include the starting safety point, the approach point, the weld transition point and the exit safety point;
[0061] (8) Send the executable welding trajectory to the control end of the welding robot to complete the trajectory reproduction and target weld welding.
[0062] In step (1), the origin of the end flange coordinate system of the welding robot is established at the geometric center of the end flange mounting surface of the sixth axis of the welding robot. The Z-axis of the end flange coordinate system of the welding robot is along the normal of the end flange mounting surface and points to the actual welding torch extension direction. The X-axis of the end flange coordinate system of the welding robot is determined by the line connecting the centers of the flange positioning holes or the zero position direction of the sixth axis of the welding robot. The Y-axis of the end flange coordinate system of the welding robot is determined according to the right-hand rule.
[0063] The construction of the kinematic model of the welding robot refers to establishing the homogeneous transformation relationship between the coordinate systems of adjacent links of a six-degree-of-freedom serial welding robot based on the DH method.
[0064] The pose of the actual welding torch tool coordinate system relative to the welding robot base coordinate system is determined by the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system, and the fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system. The fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system is obtained by the actual welding torch TCP calibration. Combining the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system with the fixed transformation yields the pose of the actual welding torch tool coordinate system in the welding robot base coordinate system.
[0065] like Figure 3 As shown, the virtual welding gun includes a virtual welding gun body 3, a hand handle 5, a virtual welding gun tip 4, a target rigid support 2, and multiple optical target points 1. The virtual welding gun body 3 is a rigid rod-shaped structure that simulates the shape and length of an actual welding gun. Multiple weight-reducing holes are provided along the length of the virtual welding gun body 3 to reduce the structural weight while ensuring the overall rigidity and teaching stability of the virtual welding gun. The weight-reducing holes are circular through holes. A conical virtual welding gun tip 4 is provided at the front end of the virtual welding gun body 3 to approach or point to the target weld and indicate the teaching sampling point. The hand handle 5 is fixed to the rear of the virtual welding gun body 3 for the operator to hold and control the teaching posture. The target rigid support 2 includes a large sphere and multiple rod-shaped arms extending along the spherical surface of the large sphere in different spatial directions. The large sphere is fixed on the virtual welding gun body 3. Multiple small spherical optical target points 1 are installed at the ends of the arms. The multiple optical target points 1 are arranged in a non-collinear spatial arrangement, enabling the multi-optical motion capture system to recognize the virtual welding gun rigid body pose. The virtual welding gun body 3, the hand handle 5, the virtual welding gun tip 4, the target rigid support 2, and the optical target points 1 are rigidly connected. The virtual welding gun rigid body coordinate system is determined by the spatial layout of the multiple optical target points 1. The fixed offset of the virtual welding gun tip 4 relative to the virtual welding gun rigid body coordinate system is obtained through tip calibration.
[0066] In step (2), the tool center point TCP calibration of the actual welding gun specifically refers to: using a multi-posture calibration method, recording the end flange pose corresponding to the tip of the welding gun in multiple different postures, and solving the fixed transformation relationship between the actual welding gun tool coordinate system and the end flange coordinate system of the welding robot.
[0067] The specific meaning of performing tip calibration on the virtual welding torch is as follows: by keeping the virtual welding torch tip 4 fixed, changing the virtual welding torch posture and collecting multiple sets of rigid body pose data, constructing an overdetermined set of equations, and using the least squares method to solve for the tip calibration result, i.e., the fixed offset of the virtual welding torch tip 4 relative to the virtual welding torch rigid body coordinate system. Specifically, it means:
[0068] Let the first During this measurement, the rotation matrix and translation vector of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system are respectively... and If the fixed coordinates of the cusp in the motion capture world coordinate system are c, then the j-th measurement satisfies the measurement equation:
[0069] ;
[0070] In the formula, Indicates the measurement sequence number in the cusp calibration. =1,2,…,M; M is the number of measurements for cusp calibration; The fixed offset of virtual welding gun tip 4 relative to the virtual welding gun rigid body coordinate system is the tip calibration result.
[0071] To facilitate a unified solution for multiple sets of measurement data, the above measurement equation is rearranged and rewritten in matrix form. Then, the M sets of measurement data are stacked row by row to obtain: ; ;
[0072] ;
[0073] In the formula, I is a 3×3 identity matrix; For each group The coefficient matrix formed by stacking rows; For each group A constant vector formed by stacking rows; Let be the unknown vector to be determined; Let be the rotation matrix of the virtual welding torch rigid body coordinate system relative to the dynamic capture world coordinate system during the Mth measurement; For the Mth measurement, the translation vector of the origin of the virtual welding torch rigid body coordinate system in the dynamic world coordinate system is given.
[0074] For the coefficient matrix Perform singular value decomposition and obtain the least squares solution:
[0075] ;
[0076] ;
[0077] In the formula, Coefficient matrix The left singular vector matrix; Coefficient matrix The singular value diagonal matrix; Coefficient matrix The right singular vector matrix; A singular value diagonal matrix The generalized inverse matrix; the superscript T denotes the matrix transpose;
[0078] The obtained unknown vector The first three components , , composition =[ ;
[0079] The hand-eye calibration refers to rigidly fixing a calibration rigid body with multiple non-collinear optical target points 1 to the end effector of a welding robot. As the welding robot moves to multiple different poses, the poses of the end flange in the welding robot's base coordinate system and the poses of the calibration rigid body in the motion capture world coordinate system are simultaneously acquired. The calibration rigid body is a rigid component composed of multiple non-collinear optical target points 1 and target point rigid supports 2, and its structural form is similar to... Figure 3 The target rigid bracket 2 above the virtual welding torch is the same, and is used to be identified by the multi-view optical motion capture system and output the calibrated rigid body pose.
[0080] The welding robot-side relative motion matrix A is formed by the end flange poses obtained from two consecutive acquisitions, and the motion capture-side relative motion matrix B is formed by the calibration rigid body poses obtained from two consecutive acquisitions. The welding robot-side relative motion matrix A and the motion capture-side relative motion matrix B together form a set of relative motion matrices, and the following hand-eye calibration model is established:
[0081] AX = XB;
[0082] In the formula, A represents the relative motion between two adjacent poses of the end flange in the welding robot base coordinate system; B represents the relative motion between two adjacent poses of the calibration rigid body in the motion capture world coordinate system; X is the hand-eye transformation matrix to be determined, which represents the fixed coordinate transformation relationship between the welding robot end flange coordinate system and the calibration rigid body coordinate system; X is solved by multiple sets of relative motion matrices, and the coordinate transformation relationship between the motion capture world coordinate system and the welding robot base coordinate system is further obtained.
[0083] In step (3), obtaining the virtual welding torch tip trajectory based on the tip calibration results specifically refers to the multi-view optical motion capture system outputting the pose of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system at the kth sampling time. The pose includes a rotation matrix. Translation vector The cusp calibration result is the fixed offset of virtual welding torch cusp 4 in the virtual welding torch rigid body coordinate system. Then, at the k-th sampling moment, the position of the virtual welding torch tip 4 in the motion capture world coordinate system... for:
[0084] ;
[0085] Arrange the positions of each tip in chronological order of sampling time to obtain the virtual welding torch tip trajectory:
[0086] ;
[0087] Where P is the set of virtual welding torch tip trajectories arranged in chronological order of sampling time, p1, p2, ..., These are the virtual welding torch tip positions 4 at the 1st to Nth sampling times, where N is the number of sampling points.
[0088] In step (4), the preprocessing of the converted trajectory specifically refers to: smoothing the position data using a discrete filtering method, smoothing the attitude data in the quaternion space; judging abnormal jump points by the distance threshold between adjacent sampling points, and correcting them by neighborhood interpolation or mean method; removing redundant points using the Douglas-Peucker algorithm, and extracting feature points by combining local turning angle or local curvature index, and forming the teaching trajectory from the feature points.
[0089] Step (5) specifically refers to: when the weld is a regular weld that is a straight line, arc, or full circle, establishing an analytical trajectory model based on the weld's geometric characteristics and the teaching trajectory; when the weld is a free curve weld, assigning curve parameter values to the feature points in the teaching trajectory using chord length parameterization, and continuously reconstructing the teaching trajectory using piecewise cubic B-splines, such as... Figure 4 As shown; after the trajectory reconstruction is completed, the continuous position trajectory is resampled with equal arc length to generate a sequence of position interpolation points that meet the target welding speed requirements.
[0090] In step (7), the singularity detection specifically refers to: calculating the Jacobian matrix corresponding to each trajectory point based on the kinematic model of the welding robot, and then calculating the singularity of the trajectory points and determining the risk based on the obtained Jacobian matrix; using one or more of the operability index, condition number index, and singularity factor index to determine the trajectory singularity risk; when the trajectory point belongs to the transition section, avoiding the singularity risk by adding transition points, adjusting the local posture, or using joint space smoothing; when the trajectory point belongs to the welding section, reducing the singularity risk by posture fine-tuning, segmented execution of the weld, or adjustment of the workpiece placement posture.
[0091] The transition segment refers to the non-arc-starting movement segment of the welding robot between the starting safety point and the welding start point, between adjacent welds or adjacent welding segments, and between the welding end point and the exit safety point; the welding segment refers to the trajectory segment of the welding robot performing actual welding along the target weld from the arc-starting point to the arc-ending point.
[0092] In summary, this invention utilizes virtual welding torch teaching and multi-view motion capture pose acquisition to replace the traditional point-by-point teaching method, thereby improving the teaching efficiency of complex welds. By establishing a unified coordinate mapping relationship through actual welding torch TCP calibration, virtual welding torch tip calibration, and hand-eye calibration, the accuracy of converting the teaching trajectory to the robot's execution trajectory can be improved. Through filtering and smoothing, redundant point removal, feature point extraction, segmented cubic B-spline reconstruction, and equal arc length interpolation, a continuous and smooth welding trajectory that meets the robot's execution requirements can be obtained. By combining robot kinematic analysis and singular point hierarchical processing strategies, welding accuracy and trajectory executability can be balanced, improving the stability of welding trajectory reproduction and the quality of weld formation.
[0093] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A welding robot teach and trajectory planning method based on multi-view optical motion capture, characterized by: The method includes the following steps in sequence: (1) Construct a welding teaching platform consisting of a welding robot, a multi-view optical motion capture system, a virtual welding torch and a host machine, and establish the welding robot base coordinate system, the welding robot end flange coordinate system, the actual welding torch tool coordinate system, the virtual welding torch rigid body coordinate system and the motion capture world coordinate system to construct the kinematic model of the welding robot. (2) The tool center point TCP of the actual welding torch is calibrated, and the cusp point of the virtual welding torch is calibrated to obtain a cusp point calibration result And a coordinate transformation relationship between the motion capture world coordinate system and the welding robot base coordinate system is obtained through the hand-eye calibration. (3) The operator holds the virtual welding torch and teaches along the target weld. The multi-view motion capture system collects the rigid body posture data of the virtual welding torch in real time and calculates the results based on the cusp calibration. Determine the trajectory of the virtual welding torch tip; (4) Convert the virtual welding torch tip trajectory to the welding robot base coordinate system to obtain the converted trajectory, and preprocess the converted trajectory to obtain the teaching trajectory; (5) Based on the teaching trajectory, position trajectory planning is performed. An analytical trajectory model is established for regular welds, and the trajectory is reconstructed by segmented cubic B-splines for free curve welds. A sequence of position interpolation points is generated based on equal arc length resampling. (6) Construct a local coordinate system for the weld seam based on the weld seam tangent and the workpiece surface normal. Set the welding gun working angle and travel angle on the basis of the local coordinate system for the weld seam, and use the quaternion interpolation method to interpolate adjacent key attitudes to generate continuous attitude trajectories. (7) The position interpolation point sequence and the continuous attitude trajectory are combined one by one according to the same interpolation sequence number or arc length parameter to form a planned trajectory; the planned trajectory is solved by inverse kinematics and singular point detection according to the kinematic model of the welding robot, and the welding segment and transition segment are graded according to the trajectory point type to generate an executable welding trajectory; the trajectory point type includes welding trajectory points and transition trajectory points, wherein the welding trajectory points include the arc starting point and the arc ending point, and the transition trajectory points include the starting safety point, the approach point, the weld transition point and the exit safety point; (8) Send the executable welding trajectory to the control end of the welding robot to complete the trajectory reproduction and target weld welding.
2. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: In step (1), the origin of the end flange coordinate system of the welding robot is established at the geometric center of the end flange mounting surface of the sixth axis of the welding robot. The Z-axis of the end flange coordinate system of the welding robot is along the normal of the end flange mounting surface and points to the actual welding torch extension direction. The X-axis of the end flange coordinate system of the welding robot is determined by the line connecting the centers of the flange positioning holes or the zero position direction of the sixth axis of the welding robot. The Y-axis of the end flange coordinate system of the welding robot is determined according to the right-hand rule. The construction of the kinematic model of the welding robot refers to establishing the homogeneous transformation relationship between the coordinate systems of adjacent links of a six-degree-of-freedom serial welding robot based on the DH method. The pose of the actual welding torch tool coordinate system relative to the welding robot base coordinate system is determined by the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system, and the fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system. The fixed transformation of the actual welding torch tool coordinate system relative to the welding robot end flange coordinate system is obtained by the actual welding torch TCP calibration. Combining the pose of the welding robot end flange coordinate system relative to the welding robot base coordinate system with the fixed transformation yields the pose of the actual welding torch tool coordinate system in the welding robot base coordinate system. The virtual welding torch includes a virtual welding torch body, a hand handle, a virtual welding torch tip, a target rigid support, and multiple optical target points. The virtual welding torch body is a rigid rod-shaped structure simulating the shape and length of an actual welding torch. Multiple weight-reducing holes are provided along the length of the virtual welding torch body to reduce structural weight while ensuring the overall rigidity and teaching stability of the virtual welding torch. These weight-reducing holes are circular through holes. A conical virtual welding torch tip is provided at the front end of the virtual welding torch body for approaching or pointing towards the target weld and indicating the teaching sampling point. The hand handle is fixed to the rear of the virtual welding torch body for the operator to hold and control the teaching posture. The rigid support includes a large sphere and multiple rod-shaped arms extending along the spherical surface of the large sphere in different spatial directions. The large sphere is fixed on the virtual welding gun body. Multiple small spherical optical target points are installed at the ends of the arms. The multiple optical target points are arranged in a non-collinear spatial arrangement, enabling the multi-optical motion capture system to recognize the rigid body posture of the virtual welding gun. The virtual welding gun body, hand handle, virtual welding gun tip, target rigid support, and optical target points are rigidly connected. The rigid body coordinate system of the virtual welding gun is determined by the spatial layout of the multiple optical target points. The fixed offset of the virtual welding gun tip relative to the rigid body coordinate system of the virtual welding gun is obtained through tip calibration.
3. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: In step (2), the tool center point TCP calibration of the actual welding gun specifically refers to: using a multi-posture calibration method, recording the end flange pose corresponding to the tip of the welding gun in multiple different postures, and solving the fixed transformation relationship between the actual welding gun tool coordinate system and the end flange coordinate system of the welding robot. The virtual welding torch tip calibration specifically refers to: maintaining the virtual welding torch tip fixed, changing the virtual welding torch posture and collecting multiple sets of rigid body pose data, constructing an overdetermined set of equations, and using the least squares method to solve for the tip calibration result, i.e., the fixed offset of the virtual welding torch tip relative to the virtual welding torch rigid body coordinate system. Specifically, this means: Let the first During this measurement, the rotation matrix and translation vector of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system are respectively... and If the fixed coordinates of the cusp in the motion capture world coordinate system are c, then the j-th measurement satisfies the measurement equation: ; In the formula, Indicates the measurement sequence number in the cusp calibration. =1,2,…,M; M is the number of measurements for cusp calibration; The fixed offset of the virtual welding torch tip relative to the virtual welding torch rigid body coordinate system is the tip calibration result. To facilitate a unified solution for multiple sets of measurement data, the above measurement equation is rearranged and rewritten in matrix form. Then, the M sets of measurement data are stacked row by row to obtain: ; ; ; In the formula, I is a 3×3 identity matrix; For each group The coefficient matrix formed by stacking rows; For each group A constant vector formed by stacking rows; Let be the unknown vector to be determined; Let be the rotation matrix of the virtual welding torch rigid body coordinate system relative to the dynamic capture world coordinate system during the Mth measurement; For the Mth measurement, the translation vector of the origin of the virtual welding torch rigid body coordinate system in the dynamic world coordinate system is given. For the coefficient matrix Perform singular value decomposition and obtain the least squares solution: ; ; In the formula, Coefficient matrix The left singular vector matrix; Coefficient matrix The singular value diagonal matrix; Coefficient matrix The right singular vector matrix; A singular value diagonal matrix The generalized inverse matrix; the superscript T denotes the matrix transpose; The obtained unknown vector The first three components , , composition =[ ; The hand-eye calibration refers to rigidly fixing a calibration rigid body with multiple non-collinear optical target points to the end of a welding robot, and simultaneously acquiring the pose of the end flange in the welding robot's base coordinate system and the pose of the calibration rigid body in the motion capture world coordinate system when the welding robot moves to multiple different poses. The welding robot-side relative motion matrix A is formed by the end flange poses obtained from two consecutive acquisitions, and the motion capture-side relative motion matrix B is formed by the calibration rigid body poses obtained from two consecutive acquisitions. The welding robot-side relative motion matrix A and the motion capture-side relative motion matrix B together form a set of relative motion matrices, and the following hand-eye calibration model is established: AX = XB; In the formula, A represents the relative motion between two adjacent poses of the end flange in the welding robot's base coordinate system; B represents the relative motion between two adjacent poses of the calibration rigid body in the motion capture world coordinate system; X is the hand-eye transformation matrix to be determined, representing the fixed coordinate transformation relationship between the welding robot's end flange coordinate system and the calibration rigid body coordinate system; X is solved by multiple sets of relative motion matrices, and the coordinate transformation relationship between the motion capture world coordinate system and the welding robot's base coordinate system is further obtained.
4. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: In step (3), obtaining the virtual welding torch tip trajectory based on the tip calibration results specifically refers to the multi-view optical motion capture system outputting the pose of the virtual welding torch rigid body coordinate system relative to the motion capture world coordinate system at the kth sampling time. The pose includes a rotation matrix. Translation vector The cusp calibration result is the fixed offset of the virtual welding torch cusp in the virtual welding torch rigid body coordinate system. Then, the position of the virtual welding torch tip in the motion capture world coordinate system at the kth sampling time is... for: ; Arrange the positions of each tip in chronological order of sampling time to obtain the virtual welding torch tip trajectory: ; Where P is the set of virtual welding torch tip trajectories arranged in chronological order of sampling time, p1, p2, ..., These represent the virtual welding torch tip positions at sampling times 1 to N, where N is the number of sampling points.
5. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: In step (4), the preprocessing of the converted trajectory specifically refers to: smoothing the position data using a discrete filtering method, smoothing the attitude data in the quaternion space; judging abnormal jump points by the distance threshold between adjacent sampling points, and correcting them by neighborhood interpolation or mean method; removing redundant points using the Douglas-Peucker algorithm, and extracting feature points by combining local turning angle or local curvature index, and forming the teaching trajectory from the feature points.
6. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: Step (5) specifically refers to: when the weld is a regular weld that is a straight line, arc or full circle, an analytical trajectory model is established based on the geometric characteristics of the weld and the teaching trajectory; when the weld is a free curve weld, the curve parameter values are assigned to the feature points in the teaching trajectory using chord length parameterization, and the teaching trajectory is continuously reconstructed using piecewise cubic B-splines; after the trajectory reconstruction is completed, the continuous position trajectory is resampled with equal arc length to generate a sequence of position interpolation points that meet the target welding speed requirements.
7. The welding robot teaching and trajectory planning method based on multi-view motion capture according to claim 1, characterized in that: In step (7), the singularity detection specifically refers to: calculating the Jacobian matrix corresponding to each trajectory point based on the kinematic model of the welding robot, and then calculating the singularity of the trajectory points and determining the risk based on the obtained Jacobian matrix; using one or more of the operability index, condition number index, and singularity factor index to determine the trajectory singularity risk; when the trajectory point belongs to the transition section, avoiding the singularity risk by adding transition points, adjusting the local posture, or using joint space smoothing; when the trajectory point belongs to the welding section, reducing the singularity risk by posture fine-tuning, segmented execution of the weld, or adjustment of the workpiece placement posture. The transition segment refers to the non-arc-starting movement segment of the welding robot between the starting safety point and the welding start point, between adjacent welds or adjacent welding segments, and between the welding end point and the exit safety point; the welding segment refers to the trajectory segment of the welding robot performing actual welding along the target weld from the arc-starting point to the arc-ending point.
8. An electronic device, comprising: processor; And a memory storing computer program instructions, which, when executed by the processor, cause the processor to perform the welding robot teaching and trajectory planning method based on multi-view optical motion capture as described in any one of claims 1-7.
9. A computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, cause the processor to perform the welding robot teaching and trajectory planning method based on multi-view optical motion capture as described in any one of claims 1-7.