Robot welding track correction method, device and equipment
By acquiring multiple laser stripe images of the weldment and using dynamic region of interest search and WTo-CPD algorithm to correct the welding trajectory, the problem of unstable robot welding trajectory is solved and the welding accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202510732420.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-06-03
AI Technical Summary
During the welding process, the robot's welding trajectory correction is subject to noise interference, resulting in instability and making it difficult to accurately correct the welding trajectory, thus affecting welding quality and efficiency.
By acquiring multiple laser stripe images of the weldment, the dynamic region of interest search method is used to determine the weld point trajectory, remove abnormal points and reconstruct the trajectory, and the WTo-CPD algorithm is combined for alignment and error correction to achieve accurate welding trajectory correction.
It improves welding accuracy, reduces welding defects, and improves production efficiency. It also accelerates algorithm convergence through feature protection and area search to ensure welding quality.
Smart Images

Figure CN120715510A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of welding trajectory correction, and in particular to a method, device and equipment for robot welding trajectory correction. Background Art
[0002] Welding is an essential part of modern manufacturing. In traditional welding processes, batch variations between parts often cause the welding torch to misalign with the weld seam, leading to quality issues such as insufficient penetration and uneven welds. Repeated part replacements require workers to frequently adjust the welding torch to align multiple weld seams, increasing the workload and decreasing efficiency.
[0003] With the widespread application of robots, collaborative robots used for welding can gradually replace workers to perform more precise welding operations. However, noise interference such as strong light during welding and reflections on the surface of parts often cause instability in the robot's automatic weld tracking, reducing the reliability of the tracking algorithm in actual production.
[0004] Traditional manual teaching or offline programming lacks effective measures to address workpiece geometry variations, and manual correction is both time-consuming and laborious. In complex welding scenarios, such as highly reflective narrow welds, high noise levels and poor stability make it difficult to accurately correct the welding trajectory, thus impacting weld quality. Summary of the Invention
[0005] In view of this, the present application provides a robot welding trajectory correction method, device and equipment for accurately correcting the welding trajectory to improve the welding quality.
[0006] Specifically, this application is implemented through the following technical solutions:
[0007] A first aspect of the present application provides a robot welding trajectory correction method, the method comprising:
[0008] Acquiring multiple laser stripe images of the weldment; wherein the multiple laser stripe images are multiple images captured by a camera mounted on the end of the robot when a laser sensor mounted on the end of the robot moves a laser stripe pattern on the weldment according to the principle of equidistant movement;
[0009] Based on a dynamic region of interest search method, determining a target trajectory consisting of a plurality of target weld points on the weldment according to the plurality of laser stripe images;
[0010] Based on the continuity and connectivity characteristics between the discrete points on the trajectory, outliers on the target trajectory are removed, and the target trajectory after the outliers are removed is reconstructed using a Poisson reconstruction method to obtain a reconstructed trajectory;
[0011] Based on the WTo-CPD algorithm, a point set discretized according to a preset distance of an offline trajectory predetermined for the weldment is used as a source point set, and a point set included in the reconstructed trajectory is used as a target point set for registration, and a displacement vector corresponding to each source point in the source point set is obtained; wherein the source point set is a dense point set, and the target point set is a sparse point set;
[0012] For each source point, determining whether to correct the displacement vector based on a predetermined error pattern of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error pattern is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; the error pattern is obtained based on statistical analysis of multiple registration tests;
[0013] When it is determined that the source point does not need to be corrected, the source point is aligned according to the displacement vector corresponding to the source point to obtain the correction point of the source point. When it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
[0014] The second aspect of the present application provides a robot welding trajectory correction device, which includes an acquisition module, a determination module, a processing module and a compensation module; wherein,
[0015] The acquisition module is configured to acquire a plurality of laser stripe images of the weldment; wherein the plurality of laser stripe images are acquired by a camera mounted at the end of the robot when a laser sensor mounted at the end of the robot moves a laser stripe pattern on the weldment according to an equidistant movement principle;
[0016] The determination module is configured to determine a target trajectory consisting of a plurality of target weld points on the weldment based on the plurality of laser stripe images based on a dynamic region of interest search method;
[0017] The processing module is configured to remove abnormal points on the target trajectory based on continuity characteristics and connectivity characteristics between discrete points on the trajectory, and reconstruct the target trajectory after the abnormal points are removed using a Poisson reconstruction method to obtain a reconstructed trajectory;
[0018] The processing module is configured to perform registration based on the WTo-CPD algorithm, using a point set discretized according to a preset distance of an offline trajectory predetermined for the weldment as a source point set and a point set included in the reconstructed trajectory as a target point set, to obtain a displacement vector corresponding to each source point in the source point set; wherein the source point set is a dense point set and the target point set is a sparse point set;
[0019] The determination module is configured to determine, for each source point, whether to correct the displacement vector based on a predetermined error law of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error law is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; and the error law is obtained based on statistical analysis of multiple registration tests;
[0020] The compensation module is used to align the source point according to the displacement vector corresponding to the source point when it is determined that the source point does not need to be corrected, so as to obtain the correction point of the source point; when it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
[0021] The third aspect of the present application provides a robot welding trajectory correction device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0022] The robot welding trajectory correction method, device and equipment provided by the present application obtain multiple laser stripe images of the weldment, and then based on the dynamic region of interest search method, determine the target trajectory composed of multiple target weld points on the weldment according to the multiple laser stripe images, and remove abnormal points on the target trajectory based on the continuity characteristics and connectivity characteristics between the discrete points on the trajectory, and use the Poisson reconstruction method to reconstruct the target trajectory after removing the abnormal points to obtain a reconstructed trajectory, and then based on the WTo-CPD algorithm, use the point set discretized according to a preset distance for the offline trajectory predetermined for the weldment as the source point set, and use the point set included in the reconstructed trajectory as the target point set for alignment to obtain the displacement vector corresponding to each source point in the source point set, so as to determine for each source point whether to correct the displacement vector according to the predetermined error law of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point, and when it is determined that the source point does not need to be corrected, the source point is aligned according to the displacement vector corresponding to the source point to obtain the source point. The correction point of the point is determined, and when it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point. In this way, through the establishment and application of the error law, a feedback correction mechanism is formed, which can effectively correct the tooling error and part difference, effectively improve the accuracy of the robot welding process, reduce welding defects caused by trajectory deviation, and thus improve welding quality and production efficiency; in addition, the welding trajectory correction method provided in this embodiment is also improved by the WTo-CPD algorithm. First, for the mathematical transformation model, by introducing a first weight for the smooth area and a second weight for the non-smooth area to perform feature protection on the non-smooth area, feature loss can be avoided and welding accuracy can be ensured; secondly, during the search, the logic of regional search is introduced to accelerate the convergence of the algorithm; in addition, when using the expectation maximization method for iterative optimization, a curve constraint term is introduced in the Q function, so that the distance between adjacent trajectory points can be guaranteed not to be too large, thereby improving the accuracy of the optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of Example 1 of the robot welding trajectory correction method provided by this application;
[0024] Figure 2 This is a schematic diagram showing the principle of obtaining a laser stripe image according to an exemplary embodiment of the present application;
[0025] Figure 3 This is a schematic diagram illustrating an exemplary embodiment of the present application for determining a target trajectory;
[0026] Figure 4This is a schematic diagram illustrating an exemplary embodiment of the present invention for removing outliers.
[0027] Figure 5 This is a schematic diagram illustrating the implementation principle of search optimization based on matching range according to an exemplary embodiment of the present application;
[0028] Figure 6 This is a diagram illustrating the implementation principle of the registration process according to an exemplary embodiment of the present application;
[0029] Figure 7 This is a schematic diagram illustrating an implementation principle of a registration process according to another exemplary embodiment of the present application;
[0030] Figure 8 This is a schematic diagram showing an exemplary embodiment of the present application for implementing a correction of a displacement vector using an error law;
[0031] Figure 9 This is a hardware structure diagram of the robot welding trajectory correction device in which the robot welding trajectory correction device of this application is located;
[0032] Figure 10 This is a structural schematic diagram of Example 1 of the robot welding trajectory correction device provided in this application. DETAILED DESCRIPTION
[0033] Exemplary embodiments are described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different drawings represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with this application.
[0034] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a," "the," and "the" used in this application are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0035] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0036] Specific embodiments are given below to introduce the technical solutions of the present application in detail.
[0037] Figure 1 This is a flow chart of the first embodiment of the robot welding trajectory correction method provided by this application. Figure 1 The method provided in this embodiment may include:
[0038] S101. Acquire multiple laser stripe images of the weldment; wherein, the multiple laser stripe images are multiple images collected by a camera installed at the end of the robot when a laser sensor installed at the end of the robot moves a laser stripe pattern on the weldment according to the principle of equidistant movement.
[0039] It should be noted that the robot welding trajectory correction method and device provided in this application are applied to the robot welding trajectory correction equipment. The robot welding trajectory correction equipment can be integrated on the robot or can be a control device independent of the robot. This application does not limit it.
[0040] Figure 2 This is a schematic diagram showing the principle of obtaining a laser stripe image according to an exemplary embodiment of the present application. Figure 2 Figure A in the figure is the principle diagram for obtaining a laser stripe image. Figure 2 Figure B is the relationship between the laser stripe pattern and the position of the weldment. Figure 2 Figure C in the figure is a schematic diagram of a laser stripe image obtained. Figure 2 The robot's end is equipped with a laser sensor and camera. The laser sensor can emit a laser stripe pattern toward the weldment below the end. After the laser sensor transmits the laser stripe pattern to the weldment, the camera can capture an image of the weldment, generating a laser stripe image. Furthermore, according to the principle of equidistant movement, the laser stripe pattern is moved on the weldment. After the movement, further images are captured to generate a laser image. In this way, by repeatedly moving the laser stripe pattern on the weldment, multiple laser stripe patterns can be generated.
[0041] It should be noted that the distance that the laser stripe pattern moves each time is set according to actual needs and is not limited in this embodiment.
[0042] With reference to the foregoing description, it can be understood that a laser stripe image is an image with specific characteristics formed by irradiating the surface of an object with a laser, and a laser stripe image of a weldment can provide a welding trajectory of the weldment.
[0043] With reference to the foregoing description, it can be understood that, in this step, a plurality of laser stripe images can be directly acquired from the camera.
[0044] S102 : Based on a dynamic region of interest search method, determine a target trajectory consisting of a plurality of target weld points on the weldment according to the plurality of laser stripe images.
[0045] It should be noted that when collecting laser stripe images, there may be high-reflective areas on the weldment, resulting in poor display of the collected laser stripe images and easy generation of false measurement data. Furthermore, if the range of the high-reflective area is large, the weak stripe areas caused by the high-reflective area can be directly filtered out by a low-pass filtering algorithm. However, if the range of the high-reflective area is small, and when a noise area similar to the weld point feature appears in the laser stripe image (the noise area is a narrow high-reflective area that appears in the laser stripe image), it is easy to cause the weld point to be identified incorrectly. In addition, when collecting laser stripe images, if the weldment areas on both sides of the weld exhibit high-reflective characteristics, the weld point at this time may be covered by the weak stripes in the high-reflective area, resulting in the loss of weld point information. Therefore, in this application, a dynamic region of interest search method is used to solve the problem of inaccurate recognition caused by the above-mentioned high-reflective situation.
[0046] Specifically, Figure 3 This is a schematic diagram showing the implementation principle of determining the target trajectory according to an exemplary embodiment of the present application. Figure 3 In a possible implementation, the specific implementation process of this step may include:
[0047] Step 1: Use the first laser stripe image as the initial laser stripe image, predict the position of the next weld position point on the laser stripe pattern in the initial laser stripe image based on the currently known weld position point, obtain the predicted point corresponding to the next position, and draw the area of interest with the predicted point as the center.
[0048] Step 2: Calculate the sum of the grayscale values of each row of pixels in the region of interest to obtain the sum value of each row of pixels, and determine the retention point corresponding to the laser stripe image based on the sum value of each row of pixels; wherein, the direction indicated by the row is perpendicular to the length direction of the laser stripe pattern; when the sum value of a row of pixels is less than or equal to the weld width of the weldment, the laser stripe point of the laser stripe pattern on the row of pixels is the retention point.
[0049] Step 3: According to the distance between each reserved point and the predicted point, the reserved point closest to the predicted point is determined as the initial weld point corresponding to the next position.
[0050] Step 4: Using the next laser stripe image of the initial laser stripe image as the initial laser stripe image, and again performing the step of predicting the position of the laser stripes of the next weld position point in the initial laser stripe image based on the currently known weld position point.
[0051] Step 5: Select one reserved point from the reserved points corresponding to each laser stripe image as the final weld position point of the laser stripe image, so that the trajectory formed by the final weld position points of all laser stripe images is a continuous trajectory.
[0052] Step 6: Determine the trajectory formed by the final weld position points of all laser stripe images as the target trajectory.
[0053] In specific implementation, in step 1, the specific implementation principle and implementation method of predicting the position of the next weld position point on the laser stripe pattern in the initial laser stripe image can be found in the description of the relevant technology and will not be repeated here.
[0054] Furthermore, when drawing the ROI, the height of the ROI is dynamically adjusted according to the number of noise points contained in the previous ROI, so as to prevent the prediction error caused by too many noise points in the previous position, which makes the current ROI unable to include the weld point here.
[0055] In specific implementation, the region of interest is determined and drawn according to the following formula:
[0056]
[0057] Wherein, k1 is the number of noise points contained in the previous region of interest, and (x p y p ) is the coordinate value of the predicted point corresponding to the next weld position point, and the x min is the minimum coordinate value of the x-direction range of the region of interest, x max is the maximum coordinate value of the x-direction range of the area of interest, y min is the minimum coordinate value of the y direction range of the area of interest, max The maximum coordinate value of the y-direction range of the region of interest.
[0058] It's understandable that the k1 value can, to a certain extent, reflect the degree of noise interference with weld location recognition. When the k1 value is small, the noise interference is low, making weld location recognition less difficult. Therefore, the ROI can be drawn with a smaller range in the y-direction. When the k1 value is large, the noise interference is higher, making weld location recognition more difficult. Therefore, the ROI needs to be drawn with a larger range in the y-direction.
[0059] It should be noted that the grayscale value of a pixel refers to the brightness level of each pixel in the image. By analyzing the grayscale value of a pixel, the shape of the object in the image can be understood to a certain extent. In this application, in the region of interest, the sum of the grayscale values of the pixels at the weld position in the direction perpendicular to the laser stripe image has an extreme value. Therefore, in step 2, the sum of the grayscale values of multiple equidistant rows in the region of interest can be analyzed and filtered to the part where the sum of the grayscale values is greater than the weld width, thereby identifying the weld location.
[0060] In specific implementation, when the grayscale value and value of a row of pixels are less than or equal to the weld width of the weldment, the laser stripe points on the laser stripe image in this row of pixels are retained; and when the grayscale value and value of a row of pixels are greater than the weld width of the weldment, the laser stripe points on this row of pixels are discarded.
[0061] Furthermore, in step 3, based on the coordinates of the retained point and the predicted point, the distance between each retained point and the predicted point is calculated using the distance formula between the two points. The calculated distances are compared, and the retained point closest to the predicted point is determined as the initial weld point.
[0062] Specifically, after determining the initial weld point, the next laser stripe image after the initial laser stripe image can be used as the initial laser stripe image, and the step of predicting the position of the next weld point on the laser stripes in the initial laser stripe image based on the currently known weld position points can be performed again. In this way, the retained points corresponding to each laser stripe image can be obtained.
[0063] It can be understood that the target trajectory has continuity. Therefore, after obtaining the retention points corresponding to each laser stripe pattern, the retention points of each laser stripe pattern can be analyzed using the continuity of the trajectory, and a retention point can be selected for the laser stripe image from the retention points corresponding to each laser stripe image as the final weld position point of the laser stripe image, so that the trajectory formed by the final weld position points of all laser stripe images is a continuous trajectory.
[0064] S103 : Based on the continuity and connectivity characteristics between the discrete points on the trajectory, remove the outliers on the target trajectory, and reconstruct the target trajectory after removing the outliers using a Poisson reconstruction method to obtain a reconstructed trajectory.
[0065] It's understandable that a continuous welding trajectory without distinct corners exhibits smooth, uninterrupted flow, without sudden jumps between discrete points. Abnormal points within the target trajectory can cause abrupt shifts or discontinuities in the welding trajectory, leading to deviations in the weld position. Removing these abnormal points can improve welding accuracy.
[0066] Specifically, in one possible implementation, Figure 4 This is a schematic diagram showing the principle of removing abnormal points according to an exemplary embodiment of the present application. Figure 4 In an ideal trajectory close to reality, there is continuity and connectivity between discrete points on the trajectory. There will be no sudden jumps between discrete points, and the trajectory between points will be smooth and will not be suddenly interrupted. Based on these two characteristics, the curvature value of each point on the target trajectory can be calculated, and then the abnormal points can be filtered out based on the curvature value of each point. Please refer to Figure 4 The specific implementation process is as follows:
[0067]
[0068] in, is the curvature value of the nth point, is the curvature value of the n+1th point, is the vector from the n-1th point to the nth point, is the modulus of the vector from the n-1th point to the nth point, is the vector from the nth point to the n+1th point, is the modulus of the vector from the nth point to the n+1th point, x last is the last point that satisfies the curvature value less than the preset threshold, x next For the next point that satisfies the curvature value greater than the preset threshold, For the set of points that remain, is the set of points to be removed.
[0069] Please refer to Figure 4 In the above formula, three points in the target trajectory are defined. Two adjacent points form a vector, and the n-1th point and the nth point form a vector. The vector between the nth point and the n+1th point Calculate the curvature of the nth point based on these two vectors If the calculated curvature value does not exceed the preset threshold, all discrete points before the point and between the previous point that satisfies the curvature value less than the preset threshold and the next point of the point are retained; if the calculated curvature value exceeds the preset threshold, all discrete points between the next point of the point and the next point after the point that satisfies the curvature value greater than the preset threshold are marked as abnormal points and removed.
[0070] See also Figure 4 ,exist Figure 4 In the middle, click x n+1 The curvature value of is greater than the preset threshold, which is the starting point of the change. At this time, it is regarded as an abnormal point, and the points from this point to the next point that satisfies the curvature value greater than the preset threshold are included. Figure 4The abnormal area is shown, and then the points in the abnormal area are removed.
[0071] It is understandable that after removing the outliers, to prevent distortion, the curvature changes at the starting and ending points where the curvature changes are ignored, and only the outliers in the middle are removed. For the middle points within the outlier area, although their curvature may not change significantly, they still need to be deleted.
[0072] It should be noted that the specific value of the preset threshold is set according to the actual required welding trajectory accuracy and is not limited here.
[0073] Furthermore, after removing the outliers by the above method, the uniformity of the points changes. Therefore, the Poisson reconstruction method is used to reconstruct the target trajectory after removing the outliers to obtain a reconstructed trajectory. The specific process of the Poisson reconstruction method can be referred to the description in the related art and will not be described here. Furthermore, for the convenience of explanation, the reconstructed trajectory is recorded as X′={x′1,…,x′ n ,…,x′ K}.
[0074] S104. Based on the WTo-CPD algorithm, the point set discretized according to the preset distance of the offline trajectory predetermined for the weldment is used as the source point set, and the point set contained in the reconstructed trajectory is used as the target point set for alignment to obtain the displacement vector corresponding to each source point in the source point set; wherein, the source point set is a dense point set, and the target point set is a sparse point set.
[0075] Refer to the previous description, the discrete points in the reconstructed trajectory are taken as the target point set X'=x'1,...,x' n ,…,x' N , the number of points in the target point set is N.
[0076] Furthermore, the offline trajectory predetermined for the weldment is discretized according to the preset distance, and the discretized point set is used as the source point set Y = {y1,…,y m ,…,y M}, the number of points in the source point set is M, where M is much larger than N. Therefore, the target point set belongs to a dense point set, and the source point set is a sparse point set.
[0077] It should be noted that different software may be used to predetermine the offline trajectory for the weldment, which is not limited herein. For example, in one embodiment, CAM software may be used to generate the offline trajectory.
[0078] In specific implementation, the specific implementation process of this step may include:
[0079] (1) Constructing a probability model based on the source point set and the target point set to obtain a cost function of the probability model; wherein, in the process of constructing the probability model, the source point set is regarded as a mixture model with a Gaussian distribution, and the target point set is regarded as the expected value of the Gaussian distribution.
[0080] (2) Constructing a mathematical transformation model; wherein the mathematical transformation model is used to describe the process of aligning the source point set to the target point set.
[0081] (3) For each source point, the cost function is iteratively optimized using the expectation maximization algorithm, and when the iteration condition terminates, the displacement vector corresponding to the source point is obtained.
[0082] Specifically, in step (1), the distribution of the source point set can be described by a combination of multiple Gaussian distributions and regarded as a mixture model with a Gaussian distribution, while the target point set is regarded as the expected value of the Gaussian distribution, which can play a role in determining the center position of the Gaussian distribution in the probability model. A probability model is constructed based on the source point set and the target point set, and the probability of the target point set finding the correct corresponding point can be obtained based on the probability model. In addition, the corresponding cost function can also be obtained based on the probability model. The cost function can reflect the mismatch between the source point set and the target point set.
[0083] In this embodiment, point y in the source point set Y m A probability model is established for the centroid. At this time, since N≠M, a uniform distribution function needs to be added, and its weight is set to ω. Therefore, the probability density function of the Gaussian distribution is represented by the first formula, which is as follows:
[0084]
[0085] Wherein, the p(x' n ) is the point x' n The probability distribution of point x' n The probability of appearing in the target point set; P(m) is the probability distribution of the mth point in the source point set, indicating the possibility of the mth point in the source point set being the matching reference point; p(x' n |m) is the point x' given the mth point n The conditional probability density distribution indicates that under the reference of the mth source point, the target point x' n The matching probability density is: N is the number of target points; M is the number of source points; ω is the weight of the uniform distribution function;
[0086] Furthermore, the cost function is represented by the second formula. Assuming that each data point is independent and obeys the same distribution, the second formula is as follows:
[0087]
[0088] Wherein, θ is the displacement vector of the point; σ 2 is the noise error variance of the point; the W fk is the weight corresponding to each point.
[0089] Furthermore, in step (2), by constructing a mathematical transformation model, the source point set can be made to coincide with or approach the target point set as much as possible through the constructed mathematical transformation model. It should be noted that the transformation type of the mathematical transformation model can be selected according to actual needs and is not limited here. For example, in one embodiment, it can be a rigid body transformation; in another embodiment, it can also be a non-rigid body transformation.
[0090] Furthermore, in step (3), the cost function between the source and target points is minimized by continuously iterating the expectation maximization algorithm. It should be noted that the expectation maximization algorithm includes an expectation step (i.e., E-step) and a maximization step (i.e., M-step), where the E-step estimates the matching probability between the source and target points, and the M-step updates the transformation matrix.
[0091] In this application, the expectation maximization algorithm is improved, and the Q function used in the maximization step is the third formula, which is specifically:
[0092]
[0093] Wherein, the Q(θ,σ 2 ) is the objective function for evaluating the matching quality of the source point and the target point; old is the conditional probability distribution calculated in the previous iteration; the W def is the weight matrix composed of the weights corresponding to each point; is the curve constraint term; α is the penalty coefficient; wi is the displacement vector obtained in the i-th iteration; x n is the nth target point in the target point set; the y m represents the mth source point in the source point set; the τ(y m ,θ) means that under the transformation parameter θ, the source point y m The transformed result after applying the transformation parameters.
[0094] It can be understood that: in the second formula:
[0095] The first item: contains the conditional probability and weight matrix, which is used to evaluate the error of the matching points.
[0096] Second item: Curve constraint item It is used to ensure the continuity of the displacement vector and prevent unreasonable jumps during the matching process.
[0097] The third term: registration error Used to measure the matching error between the target point and the source point.
[0098] Refer to the previous description, in order to reduce the degree of freedom of the probability model and make the optimization process more stable, the association between points is constructed as a curve constraint And add it to the iterative process (specifically reflected in the above Q function), so that the distance between adjacent trajectory points can be guaranteed not to be too large, thereby improving the accuracy of optimization.
[0099] It is understood that the iterative process of optimizing the cost function using the expectation-maximization algorithm continues until the value of the cost function no longer changes significantly or the preset maximum number of iterations is reached. At this point, a corresponding displacement vector is obtained for each source point in the source point set. This displacement vector can represent the direction and distance that the source point needs to move to better align with the target point set. It should be noted that the preset maximum number of iterations is set according to actual needs and is not limited here.
[0100] Optionally, in a possible implementation, the specific process of iteratively optimizing the cost function using the expectation-maximization algorithm may include:
[0101] (1) For each target point, the matching range corresponding to the target point is determined according to the first number M of source points included in the source point set, the second number K of target points included in the target point set, and the position of the target point.
[0102] (2) When the cost function is iteratively optimized using the expectation method, search optimization is performed based on the matching range.
[0103] Specifically, when iteratively optimizing the cost function using the expectation-maximization algorithm, the source points in the source point set can be assumed to be sequential and monotonically present. Therefore, a region search method can be used to optimize the cost function based on the properties of the source points. When constructing the probability model, the probability between each point in the source point set and the point in the target point set is processed. For example, for a specific point in the target point set, the probability of correctly corresponding to the point in the source point set that is relatively far away from it is recorded as 0 or the probability tends to an infinitesimal value.
[0104] Figure 5 This is a schematic diagram showing the implementation principle of search optimization based on matching range in an exemplary embodiment of this application. Figure 5 , the matching range can be determined according to the following formula:
[0105]
[0106] Wherein, m is the matching range;
[0107] The k is a preset scaling factor;
[0108] The n is the number of the target point.
[0109] It should be noted that the value range of k is 0 to 1. When the value of k is larger, the range of m' that meets the conditions becomes wider and the convergence speed becomes slower; when the value of k is smaller, the range of m' that meets the conditions becomes narrower and the convergence speed becomes faster.
[0110] Furthermore, the larger the value of k, the more implicit probability models are verified, the higher the fault tolerance rate, and the smaller the value of k, the faster the convergence speed. Therefore, it can be concluded that the iterative formula in the expectation step of the expectation maximization algorithm is the fourth formula; the fourth formula is:
[0111]
[0112] Among them, the P old (m|x n ) represents the point x in the given target point set obtained by calculation in the previous iterative process n In the case of , the probability that the point matches the mth point in the source point set; the x n is the nth target point in the target point set; the y m is the mth source point in the source point set; the θ old is the transformation parameter calculated in the previous iterative process; old is the variance calculated in the previous iteration; the τ(y m ,θ old ) represents the transformation parameter θ old Next, the source point y m The transformation result after applying the transformation parameters; D is the dimension of the point; c is the normalization factor of the probability density function of the Gaussian distribution.
[0113] Optionally, in a possible implementation, the offline trajectory includes a pre-divided smooth area and a non-smooth area; the mathematical transformation model includes a first weight matrix corresponding to the smooth area and a second weight matrix corresponding to the non-smooth area; each weight value of the second weight matrix is greater than each weight value of the second weight matrix; and for each source point, iteratively optimizing the cost function using an expectation-maximization algorithm includes:
[0114] When the source point is in a smooth area, processing is performed according to the first weight matrix; when the source point is in a non-smooth area, processing is performed according to the second weight matrix.
[0115] Specifically, Figure 6 This is a schematic diagram showing the implementation principle of the registration process of an exemplary embodiment of this application, please refer to Figure 6 ,exist Figure 6 In the example shown, the offline trajectory includes pre-divided smooth areas and non-smooth areas; wherein the non-smooth area may be a welding area with obvious shape features, for example, it may be an area including corners and arcs.
[0116] In this embodiment, see Figure 6 When the offline trajectory includes both smooth and non-smooth areas, the mathematical transformation model used to transform the source point set may cause over-smoothing or over-distortion in the non-smooth areas, leading to feature loss. If the non-smooth areas are processed according to the first weight, the registered trajectory becomes smoother, but the corner features of the original trajectory are lost.
[0117] In this embodiment, two weights are set. For ease of explanation, these two weights are respectively recorded as the first weight and the second weight. Thus, during the registration process, smooth areas are processed using the first weight, and non-smooth areas are processed using the second weight. It should be noted that the second weight is greater than the first weight. For example, if the first weight is recorded as 1, the second weight is greater than 1.
[0118] Please refer to Figure 6 ,For the non-smooth area, after processing it by the second weight, it can play the role of feature protection, and avoid losing the original ,features of the offline trajectory.
[0119] The method provided in this embodiment can ensure the protection of the welding area morphology during the mathematical transformation process by adding weight adjustment logic for non-smooth areas, so that the deformation of the non-smooth area during the transformation process is different from that of the smooth area, so as to protect the morphological features of the non-smooth area (for example, corner features).
[0120] Figure 7 This is another exemplary embodiment of the present application showing the implementation principle diagram of the registration process, please refer to Figure 7 Referring to the previous description, the method provided in this embodiment first removes outliers from the target trajectory (the irrelevant point filtering shown in the figure). Furthermore, the WTo-CPD algorithm is improved. First, a first weight for smooth areas and a second weight for non-smooth areas are introduced into the mathematical transformation model to protect the features of non-smooth areas. Second, regional search logic is introduced during the search. Furthermore, when iteratively optimizing using the expectation maximization method, a curve constraint term is introduced into the Q function to ensure that the distance between adjacent trajectory points is not too large, thereby improving the accuracy of the optimization.
[0121] S105. For each source point, determine whether to correct the displacement vector based on the predetermined error law of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error law is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; the error law is obtained based on statistical analysis of multiple registration tests.
[0122] S106. When it is determined that the source point does not need to be corrected, the source point is aligned according to the displacement vector corresponding to the source point to obtain the correction point of the source point. When it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
[0123] Specifically, due to the limitations of iteration conditions, registration errors often occur during the registration process of the source and target point sets. To eliminate registration errors, the method provided in this embodiment predetermines the error pattern of the WTo-CPD algorithm. Based on this error pattern and the modulus of the displacement vector corresponding to the source point, it is determined whether to correct the displacement vector, and correction is performed if necessary.
[0124] It should be noted that the greater the distance from the source point set, the lower the correlation between the points during the registration process, and the greater the registration error. This shows that the registration error is related to the translation matrix of each point after registration. Based on multiple registration tests, the error pattern of the WTo-CPD algorithm can be statistically analyzed to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error.
[0125] Optionally, in a possible implementation, the error law of the WTo-CPD algorithm is: when the modulus of the displacement vector corresponding to the source point is between 0 mm and 0.16 mm, the error is controlled between 0 and 0.05 mm, and the error within this range has little effect on the welding effect; and when the modulus of the displacement vector corresponding to the source point reaches an extreme value, the error is controlled between 0.06 and 0.1, and the error within this range has a greater impact on the welding effect.
[0126] It should be noted that, in step S105, if the modulus of the displacement vector is less than or equal to 0.16 mm, it is determined not to be corrected; otherwise, it is determined to be corrected.
[0127] Furthermore, in step S106, for source points that do not need to be corrected, the source point can be directly aligned according to the displacement vector corresponding to the source point to obtain the correction point of the source point; and for source points that need to be corrected, while the source point is aligned according to the displacement vector corresponding to the source point, the alignment point also needs to be compensated using the error law to obtain the correction point of the source point.
[0128] Figure 8 This is an exemplary embodiment of the present application showing the principle diagram of correcting the displacement vector using the error law. Figure 8 , the trajectory position point is combined with the posture of the welding gun at each point, and the posture is transformed by the displacement vector obtained by non-rigid registration of the position points between the source point set and the target point set. The posture information at each trajectory point is represented by Euler angles, and it is combined with the position points to obtain a representation method Tr for the end posture of the welding gun during welding. i ={x i ,y i ,z i ,a i ,b i ,c i}.
[0129] Furthermore, based on the translation vector t and the above-mentioned registration error law, the transformation matrix T of the welding gun posture transformation is constructed, which includes the translation vector v and the rotation matrix R. The transformation matrix T is as follows:
[0130]
[0131] Wherein, T is the transformation matrix;
[0132] The e n is the error corrected by the pose transformation of the source point;
[0133] The β is the angle between the z-axis of the initial end coordinate system before the welding gun rotates and the z-axis of the final end coordinate system after the welding gun rotates;
[0134] The α is the angle between the displacement vector of the source point and the y-axis of the initial end coordinate system;
[0135] The cl is the confidence level of the error rule, and the cl is a preset value;
[0136] The |t n | is the modulus of the displacement vector corresponding to the source point;
[0137] The |t st | is the modulus of the displacement vector corresponding to the position point where the offline trajectory enters the extreme value;
[0138] The l end is the distance between the end of the welding gun and the end of the robotic arm;
[0139] The e max and e0 are respectively the maximum error value and the minimum error value corresponding to when the modulus of the translation vector indicated by the error rule reaches an extreme value;
[0140] The ereg,n is the registration error of the source point calculated based on the error law.
[0141] It should be noted that in order to verify the effect of the method provided in this application, a verification experiment was also carried out. The verification experiment showed that, first, after the WTo-CPD algorithm was improved according to the method described above, in the presence of a random error of 0 to 0.3 mm, the WTo-CPD algorithm converged faster, and the average error after alignment could be controlled within 0.02 mm, with a small error; secondly, when the noise ratio of the WTo-CPD algorithm changed, the error could always be kept within a stable range without significant changes; in addition, when the welding trajectory had a small or reasonable range of offset, after correction by the above method, the end of the welding gun could accurately move along the weld trajectory of the actual workpiece, and could better adapt to subtle changes in the weld. Furthermore, this also ensured that the laser emitted by the welding equipment was evenly irradiated around the weld, forming a uniform bright area covering both sides of the weld edge, thereby effectively improving the welding quality and overall strength, and significantly reducing the occurrence of welding defects.
[0142] The robot welding trajectory correction method provided in this embodiment obtains multiple laser stripe images of the weldment, and then based on the dynamic region of interest search method, determines the target trajectory composed of multiple target weld points on the weldment according to the multiple laser stripe images, and removes abnormal points on the target trajectory based on the continuity and connectivity characteristics between the discrete points on the trajectory, and reconstructs the target trajectory after removing the abnormal points using the Poisson reconstruction method to obtain a reconstructed trajectory, and then based on the WTo-CPD algorithm, uses the point set discretized according to a preset distance for the offline trajectory predetermined for the weldment as the source point set, and uses the point set included in the reconstructed trajectory as the target point set for alignment, and obtains the displacement vector corresponding to each source point in the source point set, so as to obtain the displacement vector corresponding to each source point in the source point set, so as to obtain the displacement vector corresponding to each source point in the source point set. Point, according to the predetermined error law of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point, it is determined whether to correct the displacement vector, and when it is determined that the source point does not need to be corrected, the source point is aligned according to the displacement vector corresponding to the source point to obtain the correction point of the source point, and when it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the error law is used to compensate the alignment point to obtain the correction point of the source point. In this way, through the establishment and application of the error law, a feedback correction mechanism is formed, which can effectively correct tooling errors and part differences, effectively improve the accuracy of the robot welding process, reduce welding defects caused by trajectory deviation, and thus improve welding quality and production efficiency.
[0143] In addition, the welding trajectory correction method provided in this embodiment improves the WTo-CPD algorithm. First, for the mathematical transformation model, by introducing a first weight for the smooth area and a second weight for the non-smooth area, the feature protection of the non-smooth area is performed, which can avoid feature loss and ensure the accuracy of welding; secondly, during the search, the logic of regional search is introduced to accelerate the convergence of the algorithm; in addition, when using the expectation maximization method for iterative optimization, a curve constraint term is introduced in the Q function, so that the distance between adjacent trajectory points can be guaranteed not to be too large, thereby improving the accuracy of the optimization.
[0144] Corresponding to the aforementioned embodiment of a robot welding trajectory correction method, the present application also provides an embodiment of a robot welding trajectory correction device.
[0145] The embodiment of the robot welding trajectory correction device of the present application can be applied to the robot welding trajectory correction device. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the robot welding trajectory correction device in which it is located reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 8 As shown in the figure, it is a hardware structure diagram of the robot welding trajectory correction device where the robot welding trajectory correction device of the present application is located. Figure 9 In addition to the processor, memory, network interface, and non-volatile memory shown, the robot welding trajectory correction device in which the device is located in the embodiment can generally include other hardware according to the actual function of the robot welding trajectory correction device, which will not be described in detail.
[0146] Figure 10 This is a structural diagram of the first embodiment of the robot welding trajectory correction device provided by this application. Figure 10 The device provided in this embodiment includes an acquisition module 1010, a determination module 1020, a processing module 1030 and a compensation module 1040; wherein,
[0147] The acquisition module 1010 is configured to acquire a plurality of laser stripe images of the weldment; wherein the plurality of laser stripe images are acquired by a camera mounted at the end of the robot when a laser sensor mounted at the end of the robot moves a laser stripe pattern on the weldment according to an equidistant movement principle;
[0148] The determining module 1020 is configured to determine a target trajectory consisting of a plurality of target weld points on the weldment based on the plurality of laser stripe images based on a dynamic region of interest search method;
[0149] The processing module 1030 is configured to remove outliers on the target trajectory based on continuity and connectivity characteristics between discrete points on the trajectory, and reconstruct the target trajectory after removing the outliers using a Poisson reconstruction method to obtain a reconstructed trajectory;
[0150] The processing module 1030 is configured to perform registration based on the WTo-CPD algorithm, using a point set discretized according to a preset distance from an offline trajectory predetermined for the weldment as a source point set and a point set included in the reconstructed trajectory as a target point set, to obtain a displacement vector corresponding to each source point in the source point set; wherein the source point set is a dense point set and the target point set is a sparse point set;
[0151] The determination module 1020 is configured to determine, for each source point, whether to correct the displacement vector based on a predetermined error pattern of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error pattern is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; and the error pattern is obtained based on statistical analysis of multiple registration tests;
[0152] The compensation module 1040 is used to align the source point according to the displacement vector corresponding to the source point when it is determined that the source point does not need to be corrected, so as to obtain the correction point of the source point. When it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
[0153] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0154] Please continue to refer to Figure 9 The present application also provides a robot welding trajectory correction device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0155] The present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods provided in the present application when the program is executed by a processor.
[0156] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0157] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0158] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A robot welding trajectory correction method, characterized in that: The method comprises: Acquiring multiple laser stripe images of the weldment; wherein the multiple laser stripe images are multiple images captured by a camera mounted on the end of a robot when a laser sensor mounted on the end of the robot moves a laser stripe pattern on the weldment according to an equidistant movement principle; Based on a dynamic region of interest search method, determining a target trajectory consisting of a plurality of target weld points on the weldment according to the plurality of laser stripe images; Based on the continuity and connectivity characteristics between the discrete points on the trajectory, outliers on the target trajectory are removed, and the target trajectory after the outliers are removed is reconstructed using a Poisson reconstruction method to obtain a reconstructed trajectory; Based on the WTo-CPD algorithm, a point set discretized according to a preset distance of an offline trajectory predetermined for the weldment is used as a source point set, and a point set included in the reconstructed trajectory is used as a target point set for registration, and a displacement vector corresponding to each source point in the source point set is obtained; wherein the source point set is a dense point set, and the target point set is a sparse point set; For each source point, determining whether to correct the displacement vector based on a predetermined error pattern of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error pattern is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; the error pattern is obtained based on statistical analysis of multiple registration tests; When it is determined that the source point does not need to be corrected, the source point is aligned according to the displacement vector corresponding to the source point to obtain the correction point of the source point. When it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
2. The method according to claim 1, characterized in that The method of compensating the registration point by using the error rule to obtain a correction point of the source point includes: A transformation matrix for the welding gun posture transformation is constructed based on the displacement vector of the source point and the error law, and the registration point of the source point is compensated based on the transformation matrix to obtain a correction point of the source point; wherein the transformation matrix is as follows: β=atan2(e n ,l end ); Wherein, T is the transformation matrix; The e n is the error corrected by the pose transformation of the source point; The β is the angle between the z-axis of the initial end coordinate system before the welding gun rotates and the z-axis of the final end coordinate system after the welding gun rotates; The α is the angle between the displacement vector of the source point and the y-axis of the initial end coordinate system; The cl is the confidence level of the error rule, and the cl is a preset value; The |t n | is the modulus of the displacement vector corresponding to the source point; The |t st | is the modulus of the displacement vector corresponding to the position point where the offline trajectory enters the extreme value; The l end is the distance between the end of the welding gun and the end of the robotic arm; The e max and e0 are respectively the maximum error value and the minimum error value corresponding to when the modulus of the translation vector indicated by the error rule reaches an extreme value; The e reg,n is the registration error of the source point calculated based on the error law.
3. The method according to claim 1, characterized in that Based on the WTo-CPD algorithm, the point set discretized according to the preset distance of the offline trajectory predetermined for the weldment is used as the source point set, and the point set contained in the reconstructed trajectory is used as the target point set for registration to obtain the displacement vector corresponding to each source point, including: A probability model is constructed based on the source point set and the target point set to obtain a cost function of the probability model; wherein, in the process of constructing the probability model, the source point set is regarded as a mixture model with a Gaussian distribution, and the target point set is regarded as an expected value of the Gaussian distribution; Constructing a mathematical transformation model; wherein the mathematical transformation model is used to describe the process of aligning the source point set to the target point set; For each source point, the cost function is iteratively optimized using the expectation maximization algorithm, and when the iteration condition terminates, the displacement vector corresponding to the source point is obtained; the Q function in the maximization step of the expectation maximization algorithm is the third formula; The probability density function of the Gaussian distribution is represented by a first formula, which is: Wherein, the p(x' n ) is the point x' n The probability distribution of point x' n The probability of appearing in the target point set; P(m) is the probability distribution of the mth point in the source point set, indicating the possibility of the mth point in the source point set being the matching reference point; p(x' n |m) is the point x' given the mth point n The conditional probability density distribution indicates that under the reference of the mth source point, the target point x' n The matching probability density is: N is the number of target points; M is the number of source points; ω is the weight of the uniform distribution function; The cost function is a second formula, which is: Wherein, θ is the displacement vector of the point; σ 2 is the noise error variance of the point; the W fk is the weight corresponding to each point; The third formula is: Wherein, the Q(θ,σ 2 ) is the objective function for evaluating the matching quality of the source point and the target point; old is the conditional probability distribution calculated in the previous iteration; the W def is the weight matrix composed of the weights corresponding to each point; is the curve constraint term; α is the penalty coefficient; wi is the displacement vector obtained in the i-th iteration; x n is the nth target point in the target point set; the y m represents the mth source point in the source point set; the τ(y m ,θ) means that under the transformation parameter θ, the source point y m The transformed result after applying the transformation parameters.
4. The method according to claim 3, characterized in that The iterative optimization of the cost function using the expectation maximization algorithm includes: For each target point, determine a matching range corresponding to the target point according to a first number M of source points included in the source point set, a second number K of target points included in the target point set, and a position of the target point; When iteratively optimizing the cost function using the expectation method, performing search optimization based on the matching range; The matching range is determined according to the following formula: Wherein, m is the matching range; The Mp is the scaling reference; The k is a preset scaling factor; The n is the number of the target point; The iterative formula used in the expectation step of the expectation maximization algorithm is the fourth formula; the fourth formula is: Among them, the P old (m|x n ) represents the point x in the given target point set obtained by calculation in the previous iterative process n In the case of , the probability that the point matches the mth point in the source point set; the x n is the nth target point in the target point set; the y m is the mth source point in the source point set; the θ old is the transformation parameter calculated in the previous iterative process; old is the variance calculated in the previous iteration; the τ(y m ,θ old ) represents the transformation parameter θ old Next, the source point y m The transformation result after applying the transformation parameters; D is the dimension of the point; c is the normalization factor of the probability density function of the Gaussian distribution.
5. The method according to claim 3 or 4, characterized in that The offline trajectory includes a pre-divided smooth area and a non-smooth area; the mathematical transformation model includes a first weight matrix corresponding to the smooth area and a second weight matrix corresponding to the non-smooth area; each weight value of the second weight matrix is greater than each weight value of the second weight matrix; For each source point, iteratively optimizing the cost function using an expectation maximization algorithm includes: When the source point is in a smooth area, processing is performed according to the first weight matrix; when the source point is in a non-smooth area, processing is performed according to the second weight matrix.
6. The method according to claim 1, characterized in that The method based on the dynamic region of interest search determines a target trajectory consisting of a plurality of target weld points on the weldment according to the plurality of laser stripe images, including: The first laser stripe image is used as the initial laser stripe image, and based on the currently known weld position points, the position of the next weld position point on the laser stripe pattern in the initial laser stripe image is predicted, the predicted point corresponding to the next position is obtained, and the region of interest is drawn with the predicted point as the center; Calculating the sum of the grayscale values of each row of pixels in the region of interest to obtain the sum value of each row of pixels, and determining the retained point corresponding to the laser stripe image based on the sum value of each row of pixels; wherein the direction indicated by the row is perpendicular to the length direction of the laser stripe pattern; when the sum value of a row of pixels is less than or equal to the weld width of the weldment, the laser stripe point of the laser stripe pattern on the row of pixels is the retained point; According to the distance between each reserved point and the predicted point, the reserved point closest to the predicted point is determined as the initial weld point corresponding to the next position; Using the next laser stripe image of the initial laser stripe image as the initial laser stripe image, and again performing the step of predicting the position of the next weld position point on the laser stripes in the initial laser stripe image based on the currently known weld position point; Selecting a reserved point for each laser stripe image from the reserved points corresponding to the laser stripe image as the final weld position point of the laser stripe image, so that the trajectory formed by the final weld position points of all laser stripe images is a continuous trajectory; The trajectory formed by the final weld position points of all laser stripe images is determined as the target trajectory.
7. The method according to claim 6, characterized in that Drawing the region of interest with the predicted point as the center includes: Determine and draw the region of interest according to the following formula: Wherein, k1 is the number of noise points contained in the previous region of interest, and (x p ,y p ) is the coordinate value of the predicted point corresponding to the next weld position point, and the x min is the minimum coordinate value of the x-direction range of the region of interest, x max is the maximum coordinate value of the x-direction range of the area of interest, y min is the minimum coordinate value of the y direction range of the area of interest, max The maximum coordinate value of the y-direction range of the region of interest.
8. The method according to claim 1, characterized in that The error rule is: when the modulus of the displacement vector corresponding to the source point is between 0mm and 0.16mm, the error is controlled between 0 and 0.05mm, and when the modulus of the displacement vector corresponding to the source point reaches an extreme value, the error is controlled between 0.06 and 0.
1.
9. A robot welding trajectory correction device, characterized in that: The device includes an acquisition module, a determination module, a processing module and a compensation module; wherein, The acquisition module is configured to acquire a plurality of laser stripe images of the weldment; wherein the plurality of laser stripe images are acquired by a camera mounted at the end of the robot when a laser sensor mounted at the end of the robot moves a laser stripe pattern on the weldment according to an equidistant movement principle; The determination module is configured to determine a target trajectory consisting of a plurality of target weld points on the weldment based on the plurality of laser stripe images based on a dynamic region of interest search method; The processing module is configured to remove abnormal points on the target trajectory based on continuity characteristics and connectivity characteristics between discrete points on the trajectory, and reconstruct the target trajectory after the abnormal points are removed using a Poisson reconstruction method to obtain a reconstructed trajectory; The processing module is configured to perform registration based on the WTo-CPD algorithm, using a point set discretized according to a preset distance of an offline trajectory predetermined for the weldment as a source point set and a point set included in the reconstructed trajectory as a target point set, to obtain a displacement vector corresponding to each source point in the source point set; wherein the source point set is a dense point set and the target point set is a sparse point set; The determination module is configured to determine, for each source point, whether to correct the displacement vector based on a predetermined error law of the WTo-CPD algorithm and the modulus of the displacement vector corresponding to the source point; wherein the error law is used to characterize the correlation between the modulus of the displacement vector corresponding to the source point and the registration error; and the error law is obtained based on statistical analysis of multiple registration tests; The compensation module is used to align the source point according to the displacement vector corresponding to the source point when it is determined that the source point does not need to be corrected, so as to obtain the correction point of the source point; when it is determined that the source point needs to be corrected, the source point is aligned according to the displacement vector corresponding to the source point, and the alignment point is compensated using the error law to obtain the correction point of the source point.
10. A robot welding trajectory correction device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 8 when executing the program.
Citation Information
Patent Citations
Welding robot track offline programming batch correction method
CN112091967A
Multi-section welding seam track correction method based on offline programming software
CN112847353A
Robot welding-based curve track locating method and system
CN115488503A
Laser welding system control method for metal fittings
CN119525722A
Active laser vision weld tracking system and weld position detecting method
WO2020020113A1
Cited By
Abnormality early warning method and system for laser welding wire feeder based on image recognition
CN121527061A