Pipe flattening method, device, electronic equipment and storage medium

By using line laser sensor scanning and point cloud processing, the pipe leveling angle is determined, and the pipe is controlled to rotate in the opposite direction, which solves the problem of low pipe leveling efficiency in the existing technology and realizes a highly efficient and simplified leveling process.

CN119657697BActive Publication Date: 2025-10-24SHANGHAI BOCHU ELECTRONIC TECH CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411971911.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-10-24
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In existing technologies, pipe leveling methods are inefficient, requiring the cutting head to be raised multiple times to follow the pipe surface to obtain height values ​​and to repeatedly perform lateral movements, resulting in complex operations.

Method used

By using a line laser sensor to scan the pipe and obtain point cloud data, the leveling angle is determined through data processing and line fitting. The pipe is then controlled to rotate and level in the opposite direction, simplifying the operation and improving efficiency.

Benefits of technology

There is no need for the cutting head to lift and follow, or for the chuck to rotate repeatedly. The leveling angle is quickly determined by scanning the point cloud of the pipe with a line laser sensor, which simplifies the execution process and improves the leveling efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119657697B_ABST
    Figure CN119657697B_ABST
Patent Text Reader

Abstract

The present application provides a pipe flattening method, device, electronic equipment and storage medium, the method comprises the following steps: determining the flattening angle of the pipe; controlling the pipe to rotate in the opposite direction of the flattening angle, and the rotation angle is the angle value of the flattening angle of the pipe; determining the flattening angle of the pipe after rotation; determining whether the flattening angle is less than the preset angle; when the flattening angle is less than the preset angle, it is determined that the pipe has been flattened; when the flattening angle is greater than or equal to the preset angle, the step of controlling the pipe to rotate in the opposite direction of the flattening angle is triggered, and the rotation angle is the angle value of the flattening angle of the pipe; the flattening angle determination step comprises: scanning the pipe by using a line laser sensor to obtain a first point cloud; data processing is performed on the first point cloud to obtain a second point cloud, and a target straight line is obtained by straight line fitting on the second point cloud; the flattening angle of the pipe is determined according to the target straight line, the execution action of pipe flattening is simplified, and the flattening efficiency of pipe flattening is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of laser processing technology, and in particular to a pipe leveling method, device, electronic equipment and storage medium. Background Art

[0002] When processing a pipe, the pipe is clamped on a chuck, and the chuck needs to be rotated so that the pipe surface remains parallel to the horizontal plane of the machine tool.

[0003] At present, the method of pipe leveling includes capacitor leveling; the steps of capacitor leveling include: 1. Clamp the pipe to be leveled with a chuck; 2. Rotate the chuck so that the surface to be leveled faces upward, so that the cutting head of the laser cutter can follow the pipe surface and obtain the following height value; 3. Set two detection points on the plane to be leveled according to the cross-sectional parameters of the pipe; 4. Plan the movement of the cutting head, move it above the points to be detected, make the cutting head follow vertically to the pipe surface, obtain the height value, and record the lateral movement distance of the two detection points at the same time; 5. Calculate the angle to be leveled based on the height difference and the lateral movement distance; if the angle meets the leveling threshold, it indicates that the leveling is successful; otherwise, rotate the chuck according to the calculated leveling angle to complete the leveling action; continue to perform the operation in step 4 until the conditions for successful leveling are met.

[0004] However, capacitive leveling requires the cutting head to be raised repeatedly to follow the pipe surface to obtain the height value, and then repeatedly perform lateral movements to determine the lateral distance to level the pipe. This complex operation results in low pipe leveling efficiency. Therefore, how to improve pipe leveling efficiency is currently an urgent problem to be solved. Summary of the Invention

[0005] The present invention provides a pipe leveling method, device, electronic device and storage medium, which can solve the problem that capacitive leveling requires the cutting head to be lifted up multiple times to follow the pipe surface to obtain the height value, repeatedly perform lateral movement to determine the lateral distance, and then level the pipe, which results in complex execution and low pipe leveling efficiency.

[0006] According to a first aspect of the present invention, a pipe flattening method is provided, the method comprising:

[0007] executing a leveling angle determination step to obtain a leveling angle of the pipe;

[0008] Controlling the pipe to rotate in the opposite direction of the leveling angle, where the rotation angle is the angle value of the leveling angle of the pipe;

[0009] executing a leveling angle determination step to obtain a leveling angle of the pipe after rotation;

[0010] determining whether the leveling angle is less than the preset angle;

[0011] determine that the pipe has been flattened when the flattening angle is less than the preset angle;

[0012] trigger the step of controlling the pipe to rotate in the opposite direction of the flattening angle by an angle value of the flattening angle of the pipe when the flattening angle is greater than or equal to the preset angle;

[0013] The step of determining the flattening angle comprises:

[0014] scanning the pipe by using a line laser sensor to obtain a first point cloud;

[0015] performing data processing on the first point cloud to obtain a second point cloud, and performing straight line fitting on the second point cloud to obtain a target straight line;

[0016] determining the flattening angle of the pipe according to the target straight line.

[0017] According to a second aspect of the present application, a pipe flattening device is provided, which comprises:

[0018] a first execution module for executing the step of determining the flattening angle to obtain the flattening angle of the pipe;

[0019] a pipe rotation module for controlling the pipe to rotate in the opposite direction of the flattening angle by an angle value of the flattening angle of the pipe;

[0020] a second execution module for executing the step of determining the flattening angle to obtain the flattening angle of the pipe after rotation;

[0021] a first determination module for determining whether the flattening angle is less than the preset angle;

[0022] a second determination module for determining that the pipe has been flattened when the flattening angle is less than the preset angle;

[0023] a triggering module for triggering the step of controlling the pipe to rotate in the opposite direction of the flattening angle by an angle value of the flattening angle of the pipe when the flattening angle is greater than or equal to the preset angle;

[0024] The step of determining the flattening angle comprises:

[0025] scanning the pipe by using a line laser sensor to obtain a first point cloud;

[0026] performing data processing on the first point cloud to obtain a second point cloud, and performing straight line fitting on the second point cloud to obtain a target straight line;

[0027] determining the flattening angle of the pipe according to the target straight line.

[0028] According to a third aspect of the present application, an electronic device is provided, comprising a processor and a memory,

[0029] the memory, configured to store codes and related data;

[0030] the processor, configured to execute the codes in the memory to implement the pipe straightening method according to any of the embodiments of the present application.

[0031] According to a fourth aspect of the present application, a storage medium is provided, which stores a computer program executable by a processor to implement the pipe straightening method according to any of the embodiments of the present application.

[0032] In the embodiments of the present application, the step of determining the straightening angle of the pipe is performed to obtain the straightening angle of the pipe; the pipe is controlled to rotate in the opposite direction of the straightening angle by an angle value of the straightening angle of the pipe; the step of determining the straightening angle of the pipe is performed again to obtain the straightening angle of the pipe after rotation; it is determined whether the straightening angle is less than a preset angle; when the straightening angle is less than the preset angle, it is determined that the pipe has been straightened; when the straightening angle is greater than or equal to the preset angle, the step of controlling the pipe to rotate in the opposite direction of the straightening angle by an angle value of the straightening angle of the pipe is triggered; wherein the step of determining the straightening angle of the pipe comprises: scanning the pipe by a line laser sensor to obtain a first point cloud; performing data processing on the first point cloud to obtain a second point cloud, and performing straight line fitting on the second point cloud to obtain a target straight line; and determining the straightening angle of the pipe according to the target straight line. That is, the first point cloud of the pipe is obtained by scanning the pipe by a line laser sensor, the second point cloud is obtained by performing data processing on the first point cloud, the target straight line is obtained by performing straight line fitting on the second point cloud, and the straightening angle of the pipe is determined according to the target straight line, and then the pipe is controlled to rotate in the opposite direction of the straightening angle. When the straightening angle is less than the preset angle, it is determined that the pipe has been straightened, and there is no need to lift the cutting head to follow the surface of the pipe and repeatedly perform the transverse movement, nor is there a need to repeatedly rotate the chuck. Only the point cloud of the pipe is obtained by scanning the pipe by a line laser sensor, and the straightening angle of the pipe is quickly determined according to the target straight line fitted by the point cloud, and finally the pipe is controlled to rotate in the opposite direction of the straightening angle to straighten the pipe. The execution action of pipe straightening is simplified, the straightening efficiency of pipe straightening is improved, and the accuracy of pipe straightening is improved. BRIEF DESCRIPTION OF DRAWINGS

[0033] In order to make the technical solutions of the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only need to be some embodiments of the present application, and other drawings can be obtained by those of ordinary skill in the art without any creative effort.

[0034] Figure 1 is a flowchart of a pipe flattening method provided by an embodiment of the present application;

[0035] Figure 2 is an installation diagram of a line laser sensor provided by an embodiment of the present application;

[0036] Figure 3 is a flowchart of a step of determining a flattening angle in the pipe flattening method provided by an embodiment of the present application;

[0037] Figure 4 is a diagram of a chamfer point cloud provided by an embodiment of the present application;

[0038] Figure 5 is a diagram of a discrete point cloud provided by an embodiment of the present application;

[0039] Figure 6 is a diagram of a pipe flattening method provided by an embodiment of the present application;

[0040] Figure 7 is a structural diagram of a pipe flattening device provided by an embodiment of the present application;

[0041] Figure 8 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions of the embodiments of the present application will be described clearly and completely in the following with reference to the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without any creative effort belong to the scope of protection of the present application.

[0043] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application, and above-described drawings, if any, are used to distinguish between similar objects and are not necessarily used to describe a particular sequential or chronological order. It is to be understood that the use of the terms so

[0044] The technical solutions of the present application will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes can not be described in some examples.

[0045] Figure 1 is a flowchart of a pipe flattening method provided by an embodiment of the present application, which can be performed by a pipe flattening device that can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example, with reference to Figure 1 The method can specifically include the following steps:

[0046] Step 101, a flattening angle of the pipe is determined by performing a flattening angle determining step.

[0047] The flattening angle can be understood as the included angle between the pipe surface and the machining plane of the machine tool; the flattening angle can include an angle value and an angle direction, and the angle direction can include a first direction in which the initial edge of the flattening angle rotates to the terminal edge of the flattening angle, and a second direction in which the terminal edge of the flattening angle rotates to the initial edge of the flattening angle. In the field of machine tool machining, the vertical direction of the cutting head is generally defined as the Z axis, the forward and backward movement direction of the cutting head is the X axis, and the left and right movement axis of the cutting head is the Y axis. In the embodiment of the present application, since the target straight line is parallel to the pipe surface, the profile of the pipe surface is parallel to the X axis, therefore, the initial edge can be understood as the edge of the flattening angle parallel to the X axis, and the terminal edge can be understood as the edge of the flattening angle not parallel to the X axis.

[0048] In step 101, the flattening angle determining step can include: scanning the pipe by a line laser sensor to obtain a first point cloud, performing data processing on the first point cloud to obtain a second point cloud, and performing straight line fitting on the second point cloud to obtain a target straight line, and determining the flattening angle of the pipe according to the target straight line.

[0049] The first point cloud can be understood as a point cloud of a pipe profile obtained by scanning the pipe with a line laser sensor. The data processing can include, but is not limited to, center line extraction, coordinate conversion, filtering and other processing operations. The second point cloud can be understood as a point cloud obtained by data processing on the first point cloud. The target straight line can be understood as a fitting straight line parallel to the pipe surface obtained by straight line fitting on the second point cloud.

[0050] In an optional embodiment, as shown in FIG. 1, the line laser sensor can be installed at a fixed position near the cutting head and moves with the cutting head. In the embodiment of the present application, the line laser sensor can be moved to a position in the middle of the pipe surface of the pipe to be straightened, so that the laser line of the line laser sensor can irradiate on the pipe surface, and the camera can collect the point cloud of the pipe surface. The pipe can be controlled to rotate by a preset rotation angle, and in the process of pipe rotation, the first point cloud can be obtained by scanning the pipe with the line laser sensor and collecting the point cloud of the pipe surface with the camera of the line laser sensor. Figure 2

[0051] Since the first point cloud obtained by scanning the pipe with the line laser sensor is a light and dark distinguished point cloud, and straight line fitting needs to perform straight line fitting on the point cloud in the brightest area; and the first point cloud is in the camera coordinate system, and the pipe straightening needs to determine the straightening angle of the pipe in the machine tool coordinate system, therefore, in an optional embodiment, the center line of the first point cloud can be extracted to obtain a first intermediate point cloud, and the first intermediate point cloud can be subjected to coordinate conversion to obtain a second intermediate point cloud, the coordinates of the second intermediate point cloud belong to the machine tool coordinate system, so that the straightening angle of the pipe can be determined in the machine tool coordinate system. The first intermediate point cloud can be understood as a point cloud obtained by center line extraction on the first point cloud. The second intermediate point cloud can be understood as a point cloud in the machine tool coordinate system obtained by coordinate conversion on the first intermediate point cloud.

[0052] Since the first point cloud obtained by scanning the pipe with the line laser sensor is a light and dark distinguished point cloud, and straight line fitting needs to perform straight line fitting on the point cloud in the brightest area; and the first point cloud is in the camera coordinate system, and the pipe straightening needs to determine the straightening angle of the pipe in the machine tool coordinate system, therefore, in an optional embodiment, the center line of the first point cloud can be extracted to obtain a first intermediate point cloud, and the first intermediate point cloud can be subjected to coordinate conversion to obtain a second intermediate point cloud, the coordinates of the second intermediate point cloud belong to the machine tool coordinate system, so that the straightening angle of the pipe can be determined in the machine tool coordinate system. The first intermediate point cloud can be understood as a point cloud obtained by center line extraction on the first point cloud. The second intermediate point cloud can be understood as a point cloud in the machine tool coordinate system obtained by coordinate conversion on the first intermediate point cloud.

[0053] ​Since the target straight line is parallel to the surface of the pipe, the angle between the target straight line and the machining plane of the machine tool, i.e. the angle between the pipe and the machining plane of the machine tool, and thus the direction vector of the target straight line can be determined in an optional embodiment; the flattening angle of the pipe is determined according to the direction vector, so that the cutting head does not need to be lifted to follow the surface of the pipe and the transverse movement is not needed to be repeatedly performed, and the chuck does not need to be repeatedly rotated, only the point cloud of the pipe is obtained by scanning the pipe by using the line laser sensor, and the flattening angle of the pipe can be quickly determined according to the target straight line fitted by the point cloud, so that the execution action of the pipe flattening is simplified, and the flattening efficiency of the pipe flattening is improved.

[0054] In step 102, the pipe is controlled to rotate in the opposite direction of the flattening angle, and the rotation angle is the angle value of the flattening angle of the pipe.

[0055] The opposite direction can be understood as the second direction in which the terminal side of the flattening angle is rotated to the initial side of the flattening angle.

[0056] In an optional embodiment, the chuck clamping the pipe can be controlled to rotate in the second direction in which the terminal side of the flattening angle is rotated to the initial side of the flattening angle, and the rotation angle is the angle value of the flattening angle of the pipe, so that the initial side and the terminal side of the flattening angle coincide, the pipe is rotated in the opposite direction of the flattening angle, and the rotation angle is the angle value of the flattening angle of the pipe, so that the cutting head does not need to be lifted to follow the surface of the pipe and the transverse movement is not needed to be repeatedly performed, only the point cloud of the pipe is obtained by scanning the pipe by using the line laser sensor, and the flattening angle of the pipe can be quickly determined according to the target straight line fitted by the point cloud, and finally the chuck is controlled to rotate the pipe in the opposite direction of the flattening angle to flatten the pipe, so that the execution action of the pipe flattening is simplified, and the flattening efficiency of the pipe flattening is improved.

[0057] In another optional embodiment, the chuck can also be controlled to temporarily not clamp the pipe, the pipe is rotated in the second direction in which the terminal side of the flattening angle is rotated to the initial side of the flattening angle by means of a rotating device, and the rotation angle is the angle value of the flattening angle of the pipe, and then the chuck is controlled to clamp the flattened pipe.

[0058] In step 103, the flattening angle of the pipe after rotation is determined by executing the step of determining the flattening angle.

[0059] In step 104, it is determined whether the flattening angle is less than a preset angle, if yes, step 105 is executed, and if no, step 102 is returned to be executed.

[0060] In the embodiment of the present application, it is determined whether the flattening angle after the rotation of the pipe is less than the preset angle; when the flattening angle is less than the preset angle, it is determined that the pipe has been flattened; when the flattening angle is greater than or equal to the preset angle, the pipe is controlled to rotate in the opposite direction of the flattening angle, and the flattening angle is determined again to obtain the flattening angle of the pipe. In this way, the determination process of the flattening angle and the pipe flattening action can be repeated and iterated. When the flattening angle is less than the preset angle, that is, when the pipe meets the flattening condition, it is determined that the pipe has been flattened. When the flattening angle is greater than or equal to the preset angle, that is, when the pipe is controlled to rotate in the opposite direction of the flattening angle and the ideal pipe flattening effect is not achieved, the flattening angle of the pipe is determined again, and the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe, thereby improving the accuracy of pipe flattening.

[0061] Step 105, determining that the pipe has been flattened.

[0062] In the embodiment of the present application, the first point cloud of the pipe is obtained by scanning the pipe with a line laser sensor, the second point cloud is obtained by data processing the first point cloud, and the target straight line is obtained by straight line fitting the second point cloud. The flattening angle of the pipe is determined according to the target straight line, and then the pipe is controlled to rotate in the opposite direction of the flattening angle. When the flattening angle is less than the preset angle, it is determined that the pipe has been flattened, and there is no need to lift the cutting head to follow the pipe surface and repeatedly perform the horizontal movement, nor is there a need to repeatedly rotate the chuck. Only the point cloud of the pipe is obtained by scanning the pipe with a line laser sensor, and the flattening angle of the pipe is quickly determined according to the target straight line fitted by the point cloud. Finally, the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe. The execution action of pipe flattening is simplified, and the flattening efficiency of pipe flattening is improved. When the flattening angle after the rotation of the pipe is greater than or equal to the preset angle, that is, when the pipe is controlled to rotate in the opposite direction of the flattening angle for the first time and the ideal pipe flattening effect is not achieved, the point cloud of the pipe is obtained again by scanning the pipe with a line laser sensor, the flattening angle of the pipe is determined again according to the point cloud, and the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe. That is, the determination process of the flattening angle and the pipe flattening action are repeated and iterated until the flattening angle after the rotation of the pipe is less than the preset angle, that is, until the pipe meets the flattening condition, it is determined that the pipe has been flattened. The accuracy of pipe flattening is improved.

[0063] The determination of the flattening angle in the pipe flattening method provided by the embodiment of the present application will be further described below. As shown in Figure 3 Figure 3 is a flowchart of the determination of the flattening angle in the pipe flattening method provided by the embodiment of the present application. Specifically, the method can include the following steps:

[0064] Step 201, obtaining the first point cloud by scanning the pipe with a line laser sensor.

[0065] Step 202, extracting the center line of the first point cloud to obtain the first intermediate point cloud. ​

[0066] Step 203, coordinate conversion is performed on the first intermediate point cloud to obtain a second intermediate point cloud.

[0067] In an optional embodiment, pixel coordinates of the first intermediate point cloud, a calibration matrix and a distortion matrix of the camera can be obtained, and the first intermediate point cloud is subjected to coordinate conversion according to the pixel coordinates of the first intermediate point cloud, the calibration matrix and the distortion matrix of the camera to obtain the second intermediate point cloud in the machine tool coordinate system.

[0068] Specifically, the pixel coordinates of each point in the first intermediate point cloud, the calibration matrix and the distortion matrix of the camera can be multiplied respectively to obtain the second intermediate point cloud.

[0069] Step 204, filtering is performed on the second intermediate point cloud to obtain a second point cloud.

[0070] The filtering operation can include, but is not limited to, any one of median filtering, smoothing filtering and radius filtering. Median filtering is a nonlinear smoothing technique, which sets the gray value of each pixel point as the median value of the gray values of all pixel points in a certain neighborhood window of the point. Smoothing filtering is a low-frequency enhancement spatial domain filtering technique; spatial domain smoothing filtering generally uses a simple average method, that is, the average brightness value of adjacent pixel points is calculated. The size of the neighborhood is directly related to the smoothing effect, and the larger the neighborhood, the better the smoothing effect. However, if the neighborhood is too large, the edge information will be lost, and the output image will become blurred, so the size of the neighborhood needs to be reasonably selected. Radius filtering is a radius outlier removal technique.

[0071] In an optional embodiment, if there are many outliers and noise points in the second intermediate point cloud, median filtering and / or smoothing filtering can be selected, so that the outliers and noise points existing in the second intermediate point cloud can be removed, the influence of the outliers and noise points on the straight line fitting is reduced, and the accuracy of the straight line fitting is improved. If the second intermediate point cloud is not smooth enough, radius filtering can be selected to increase the smoothness of the second intermediate point cloud, reduce the influence of the outliers and noise points on the straight line fitting, and improve the accuracy of the straight line fitting.

[0072] Step 205, straight line fitting is performed on the second point cloud to obtain a target straight line.

[0073] In order to improve the fitting accuracy of the target straight line, the influence of the chamfer point cloud at the chamfer of the pipe material and the discrete point cloud of some discrete points not deleted in the filtering stage on the fitting accuracy of the straight line needs to be reduced to the greatest extent. Therefore, in an optional embodiment, the second point cloud can be subjected to straight line fitting to obtain an initial straight line; a distance threshold value is obtained, and the to-be-deleted point cloud is determined according to the distance threshold value and the initial straight line; the to-be-deleted point cloud is deleted from the second point cloud to obtain a target point cloud, and the target point cloud is subjected to straight line fitting to obtain a target straight line. In this way, the initial straight line obtained through the initial straight line fitting and the distance threshold value can be used to delete the chamfer point cloud at the chamfer of the pipe material and the discrete point cloud of some discrete points not deleted in the filtering stage, so as to reduce the influence of the chamfer point cloud and the discrete point cloud on the fitting accuracy of the target straight line and improve the fitting accuracy of the target straight line. The to-be-deleted point cloud can be understood as a point cloud existing in the second point cloud and having an influence on the fitting accuracy of the target straight line. The to-be-deleted point cloud can include but is not limited to the chamfer point cloud and the discrete point cloud. The distance threshold value can include a first threshold value and a second threshold value. The first threshold value can be understood as a preset distance threshold value between the point cloud at the chamfer and the initial straight line. The second threshold value can be understood as a preset distance threshold value between the point cloud near the fitting straight line and the initial straight line.

[0074] Specifically, the chamfer point cloud can be determined according to the second point cloud, the first threshold value and the initial straight line; the second threshold value is set, and the discrete point cloud is determined according to the second point cloud, the second threshold value and the initial straight line; and the chamfer point cloud and the discrete point cloud are determined as the to-be-deleted point cloud. In this way, the point cloud in the second point cloud that has an influence on the fitting accuracy of the target straight line can be deleted according to different distance threshold values, the fitting accuracy of the target straight line is improved, the accuracy of the direction vector of the determined target straight line is further improved, and thus the accuracy of the flattening angle of the pipe material determined according to the direction vector is improved.

[0075] Further, since the pipe has two chamfers on the left and right sides, the left and right points belonging to the points inside the initial straight line can be determined on the initial straight line, then the point cloud left to the left point is screened from the second point cloud according to the left point, the point cloud right to the right point is screened from the second point cloud according to the right point, and finally the point cloud at the left chamfer is determined according to the first threshold, the left point and the point cloud left to the left point, and the point cloud at the right chamfer is determined according to the first threshold, the right point and the point cloud right to the right point. Therefore, in an optional embodiment, the first coordinate and the second coordinate of the initial straight line can be determined; the first candidate point cloud on the left side of the first coordinate and the second candidate point cloud on the right side of the second coordinate are screened from the second point cloud; the first chamfer point cloud is determined according to the first threshold, the first coordinate and the first candidate point cloud; the second chamfer point cloud is determined according to the first threshold, the second coordinate and the second candidate point cloud; and the first chamfer point cloud and the second chamfer point cloud are determined as the chamfer point cloud. Wherein, the first coordinate can be understood as the coordinate of the left point of the initial straight line, and the second coordinate can be understood as the coordinate of the right point of the initial straight line. The first candidate point cloud can be understood as the point cloud of the points on the left side of the first coordinate in the second point cloud. The second candidate point cloud can be understood as the point cloud of the points on the left side of the second coordinate in the second point cloud.

[0076] Since each point in the discrete point cloud has a certain distance from the initial straight line, the discrete point cloud can be determined according to the distance between each point in the second point cloud and the initial straight line. That is, the third distance between each point in the second point cloud and the initial straight line can be determined; the point cloud composed of the points in the second point cloud with the third distance greater than the second threshold is determined as the discrete point cloud, so that the point cloud of the points not belonging to the points inside the initial straight line in the second point cloud can be deleted, the influence of the discrete point cloud on the fitting accuracy of the target straight line can be reduced, and the fitting accuracy of the target straight line can be improved. Wherein, the third distance can be understood as a preset distance threshold between each point in the second point cloud and the initial straight line.

[0077] Further, the first coordinate and the second coordinate of the initial straight line can be determined, the coordinate of a point corresponding to the minimum coordinate value on the preset axis among the plurality of points on the initial straight line can be determined as the first coordinate, the coordinate of a point corresponding to the maximum coordinate value on the preset axis among the plurality of points on the initial straight line can be determined as the second coordinate, or a detection frame corresponding to the initial straight line can be obtained, a point on the initial straight line located on the left boundary line of the detection frame can be determined as the first coordinate, and a point on the initial straight line located on the right boundary line of the detection frame can be determined as the second coordinate, so that the first coordinate and the second coordinate on the initial straight line can be determined more quickly and accurately, the accuracy of the first coordinate and the second coordinate is improved, and the accuracy of the chamfer point cloud determined according to the first threshold value, the first coordinate, the second coordinate and the second point cloud is further improved. In the field of machine tool machining, the vertical direction of the cutting head is generally defined as the Z axis, the front and back movement direction of the cutting head is the X axis, and the left and right movement axis of the cutting head is the Y axis, and the preset axis can be any one of the X axis, the Y axis and the Z axis. In the embodiment of the present application, since the target straight line is parallel to the pipe surface, the profile of the pipe surface is parallel to the X axis, and therefore the preset axis can be the X axis.

[0078] The first chamfer point cloud can be determined according to the first threshold value, the first coordinate and the first candidate point cloud, which can include determining the first distance between each point in the first candidate point cloud and the first coordinate, and determining the point cloud composed of the points in the first candidate point cloud with the first distance less than the first threshold value as the first chamfer point cloud. The second chamfer point cloud can be determined according to the first threshold value, the second coordinate and the second candidate point cloud, which includes determining the second distance between each point in the second candidate point cloud and the second coordinate, and determining the point cloud composed of the points in the second candidate point cloud with the second distance less than the first threshold value as the second chamfer point cloud, so that the chamfer point cloud and the discrete point cloud in the second point cloud can be determined more accurately, the influence of the chamfer point cloud and the discrete point cloud on the fitting accuracy of the target straight line is reduced, and the fitting accuracy of the target straight line is improved.

[0079] For example, the first distance between each point in the first candidate point cloud and the first coordinate can be determined, the point cloud composed of the points in the first candidate point cloud with the first distance less than the first threshold value can be determined as the first chamfer point cloud, and the second distance between each point in the second candidate point cloud and the second coordinate can be determined, the point cloud composed of the points in the second candidate point cloud with the second distance less than the first threshold value can be determined as the second chamfer point cloud. Figure 4 The coordinate of a point on the initial straight line located on the left boundary line of the detection frame can be determined as the first coordinate, and the coordinate of a point on the initial straight line located on the right boundary line of the detection frame can be determined as the second coordinate, the coordinate of each point and the first coordinate can be substituted into the first distance calculation formula to obtain the first distance, and the point cloud composed of the points in the first candidate point cloud with the first distance less than the first threshold value can be determined as the first chamfer point cloud. The coordinate of each point and the second coordinate can be substituted into the second distance calculation formula to obtain the second distance, and the point cloud composed of the points in the second candidate point cloud with the second distance less than the first threshold value can be determined as the second chamfer point cloud, and the first chamfer point cloud and the second chamfer point cloud are as shown in Figure 4 The first distance calculation formula is:

[0080]

[0081] Wherein, D1 represents the first distance, x1 represents the horizontal coordinate of the first coordinate, y1 represents the vertical coordinate of the first coordinate, z1 represents the vertical coordinate of the first coordinate, x11 represents the horizontal coordinate of each point in the first candidate point cloud, y11 represents the vertical coordinate of each point in the first candidate point cloud, and z11 represents the vertical coordinate of each point in the first candidate point cloud.

[0082] The second distance calculation formula is:

[0083]

[0084] Wherein, D2 represents the second distance, x2 represents the horizontal coordinate of the second coordinate, y2 represents the vertical coordinate of the second coordinate, z2 represents the vertical coordinate of the second coordinate, x22 represents the horizontal coordinate of each point in the second candidate point cloud, y22 represents the vertical coordinate of each point in the second candidate point cloud, and z22 represents the vertical coordinate of each point in the second candidate point cloud.

[0085] Finally, the straight line equation of the initial straight line is determined according to the first coordinate and the second coordinate, and then the third distance D3 between each point in the second point cloud and the initial straight line is determined according to the coordinates of each point in the second point cloud and the straight line equation of the initial straight line. The point cloud composed of the points in the second point cloud with the third distance greater than the second threshold value is determined as the discrete point cloud. For example, Figure 5 The white straight line in the figure is the fitted initial straight line. The third distance D3 between the discrete point 1 and the initial straight line can be determined according to the coordinates of the discrete point 1 and the straight line equation of the initial straight line. If D3 is greater than the second threshold value, it can be determined that Figure 5 The discrete point 1 in the figure does not belong to the initial straight line and belongs to the discrete point cloud.

[0086] Step 206, determine the direction vector of the target straight line.

[0087] Step 207, determine the flattening angle of the pipe according to the direction vector.

[0088] Wherein, the direction vector includes a first component and a second component. In the field of machine tool processing, the vertical direction of the cutting head is generally defined as the Z axis, the forward and backward movement direction of the cutting head is defined as the X axis, and the left and right movement direction of the cutting head is defined as the Y axis. The first component can be the component on the Z axis, and the second component can be the component on the X axis.

[0089] In an optional embodiment, the first component and the second component are substituted into the flattening angle calculation formula of the pipe to obtain the angle value of the flattening angle of the pipe. The angle value calculation formula of the flattening angle of the pipe is:

[0090] angle=arctan(l1 / l2)

[0091] Wherein, angle represents the angle value of the flattening angle of the pipe, l1 represents the first component, and l2 represents the second component.

[0092] In the embodiment of the present application, the linear laser sensor is used to scan the pipe to obtain a first point cloud, a center line of the first point cloud is extracted to obtain a first intermediate point cloud, coordinate conversion is performed on the first intermediate point cloud to obtain a second intermediate point cloud, filtering is performed on the second intermediate point cloud to obtain a second point cloud, straight line fitting is performed on the second point cloud to obtain a target straight line, a direction vector of the target straight line is determined, the flattening angle of the pipe is determined according to the direction vector, without the need of cutting head lifting to follow the pipe surface and repeated horizontal movement, and without the need of chuck repeated rotation, only the point cloud of the pipe is obtained by using the linear laser sensor to scan the pipe, and the flattening angle of the pipe is quickly determined according to the target straight line fitted by the point cloud, so that the determination action of the flattening angle is simplified, the determination efficiency of the flattening angle is improved, so as to control the pipe to rotate in the opposite direction of the flattening angle to flatten the pipe, the execution action of the pipe flattening is simplified, and the flattening efficiency of the pipe flattening is improved.

[0093] The pipe flattening method provided by the embodiment of the present application is further described below with specific examples. Figure 6 is a schematic diagram of the pipe flattening method provided by the embodiment of the present application, as shown in Figure 6 the linear laser sensor is used to scan the pipe to obtain a first point cloud, a center line of the first point cloud is extracted to obtain a first intermediate point cloud, coordinate conversion is performed on the first intermediate point cloud to obtain a second intermediate point cloud, filtering is performed on the second intermediate point cloud to obtain a second point cloud, straight line fitting is performed on the second point cloud to obtain a target straight line, a direction vector of the target straight line is determined, the flattening angle of the pipe is determined according to the direction vector, the pipe is controlled to rotate in the opposite direction of the flattening angle, the rotation angle is the angle value of the flattening angle of the pipe, the linear laser sensor is used again to scan the pipe to obtain a first point cloud, a center line of the first point cloud is extracted to obtain a first intermediate point cloud, coordinate conversion is performed on the first intermediate point cloud to obtain a second intermediate point cloud, filtering is performed on the second intermediate point cloud to obtain a second point cloud, straight line fitting is performed on the second point cloud to obtain a target straight line, a direction vector of the target straight line is determined, the flattening angle of the pipe is determined according to the direction vector, it is determined whether the flattening angle is less than a preset angle, if yes, it is determined that the pipe has been flattened; if no, the pipe is controlled to rotate in the opposite direction of the flattening angle, the rotation angle is the angle value of the flattening angle of the pipe, the flattening angle of the pipe after rotation is determined again, and the pipe is flattened. From Figure 6As can be seen, when the flattening angle of the pipe after rotation is greater than or equal to the preset angle, the pipe is scanned again by the line laser sensor to obtain a point cloud of the pipe, and the flattening angle of the pipe is determined again according to the point cloud, and the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe, that is, after the pipe is controlled to rotate in the opposite direction of the flattening angle for the first time, the determination process of the flattening angle and the flattening action of the pipe are repeated until the flattening angle of the pipe after rotation is less than the preset angle, it is determined that the pipe has been flattened, and it is not necessary to lift the cutting head to the surface of the pipe and repeatedly perform the transverse movement, nor is it necessary to repeatedly rotate the chuck, but only the point cloud of the pipe is obtained by scanning the pipe by the line laser sensor, and the flattening angle of the pipe is quickly determined according to the target straight line fitted by the point cloud, and finally the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe, thereby simplifying the execution action of the pipe flattening, and improving the flattening efficiency and accuracy of the pipe flattening.

[0094] Figure 7 is a structural schematic diagram of a pipe flattening device provided by an embodiment of the present application, which is suitable for executing the pipe flattening method provided by the present application. As shown in the figure, Figure 7 the device can specifically include:

[0095] The first execution module 301 is configured to execute the flattening angle determination step to obtain the flattening angle of the pipe.

[0096] The pipe rotation module 302 is configured to control the pipe to rotate in the opposite direction of the flattening angle, and the rotation angle is the angle value of the flattening angle of the pipe.

[0097] The second execution module 303 is configured to execute the flattening angle determination step to obtain the flattening angle of the pipe after rotation.

[0098] The first determination module 304 is configured to determine whether the flattening angle is less than the preset angle.

[0099] The second determination module 305 is configured to determine that the pipe has been flattened when the flattening angle is less than the preset angle.

[0100] The triggering module 306 is configured to trigger the step of controlling the pipe to rotate in the opposite direction of the flattening angle when the flattening angle is greater than or equal to the preset angle, and the rotation angle is the angle value of the flattening angle of the pipe.

[0101] The flattening angle determination step includes:

[0102] The first point cloud is obtained by scanning the pipe by the line laser sensor.

[0103] The second point cloud is obtained by data processing the first point cloud, and the target straight line is obtained by straight line fitting the second point cloud.

[0104] determine a straightening angle of the pipe according to the target straight line.

[0105] Optionally, the first execution module 301 performs straight line fitting on the second point cloud to obtain a target straight line, including:

[0106] performing straight line fitting on the second point cloud to obtain an initial straight line;

[0107] obtaining a distance threshold, and determining a point cloud to be deleted according to the distance threshold and the initial straight line;

[0108] deleting the point cloud to be deleted from the second point cloud to obtain a target point cloud;

[0109] performing straight line fitting on the target point cloud to obtain the target straight line.

[0110] Optionally, the distance threshold includes a first threshold and a second threshold, and the first execution module 301 determines a point cloud to be deleted according to the distance threshold and the initial straight line, including:

[0111] determining a chamfer point cloud according to the second point cloud, the first threshold and the initial straight line;

[0112] determining a discrete point cloud according to the second point cloud, the second threshold and the initial straight line;

[0113] determining the chamfer point cloud and the discrete point cloud as the point cloud to be deleted.

[0114] Optionally, the first execution module 301 determines a chamfer point cloud according to the second point cloud, the first threshold and the initial straight line, including:

[0115] determining a first coordinate and a second coordinate of the initial straight line;

[0116] screening a first candidate point cloud on the left side of the first coordinate and a second candidate point cloud on the right side of the second coordinate from the second point cloud;

[0117] determining a first chamfer point cloud according to the first threshold, the first coordinate and the first candidate point cloud;

[0118] determining a second chamfer point cloud according to the first threshold, the second coordinate and the second candidate point cloud;

[0119] determining the first chamfer point cloud and the second chamfer point cloud as the chamfer point cloud.

[0120] Optionally, the first execution module 301 determines a first coordinate and a second coordinate of the initial straight line, including:

[0121] determine a coordinate of a point corresponding to a minimum coordinate value on the preset axis among the multiple points on the initial straight line as the first coordinate;

[0122] determine a coordinate of a point corresponding to a maximum coordinate value on the preset axis among the multiple points on the initial straight line as the second coordinate;

[0123] Alternatively, the detection box corresponding to the initial straight line is obtained;

[0124] determine a point on the initial straight line at a left boundary line of the detection box as the first coordinate;

[0125] determine a point on the initial straight line at a right boundary line of the detection box as the second coordinate.

[0126] Optionally, the first execution module 301 determines a first chamfer point cloud according to the first threshold value, the first coordinate, and the first candidate point cloud, including:

[0127] determine a first distance between each point in the first candidate point cloud and the first coordinate;

[0128] determine a point cloud composed of points in the first candidate point cloud with a first distance less than the first threshold value as the first chamfer point cloud;

[0129] determine a second chamfer point cloud according to the first threshold value, the second coordinate, and the second candidate point cloud, including:

[0130] determine a second distance between each point in the second candidate point cloud and the second coordinate;

[0131] determine a point cloud composed of points in the second candidate point cloud with a second distance less than the first threshold value as the second chamfer point cloud.

[0132] Optionally, the first execution module 301 determines a discrete point cloud according to the second point cloud, the second threshold value, and the initial straight line, including:

[0133] determine a third distance between each point in the second point cloud and the initial straight line;

[0134] determine a point cloud composed of points in the second point cloud with a third distance greater than the second threshold value as the discrete point cloud.

[0135] Optionally, the first execution module 301 determines a flattening angle of the pipe according to the target straight line, including:

[0136] determine a direction vector of the target straight line;

[0137] determine a flattening angle of the pipe according to the direction vector.

[0138] Optionally, the direction vector comprises a first component and a second component, and the first execution module 301 determines the flattening angle of the pipe according to the direction vector, comprising:

[0139] substituting the first component and the second component into a flattening angle calculation formula of the pipe to obtain an angle value of the flattening angle of the pipe, and the flattening angle calculation formula of the pipe is:

[0140] angle = arctan (l1 / l2)

[0141] wherein angle represents the angle value of the flattening angle of the pipe, l1 represents the first component, and l2 represents the second component.

[0142] Optionally, the first execution module 301 performs data processing on the first point cloud to obtain a second point cloud, comprising:

[0143] extracting a center line of the first point cloud to obtain a first intermediate point cloud;

[0144] performing coordinate conversion on the first intermediate point cloud to obtain a second intermediate point cloud;

[0145] filtering the second intermediate point cloud to obtain the second point cloud.

[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the above described functional modules can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0147] The pipe flattening device provided by the embodiment of the present application utilizes a line laser sensor to scan the pipe to obtain a first point cloud of the pipe, performs data processing on the first point cloud to obtain a second point cloud, performs straight line fitting on the second point cloud to obtain a target straight line, determines a flattening angle of the pipe according to the target straight line, and then controls the pipe to rotate in the opposite direction of the flattening angle. When the flattening angle is less than a preset angle, it is determined that the pipe has been flattened, and there is no need to lift the cutting head to follow the pipe surface and repeatedly perform the transverse movement, nor is there a need to repeatedly rotate the chuck. Only the line laser sensor is utilized to scan the pipe to obtain a point cloud of the pipe, and the flattening angle of the pipe is quickly determined according to the target straight line fitted through the point cloud. Finally, the pipe is controlled to rotate in the opposite direction of the flattening angle to flatten the pipe. The execution action of pipe flattening is simplified, and the flattening efficiency of pipe flattening is improved. Moreover, when the flattening angle of the pipe after rotation is greater than or equal to the preset angle, that is, the first control of the pipe to rotate in the opposite direction of the flattening angle does not achieve the ideal pipe flattening effect, the line laser sensor is utilized again to scan the pipe to obtain a point cloud of the pipe, and the flattening angle of the pipe is determined again according to the point cloud. The pipe is controlled again to rotate in the opposite direction of the flattening angle to flatten the pipe, that is, the determination process of the flattening angle and the pipe flattening action are repeated and iterated until the flattening angle of the pipe after rotation is less than the preset angle, that is, the pipe meets the flattening condition, and it is determined that the pipe has been flattened. The accuracy of pipe flattening is improved.

[0148] Figure 8 is a structural schematic diagram of an electronic device provided by the embodiment of the present application.

[0149] Please refer to Figure 8 , which provides an electronic device 50, comprising:

[0150] a processor 51; and

[0151] a memory 52 configured to store executable instructions of the processor;

[0152] The processor 51 is configured to execute the above-mentioned method by executing the executable instructions.

[0153] The processor 51 can communicate with the memory 52 through the bus 53.

[0154] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by the processor to implement the above-mentioned method.

[0155] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of straightening a pipe, characterized by, The method comprises: performing a determination of a flattening angle of the pipe to obtain a flattening angle of the pipe, the flattening angle being an included angle between a surface of the pipe and a machining plane of a machine tool; controlling the pipe to rotate in an opposite direction of the flattening angle by an angle value of the flattening angle of the pipe; performing a determination of a flattening angle of the pipe to obtain a flattening angle of the pipe after rotation; determining whether the flattening angle is less than a preset angle; when the flattening angle is less than the preset angle, determining that the pipe has been flattened; when the flattening angle is greater than or equal to the preset angle, triggering the step of controlling the pipe to rotate in the opposite direction of the flattening angle by the angle value of the flattening angle of the pipe; wherein the determination of the flattening angle comprises: scanning the pipe by using a line laser sensor to obtain a first point cloud; performing data processing on the first point cloud to obtain a second point cloud, and performing straight line fitting on the second point cloud to obtain a target straight line, the target straight line being a fitting straight line parallel to the surface of the pipe obtained by performing straight line fitting on the second point cloud; determining the flattening angle of the pipe according to the target straight line.

2. The method of claim 1, wherein, The straight line fitting on the second point cloud to obtain the target straight line comprises: performing straight line fitting on the second point cloud to obtain an initial straight line; obtaining a distance threshold value, and determining a to-be-deleted point cloud according to the distance threshold value and the initial straight line; deleting the to-be-deleted point cloud from the second point cloud to obtain a target point cloud; performing straight line fitting on the target point cloud to obtain the target straight line.

3. The method of claim 2, wherein, The distance threshold value comprises a first threshold value and a second threshold value, and the determination of the to-be-deleted point cloud according to the distance threshold value and the initial straight line comprises: determining a chamfer point cloud according to the second point cloud, the first threshold value and the initial straight line, the first threshold value being a preset distance threshold value between a point cloud at a chamfer and the initial straight line; determining a discrete point cloud according to the second point cloud, the second threshold value and the initial straight line, the second threshold value being a preset distance threshold value between a point cloud near a fitting straight line and the initial straight line; determining the chamfer point cloud and the discrete point cloud as the to-be-deleted point cloud.

4. The method of claim 3, wherein, The determination of the chamfer point cloud according to the second point cloud, the first threshold value and the initial straight line comprises: determining a first coordinate and a second coordinate of the initial straight line; screening a first candidate point cloud on a left side of the first coordinate and a second candidate point cloud on a right side of the second coordinate from the second point cloud; determining a first chamfer point cloud according to the first threshold value, the first coordinate and the first candidate point cloud; determining a second chamfer point cloud according to the first threshold value, the second coordinate and the second candidate point cloud; determining the first chamfer point cloud and the second chamfer point cloud as the chamfer point cloud.

5. The method of claim 4, wherein, The determination of the first coordinate and the second coordinate of the initial straight line comprises: determining a coordinate of a point corresponding to a minimum coordinate value on a preset axis among a plurality of points on the initial straight line as the first coordinate; determining a coordinate of a point corresponding to a maximum coordinate value on the preset axis among the plurality of points on the initial straight line as the second coordinate; or, obtaining a detection box corresponding to the initial straight line; Determine a point on the initial straight line that is located on the left boundary line of the detection frame as the first coordinate; A point on the initial straight line that is located on the right boundary line of the detection frame is determined as the second coordinate.

6. The method of claim 4, wherein, The determining a first chamfer point cloud according to the first threshold, the first coordinates, and the first candidate point cloud includes: Determining a first distance between each point in the first candidate point cloud and the first coordinate; Determine a point cloud consisting of points in the first candidate point cloud whose first distance is less than the first threshold as the first chamfer point cloud; The determining a second chamfer point cloud according to the first threshold, the second coordinate, and the second candidate point cloud includes: Determining a second distance between each point in the second candidate point cloud and the second coordinate; A point cloud consisting of points in the second candidate point cloud whose second distance is smaller than the first threshold is determined as the second chamfer point cloud.

7. The method of claim 3, wherein, The determining of a discrete point cloud according to the second point cloud, the second threshold, and the initial straight line includes: determining a third distance between each point in the second point cloud and the initial straight line; A point cloud consisting of points in the second point cloud whose third distance is greater than the second threshold is determined as the discrete point cloud.

8. The method of claim 1, wherein, Determining the straightening angle of the pipe according to the target straight line includes: Determining the direction vector of the target line; The straightening angle of the pipe is determined according to the direction vector.

9. The method of claim 8, wherein, The direction vector includes a first component and a second component, and determining the straightening angle of the pipe according to the direction vector includes: Substitute the first component and the second component into the straightening angle calculation formula of the pipe to obtain the angle value of the straightening angle of the pipe. The angle value calculation formula of the straightening angle of the pipe is: angle = arctan (l1 / l2) Wherein, angle represents the angle value of the straightening angle of the pipe, l1 represents the first component, and l2 represents the second component.

10. The method of claim 1, wherein, The step of processing the first point cloud to obtain a second point cloud includes: Extracting a center line of the first point cloud to obtain a first intermediate point cloud; Performing coordinate transformation on the first intermediate point cloud to obtain a second intermediate point cloud; The second intermediate point cloud is filtered to obtain the second point cloud.

11. A pipe straightening device characterized by comprising: The device comprises: A first execution module is configured to execute a step of determining a leveling angle to obtain the leveling angle of the pipe; A pipe rotation module, used to control the pipe to rotate in the opposite direction of the leveling angle, where the rotation angle is the angle value of the leveling angle of the pipe; A second execution module is configured to execute the step of determining the leveling angle to obtain the leveling angle of the pipe after rotation; A first determining module is used to determine whether the leveling angle is less than a preset angle; A second determining module is configured to determine that the pipe has been leveled when the leveling angle is less than the preset angle; a triggering module, configured to trigger, when the leveling angle is greater than or equal to the preset angle, a step of controlling the pipe to rotate in a direction opposite to the leveling angle, wherein the rotation angle is equal to the angle value of the leveling angle of the pipe; Wherein, the step of determining the leveling angle includes: Scan the pipe using a line laser sensor to obtain the first point cloud; Data processing is performed on the first point cloud to obtain a second point cloud, and a straight line fitting is performed on the second point cloud to obtain a target straight line; A flattening angle of the pipe is determined according to the target straight line.

12. An electronic device, comprising: The pipe flattening device comprises a processor and a memory, The memory is configured to store codes and related data. The processor is configured to execute the codes in the memory to implement the pipe flattening method according to any one of claims 1 to 10. 13.A storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the pipe flattening method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method for measuring central position of metal pipe

    CN107289885A

  • Straightening method for pipe parts

    CN115673030A