A method, device and medium for early collision detection of a laser head of a tube machine
By employing multi-level interference checks and modular processing, the problems of slow processing speed and misjudgment in laser head collision detection with pipes have been solved, achieving efficient and accurate laser head anti-collision detection, adapting to various pipe cross-sections, and improving the processing efficiency and stability of the pipe cutting system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN BODOR LASER CO LTD
- Filing Date
- 2025-12-08
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the collision detection between the laser head and the tube in the tube cutting system suffers from slow processing speed, long detection time, and high false judgment rate. In particular, the computational load increases dramatically when dealing with irregularly shaped tubes or irregular cross-sections, affecting the processing cycle and detection stability.
A multi-level interference inspection method is adopted, which quickly eliminates non-interference points by using bounding boxes, improves computational efficiency by using modular processing, and ensures detection accuracy by finding intersections. It generates a matrix of motion trajectory points with equal spacing, matches the laser head swing normal vector, simplifies the data structure, and directly determines the interference situation by finding intersections.
It improves the efficiency and accuracy of laser head collision avoidance detection, ensures the reliability and practicality of detection results, adapts to various pipe cross-sections, reduces computational complexity, and avoids false signals and missed detections.
Smart Images

Figure CN121423862B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser cutting technology, specifically relating to a method, equipment, and medium for early collision prevention detection of a tube laser head. Background Technology
[0002] In a pipe cutting system, during the process of cutting pipes, due to the different types of pipes and different types of laser heads, there may be collisions between the laser head and the pipe when cutting various shapes on the pipe.
[0003] In related technologies, the bounding box detection method, although fast in operation, generates a large number of false signals of bounding box interference when there is no actual interference due to the excessively wide interference range judgment. This requires additional investigation, which increases the computation time. When dealing with multi-trajectory point processing scenarios, the detection time is too long, affecting the processing cycle.
[0004] The trajectory generated by the relevant technology is based on historical parameter templates and cannot be adapted to the actual cross-sectional shape. Furthermore, the laser head swing direction and trajectory points are not precise enough, resulting in a deviation between the spatial state of the laser head during detection and the actual processing posture. This can lead to missed detection of real interference points or misjudgment of no interference points.
[0005] When dealing with irregularly shaped pipes or irregular laser head cross-sections, the complex contour lines and messy data structures of related technologies can lead to a surge in computational load and computational lag when directly performing interference calculations, thus affecting the stability of the detection. Summary of the Invention
[0006] The method for early collision avoidance detection of tube laser heads provided by this invention improves the efficiency and accuracy of tube laser head collision avoidance detection by using multi-level interference checks, quickly eliminating non-interference points using bounding boxes, improving computational efficiency through modular processing, and ensuring detection accuracy through intersection calculation.
[0007] The methods include: S101: Obtain the cross-sectional information of the tube and the laser head required for tube machining; S102: Based on the pipe cross-section information, generate a laser head motion trajectory point array and determine the laser head swing normal vector corresponding to each trajectory point; S103: Draw the outer contour lines of the pipe cross-section and the laser head cross-section respectively based on the pipe cross-section information and the laser head cross-section information; S104: Modularize the outer contour lines of the pipe section and the laser head section to obtain modular small square groups of pipe section and laser head section; S105: For each trajectory point, analyze the interference state between the laser head cross-section bounding box and the pipe cross-section bounding box; if there is no interference, check the next trajectory point; if there is interference, proceed to step S106. S106: Based on the modular small square group of the pipe cross-section and the modular small square group of the laser head cross-section, analyze the interference between the two; if there is no interference, check the next trajectory point; if there is interference, proceed to step S107. S107: Determine whether there is an intersection between the outer contour line of the laser head section and the outer contour line of the tube section; if there is an intersection, output the interference state of the trajectory point; if there is no intersection, check the next trajectory point, and after completing the interference check by traversing all trajectory points in the motion trajectory point matrix, output the anti-collision detection result of the tube machine laser head.
[0008] According to another embodiment of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the tube laser head early collision avoidance detection method.
[0009] According to another embodiment of this application, a storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the tube laser head early collision avoidance detection method.
[0010] As can be seen from the above technical solutions, the present invention has the following advantages: The tube-making machine laser head anti-collision detection method provided by this invention uses progressive interference inspection. It employs a comprehensive bounding box for rapid screening, followed by refined filtering through modular small square groups, and finally, direct intersection determination based on the contour. This ensures no interference points are missed and no misjudgments, improving the anti-collision detection speed. Based on the actual cross-sectional information of the tube, an equally spaced motion trajectory point array is generated, and the laser head swing normal vector is matched to each trajectory point. This ensures that the detection trajectory precisely matches the processing path and that the laser head posture is synchronized with the actual processing state, guaranteeing that the interference judgment accurately reflects the processing scenario. Modular processing is applied to complex cross-sectional contours, transforming irregular outer contours into small square groups. This simplifies the data structure while retaining key contour features, reducing the complexity of interference calculations and adapting to various tube cross-sections such as circles, squares, and irregular shapes. The motion trajectory point array is traversed point by point, and the interference state is recorded. The final output detection result contains specific information on all interference trajectory points, directly providing a basis for the anti-collision control of the tube-making machine. All data during the detection process is based on a unified coordinate system and data from previous steps, ensuring the reliability of the detection results. Attached Figure Description
[0011] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of the pre-collision detection method for the tube laser head of the present invention; Figure 2 This is a schematic diagram of the modular processing of the present invention; Figure 3 This is a schematic diagram illustrating the modular processing of the present invention; Figure 4 Diagram of an interference inspection scenario; Figure 5 Flowchart of the method for early collision prevention detection of the laser head in tube-type laser receivers; Figure 6 This is a schematic diagram of an electronic device. Detailed Implementation
[0013] like Figure 1 This is a flowchart of the anti-collision detection method for the laser head of the tube cutting machine provided by the present invention. The present invention is a solution to solve the problem of laser head collision with tube material in tube cutting integrated tube cutting CAM and independent tube cutting CAM, and solves the problem of laser head collision due to path and laser head direction.
[0014] This invention has two forms of collision avoidance detection: 1. Simulation animation inspection: Simulation animation is more intuitive, but animation demonstration takes more time.
[0015] 2. Direct inspection will output the correct or incorrect result directly. If it is incorrect, the final image of the interference will be output.
[0016] The interference detection algorithm first uses bounding box interference calculations to eliminate most interference cases. This is because bounding box calculations significantly improve computational speed, and the interference range covered by bounding box calculations is relatively large. Interference only occurs when the bounding box interferes with the actual contour. Conversely, if the bounding box does not interfere, the laser head and the pipe cross-section will certainly not interfere either. Therefore, using the bounding box can eliminate most non-interference cases at most points, improving computational efficiency.
[0017] like Figure 4 As shown, the laser head performs simulation on the cross-section of the pipe, and interference checks are performed simultaneously with the simulation.
[0018] The following describes in detail the pre-collision detection method for the laser head of the tube-type laser system involved in this application. Specific details such as particular system structures and technologies are presented for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.
[0019] It should be understood that, when used in this specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0020] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Please see Figure 5 The diagram shows a flowchart of a method for early collision avoidance detection of the laser head in a tube-type laser unit, in a specific embodiment. The method includes: S101: Obtain the cross-sectional information of the tube and the laser head required for tube machining.
[0023] In some embodiments, the specification data of the pipe to be processed, including basic parameters such as cross-sectional shape and dimensions, is retrieved through the processing parameter storage module preset by the pipe processing machine. The axial cross-section of the pipe and the cross-section of the working end of the laser head are projected onto the same acquisition plane, and the contour images of both are captured using an image acquisition element. Edge recognition and feature extraction are performed on the acquired contour images, and the image information is converted into cross-sectional information containing coordinate data.
[0024] S101 specifically includes the following steps: S1011: Establish a three-dimensional spatial coordinate system with the central axis of the pipe as the reference, and load the three-dimensional model data of the pipe and the three-dimensional model data of the laser head device into this coordinate system.
[0025] S1012: Determine the plane direction used for the section projection, which is perpendicular to the center axis of the current processing posture of the tube.
[0026] S1013: Perform parallel projection operation on the three-dimensional model of the pipe along the plane direction determined in step S1012 to obtain the outer envelope on the projection plane as the graphic data of the pipe cross-section profile.
[0027] S1014: Along the same plane direction determined in step S1012, perform parallel projection operation on the cutting nozzle and protective lens tube used for interference inspection in the three-dimensional model of the laser head device to obtain their outer envelope on the projection plane, which serves as the graphic data of the laser head cross-sectional profile.
[0028] S1015: Identify and output the closed boundaries defined in the graphic data obtained in steps S1013 and S1014, and obtain the contour information used to characterize the cross-section of the pipe and the cross-section of the laser head, respectively.
[0029] It should be noted that the tube cutting machine is intended to process a round stainless steel tube with an outer diameter of φ50mm and a length of 1500mm. It is equipped with a laser cutting head of model HS-300. The outer diameter of the cutting nozzle of the laser head is φ12mm, the outer diameter of the protective lens is φ25mm, and the cutting nozzle and the protective lens are coaxially set.
[0030] Here, a three-dimensional spatial coordinate system is established with the central axis of the circular pipe as the Z-axis and the center of the end face of the pipe as the origin (0,0,0). The three-dimensional model data of the pipe, including key components such as the cutting nozzle and protective lens, and the three-dimensional model data of the laser head device are loaded into the coordinate system together to ensure that the initial position of the laser head model and the relative position of the pipe model conform to the actual installation state of the pipe machine.
[0031] Since the pipe is currently positioned horizontally during processing, the central axis of the Z-axis is horizontal. Therefore, the projection plane is determined to be the XY plane, perpendicular to the Z-axis. The XY plane accurately reflects the relative radial cross-section of the laser head and the pipe during processing. Parallel projection is performed on the 3D model of the pipe along the XY plane. The resulting outer envelope is a circle with a diameter of φ50mm, representing the graphical data of the pipe's cross-sectional profile. Along the same XY plane, parallel projection is performed only on the cutting nozzle and protective lens barrel in the 3D model of the laser head device, which affect interference judgment. Since they are coaxial, the resulting outer envelope is a circle with a diameter of φ25mm, representing the graphical data of the laser head's cross-sectional profile.
[0032] In this embodiment, the closed boundaries of the projected circles of the pipe and the laser head are extracted separately using an image recognition algorithm. This yields the set of circular boundary coordinates with a diameter of φ50mm, which serves as the pipe cross-sectional profile information, and the laser head cross-sectional profile information with a diameter of φ25mm, which serves as the set of circular boundary coordinates. This completes the acquisition of cross-sectional information.
[0033] S102: Based on the pipe cross-section information, generate a laser head motion trajectory point array and determine the laser head swing normal vector corresponding to each trajectory point.
[0034] S102 specifically includes the following steps: S1021: Along the outer contour of the pipe cross-section, sampling is performed according to the preset equidistant discrete step length to generate an ordered sequence of discrete coordinate points.
[0035] In some embodiments, the laser head moves continuously along the profile of the pipe cross-section during processing. To simulate inspection in a computer, this continuous profile is transformed into a series of dense inspection points representing possible locations where the laser head may stop. By setting a fixed step size, starting from a certain starting point on the profile, a series of coordinate points are obtained by sequentially intercepting along the edge of the profile. These points retain the original order of the profile, forming a matrix of motion trajectory points. Equal spacing ensures the uniformity of the inspection and avoids omissions.
[0036] S1022: Construct a continuous laser head motion path by connecting an ordered sequence of discrete coordinate points in the order they appear on the contour line.
[0037] In some embodiments, step S1021 generates isolated points. This step reconstructs an approximate motion path of the laser head by connecting these points sequentially with straight line segments in the order they were generated. This path is a polyline composed of a series of short line segments, approximating the original smooth contour line.
[0038] S1023: On the motion path, for each discrete coordinate point, calculate the path tangent vector at the path point based on the direction of the line segment formed by the discrete coordinate point and its adjacent previous path point.
[0039] In some embodiments, when the laser head processes at a point, its orientation can be perpendicular to the pipe surface at that point. The normal direction of the pipe surface at that point is perpendicular to the tangent direction of the contour line at that point. Here, we first obtain the state of the tangent direction. For a polygonal path composed of discrete points, the path tangent vector at a certain point can be approximated by analyzing the difference between the coordinates of that point and its preceding adjacent point. This difference vector represents the approximate instantaneous direction of the laser head when it moves to that point.
[0040] S1024: Using the preset rotation axis direction vector as a reference, perform a cross product operation between the path tangent vector calculated at each discrete coordinate point and the reference vector.
[0041] In some embodiments, because the laser head cuts point by point during processing, it is necessary to find the laser head's motion trajectory point array based on the pipe cross-section information. This is achieved by equally dispersing the cross-sectional contour lines into point coordinates, simulating the laser head's movement along this trajectory. During processing, the laser head needs to move to the corresponding point. Since the laser head is typically perpendicular to the pipe surface, it needs to be swung to a vertical position at each point on the trajectory, requiring the calculation of the normal vector for each point.
[0042] It should be noted that calculating the path tangent vector at a path point is equivalent to calculating the normal vector by taking the first derivative of each line segment formed by the two trajectory points, and then obtaining the tangent vector. (X, Y, Z), the rotation axis of the cross-section information is the Y-axis by default. (0, 1, 0). The normal vector is obtained by the cross product of a and b. (X, Y, Z). The normal vector of the profile at this point is assumed to be the laser's incident direction, which is also the direction of the laser head's oscillation on the cross section.
[0043] The formula for the cross product of a and b is:
[0044] In this embodiment, the vector cross product generates a new vector that is perpendicular to both input vectors. Here, the motion tangent vector of the laser head is... With a fixed machine tool reference axis Perform a cross product. Due to the reference axis... It is fixed; the direction of the cross product result vector DirN is uniquely determined by the tangent vector. The decision was made, and it was ensured that DirN was perpendicular to... .because It is the tangent direction of the contour, so DirN is the normal direction of the contour, which is the direction in which the laser head should theoretically swing perpendicularly.
[0045] S1025: Normalize the vector obtained after performing a cross product operation at each discrete coordinate point, and output the unit normal vector corresponding to the discrete coordinate point as the theoretical swing direction of the laser head at that trajectory point.
[0046] In some embodiments, the normal vector DirN calculated by cross product in step S1024 is a vector with a specific length. However, when controlling the laser head oscillation, only the direction is considered, not the length of the vector. Therefore, this vector is normalized by dividing it by its own magnitude to obtain a unit vector of length 1. This unit vector contains only direction information and can be directly used to define the attitude angle of the laser head or drive the oscillation mechanism. This eliminates the problem of inconsistent calculated normal vector lengths caused by different path shapes, making subsequent oscillation control or attitude simulation interface processing more consistent.
[0047] S103: Based on the pipe cross-section information and the laser head cross-section information, draw the outer contour lines of the pipe cross-section and the laser head cross-section, respectively.
[0048] S103 specifically includes the following steps: S1031: Call the pipe cross-section information obtained in step S101 and extract the set of contour feature point coordinates.
[0049] In some embodiments, key feature points constituting the edge of the pipe cross-section are selected from the pipe cross-section data obtained in step S101, and the three-dimensional coordinates of each feature point are extracted one by one and organized into an ordered set of coordinates.
[0050] S1032: Call the laser head cross-section information obtained in step S101 and extract the set of contour feature point coordinates.
[0051] In some embodiments, key feature points on the edge of the laser head working end section are selected from the laser head cross-sectional data obtained in step S101, and the three-dimensional coordinates of each feature point are extracted and organized into an ordered coordinate set. This clarifies the constituent base points of the laser head contour, ensuring that the drawn outer contour line accurately reflects the actual cross-sectional size and shape of the laser head.
[0052] S1033: Set a unified drawing coordinate system and transform the coordinates of the feature points of the pipe cross-section and the feature points of the laser head cross-section to this coordinate system.
[0053] In some embodiments, a drawing coordinate system is established with the processing reference point of the tube machine as the origin and the processing spindle direction as the Y-axis. Through coordinate translation and rotation transformation rules, the coordinates of the contour feature points of the tube and the laser head are uniformly mapped to this coordinate system to eliminate the coordinate reference deviation caused by different acquisition links.
[0054] S1034: Connect the feature points of the pipe section profile in sequence according to the order of the feature points in the coordinate set, and form the outer contour line of the pipe section by connecting the feature points in sequence with straight lines; and connect the feature points of the laser head section profile in sequence according to the order of the feature points, and form the outer contour line of the laser head section by connecting the feature points in sequence with straight lines.
[0055] In some embodiments, adjacent pipe cross-section contour feature points are sequentially connected with straight lines according to the natural extension order of the feature points at the edge of the actual cross-section, forming a continuous outer contour line of the pipe cross-section. Similarly, the laser head cross-section contour feature points are connected with straight lines in the same order to form a continuous outer contour line of the laser head cross-section.
[0056] S1035: Perform a closing process by connecting the first and last points of the formed pipe cross-section outer contour line and the laser head cross-section outer contour line to remove redundant overlapping line segments on the contour lines.
[0057] In some embodiments, the starting and ending feature points of the outer contour line of the pipe cross-section are connected by straight lines to form a closed structure. Similarly, the closure of the outer contour line of the laser head cross-section can be achieved. Then, by comparing the coordinate ranges of each line segment, overlapping redundant line segments are deleted, retaining the effective contour lines. In this way, the closed contour line completely reflects the closed shape of the cross-section, meeting the contour requirements for interference inspection.
[0058] S104: Modularize the outer contour lines of the pipe section and the laser head section to obtain modular small square groups of pipe section and laser head section.
[0059] S105: For each trajectory point, analyze the interference state between the laser head cross-section bounding box and the pipe cross-section bounding box; if there is no interference, check the next trajectory point; if there is interference, execute step S106.
[0060] S106: Based on the modular small square group of the pipe cross section and the modular small square group of the laser head cross section, analyze the interference between the two; if there is no interference, check the next trajectory point; if there is interference, execute step S107.
[0061] S107: Determine whether there is an intersection between the outer contour line of the laser head section and the outer contour line of the tube section; if there is an intersection, output the interference state of the trajectory point; if there is no intersection, check the next trajectory point, and after completing the interference check by traversing all trajectory points in the motion trajectory point matrix, output the anti-collision detection result of the tube machine laser head.
[0062] The direct intersection detection method of the contour lines in this embodiment can accurately capture the actual interference situation and ensure the reliability of the detection results. Step S107 is performed on a small number of trajectory points after the screening in the first two steps, which ensures the detection accuracy and does not affect the overall detection efficiency due to the complexity of the calculation. The final output result can directly provide a clear basis for the anti-collision control of tube machining.
[0063] In one embodiment of the present invention, based on step S104, the following is a possible embodiment and its specific implementation will be described in a non-limiting manner. S104 specifically includes the following steps: S1041: Decompose the outer contour line of the pipe section and the outer contour line of the laser head section obtained in step S103, and obtain several continuous small contour lines respectively. Extract the direction vector of each small contour line segment.
[0064] In some embodiments, the complete outer contour line of the pipe section and the outer contour line of the laser head section are divided into independent small contour segments according to their natural segmentation. By reading the coordinate data of the two ends of each small segment, the direction vector of each segment is determined to form a vector set.
[0065] S1042: For every two adjacent contour line segments, calculate the angle between the direction vectors, and mark the connection points of the line segments with an absolute value between π / 4 and 3π / 4 as corner points.
[0066] In some embodiments, such as Figure 2 and Figure 3 As shown, after moving the laser head cross-section to the corresponding position and swinging it in the corresponding direction, it is necessary to perform an interference check between the laser head cross-section and the contour line. Since there are many points and each point needs to be checked, the computational load is large, resulting in slow processing speed. Therefore, the laser head and the cross-sectional contour need to be modularized. This involves simplifying the laser head and the projected cross-section into a square.
[0067] This embodiment determines the angle of each line segment by searching and judging the angle of the preceding and following line segments based on the constituent line segments of the contour line. The vector of the preceding line is... The vector of the second line is Calculate the angle between two vectors. included angle Points with absolute values between π / 4 and 3π / 4 are considered corner points. The corner points are arranged in descending order of Y value. The bounding boxes are drawn in descending order and the union is calculated to obtain the small square group after modularizing the cross-sectional profile or the laser head cross-sectional profile.
[0068] Formula for calculating the angle between vectors: .
[0069] By using specific angle thresholds to filter corner points, the accuracy of corner point marking is ensured. S1043: Sort all the marked corner points in descending order of their Y-axis coordinate values to form a sequence of corner points for the pipe cross-section and a sequence of corner points for the laser head cross-section.
[0070] In some embodiments, the Y-axis coordinate value of each marked corner point is read, and the corner points of the pipe section and the laser head section are sorted in descending order of value to form an ordered sequence of corner points, ensuring that the bounding box drawing follows a unified direction.
[0071] S1044: According to the sorted corner point sequence, draw rectangular bounding boxes for the contour line segment regions between two adjacent corner points from top to bottom, ensuring that each bounding box completely covers the contour line segment of the corresponding region.
[0072] In some embodiments, based on the sorted sequence of corner points, a rectangular bounding box is drawn for the contour line segment region between two adjacent corner points, with the maximum X-axis span and the maximum Y-axis span of the region as the boundary, to ensure that the bounding box can completely enclose all contour line segments within the corresponding region.
[0073] S1045: Perform a union operation on all drawn rectangular bounding boxes, remove overlapping parts, and uniformly regularize the remaining bounding boxes into small squares of the same size, forming modular small square groups for pipe cross-sections and modular small square groups for laser head cross-sections respectively.
[0074] In some embodiments, a union operation is performed on all rectangular bounding boxes of the same cross section to merge overlapping or adjacent bounding box regions, remove redundant overlapping parts, and then trim the remaining effective bounding boxes into small squares according to a preset uniform side length specification, ultimately forming a structured modular small square group. In this way, the uniformly sized small squares make the modular data more regular, facilitate rapid interferometry comparison, and improve the overall detection efficiency.
[0075] In one embodiment of the present invention, based on step S105, the following is a possible embodiment and its specific implementation will be described in a non-limiting manner. S105 specifically includes the following steps: S1051: Call the motion trajectory point array and the laser head swing normal vector corresponding to each trajectory point in step S102, and also call the outer contour line of the laser head section and the outer contour line of the pipe section in step S103.
[0076] In some embodiments, the motion trajectory coordinates, laser head attitude parameters, and basic data of two types of cross-sectional contours required for checking the current trajectory point are retrieved from the stored data to provide data for bounding box generation and interference judgment.
[0077] S1052: Based on the coordinates of the current trajectory point to be inspected and the corresponding swing normal vector, adjust the spatial attitude of the outer contour line of the laser head section to generate the overall bounding box of the laser head section corresponding to the trajectory point.
[0078] In some embodiments, the coordinates of the current trajectory point are used as the spatial positioning reference of the laser head. The orientation of the outer contour line of the laser head section is adjusted according to the corresponding swing normal vector so that the contour line is perpendicular to the pipe section. Then, the maximum spatial span of the contour line is used as the boundary to construct an overall bounding box that can completely enclose the laser head section.
[0079] In this embodiment, the position and orientation of the bounding box match the actual processing state of the laser head, ensuring that the preliminary interference check can accurately cover the actual space occupied by the laser head.
[0080] S1053: Based on the outer contour line of the pipe section in step S103, extract the maximum and minimum X, Y, and Z axis coordinates of the pipe section to generate the overall pipe section bounding box.
[0081] In some embodiments, all feature points of the outer contour line of the pipe section are traversed, and the X, Y, and Z axis coordinates of each feature point are read one by one. The maximum and minimum values on each coordinate axis are selected, and these six extreme values are used as the six face boundaries of the bounding box to construct an overall bounding box that can completely enclose the pipe section. In this way, the bounding box generated based on the original contour feature points can truly reflect the spatial range of the pipe section and ensure that it matches the actual contour size of the pipe.
[0082] S1054: Read the X-axis, Y-axis, and Z-axis coordinate ranges of the overall cross-sectional bounding box of the laser head and the overall cross-sectional bounding box of the pipe, and compare whether there is an overlap between the coordinate ranges of the two axes.
[0083] In some embodiments, the X-axis start and end coordinates (X1min, X1max), Y-axis start and end coordinates (Y1min, Y1max), Z-axis start and end coordinates (Z1min, Z1max), and (X2min, X2max), (Y2min, Y2max), (Z2min, Z2max) of the bounding box of the laser head and the overall cross-section of the pipe are extracted respectively. Each interval on the same coordinate axis is compared to see if it meets the conditions. These conditions can be overlapping conditions where the minimum value of one bounding box is less than the maximum value of another bounding box, and the maximum value is greater than the minimum value of another bounding box. Preliminary interference screening is achieved through coordinate interval comparison, eliminating the need for complex contour calculations and enabling preliminary judgment of single trajectory points, thus improving overall detection efficiency.
[0084] S1055: If there is no overlapping range of coordinates on each axis, it is determined that there is no interference at the trajectory point, and the process is switched to the next trajectory point and step S1051 is repeated. If there is an overlapping range of coordinates on any axis, it is determined that there is preliminary interference at the trajectory point, and step S106 is executed.
[0085] In some embodiments, the comparison results of the coordinate ranges of each axis are summarized. If there is no overlapping interval of all coordinate axes, it is determined that the trajectory point has no risk of interference and no further inspection is required.
[0086] If any coordinate axis has an overlapping region, it is determined that there is a possibility of interference, and the process proceeds to the inspection stage.
[0087] In one embodiment of the present invention, based on step S106, the following is a possible embodiment and its specific implementation will be described in a non-limiting manner. S106 specifically includes the following steps: S1061: Call the modular small square group of pipe cross section and the modular small square group of laser head cross section obtained in S104, and also call the coordinates of the current trajectory point to be inspected and the corresponding laser head swing normal vector in step S102.
[0088] S1062: Using the coordinates of the current trajectory point to be inspected as the positioning reference, adjust the spatial attitude and position of the modular small square group of the laser head section according to the corresponding laser head swing normal vector, so that it matches the actual processing state of the laser head.
[0089] In some embodiments, the coordinates of the current trajectory point are used as the spatial anchor points of the modular small square group of the laser head. The orientation of the entire modular group is adjusted by swinging the normal vector so that the spatial posture of each small square is consistent with the actual posture of the laser head during processing, ensuring that the modular group can truly reflect the space occupation of the laser head.
[0090] S1063: Extract the X, Y, and Z coordinate ranges of each small square in the modular small square group of the laser head cross-section after adjustment, and at the same time extract the X, Y, and Z coordinate ranges of each small square in the modular small square group of the pipe cross-section.
[0091] In some embodiments, for the adjusted modular small square group of the laser head and the fixed modular small square group of the tubing, the boundary coordinates of each small square are read one by one to determine the maximum and minimum values of each small square on the X, Y, and Z axes, forming independent coordinate range data for each small square. Here, the modular group is decomposed into a single comparable unit, and the coordinate range of each small square is clearly defined, providing a clear basis for comparison.
[0092] S1064: Select one small square from the modular small square group of the laser head cross-section in sequence, and compare it with all the small squares in the modular small square group of the pipe cross-section one by one in terms of coordinate range of each axis.
[0093] In some embodiments, a one-to-one matching method is used. A small square of the laser head is selected and compared sequentially with each small square of the pipe in terms of X-axis, Y-axis, and Z-axis coordinate ranges to check whether there is any overlap in coordinate ranges between the matched small squares. By comparing individual small squares, the false positive rate can be significantly reduced compared to overall bounding box inspection.
[0094] S1065: If the coordinate ranges of all small squares of the laser head and all small squares of the tube do not overlap, it is determined that there is no interference at the trajectory point, and the process switches to the next trajectory point and repeats step S1061; if the coordinate ranges of any small square of the laser head and any small square of the tube overlap, it is determined that there is interference at the trajectory point, and step S107 is executed.
[0095] In some embodiments, the comparison results of all small squares are summarized. If no set of small squares is found to have overlapping coordinate ranges, it indicates that there is no actual risk of interference between the laser head and the pipe at this trajectory point, and the process can be directly switched to the next trajectory point. If any set of small squares overlaps, it indicates that there is actual interference, and the process needs to proceed to the inspection stage.
[0096] This embodiment filters out cases where there is interference in the overall bounding box but no actual interference, based on S105, reducing the number of subsequent high-precision calculations and improving detection efficiency.
[0097] In one embodiment of the present invention, based on step S107, the following is a possible embodiment and its specific implementation will be described in a non-limiting manner. S107 specifically includes the following steps: S1071: Retrieve the outer contour line of the laser head section and the outer contour line of the pipe section from step S103, as well as the coordinates of the current trajectory point to be inspected and the corresponding laser head swing normal vector from step S102.
[0098] In some embodiments, the data required for intersection determination is extracted from the stored data, including two basic outer contour lines, spatial positioning parameters of the current trajectory point, and laser head attitude parameters, to ensure that all data matches the current inspection object.
[0099] S1072: Using the coordinates of the current trajectory point to be inspected as the positioning reference, adjust the spatial posture of the outer contour of the laser head section according to the laser head swing normal vector so that it is consistent with the actual processing posture of the laser head.
[0100] In some embodiments, the coordinates of the current trajectory point are used as the spatial anchor point of the laser head's outer contour line. The orientation of the contour line is adjusted by swinging the normal vector so that the spatial posture of the contour line is synchronized with the actual posture of the laser head when processing at the trajectory point, ensuring that the contour line can truly reflect the actual spatial position of the laser head.
[0101] S1073: Divide the adjusted outer contour of the laser head section and the fixed outer contour of the pipe section into several continuous straight line segments, and extract the endpoint coordinates of each straight line segment.
[0102] In some embodiments, the closed contour line is decomposed into several independent continuous straight line segments according to the natural extension order of the two outer contour lines. By reading the coordinate data of the two endpoints of each line segment, the spatial position boundary of each line segment is determined, forming a basic unit that can be directly compared.
[0103] S1074: Select a straight line segment of the outer contour line of the laser head section in sequence, and compare the endpoint coordinates with all the straight line segments of the outer contour line of the pipe section one by one to determine whether there is an intersection between the line segments.
[0104] In some embodiments, a segment-by-segment matching method is used, where a fixed straight line segment of the laser head contour is used, and the endpoint coordinates are compared with each straight line segment of the pipe contour in turn. By determining whether the endpoints of two line segments are located on opposite sides of another line segment, it is determined whether the line segments intersect.
[0105] S1075: If any straight line segment of the laser head intersects with any straight line segment of the pipe, record the interference state of that trajectory point; if all line segments do not intersect, switch to the next trajectory point; after all trajectory points have been checked, summarize the interference state records and output the anti-collision detection result of the tube machine laser head.
[0106] In some embodiments, the comparison results of each line segment are recorded in real time. If any set of line segments intersects, it is determined that there is real interference at the trajectory point and the relevant information is stored.
[0107] If all line segments do not intersect, then there is no interference and the process switches to the next trajectory point.
[0108] After all trajectory points have been checked, all interference records are compiled and summarized to form a complete detection result, which is then output. This case-by-case handling of the status of each trajectory point ensures that no interference information is missed or misjudged. The summarized detection results are comprehensive and practical, providing a direct reference for the anti-collision control of the pipeline machine. The orderly switching of trajectory points ensures the integrity of the detection process.
[0109] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0110] like Figure 6As shown, this application also provides an electronic device, including a display module 103, a memory 102, a processor 101, a communication module 104, and a computer program stored in the memory and executable on the processor 101. When the processor 101 executes the program, it implements the steps of the tube laser head early anti-collision detection method.
[0111] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments described and / or claimed herein.
[0112] In this embodiment, processor 101 may be implemented using at least one of an application-specific integrated circuit, a programmable logic device, a field-programmable gate array, a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such an implementation may be implemented within a controller. For software implementation, implementations such as processes or functions may be implemented with separate software modules that allow the performance of at least one function or operation. Software code may be implemented by a software application (or program) written in any suitable programming language, and the software code may be stored in memory and executed by the controller.
[0113] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like.
[0114] The memory 102 can be used to store software programs and various data. The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0115] The communication module 104 transmits radio signals to and / or receives radio signals from at least one of a base station, an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data sent and / or received according to text and / or multimedia messages.
[0116] The present invention also provides a storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the tube laser head early collision avoidance detection method.
[0117] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0118] The storage medium stores a program product capable of implementing the methods described above in this specification. In some possible implementations, various aspects of this disclosure may also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0119] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for early collision avoidance detection of a tube laser head, characterized in that, The methods include: S101: Obtain the cross-sectional information of the tube and the laser head required for tube machining; S102: Based on the pipe cross-section information, generate a laser head motion trajectory point array and determine the laser head swing normal vector corresponding to each trajectory point; S103: Draw the outer contour lines of the pipe cross-section and the laser head cross-section respectively based on the pipe cross-section information and the laser head cross-section information; S104: Modularize the outer contour lines of the pipe section and the laser head section to obtain modular small square groups of pipe section and laser head section; S105: For each trajectory point, analyze the interference state between the laser head cross-section bounding box and the pipe cross-section bounding box; if there is no interference, check the next trajectory point; if there is interference, proceed to step S106. S105 specifically includes the following steps: S1051: Call the motion trajectory point array and the laser head swing normal vector corresponding to each trajectory point in step S102, and also call the outer contour line of the laser head section and the outer contour line of the pipe section in step S103. S1052: Based on the coordinates of the current trajectory point to be inspected and the corresponding swing normal vector, adjust the spatial attitude of the outer contour of the laser head section to generate the overall bounding box of the laser head section corresponding to the trajectory point. S1053: Based on the outer contour line of the pipe section in step S103, extract the maximum and minimum X, Y, and Z axis coordinates of the pipe section and generate the overall pipe section bounding box; S1054: Read the X-axis, Y-axis, and Z-axis coordinate ranges of the overall cross-sectional bounding box of the laser head and the overall cross-sectional bounding box of the pipe, and compare whether there is an overlap between the coordinate ranges of the two axes; S1055: If there is no overlapping range of coordinates on each axis, it is determined that there is no interference between the trajectory points. Switch to the next trajectory point and repeat steps S1051-S1055. If there are overlapping intervals in the coordinate range of any axis, it is determined that there is preliminary interference in the trajectory points, and step S106 is executed; S106: Based on the modular small square group of the pipe cross-section and the modular small square group of the laser head cross-section, analyze the interference between the two; if there is no interference, check the next trajectory point; if there is interference, proceed to step S107. S107: Determine whether there is an intersection between the outer contour line of the laser head section and the outer contour line of the pipe section; If an intersection point exists, the interference state of the trajectory point is output; if no intersection point exists, the next trajectory point is checked, and after completing the interference check by traversing all trajectory points in the motion trajectory point array, the anti-collision detection result of the tube laser head is output.
2. The method for early collision avoidance detection of the tube laser head according to claim 1, characterized in that, S101 specifically includes the following steps: S1011: Establish a three-dimensional spatial coordinate system with the central axis of the pipe as the reference, and load the three-dimensional model data of the pipe and the three-dimensional model data of the laser head device into the coordinate system; S1012: Determine the plane direction used for the section projection, which is perpendicular to the center axis of the current processing posture of the tube; S1013: Perform parallel projection operation on the three-dimensional model of the pipe along the plane direction determined by S1012 to obtain the outer envelope on the projection plane as the graphic data of the pipe cross-section profile; S1014: Along the same plane direction determined in step S1012, perform parallel projection operation on the cutting nozzle and protective lens tube used for interference inspection in the three-dimensional model of the laser head device to obtain their outer envelope on the projection plane as graphic data of the laser head cross-sectional profile. S1015: Identify and output the closed boundaries defined in the graphic data obtained in steps S1013 and S1014, and obtain the contour information used to characterize the pipe cross-section and the laser head cross-section, respectively.
3. The method for early collision avoidance detection of the tube laser head according to claim 1, characterized in that, S102 specifically includes the following steps: S1021: Along the outer contour of the pipe section, sampling is performed according to the preset equidistant discrete step length to generate an ordered sequence of discrete coordinate points; S1022: Construct a continuous laser head motion path by connecting an ordered sequence of discrete coordinate points in the order they appear on the contour line. S1023: On the motion path, for each discrete coordinate point, calculate the path tangent vector at the path point according to the direction of the line segment formed by the discrete coordinate point and its adjacent previous path point. S1024: Using the preset rotation axis direction vector as a reference, perform a cross product operation between the path tangent vector calculated at each discrete coordinate point and the reference vector. S1025: Normalize the vector obtained after performing a cross product operation at each discrete coordinate point, and output the unit normal vector corresponding to the discrete coordinate point as the theoretical oscillation direction of the laser head at the trajectory point.
4. The method for early collision avoidance detection of the tube laser head according to claim 1, characterized in that, S103 specifically includes the following steps: S1031: Call the pipe cross-section information obtained in step S101 and extract the set of contour feature point coordinates; S1032: Call the laser head cross-section information obtained in step S101 and extract the set of contour feature point coordinates; S1033: Set a unified drawing coordinate system and transform the coordinates of the feature points of the pipe cross-section and the feature points of the laser head cross-section to the coordinate system. S1034: Connect the feature points of the pipe section profile in sequence according to the order of the feature points in the coordinate set, and connect the feature points in sequence using a straight line connection method to form the outer contour line of the pipe section; and connect the feature points of the laser head section profile in sequence according to the order of the feature points, and connect the feature points in sequence using a straight line connection method to form the outer contour line of the laser head section. S1035: Perform a closing process by connecting the first and last points of the formed pipe cross-section outer contour line and the laser head cross-section outer contour line to remove redundant overlapping line segments on the contour lines.
5. The method for early collision avoidance detection of the laser head in tube-type laser equipment according to claim 1, characterized in that, S104 specifically includes the following steps: S1041: Decompose the outer contour line of the pipe section and the outer contour line of the laser head section obtained in step S103, and obtain several continuous small contour lines respectively. Extract the direction vector of each small contour line. S1042: For each pair of adjacent contour line segments, calculate the angle between the direction vectors, and mark the connection points of the line segments with an absolute value between π / 4 and 3π / 4 as corner points; S1043: Sort all the marked corner points in descending order of their Y-axis coordinate values to form a sequence of corner points for the pipe cross-section and a sequence of corner points for the laser head cross-section; S1044: According to the sorted corner point sequence, draw rectangular bounding boxes for the contour line segment regions between two adjacent corner points from top to bottom, ensuring that each bounding box completely covers the contour line segment of the corresponding region. S1045: Perform a union operation on all drawn rectangular bounding boxes, remove overlapping parts, and uniformly regularize the remaining bounding boxes into small squares of the same size, forming modular small square groups for pipe cross-sections and modular small square groups for laser head cross-sections respectively.
6. The method for early collision avoidance detection of the tube laser head according to claim 1, characterized in that, S106 specifically includes the following steps: S1061: Call the modular small square group of pipe cross section and the modular small square group of laser head cross section obtained in S104, and also call the coordinates of the current trajectory point to be inspected and the corresponding laser head swing normal vector in step S102. S1062: Using the coordinates of the current trajectory point to be inspected as the positioning reference, adjust the spatial attitude and position of the modular small square group of the laser head section according to the corresponding laser head swing normal vector, so that it matches the actual processing state of the laser head; S1063: Extract the X-axis, Y-axis, and Z-axis coordinate ranges of each small square in the modular small square group of the laser head cross-section after adjustment; also extract the X-axis, Y-axis, and Z-axis coordinate ranges of each small square in the modular small square group of the pipe cross-section. S1064: Select one small square from the modular small square group of the laser head section in sequence, and compare it with all the small squares in the modular small square group of the pipe section one by one in terms of coordinate range of each axis. S1065: If the coordinate ranges of all small squares of the laser head and all small squares of the tube do not overlap, it is determined that there is no interference between the trajectory points, and the process switches to the next trajectory point and repeats steps S1061-S1065; if the coordinate ranges of any small square of the laser head and any small square of the tube overlap, it is determined that there is interference between the trajectory points, and step S107 is executed.
7. The method for early collision avoidance detection of the tube laser head according to claim 1, characterized in that, S107 specifically includes the following steps: S1071: Retrieve the outer contour line of the laser head section and the outer contour line of the pipe section from step S103, as well as the coordinates of the current trajectory point to be inspected and the corresponding laser head swing normal vector from step S102. S1072: Using the coordinates of the current trajectory point to be inspected as the positioning reference, adjust the spatial posture of the outer contour of the laser head section according to the laser head swing normal vector to match the actual processing posture of the laser head; S1073: Divide the adjusted outer contour line of the laser head section and the fixed outer contour line of the pipe section into several continuous straight line segments, and extract the endpoint coordinates of each straight line segment. S1074: Select a straight line segment of the outer contour line of the laser head section in sequence, and compare the endpoint coordinates with all the straight line segments of the outer contour line of the pipe section one by one to determine whether there is an intersection between the line segments; S1075: If any straight line segment of the laser head intersects with any straight line segment of the pipe, record the interference state of the trajectory point; If all line segments do not intersect, then switch to the next trajectory point; After all trajectory points have been checked, the interference state records are summarized, and the anti-collision detection results of the output tube laser head are generated.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the tube laser head anti-collision detection method as described in any one of claims 1 to 7.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the tube laser head anti-collision detection method as described in any one of claims 1 to 7.