Weld seam scanning method and apparatus, medium, electronic device
By combining a laser sensor and a PID controller to determine the position relationship and coordinate increment of the robot arm's end effector, the problem of insufficient accuracy of existing weld scanning methods is solved, and the accuracy and stability of the weld path are improved.
Patent Information
- Application Number
- CN202510003931.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-01-02
AI Technical Summary
Existing weld scanning methods have problems such as low hand-eye calibration accuracy and limited manual teaching accuracy, resulting in insufficient weld path accuracy and stability, especially when scanning irregularly shaped welds.
By combining a laser sensor and a PID controller, the position relationship and coordinate increment of the end effector of the robotic arm are determined. The PID adjustment axis is used to control the movement of the robotic arm along the weld, and multiple valid position coordinates are obtained to determine the scanning path.
The accuracy and stability of the weld scanning path have been improved, making it suitable for weld identification and continuous scanning in various scenarios.
Smart Images

Figure CN119501406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of shipbuilding, and in particular to a weld scanning method and device, medium, and electronic equipment. Background Art
[0002] Currently, in shipbuilding, weld scanning is often required to improve the accuracy of weld manipulation by robotic arms. Traditional weld scanning methods include the following two methods.
[0003] The first weld scanning method, a calibration-based weld scanning method, uses hand-eye calibration to convert the weld point coordinates within the laser sensor's field of view into coordinates based on the robotic arm's base. The robotic arm then moves directly to the weld point within its field of view. However, if the hand-eye calibration results are not accurate enough, the converted weld point coordinates will deviate from the actual weld location.
[0004] The second weld scanning method: a weld scanning method based on manual teaching, which determines the teaching starting point, teaching end point, and single or multiple teaching intermediate points through manual teaching, and then interpolates or fits each teaching point to obtain a complete weld path. However, the number of points for manual teaching is limited, the scanning accuracy for irregularly shaped welds is limited, and it is only applicable to straight welds, which makes the scanning weld path more limited, thereby reducing the accuracy and stability of the scanning weld path. Summary of the Invention
[0005] One of the purposes of this application is to provide a weld scanning method and device, medium, and electronic equipment to improve the accuracy and stability of the weld scanning path.
[0006] To achieve the above objectives and other related objectives, the present application provides a weld scanning method, comprising the following steps:
[0007] S101, based on multiple coordinate change values of the end effector relative to the target weld in the robot arm base coordinate system, determining a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the robot arm base coordinate system when the laser sensor scans the target weld;
[0008] S102: Control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, respectively, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement.
[0009] S103, starting with the starting position of the target weld as the current position, cyclically inputting the position coordinates of the target weld at the next calibration position into the PID controller, the PID controller obtaining laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; determining the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis based on the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis in combination with the laser difference data; obtaining the position coordinates of the end effector corresponding to the current position of the target weld and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determining the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, thereby obtaining all the position coordinates of the end effector corresponding to the target weld;
[0010] S104 : Obtaining a scanning path corresponding to the target weld according to all position coordinates of the end effector.
[0011] The present application also provides a weld scanning device, comprising:
[0012] a spatial axis determination module, the spatial axis determination module being configured to determine, based on a plurality of coordinate change values of the end effector relative to the target weld in the manipulator base coordinate system, a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the manipulator base coordinate system when the laser sensor scans the target weld;
[0013] a position relationship determination module, the position relationship determination module being configured to control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement, spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis;
[0014] a position coordinate determination module, the position coordinate determination module is used to start with the starting position of the target weld as the current position, cyclically input the position coordinates of the target weld at the next calibration position into the PID controller, the PID controller obtains laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; based on the spatial position relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, combined with the laser difference data, determine the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis; obtain the position coordinates of the end effector corresponding to the current position of the target weld, and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determine the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, and then obtain all the position coordinates of the end effector corresponding to the target weld;
[0015] A weld path determination module is used to obtain a scanning path corresponding to the target weld according to all position coordinates of the end effector.
[0016] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the above-mentioned weld scanning method.
[0017] The present application also provides an electronic device, comprising: at least one memory for storing a program;
[0018] At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the above-mentioned weld scanning method.
[0019] This application has at least the following beneficial effects:
[0020] The weld scanning method, device, medium, and electronic equipment of the present application are used to determine the positional relationship between the laser sensor and end effector of the robotic arm relative to the target weld, and to adjust the end position of the robotic arm in combination with the PID controller to obtain multiple position coordinates of the robotic arm moving along the weld, complete the scanning of the weld and record the effective position coordinates to determine the scanning path of the weld, so that the robotic arm can identify and continuously scan the weld in a variety of scenarios, thereby improving the accuracy and stability of the robotic arm's welding path scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a schematic diagram of a robotic arm scanning a weld on a tool according to an embodiment of the present application;
[0023] Figure 2 A flow chart illustrating data processing by a PID controller according to an embodiment of the present application;
[0024] Figure 3 A schematic structural diagram of a weld scanning device provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0026] Illustration:
[0027] 400 weld scanning device; 410 spatial axis determination module; 420 position relationship determination module; 430 position coordinate determination module; 500 electronic device; 510 processor; 520 memory; 530 system bus. DETAILED DESCRIPTION
[0028] The following describes the embodiments of the present application through specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in the present application can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.
[0029] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be considered to be preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0030] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc., multiple elements means two or more elements, etc.
[0031] Reference Figure 1 The robotic arm consists of a base frame and multiple machine joints mounted on the base frame and connected in sequence. The robotic arm is equipped with a laser sensor and an end effector. The laser sensor is used to perform laser scanning on the target weld, obtaining information such as the shape and position of the target weld surface, thereby achieving precise scanning and positioning of the target weld. The end effector is connected to the end of the robotic arm and is used to interact with the surrounding environment to perform industrial operations on the workpiece and weld.
[0032] The laser sensor is provided with a PID controller, which is used to adjust and control the industrial operation position of the robot arm based on the laser difference data of the laser sensor, specifically, to control the laser sensor and the end effector to move equal distances in the same direction.
[0033] The preset robot base coordinate system {R} provides the coordinates of the end effector within the robot base coordinate system {R}. The sensor base coordinate system {C} provides the coordinates of the laser sensor within the sensor base coordinate system {C}. The robot base coordinate system {R} has a horizontal axis (i.e., the X-axis), a vertical axis (i.e., the Y-axis), and a vertical axis (i.e., the Z-axis). The sensor base coordinate system {C} has a horizontal axis (i.e., the X-axis), a vertical axis (i.e., the Y-axis), and a vertical axis (i.e., the Z-axis).
[0034] A first aspect of the present application provides a weld scanning method, comprising the following steps:
[0035] S101, based on multiple coordinate change values of the end effector relative to the target weld in the robot arm base coordinate system, determining a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the robot arm base coordinate system when the laser sensor scans the target weld;
[0036] Step S101 further includes the following steps:
[0037] S1011. Control the robotic arm to advance a preset distance from the starting position of the target weld to obtain multiple coordinate change values of the end effector in the robotic arm base coordinate system, the multiple coordinate change values including a first coordinate change value, a second coordinate change value, and a third coordinate change value; wherein the coordinate change value refers to the absolute value of the coordinate change value, and the coordinate change value includes the first coordinate change value, the second coordinate change value, and the third coordinate change value in descending order according to the absolute value.
[0038] S1012. Determine, based on the first coordinate change value, the forward direction axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld;
[0039] S1013. Determine the second coordinate change value as the first PID adjustment axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld; determine the third coordinate change value as the second PID adjustment axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld.
[0040] In step S1011, the robotic arm is guided and controlled to move close to the target weld until the end effector is located at the starting position of the target weld, and the end effector is controlled to move from the starting position of the target weld to a preset distance along the target weld according to the beat step set by the robotic arm, and multiple coordinate change values of the end effector in the robotic arm base coordinate system are obtained.
[0041] The predetermined distance can be the distance along the starting point of the weld seam that is moved according to a predetermined number of tact steps. A tact step can range from 0.5 mm to 10 mm, preferably from 0.5 mm to 2 mm. The number of tact steps can be determined based on the actual parameters of the weld seam, the parameters of the robot arm, and the requirements of the welding or industrial operation.
[0042] The coordinate change value refers to the absolute value of the coordinate change value, and the coordinate change value includes a first coordinate change value, a second coordinate change value, and a third coordinate change value in descending order according to the absolute value.
[0043] In step S1012, the first coordinate change value corresponds to the coordinate change value in the transverse axis direction of the robot arm base coordinate system, and the coordinate change value in the transverse axis direction of the robot arm base coordinate system is determined as the forward direction axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld.
[0044] In step S1013, the second coordinate change value corresponds to the coordinate change value in the longitudinal axis direction of the robot arm base coordinate system, and the coordinate change value in the longitudinal axis direction of the robot arm base coordinate system is determined as the first PID adjustment axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld.
[0045] The third coordinate change value corresponds to the coordinate change value in the vertical axis direction of the robot arm base coordinate system, and the coordinate change value in the vertical axis direction of the robot arm base coordinate system is determined as the second PID adjustment axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld.
[0046] For example, when the coordinate change values of the end effector in the horizontal axis (X-axis), longitudinal axis (Y-axis) and vertical axis (Z-axis) of the robot arm base coordinate system are 5, 3 and 2 respectively, the X-axis is determined as the forward direction axis of the end effector corresponding to the target weld; the Y-axis and Z-axis are respectively determined as the first PID adjustment axis and the second PID adjustment axis corresponding to the robot arm base coordinate system when the laser sensor scans the target weld.
[0047] S102: Control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, respectively, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement.
[0048] Step S102 specifically includes the following steps:
[0049] S1021, controlling the end effector to move to the starting position of the target weld, and obtaining the starting position coordinates of the laser sensor in the sensor base coordinate system corresponding to the starting position;
[0050] S1022: Control the laser sensor to move from the starting position coordinates in the sensor base coordinate system to a first preset position along the first PID adjustment axis, and obtain a first position coordinate of the laser sensor in the sensor base coordinate system corresponding to the first preset position;
[0051] S1023, controlling the laser sensor to return from the first preset position to the starting position coordinates in the sensor base coordinate system corresponding to the starting position, and then moving from the starting position coordinates along the second PID adjustment axis to a second preset position, to obtain the second position coordinates of the laser sensor in the sensor base coordinate system corresponding to the second preset position;
[0052] S1024: Determine, based on the starting position coordinates, the first position coordinates, and the second position coordinates in the sensor-based coordinate system of the laser sensor, the spatial positional relationships between each coordinate axis of the sensor-based coordinate system and the first PID adjustment axis and the second PID adjustment axis, respectively. The spatial positional relationships include a same-direction relationship, a negative-direction relationship, and a perpendicular relationship.
[0053] In step S1021, the end effector is controlled to move to the starting position of the target weld, and the starting position coordinates of the laser sensor in the sensor base coordinate system corresponding to the starting position are obtained through the pre-calibrated starting position coordinates of the target weld.
[0054] In step S1022, the laser sensor is controlled to move from the starting position coordinates in the sensor base coordinate system corresponding to the starting position, along the first PID adjustment axis, to the first preset position after moving the first preset step distance, and obtain the first position coordinates of the laser sensor in the sensor base coordinate system corresponding to the first preset position.
[0055] In one possible implementation manner of the present application, the first preset step distance is set to 10 mm, but is not limited to 10 mm, and may also be other distances, which is not further limited in the present application.
[0056] In step S1023, during the specific implementation, first, the laser sensor is controlled to return from the first preset position to the starting position coordinates in the sensor base coordinate system corresponding to the starting position; then, the laser sensor is controlled to move from the starting position coordinates in the sensor base coordinate system corresponding to the starting position of the target weld along the second PID adjustment axis for a second preset step distance, and then to the second preset position; finally, the second position coordinates of the laser sensor in the sensor base coordinate system corresponding to the second preset position are obtained.
[0057] In one possible implementation manner of the present application, the second preset step distance is set to 10 mm, but is not limited to 10 mm, and may also be other distances, which is not further limited in the present application.
[0058] Exemplarily, the starting position coordinates of the laser sensor in the sensor base coordinate system corresponding to the starting position are (Lx1, Ly1, Lz1); the first position coordinates of the laser sensor in the sensor base coordinate system corresponding to the first preset position are (Lx2, Ly2, Lz2); the second position coordinates of the laser sensor in the sensor base coordinate system corresponding to the second preset position are (Lx3, Ly3, Lz3).
[0059] Step S1024 specifically includes the following steps:
[0060] S10241. Subtract the starting point position coordinates in the sensor base coordinate system of the laser sensor from the first position coordinates and the second position coordinates to obtain a first coordinate difference value and a second coordinate difference value;
[0061] S10242. Determine the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis according to the first coordinate difference;
[0062] S10243. Determine the spatial position relationship between each coordinate axis of the sensor base coordinate system and the second PID adjustment axis according to the second coordinate difference.
[0063] In step S10241, the first coordinate difference values include a first coordinate horizontal axis difference value along the horizontal axis direction of the sensor-based coordinate system, a first coordinate vertical axis difference value along the vertical axis direction of the sensor-based coordinate system, and a first coordinate vertical axis difference value along the vertical axis direction of the sensor-based coordinate system. The second coordinate difference values include a second coordinate horizontal axis difference value along the horizontal axis direction of the sensor-based coordinate system, a second coordinate vertical axis difference value along the vertical axis direction of the sensor-based coordinate system, and a second coordinate vertical axis difference value along the vertical axis direction of the sensor-based coordinate system.
[0064] For example, when the starting position coordinates are (Lx1, Ly1, Lz1), the first position coordinates are (Lx2, Ly2, Lz2), and the second position coordinates are (Lx3, Ly3, Lz3), the expressions of the first coordinate differences dx1, dy1, and dz1 corresponding to the horizontal, longitudinal, and vertical axes of the laser sensor are Lx2-Lx1, Ly2-Ly, and Lz2-Lz1, respectively; the expressions of the second coordinate differences dx2, dy2, and dz2 are Lx3-Lx1, Ly3-Ly, and Lz3-Lz1, respectively.
[0065] In step 10242, when the difference between the horizontal axes of the first coordinates is a positive number, the horizontal axis of the sensor base coordinate system and the first PID adjustment axis are in the same direction; when the difference between the horizontal axes of the first coordinates is a negative number, the horizontal axis of the sensor base coordinate system and the first PID adjustment axis are in a negative direction; when the difference between the horizontal axes of the first coordinates is 0, the horizontal axis of the sensor base coordinate system and the first PID adjustment axis are in a vertical relationship.
[0066] When the difference between the vertical axis of the first coordinate is a positive number, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in the same direction; when the difference between the vertical axis of the first coordinate is a negative number, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in a negative direction; when the difference between the horizontal axis of the first coordinate is 0, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in a perpendicular relationship.
[0067] When the difference value of the vertical axis of the first coordinate is positive, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in the same direction; when the difference value of the vertical axis of the first coordinate is negative, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in a negative direction; when the difference value of the horizontal axis of the first coordinate is 0, the vertical axis of the sensor base coordinate system and the first PID adjustment axis are in a perpendicular relationship.
[0068] In step S10243, when the difference between the second coordinate horizontal axis is a positive number, the horizontal axis of the sensor base coordinate system and the second PID adjustment axis are in the same direction; when the difference between the second coordinate horizontal axis is a negative number, the horizontal axis of the sensor base coordinate system and the second PID adjustment axis are in a negative direction; when the difference between the second coordinate horizontal axis is 0, the horizontal axis of the sensor base coordinate system and the second PID adjustment axis are in a vertical relationship.
[0069] When the difference value of the second coordinate vertical axis is positive, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in the same direction; when the difference value of the second coordinate vertical axis is negative, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in a negative direction; when the difference value of the second coordinate horizontal axis is 0, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in a perpendicular relationship.
[0070] When the difference value of the second coordinate vertical axis is positive, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in the same direction; when the difference value of the second coordinate vertical axis is negative, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in a negative direction; when the difference value of the second coordinate horizontal axis is 0, the vertical axis of the sensor base coordinate system and the second PID adjustment axis are in a perpendicular relationship.
[0071] S103, starting with the starting position of the target weld as the current position, cyclically inputting the position coordinates of the target weld at the next calibration position into the PID controller, the PID controller obtaining laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; determining the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis based on the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis in combination with the laser difference data; obtaining the position coordinates of the end effector corresponding to the current position of the target weld and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determining the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, thereby obtaining all the position coordinates of the end effector corresponding to the target weld;
[0072] It should be noted that after determining the forward direction axis, the first PID adjustment axis and the second PID adjustment axis corresponding to the end effector, and the spatial position relationship between the laser sensor and the first PID adjustment axis and the second PID adjustment axis respectively, the robotic arm controls the laser sensor to start at the starting position of the target weld as the current position, until the target weld ends at the next calibration position as the end position of the target weld, and the laser sensor scans the target weld.
[0073] Step S103 specifically includes the following steps:
[0074] S1031, starting with the starting position of the target weld as the current position, cyclically inputting the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position into the PID controller, wherein the PID controller obtains laser difference data between the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position and the position coordinates of the laser sensor in the sensor base coordinate system corresponding to the current position;
[0075] S1032: Determine, based on the spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis in combination with the laser difference data;
[0076] S1033. Obtain the position coordinates of the end effector corresponding to the current position of the target weld, and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determine the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, and then obtain all the position coordinates of the end effector corresponding to the target weld.
[0077] Step S1031 specifically includes:
[0078] S10311, subtracting the position coordinate of the target weld in the sensor base coordinate system corresponding to the next calibration position from the position coordinate of the laser sensor in the sensor base coordinate system corresponding to the current position to obtain a third coordinate difference;
[0079] S10312. Input the third coordinate difference into the PID controller to obtain laser difference data between the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position and the position coordinates of the laser sensor in the sensor base coordinate system corresponding to the current position.
[0080] In step S10311, the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position are calibration coordinate data obtained by pre-scanning the target weld with a laser sensor.
[0081] In step S10312, refer to Figure 2, the third coordinate difference is input into the proportional calculation unit kp, the differential control unit ki and the integral calculation unit kd in the PID controller, and the calculation formulas corresponding to the proportional calculation unit kp, the differential control unit ki and the integral calculation unit kd are used to obtain the laser difference data between the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position and the position coordinates of the laser sensor in the sensor base coordinate system corresponding to the current position.
[0082] Among them, the calculation formulas corresponding to the proportional calculation unit kp, the differential control unit ki and the integral calculation unit kd are as follows: Figure 2 As shown in .
[0083] Step S1032 specifically includes: determining the spatial position relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, the spatial position relationship including the corresponding coefficient value, combined with the laser difference data input into the preset movement increment calculation formula; the movement increment calculation formula outputs the coordinate increment of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis.
[0084] Among them, the coefficient values corresponding to the spatial position relationship specifically include: when the spatial position relationship is a unidirectional relationship, the corresponding coefficient value is 1; when the spatial position relationship is a negative relationship, the corresponding coefficient value is -1; when the spatial position relationship is a vertical relationship, the corresponding coefficient value is 0.
[0085] Exemplarily, when the first PID adjustment axis is the Z-axis of the robot base coordinate system, and Cxz is the coefficient value corresponding to the spatial position relationship between the horizontal axis of the sensor base coordinate system and the Z-axis of the robot base coordinate system, if Cxz is 1, the spatial position relationship between the horizontal axis of the sensor base coordinate system and the Z-axis of the robot base coordinate system is in the same direction; if Cxz is -1, the spatial position relationship between the horizontal axis of the sensor base coordinate system and the Z-axis of the robot base coordinate system is a negative relationship; if Cxz is 0, the spatial position relationship between the horizontal axis of the sensor base coordinate system and the Z-axis of the robot base coordinate system is a vertical relationship.
[0086] Specifically, when the first PID adjustment axis is the Z axis of the robot base coordinate system and the second PID adjustment axis is the Y axis of the robot base coordinate system, the expression of the preset movement increment calculation formula is as follows.
[0087] M Z =Cxz*Px+Cyz*Py+Czz*Pz
[0088] M Y =Cxy*Px+Cyy*Py+Czy*Pz
[0089] Among them, M Z and MY are the coordinate increments of the end effector in the direction of the Z-axis and Y-axis of the robot arm base coordinate system in which the PID adjustment axis is respectively; (Px, Py, Pz) are the laser difference data corresponding to the horizontal, vertical and vertical axes of the sensor base coordinate system in the current position of the laser sensor; Cxz, Cyz and Czz are the coefficient values corresponding to the spatial position relationship between the horizontal, vertical and vertical axes of the laser sensor in the sensor base coordinate system and the Z-axis of the robot arm base coordinate system; Cxy, Cyyy and Czy are the coefficient values corresponding to the spatial position relationship between the horizontal, vertical and vertical axes of the laser sensor in the sensor base coordinate system and the Y-axis of the robot arm base coordinate system.
[0090] Step S1033 also includes: adding the coordinate increment corresponding to the first PID adjustment axis and the coordinate increment corresponding to the second PID adjustment axis to the position coordinates of the end effector corresponding to the current position of the target weld, respectively, to obtain the position coordinates of the end effector at the next calibration position; repeating the step of obtaining the position coordinates of the end effector at the next calibration position until the target weld is at the end position of the target weld at the next calibration position; and then obtaining all the position coordinates of the end effector corresponding to the target weld.
[0091] S104 : Obtaining a scanning path corresponding to the target weld according to all position coordinates of the end effector.
[0092] Step S104 specifically includes the following steps:
[0093] S1041. For all position coordinates of the target weld, subtract all position coordinates of the target weld from all position coordinates of the end effector corresponding to the target weld to obtain deviation values between all position coordinates of the target weld and all position coordinates of the end effector corresponding to the target weld;
[0094] S1042: Determine whether the deviation value falls within a preset accuracy range.
[0095] S1043: If so, the position coordinates of the end effector corresponding to the deviation value are valid position coordinates; if not, the position coordinates of the end effector corresponding to the deviation value are not valid position coordinates.
[0096] In step S1041 , all position coordinates of the target weld are position coordinates determined in advance by scanning the target weld with a laser sensor.
[0097] In step S1042 , the deviation value of each position coordinate is compared with a preset accuracy range to determine whether the deviation value falls within the preset accuracy range.
[0098] The preset accuracy range is calibrated based on the performance parameters of the robotic arm and the laser sensor, combined with the actual size and position of the target weld.
[0099] In step S1043, if the deviation value of each position coordinate belongs to the preset accuracy range, indicating that the error of the position coordinate obtained at this time is within a reasonable range, then the position coordinate is determined to be a valid position coordinate; if not, the position coordinate of the end effector corresponding to the deviation value is not a valid position coordinate.
[0100] A second aspect of the present application provides a weld scanning device 400, which includes the following parts:
[0101] A spatial axis determination module 410 is configured to determine, based on a plurality of coordinate change values of the end effector relative to the target weld in the robot arm base coordinate system, a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the robot arm base coordinate system when the laser sensor scans the target weld;
[0102] a position relationship determination module 420 configured to control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement, spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis.
[0103] a position coordinate determination module 430, the position coordinate determination module 430 being configured to start with the starting position of the target weld as the current position, cyclically input the position coordinates of the target weld at the next calibration position into the PID controller, the PID controller obtaining laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; determining the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis based on the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, in combination with the laser difference data; obtaining the position coordinates of the end effector corresponding to the current position of the target weld and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determining the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, thereby obtaining all the position coordinates of the end effector corresponding to the target weld;
[0104] The weld path determination module 440 is configured to obtain a scanning path corresponding to the target weld according to all position coordinates of the end effector.
[0105] The third aspect of the present application provides a computer-readable storage medium, on which a program for a weld scanning method is stored, so that the weld scanning method provided in the first aspect of the present application can be executed. As for the aforementioned computer-readable storage medium, those skilled in the art will understand that the embodiments for implementing the functions of the aforementioned system and each unit can be accomplished through hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, it executes an embodiment including the functions of the aforementioned system and each unit. The aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, or optical disks.
[0106] In a fourth aspect, the present application provides an electronic device 500 comprising: at least one memory 520 for storing programs; and at least one processor 510 for executing the programs stored in the memory. The electronic device may be a server. The electronic device 500 comprises a processor 510, a memory 520, a network interface, and a database connected via a system bus 530. The processor 510 of the electronic device 500 is used to provide computing and control capabilities. The memory 520 of the electronic device comprises a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device 500 is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the weld scanning function or steps of the present application are implemented.
[0107] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and replacements can be made without departing from the technical principles of the present application. These improvements and replacements should also be regarded as the scope of protection of the present application.
Claims
1. A weld scanning method, characterized in that: The weld scanning method comprises the following steps: S101, based on multiple coordinate change values of the end effector relative to the target weld in the robot arm base coordinate system, determining a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the robot arm base coordinate system when the laser sensor scans the target weld; S102: Control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, respectively, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement. S103, starting with the starting position of the target weld as the current position, cyclically inputting the position coordinates of the target weld at the next calibration position into the PID controller, the PID controller obtaining laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; determining the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis based on the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis in combination with the laser difference data; obtaining the position coordinates of the end effector corresponding to the current position of the target weld and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determining the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld at the next calibration position is the end position of the target weld, thereby obtaining all the position coordinates of the end effector corresponding to the target weld; S104 : Obtaining a scanning path corresponding to the target weld according to all position coordinates of the end effector.
2. The weld scanning method according to claim 1, characterized in that: Step S101 further includes the following steps: S1011, controlling the robotic arm to advance a preset distance from the starting position of the target weld, and obtaining a plurality of coordinate change values of the end effector in the robotic arm base coordinate system, wherein the plurality of coordinate change values include a first coordinate change value, a second coordinate change value, and a third coordinate change value; wherein the coordinate change value refers to the absolute value of the coordinate change value, and the coordinate change values include, in descending order of absolute value, the first coordinate change value, the second coordinate change value, and the third coordinate change value; S1012. Determine, based on the first coordinate change value, a corresponding forward direction axis of the end effector in the robot arm base coordinate system when the laser sensor scans the target weld; S1013. Determine the second coordinate change value as the first PID adjustment axis corresponding to the end effector in the robotic arm base coordinate system when the laser sensor scans the target weld; determine the third coordinate change value as the second PID adjustment axis corresponding to the end effector in the robotic arm base coordinate system when the laser sensor scans the target weld.
3. The weld scanning method according to claim 1, characterized in that: Step S102 specifically includes the following steps: S1021, controlling the end effector to move to the starting position of the target weld, and obtaining the starting position coordinates of the laser sensor in the sensor base coordinate system corresponding to the starting position; S1022: Control the laser sensor to move from the starting position coordinates in the sensor base coordinate system to a first preset position along the first PID adjustment axis, and obtain first position coordinates of the laser sensor in the sensor base coordinate system corresponding to the first preset position; S1023, controlling the laser sensor to return from the first preset position to the starting position coordinates in the sensor base coordinate system corresponding to the starting position, and then moving from the starting position coordinates along the second PID adjustment axis to a second preset position, to obtain the second position coordinates of the laser sensor in the sensor base coordinate system corresponding to the second preset position; S1024. Based on the starting position coordinates, the first position coordinates, and the second position coordinates in the sensor base coordinate system of the laser sensor, determine the spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis.
4. The weld scanning method according to claim 3, characterized in that: Step S1024 specifically includes the following steps: S10241: Subtract the starting point position coordinates of the laser sensor in the sensor base coordinate system from the first position coordinates and the second position coordinates to obtain a first coordinate difference value and a second coordinate difference value; S10242: Determine the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis according to the first coordinate difference; S10243. Determine the spatial position relationship between each coordinate axis of the sensor base coordinate system and the second PID adjustment axis according to the second coordinate difference.
5. The weld scanning method according to claim 1, characterized in that: Step S103 specifically includes the following steps: S1031, starting with the starting position of the target weld as the current position, cyclically inputting the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position into the PID controller, wherein the PID controller obtains laser difference data between the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position and the position coordinates of the laser sensor in the sensor base coordinate system corresponding to the current position; S1032: Determine, based on the spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis in combination with the laser difference data; S1033. Obtain the position coordinates of the end effector corresponding to the current position of the target weld, and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determine the position coordinates of the end effector corresponding to the target weld at the next calibration position, until the target weld is the end position of the target weld at the next calibration position, and then obtain all the position coordinates of the end effector corresponding to the target weld.
6. The weld scanning method according to claim 1, characterized in that: Step S1031 specifically includes: S10311. Subtract the position coordinate of the target weld in the sensor base coordinate system corresponding to the next calibration position from the position coordinate of the laser sensor in the sensor base coordinate system corresponding to the current position to obtain a third coordinate difference value; S10312. Input the third coordinate difference into the PID controller to obtain laser difference data between the position coordinates of the target weld in the sensor base coordinate system corresponding to the next calibration position and the position coordinates of the laser sensor in the sensor base coordinate system corresponding to the current position.
7. The weld scanning method according to claim 1, characterized in that: Step S104 specifically includes: calculating the deviation values between all the position coordinates of the target weld and all the position coordinates of the end effector corresponding to the target weld, selecting the valid position coordinates from all the position coordinates of the end effector corresponding to the target weld according to the deviation values, and combining and connecting the valid position coordinates to obtain the scanning path corresponding to the target weld.
8. A weld scanning device, characterized in that: include: a spatial axis determination module, the spatial axis determination module being configured to determine, based on a plurality of coordinate change values of the end effector relative to the target weld in the manipulator base coordinate system, a forward direction axis, a first PID adjustment axis, and a second PID adjustment axis corresponding to the end effector in the manipulator base coordinate system when the laser sensor scans the target weld; a position relationship determination module, the position relationship determination module being configured to control the laser sensor to move along the first PID adjustment axis and the second PID adjustment axis to obtain position coordinates of the laser sensor in a sensor base coordinate system before and after the movement; and determine, based on the position coordinates of the laser sensor in the sensor base coordinate system before and after the movement, spatial positional relationships between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis; A position coordinate determination module is configured to start with the starting position of the target weld as the current position, cyclically input the position coordinates of the target weld at the next calibration position into a PID controller, and the PID controller obtains laser difference data between the position coordinates corresponding to the target weld at the next calibration position and the position coordinates of the laser sensor at the current position; based on the spatial positional relationship between each coordinate axis of the sensor base coordinate system and the first PID adjustment axis and the second PID adjustment axis, the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis are determined in combination with the laser difference data; Obtaining the position coordinates of the end effector corresponding to the current position of the target weld, and the coordinate increments of the end effector corresponding to the first PID adjustment axis and the second PID adjustment axis, determining the position coordinates of the end effector corresponding to the next calibration position of the target weld, until the next calibration position of the target weld is the end position of the target weld, thereby obtaining all the position coordinates of the end effector corresponding to the target weld; A weld path determination module is used to obtain a scanning path corresponding to the target weld according to all position coordinates of the end effector.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program runs on a processor, the processor is enabled to execute the weld scanning method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the weld scanning method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Weld joint position tracking control method and device based on PID
CN109514042A
Double-layer cooperative control method for multi-arm double-beam laser welding robot
CN114888793A