A three-dimensional dynamic display and processing triggering method for robot laser flying welding
By calculating the robot trajectory and laser galvanometer coordinates, and combining DH parameters and the VTK library, the three-dimensional dynamic display and time-position integrated triggering of the laser beam are realized, which solves the complex problems of laser beam position display and processing triggering in the existing technology, improves the accuracy of the simulation results and the ease of operation, and avoids interference in the processing process.
Patent Information
- Application Number
- CN202510863623.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing robot offline programming software cannot effectively display the position and status of the laser beam, and the processing triggering method is complicated and cumbersome, which cannot adapt to complex working conditions, resulting in possible collisions and unreasonable laser emission time during the processing.
By calculating the robot trajectory motion direction and the laser galvanometer coordinate position, the robot and laser beam models are displayed in the 3D software using DH parameters and forward kinematics formulas. The VTK library is combined to achieve 3D dynamic display, and the time and position combined triggering method is used to adjust the weld processing time to avoid interference.
It realizes the real-time display and flexible adjustment of the laser beam position, simplifies the operation process, improves the accuracy and compatibility of the simulation results, and can adjust the processing process according to the actual situation to avoid laser beam interference.
Smart Images

Figure CN120362705B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot off-line programming, and in particular relates to a three-dimensional dynamic display and processing triggering method for robot laser flying welding. Background Art
[0002] Robotic laser welding on the fly involves mounting a laser galvanometer on the end flange of a robot. The galvanometer offers extremely fast response speed and high precision, while the robot boasts a large processing area. By changing the robot's posture, it can process different planes in three-dimensional space. Combining these two technologies enables rapid processing of large-scale, complex workpieces.
[0003] The current robot offline programming software encapsulates the method of importing robot models within the software, so when using the software, only specific robot models and tools can be selected. The laser galvanometer lens is different from ordinary tools. The laser of the laser galvanometer lens can swing freely within the processing range. The current robot offline programming software can only move the six axes of the robot and cannot make the imported laser beam model move according to the expected trajectory. In addition, during the actual processing process, the human eye cannot see the laser propagating in the air. It is of great significance to independently develop robot simulation software that can view the position of the laser beam.
[0004] Since collisions, unreasonable laser emission time, robots or laser galvanometers not moving according to the expected trajectory may occur during the actual processing, it is of great significance to develop simulation software to simulate the processing process before actual processing, check the movement status of the robot and laser galvanometer, and adjust the emission time of each weld according to actual conditions.
[0005] In response to the above problems, existing solutions include (1) simulating the actual processing process in a relatively mature robot offline programming software, and then importing the robot trajectory obtained by simulation into the robot control software. It is not easy to display information such as the weld position in the simulation space. The position and status of the laser beam cannot be displayed. (2) Using the robot toolbox in MATLAB for simulation. The toolbox uses the MATLAB window for drawing, so it can draw some visual line segments to display information such as the weld position and robot trajectory. The toolbox can use abstract connecting rods to display the robot model and can also import the actual robot model for display. However, the toolbox cannot export code, making data exchange between the software used difficult. The toolbox cannot display the position and status of the laser beam in real time. (3) The weld processing triggering methods of the current galvanometer processing software can be divided into time triggering and position triggering. The time triggering method requires first teaching the robot trajectory and the position of the weld in space to obtain the total time of the robot movement and the time when each weld starts and ends processing. It is necessary to adjust the initial position of each weld by itself, and then trigger the processing signal according to the relative time. Position-based triggering triggers processing when the laser lens or robot reaches the set weld processing position. Time-based triggering requires actual robot teaching before processing begins, making the operation complex and cumbersome. Position-based triggering also has a fixed trigger position and cannot be adjusted according to actual conditions, making it unsuitable for more complex working conditions. Summary of the Invention
[0006] To solve the above technical problems, the present invention provides a three-dimensional dynamic display and processing triggering method for robot laser flying welding to solve the problems in the prior art. The technical solution adopted by the present invention is:
[0007] A three-dimensional dynamic display and processing triggering method for robot laser flying welding includes the following steps:
[0008] Step 1: Calculate the direction vector RobotMove of the robot's trajectory and the relative position vector of the robot;
[0009] Step 2: Calculate the coordinate position of the laser galvanometer and the robot joint position, store them in an array, and use the data to realize three-dimensional dynamic display;
[0010] Step 3: Use the program to adjust the laser galvanometer's light emission time to avoid interference.
[0011] Furthermore, step 1 includes:
[0012] The difference between the current tool coordinate system position of the robot and the coordinates of the X and Y planes of the previous interpolated position is calculated to obtain the direction vector RobotMove of the robot trajectory movement direction;
[0013] RobotMove=(X current -X last , Y current -Y last )
[0014] Subtract the current tool coordinate system position of the robot from the center coordinate of the weld to obtain the relative position vector RelativeVector;
[0015] RelativeVector=(X current -X center , Y current -Y center )
[0016] When the robot moves to the point where the angle between the direction vector and the relative position vector is approximately 90°, the robot tool coordinate system position is used as the trigger position for the weld to start processing:
[0017] acos(RobotMove·RelativeVector)-π / 2<0.01.
[0018] Furthermore, step 2 includes:
[0019] Step 2-1: Establish a DH parameter coordinate system at the robot's joints using the DH parameter method: Measure the rod length in 3D software, calculate the DH parameters, and create a DH parameter table. Establish a coordinate system for the laser galvanometer lens model at the position where it coincides with the robot flange, and establish a coordinate system for the laser beam model at the position where the laser galvanometer lens emits light. The Z axis of the laser beam model coordinate system is along the direction of the laser beam length.
[0020] Step 2-2: Export the robot's rods, laser galvanometer, and laser beam models separately in the 3D software, exporting them according to the defined coordinate system positions;
[0021] Step 2-3: Import the model into the program and display it in the interface through VTK. For the initial position of the model, calculate it with the help of DH parameters and forward kinematics formula. The position of the base coincides with the world coordinate system in the VTK interface. The position and attitude change matrix T of the adjacent rod coordinate system is:
[0022] ;
[0023] Step 2-4: Use the DH parameter table and matrix T in the program to calculate the position of each model in space, use the program to read the model, establish the assembly relationship, display the model in the VTK window, and calculate the position and posture of each rod coordinate system relative to the world coordinate system:
[0024] The position and attitude matrix of the rod coordinate system G1 is: T 01 ;
[0025] The position and attitude matrix of the second coordinate system G2 of the rod is: T 02 =T 01 T 12 ;
[0026] The position and attitude matrix of the rod three-coordinate system G3 is: T 03 =T 01 T 12 T 23 ;
[0027] The position and attitude matrix of the rod four-coordinate system G4 is: T 04 =T 01 T 12 T 23 T 34 ;
[0028] The position and attitude matrix of the five-coordinate system G5 of the rod is: T 05 =T 01 T 12 T 23 T 34 T 45 ;
[0029] The position and attitude matrix of the six-coordinate system G6 of the rod is: T 06 =T 01 T 12 T 23 T 34 T 45 T 56 ;
[0030] The position and posture matrix of the tool coordinate system GTool is: T 07 =T 01 T 12 T 23 T 34 T 45 T 56 T 67 ;
[0031] The position and attitude matrix of the laser beam model coordinate system Glaser is: T laser = T 07 ZMoveMatrix(laserlength);
[0032] Where laserlength represents the length of the laser beam model, and ZMoveMatrix represents the function of movement in the Z-axis direction;
[0033] Step 2-5: Obtain the position and posture of the laser beam coordinate system: The position and posture of the laser beam are calculated through the robot's forward kinematics to obtain the pose matrix. The positions of the laser beam model coordinate system LaserX, LaserY, and LaserZ are extracted from the pose matrix. The first three rows of the third column of the pose matrix are the unit direction vector LaserZUnit of the laser beam model coordinate system's Z axis in the world coordinate system.
[0034] Step 2-6: Obtain the X, Y, and Z coordinates of the laser beam focus obtained by interpolation calculation based on the weld position. Use the laser beam focus position to calculate the relative vector Relative relative to the laser beam model coordinate system. Normalize Relative to obtain the unit direction vector RelativeUnit of the laser beam's Z axis at this time:
[0035] Relative=(X-LaserX, Y- LaserY, Z- LaserZ)
[0036] Step 2-7: Perform dot product calculation on the vector LaserUnit obtained in real time and RelativeUnit, perform arc cosine calculation on the result, and obtain the angle RotateAngle between the two vectors:
[0037] RotateAngle=acos(LaserZUnit·RelativeUnit)
[0038] Step 2-8: Perform a cross product calculation on the vector LaserUnit and RelativeUnit obtained in real time to obtain a vector perpendicular to the plane where the two vectors are located, and normalize the vector to obtain the unit rotation axis vector RotateAxis:
[0039] RotateAxis=LaserZUnit×RelativeUnit
[0040] Step 2-9: Construct an antisymmetric matrix K with the components of the rotation axis. The matrix K represents the rotation around the rotation axis:
[0041] ;
[0042] Step 2-10: Define a three-dimensional unit matrix I and use the Rodriguez rotation formula to calculate the rotation matrix R from the unit vector LaserUnit to the unit vector RelativeUnit:
[0043] R= I + sin(RotateAngle)K + (1 - cos(RotateAngle))K 2
[0044] Step 2-11: Convert the rotation matrix R into the rotation angles around the X-axis, Y-axis, and Z-axis of the laser beam model coordinate system through calculation. Use the SetOrientation function in VTK to display the laser beam model in real time according to the actual weld position:
[0045] RPY = TR2RPY(R)
[0046] Where TR2RPY is a function that converts the rotation matrix into the angle values of rotation around the X, Y, and Z axes respectively;
[0047] Step 2-12: After rotating the laser beam model in the simulation interface, change the length of the laser beam to make it equal to the length of the real laser beam; use the SetScale function to scale the laser beam model in the Z-axis direction. The scaling ratio is:
[0048] ;
[0049] Step 2-13: In the simulation interface, traverse the array of robot joint angles and laser galvanometer position coordinates, use the timer to refresh the interface, and change the simulation speed by changing the time interval of the timer.
[0050] Furthermore, step 3 includes: adding a time axis in the program interface to display the time used for the entire processing process, adding a time cursor on the time axis to display the current processing progress, adding a time slice on the time axis to display the start processing time and end processing time of each weld, and obtaining the corresponding time slice of each weld on the time axis through the start and end processing time of each weld. By dragging the time slice, the position of the time slice relative to the time axis is changed, and the light emission time of each weld is changed by converting pixels and time.
[0051] Furthermore, in step 3, the time axis is used to display the time used for the entire processing process, the time cursor is used to display the current processing progress, the time slice is used to display the start and end time of the weld processing, and the time slice is dragged to change the start time of the weld processing. This is achieved by the following steps:
[0052] Step 3-1: In the robot trajectory interpolation part, before using each interpolation algorithm, pre-process the entire interpolation process to obtain the total time, acceleration period, deceleration period, and constant speed period used in the entire robot interpolation process; the total time used for all machining trajectory interpolation is added together to obtain the total time used for the entire machining process;
[0053] Step 3-2: After obtaining the total time of the entire processing process, draw a time scale based on the ratio of time to pixels. Initially, set every 100 pixels to represent one second. When scaling the time axis, add the scaling ratio, and every 100*ratio pixels represents one second.
[0054] Step 3-3: In the robot trajectory interpolation section, when processing begins, timing begins and the actual processing time is accumulated to obtain the current processing time from the start of processing. The current processing time is returned to the 3D display section, and the current time cursor on the time axis is obtained from the ratio of time to pixels. The processing progress of the entire processing process is obtained from the current processing time and the total time used for the entire robot interpolation calculation process.
[0055] Step 3-4: Simulate the entire machining process and trigger the welding process by position triggering. The time slice of each welding seam is displayed on the time axis. Drag the time slice to change its position. The time difference before and after the drag is obtained from the pixel difference before and after the drag through the conversion relationship between time and pixels.
[0056] Step 3-5: Based on the known moments before and after the time slice drag in the corresponding processing section in step 3-4, calculate the current cumulative displacement at the corresponding moment using the pre-processing stage before interpolation, and calculate the difference X between the cumulative displacement before and after the drag change , Y change ;
[0057] Step 3-6: Change the moment when the weld starts by changing the robot's weld processing trigger position; calculate the direction vector RobotMove of the robot's trajectory movement at this time. If the time slice is dragged forward, the weld processing trigger flag position is advanced; if the time slice is dragged backward, the weld processing trigger flag position is delayed:
[0058] RobotMove=(X current -X last -X change , Y current -Y last - Y change ).
[0059] The present invention has the following beneficial effects:
[0060] (1) This invention is developed based on Visual Studio and can be integrated into a single program with existing control programs for robots, laser galvanometers, and lasers. The data used for simulation and the data used for actual processing are calculated using the same calculation program. Therefore, there is no need to generate the data required for robot control after the simulation is completed and then import it into the actual robot control program. This ensures the accuracy of the simulation results and is easy to operate. It has good compatibility and can be used with various robots and galvanometers on the market. The model can be imported using an XML file, which is easy to operate. By changing the simulation speed, the simulation of unnecessary parts can be accelerated, while the simulation speed can be slowed down for parts that require careful observation.
[0061] (2) In the present invention, specific functions can be developed as needed. Functions such as adding, moving, and deleting welds can be implemented in the interface, giving users a more intuitive understanding of weld information. The robot trajectory can be displayed in the interface, the current laser output status can be displayed by changing the color of the laser beam model, and the weld color can be changed to indicate whether the weld has been processed. This allows for a clearer understanding of the processing process and progress.
[0062] (3) In the present invention, there is no need to teach the robot trajectory and weld position in advance. The start time of the weld processing is determined by the method of triggering the start of the weld processing by combining time and position, so that the processing process can be flexibly adjusted according to the actual situation. By adding a time axis to the interface to display the time required for the entire processing process, the start and end time of each weld processing is displayed by a time slice, and the current processing progress is displayed by a time cursor. Dragging the time slice can change the start time of the weld processing, which is of great significance for adjusting the light emission time during robot flying welding to prevent the laser beam from being interfered with by fixtures or other objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 This is a schematic diagram of the assembly of the robot, laser galvanometer lens, and laser beam three-dimensional model of the present invention.
[0064] Figure 2 It is a schematic diagram of the overall technical solution flow of the three-dimensional display part of the present invention.
[0065] Figure 3 Schematic diagram of the Z-axis and rotation axis of the laser beam model.
[0066] Figure 4 Schematic diagram showing the position flow of the robot model and the laser beam model through interpolation calculation.
[0067] Figure 5 It is a schematic diagram of the time axis, time slice and time cursor.
[0068] Figure 6Implement process flow diagrams for the timeline, time slices, and time cursors.
[0069] Figure 7 This is a schematic diagram of the actual operating effect of the present invention. DETAILED DESCRIPTION
[0070] The following is a combination of the embodiments of the present invention Figure 1-Figure 7 , the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Unless otherwise specified, the technical means used in the embodiments are conventional means well known to those skilled in the art.
[0071] Reference Figure 1 , the model included in this embodiment includes the base of the robot model, rods one to six, a laser galvanometer lens, and a laser beam model. The robot includes six axes, and the laser galvanometer lens includes two axes. The robot can move greatly in space to change the position and posture of the laser galvanometer lens. There are two reflectors inside the laser galvanometer lens, which are used to change the position of the laser on the X-axis and Y-axis respectively. The robot and the laser galvanometer mirror move in coordination to complete the welding of the target weld. The target weld is the combined motion trajectory of the welding. The combined motion trajectory needs to be decomposed into the motion trajectory of the robot and the motion trajectory of the laser galvanometer. When the robot moves to the set weld processing start position, an interpolation calculation is performed to obtain the interpolation position of the galvanometer in each cycle, thereby realizing the coordinated control of the laser galvanometer and the robot. This embodiment is divided into three main functional parts, namely the three-dimensional display part, the robot trajectory interpolation part, and the laser galvanometer trajectory interpolation part. Figure 2 As shown, the 3D display is primarily responsible for displaying information about the robot, laser galvanometer lens, laser beam, and weld seam. The robot trajectory interpolation component interpolates the robot trajectory and transmits the interpolated positions to the six axes of the robot model in the 3D display. The galvanometer trajectory interpolation component interpolates the laser galvanometer trajectory and transmits the interpolated positions to the X and Y coordinates of the laser beam model in the 3D display. This method utilizes the open-source visualization toolkit (VTK) to display the 3D models of the robot, laser galvanometer lens, laser beam model, and weld seam information. The Visual Studio platform is used to develop the robot's offline programming system.
[0072] Reference Figure 1-Figure 7 The present invention provides a three-dimensional dynamic display and processing triggering method for robot laser flying welding, comprising the following steps:
[0073] Step 1: Calculate the difference between the current tool coordinate system position of the robot and the coordinates of the X and Y planes of the previous interpolated position to obtain the direction vector RobotMove of the robot trajectory movement direction.
[0074] RobotMove=(X current -X last , Y current -Y last )
[0075] The relative position vector RelativeVector can be obtained by subtracting the current tool coordinate system position of the robot from the center coordinate of the weld.
[0076] RelativeVector=(X current -X center , Y current -Y center )
[0077] When the robot moves to the point where the angle between the two vectors is approximately 90°, the robot tool coordinate system position at this point is used as the trigger mark for the start of weld processing.
[0078] acos(RobotMove·RelativeVector)-π / 2<0.01.
[0079] Step 2: First calculate the coordinate position of the laser galvanometer and the robot joint position and store them in an array or obtain the real-time coordinate position of the laser galvanometer and the robot joint position. The following describes how to use the above data to realize three-dimensional dynamic display. The specific steps are as follows: Figure 3 .
[0080] Step 2-1: First, establish the DH parameter coordinate system at the joints of the robot according to the DH parameter method, such as Figure 1 As shown, the rod length is measured in 3D software, and the DH parameters are calculated to create a DH parameter table. The laser galvanometer model establishes a coordinate system where it coincides with the robot flange, while the laser beam model establishes a coordinate system where the laser galvanometer emits light to facilitate subsequent calculations. The Z axis of the laser beam model coordinate system is aligned with the length of the laser beam, facilitating subsequent control of the laser beam direction.
[0081] Step 2-2: Export the robot link, laser galvanometer, and laser beam models to STL format in the 3D software. Export the models according to the defined coordinate system. When you subsequently display the model in VTK, the model's position will be relative to the defined coordinate system.
[0082] Step 2-3: Import the model into the program and display it in the interface with the help of VTK. The initial position of the model is calculated with the help of DH parameters and the forward kinematics formula. The position of the base coincides with the world coordinate system in the VTK interface. The position and attitude change matrix T of the adjacent rod coordinate system is
[0083] ;
[0084] Steps 2-4: Use the DH parameter table and matrix T in the program to calculate the position of each model in space. Use the program to read the model, establish the correct assembly relationship, and display the model in the VTK window. Calculate the position and posture of each rod coordinate system relative to the world coordinate system.
[0085] The position and attitude matrix of the rod coordinate system G1 is: T 01 .
[0086] The position and attitude matrix of the second coordinate system G2 of the rod is: T 02 =T 01 T 12 .
[0087] The position and attitude matrix of the rod three-coordinate system G3 is: T 03 =T 01 T 12 T 23 .
[0088] The position and attitude matrix of the rod four-coordinate system G4 is: T 04 =T 01 T 12 T 23 T 34 .
[0089] The position and attitude matrix of the five-coordinate system G5 of the rod is: T 05 =T 01 T 12 T 23 T 34 T 45 .
[0090] The position and attitude matrix of the six-coordinate system G6 of the rod is: T 06 =T 01 T 12 T 23 T 34 T 45 T 56 .
[0091] The position and posture matrix of the tool coordinate system GTool is: T 07 =T 01 T 12 T 23 T 34 T 45 T 56 T 67 .
[0092] The position and attitude matrix of the laser beam model coordinate system Glaser is: Tlaser = T 07 ZMoveMatrix(laserlength).
[0093] Where laserlength represents the length of the laser beam model, and ZMoveMatrix represents the function of movement in the Z-axis direction.
[0094] Step 2-5: Since the robot is always in a moving state, the position and posture of the laser beam coordinate system are also changing all the time. The position and posture of the laser beam coordinate system are obtained. The position and posture of the laser beam are calculated through the robot's forward kinematics to obtain the pose matrix. The position LaserX, LaserY, and LaserZ of the laser beam model coordinate system are extracted from the pose matrix. The first three rows of the third column of the pose matrix are the unit direction vector LaserZUnit of the Z axis of the laser beam model coordinate system in the world coordinate system.
[0095] Step 2-6: Obtain the X, Y, and Z coordinates of the laser beam focus obtained by interpolation calculation based on the weld position, and use the laser beam focus position to calculate the relative vector Relative relative to the laser beam model coordinate system. Unitize Relative to obtain the unit direction vector RelativeUnit of the laser beam's Z axis at this time, such as Figure 4 shown.
[0096] Relative=(X-LaserX, Y- LaserY, Z- LaserZ)
[0097] Step 2-7: Perform dot product calculation on the vector LaserUnit obtained in real time and RelativeUnit, and perform arc cosine calculation on the calculation result to obtain the angle RotateAngle between the two vectors.
[0098] RotateAngle=acos(LaserZUnit·RelativeUnit)
[0099] Step 2-8: Perform cross product calculation on the vector LaserUnit and RelativeUnit obtained in real time to obtain a vector perpendicular to the plane where the two vectors are located, such as Figure 4 The rotation axis in . And normalize the vector to get the unit rotation axis vector RotateAxis.
[0100] RotateAxis=LaserZUnit×RelativeUnit
[0101] Step 2-9: Construct an antisymmetric matrix K using the components of the rotation axis. This matrix K can represent the rotation around Figure 4Rotation about the axis of rotation.
[0102] ;
[0103] Step 2-10: Define a three-dimensional identity matrix I. The Rodrigues rotation formula is a concise and effective formula for rotating any vector in space around a specific axis. Using the Rodrigues rotation formula, calculate the rotation matrix R from the unit vector LaserUnit to the unit vector RelativeUnit.
[0104] R= I + sin(RotateAngle)K + (1 - cos(RotateAngle))K 2
[0105] Step 2-11: Convert the rotation matrix R to the angles of rotation about the X, Y, and Z axes of the laser beam model coordinate system. Using the SetOrientation function in VTK, the laser beam model can be displayed in real time based on the actual weld position. During processing, the laser beam model color is set to orange to easily distinguish between processing and non-processing states.
[0106] RPY = TR2RPY(R)
[0107] TR2RPY is a function that converts the rotation matrix into angle values for rotation around the X, Y, and Z axes respectively.
[0108] Step 2-12: After rotating the laser beam model in the simulation interface, you can find that the length of the laser beam model is fixed. However, when the coordinate value of the laser relative to the laser galvanometer origin is not (0, 0), the length of the laser beam will become longer. In order to better simulate the state of the real laser beam, change the length of the laser beam to make it equal to the length of the real laser beam. Use the SetScale function to scale the laser beam model in the Z-axis direction. The scaling ratio is
[0109] ;
[0110] Step 2-13: In the simulation interface, traverse the array of robot joint angles and laser galvanometer position coordinates, and use the timer to refresh the interface. By changing the time interval of the timer, the simulation speed can be changed. The simulation of the processing process can be accelerated or slowed down.
[0111] Step 3: The above steps can realize the dynamic display of the robot, laser galvanometer lens, and laser beam model in three-dimensional space. Since the processing trigger instruction of the weld in the above process is determined by the position of the robot and the weld in space, but in the actual processing of robot laser flight welding, there is a problem of objects such as fixtures blocking the laser beam. Therefore, in the actual processing process, it is necessary to fine-tune the light emission time of the laser galvanometer according to the actual situation. Changing the light emission time can effectively avoid the problems of objects such as fixtures blocking and interfering with the laser beam during laser welding. By adding a timeline in the program interface, the time used for the entire processing process can be displayed. Adding a time cursor to the timeline can display the current processing progress. Adding a time slice to the timeline can display the start processing time and the end processing time of each weld. Figure 5 As shown. By the start and end processing time of each weld, the corresponding time slice of each weld on the time axis can be obtained. By dragging the time slice, the position of the time slice relative to the time axis can be changed. By converting pixels and time, the light emission time of each weld can be changed. The following describes how to use the time axis to display the overall processing time, use the time cursor to display the current processing progress, use the time slice to display the start and end processing time of the weld, and drag the time slice to change the start processing time of the weld. The flowchart of using time and position to comprehensively trigger the processing signal is shown below. Figure 6 shown.
[0112] Step 3-1: Before applying each interpolation algorithm to the robot trajectory interpolation process, a preprocessing calculation is required for the entire interpolation process. Since a machining trajectory can be divided into two segments (acceleration and deceleration), or three segments (acceleration, constant speed, and deceleration), preprocessing the entire machining trajectory before interpolation calculations can determine the total interpolation time, acceleration time, deceleration time, and constant speed time. Adding the total interpolation time for all machining trajectories yields the total machining time.
[0113] Step 3-2: After obtaining the total time of the entire processing process, draw a time scale based on the ratio of time to pixels. Initially, set every 100 pixels to represent one second. When scaling the time axis, you need to add the scaling ratio, so that every 100*ratio pixels represents one second.
[0114] Step 3-3: In the robot trajectory interpolation section, when machining begins, timing begins and the actual machining time is accumulated. This gives the current machining time from the start of machining. The current machining time is returned to the 3D display, and the time-to-pixel ratio indicates the current time cursor on the time axis. The current machining time and the total time spent by the robot interpolation calculation process provide the machining progress.
[0115] Step 3-4: First, simulate the entire processing process and trigger the processing of the weld by position triggering. At this time, the time slice of each weld will be displayed on the time axis. Drag the time slice to change its position. Through the conversion relationship between time and pixels, the time difference before and after dragging can be obtained from the pixel difference before and after dragging.
[0116] Step 3-5: From step 3-4, the time slices before and after the drag are known in the corresponding processing section. By using the pre-processing stage before interpolation, the current cumulative displacement at the corresponding moment can be obtained. From this, the difference X in the cumulative displacement before and after the drag can be calculated. change , Y change .
[0117] Step 3-6: Change the moment when the weld starts to be processed by changing the robot's weld processing trigger position.
[0118] Calculate the direction vector RobotMove of the robot trajectory at this time. If the time slice is dragged forward, the weld processing trigger flag is advanced. If the time slice is dragged backward, the weld processing trigger flag is delayed.
[0119] RobotMove=(X current -X last -X change , Y current -Y last - Y change )
[0120] The relative position vector RelativeVector can be obtained by subtracting the current position of the robot from the coordinates of the center position of the weld.
[0121] RelativeVector=(X current -X center , Y current -Y center )
[0122] When the robot moves to the point where the angle between the two vectors is approximately 90°, it is considered as the trigger mark for the start of welding processing.
[0123] acos(RobotMove·RelativeVector)-π / 2<0.01
[0124] Through the above steps, you can achieve the purpose of dragging the time slice to change the welding seam light emission time.
[0125] The actual application effect of the present invention is referenced Figure 7 .
[0126] The embodiments described above are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the spirit of the present invention, various deformations, modifications, and substitutions made to the technical solutions of the present invention by ordinary technicians in this field should fall within the scope of protection determined by the claims of the present invention.
Claims
1. A three-dimensional dynamic display and processing triggering method for robot laser flying welding, characterized in that: The following steps are involved: Step 1: Calculate the direction vector RobotMove of the robot's trajectory and the relative position vector of the robot; Step 2: Calculate the coordinate position of the laser galvanometer and the robot joint position, store them in an array, and use the data to realize three-dimensional dynamic display; Step 3: Use the program to adjust the laser galvanometer's light emission time to avoid interference; Step 1 includes: The difference between the current tool coordinate system position of the robot and the coordinates of the X and Y planes of the previous interpolated position is calculated to obtain the direction vector RobotMove of the robot trajectory movement direction; RobotMove=(X current -X last ,AND current -AND last ) Subtract the current tool coordinate system position of the robot from the center coordinate of the weld to obtain the relative position vector RelativeVector; RelativeVector=(X current -X center ,Y current -Y center ) When the robot moves to the point where the angle between the direction vector and the relative position vector is approximately 90°, the robot tool coordinate system position is used as the trigger position for the weld to start processing: acos(RobotMove·RelativeVector)-π / 2 < 0.01; In step 3, use the time axis to display the time used for the entire processing process, use the time cursor to display the current processing progress, use the time slice to display the start and end time of the weld processing, and drag the time slice to change the start time of the weld processing. This is achieved through the following steps: Step 3-1: In the robot trajectory interpolation part, before using each interpolation algorithm, pre-process the entire interpolation process to obtain the total time, acceleration period, deceleration period, and constant speed period used in the entire robot interpolation process; the total time used for all machining trajectory interpolation is added together to obtain the total time used for the entire machining process; Step 3-2: After obtaining the total time of the entire processing process, draw a time scale based on the ratio of time to pixels. Initially, set every 100 pixels to represent one second. When scaling the time axis, add the scaling ratio, and every 100*ratio pixels represents one second. Step 3-3: In the robot trajectory interpolation section, when processing begins, timing begins and the actual processing time is accumulated to obtain the current processing time from the start of processing. The current processing time is returned to the 3D display section, and the current time cursor on the time axis is obtained from the ratio of time to pixels. The processing progress of the entire processing process is obtained from the current processing time and the total time used for the entire robot interpolation calculation process. Step 3-4: Simulate the entire machining process and trigger the welding process by position triggering. The time slice of each welding seam is displayed on the time axis. Drag the time slice to change its position. The time difference before and after the drag is obtained from the pixel difference before and after the drag through the conversion relationship between time and pixels. Step 3-5: Based on the known moments before and after the time slice drag in the corresponding processing section in step 3-4, calculate the current cumulative displacement at the corresponding moment using the pre-processing stage before interpolation, and calculate the difference X between the cumulative displacement before and after the drag change , Y change ; Step 3-6: Change the moment when the weld starts by changing the robot's weld processing trigger position; calculate the direction vector RobotMove of the robot's trajectory movement at this time. If the time slice is dragged forward, the weld processing trigger flag position is advanced; if the time slice is dragged backward, the weld processing trigger flag position is delayed: RobotMove=(X current -X last -X change ,AND current -AND last - AND change )。 2. A three-dimensional dynamic display and processing triggering method for robot laser flying welding according to claim 1, characterized in that: Step 2 includes: Step 2-1: Establish a DH parameter coordinate system at the robot's joints using the DH parameter method: Measure the rod length in 3D software, calculate the DH parameters, and create a DH parameter table. Establish a coordinate system for the laser galvanometer lens model at the position where it coincides with the robot flange, and establish a coordinate system for the laser beam model at the position where the laser galvanometer lens emits light. The Z axis of the laser beam model coordinate system is along the direction of the laser beam length. Step 2-2: Export the robot's rods, laser galvanometer, and laser beam models separately in the 3D software, exporting them according to the defined coordinate system positions; Step 2-3: Import the model into the program and display it in the interface through VTK. For the initial position of the model, calculate it with the help of DH parameters and forward kinematics formula. The position of the base coincides with the world coordinate system in the VTK interface. The position and attitude change matrix T of the adjacent rod coordinate system is: ; Step 2-4: Use the DH parameter table and matrix T in the program to calculate the position of each model in space, use the program to read the model, establish the assembly relationship, display the model in the VTK window, and calculate the position and posture of each rod coordinate system relative to the world coordinate system: The position and attitude matrix of the rod coordinate system G1 is: T 01 ; The position and attitude matrix of the second coordinate system G2 of the rod is: T 02 =T 01 T 12 ; The position and attitude matrix of the rod three-coordinate system G3 is: T 03 =T 01 T 12 T 23 ; The position and attitude matrix of the rod four-coordinate system G4 is: T 04 =T 01 T 12 T 23 T 34 ; The position and attitude matrix of the five-coordinate system G5 of the rod is: T 05 =T 01 T 12 T 23 T 34 T 45 ; The position and attitude matrix of the six-coordinate system G6 of the rod is: T 06 =T 01 T 12 T 23 T 34 T 45 T 56 ; The position and posture matrix of the tool coordinate system GTool is: T 07 =T 01 T 12 T 23 T 34 T 45 T 56 T 67 ; The position and attitude matrix of the laser beam model coordinate system Glaser is: T laser = T 07 ZMoveMatrix(laserlength); Where laserlength represents the length of the laser beam model, and ZMoveMatrix represents the function of movement in the Z-axis direction; Step 2-5: Obtain the position and posture of the laser beam model coordinate system: The position and posture of the laser beam are calculated through the robot's forward kinematics to obtain the pose matrix. The positions of the laser beam model coordinate system LaserX, LaserY, and LaserZ are extracted from the pose matrix. The first three rows of the third column of the pose matrix are the unit direction vector LaserZUnit of the laser beam model coordinate system's Z axis in the world coordinate system. Step 2-6: Obtain the X, Y, and Z coordinates of the laser beam focus obtained by interpolation calculation based on the weld position. Use the laser beam focus position to calculate the relative vector Relative relative to the laser beam model coordinate system. Normalize Relative to obtain the unit direction vector RelativeUnit of the laser beam's Z axis at this time: Relative=(X-LaserX, Y- LaserY, Z- LaserZ) Step 2-7: Perform dot product calculation on the vector LaserZUnit obtained in real time and RelativeUnit, perform arc cosine calculation on the result, and obtain the angle RotateAngle between the two vectors: RotateAngle=acos(LaserZUnit·RelativeUnit) Step 2-8: Perform a cross product calculation on the vector LaserZUnit and RelativeUnit obtained in real time to obtain a vector perpendicular to the plane where the two vectors are located, and normalize the vector to obtain the unit rotation axis vector RotateAxis: RotateAxis=LaserZUnit×RelativeUnit Step 2-9: Construct an antisymmetric matrix K with the components of the rotation axis. The matrix K represents the rotation around the rotation axis: ; Step 2-10: Define a three-dimensional unit matrix I and use the Rodriguez rotation formula to calculate the rotation matrix R from the unit vector LaserZUnit to the unit vector RelativeUnit: R= I + sin(RotateAngle)K + (1 - cos(RotateAngle))K 2 Step 2-11: Convert the rotation matrix R into the rotation angles around the X-axis, Y-axis, and Z-axis of the laser beam model coordinate system through calculation. Use the SetOrientation function in VTK to display the laser beam model in real time according to the actual weld position: RPY = TR2RPY(R) Where TR2RPY is a function that converts the rotation matrix into the angle values of rotation around the X, Y, and Z axes respectively; Step 2-12: After rotating the laser beam model in the simulation interface, change the length of the laser beam to make it equal to the length of the real laser beam; use the SetScale function to scale the laser beam model in the Z-axis direction. The scaling ratio is: ; Step 2-13: In the simulation interface, traverse the array of robot joint angles and laser galvanometer position coordinates, use the timer to refresh the interface, and change the simulation speed by changing the time interval of the timer.
3. The method for three-dimensional dynamic display and processing triggering of robot laser flying welding according to claim 1 is characterized in that: Step 3 includes: adding a timeline in the program interface to display the time used for the entire processing process, adding a time cursor on the timeline to display the current processing progress, adding a time slice on the timeline to display the start processing time and end processing time of each weld, and obtaining the corresponding time slice of each weld on the timeline through the start and end processing time of each weld. By dragging the time slice, the position of the time slice relative to the timeline is changed, and the light emission time of each weld is changed by converting pixels and time.
Citation Information
Patent Citations
Intelligent edge-tracing laser welding and marking all-in-one machine
CN105499801A
Intelligent welding method and workstation
CN110270997A
Unmanned aerial vehicle flight control method and device, electronic equipment and storage medium
CN117055600A