Cabin weld joint detection path planning method and device, electronic equipment and storage medium

Through three-dimensional space modeling and viewpoint set optimization, the detection problem of plane and three-dimensional structures in ship weld inspection is solved, and efficient and safe weld inspection path planning is achieved.

CN120655869APending Publication Date: 2025-09-16WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510754942.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The existing ship weld inspection path planning method is difficult to take into account the refined inspection requirements of both planar and three-dimensional structures, resulting in low inspection efficiency and safety hazards.

Method used

By performing three-dimensional spatial modeling based on point cloud data of the ship cabin, generating a minimum effective viewpoint set, optimizing global path planning, and combining it with robot motion control to achieve weld detection.

Benefits of technology

It significantly improves detection efficiency, reduces redundant observation nodes, enhances detection adaptability and resource utilization, reduces ineffective movement in small spaces, and improves detection safety and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655869A_ABST
    Figure CN120655869A_ABST
Patent Text Reader

Abstract

The invention discloses a cabin welding seam detection path planning method and device, electronic equipment and a storage medium. The cabin welding seam detection path planning method comprises the following steps: carrying out three-dimensional space modeling according to point cloud data of a ship cabin; generating a minimum effective viewpoint set according to constraint conditions; and obtaining an optimal global path according to the effective viewpoint set. According to the method, the point cloud processing complexity is remarkably reduced, the modeling efficiency is improved, and the anti-noise capability of the model is enhanced. Redundant observation nodes are greatly reduced, and the detection adaptability and the resource utilization rate of the complex closed cabin are improved. The robot movement time is obviously shortened, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of ship detection, and in particular to a method, device, electronic equipment and storage medium for ship cabin weld detection path planning. Background Art

[0002] During shipbuilding, lattice-type structures are installed at the bottom of the cabin to strengthen the hull. These structures are often sealed at the top, have a small space, and contain a large number of flat curved fillet welds and broken line fillet welds. Regular inspections of ships are usually carried out in accordance with the requirements of classification societies, and currently, structural inspections are mainly carried out by surveyors. In cramped cabins, workers must enter through narrow "manholes" and complete a full inspection while only being able to maintain a crouched posture and unable to change positions. Visual estimates are usually made based on experience. The accumulation of harmful gases caused by poor ventilation, claustrophobic stress caused by the small space, and the potential for limb scratches caused by sharp edges of the structure make the inspection work time-consuming and arduous.

[0003] However, in complex, enclosed cabins, such as ship bottom compartments, the following problems arise due to the special internal environment of the ship: the cabin structure is densely populated with girders, ribs, and other components, forming a large number of grid spaces; appearance inspections require high-resolution photography, and photographing blind spots is extremely difficult. In response to the efficiency bottlenecks and safety risks of traditional inspection methods, and considering the limitations of current intelligent drone inspections in small cabins, in order to guide the robot to fully traverse the weld positions within the cabin as much as possible, during close-up inspection, the viewpoint should be as perpendicular to the inspected surface as possible, and the reference plane should be as coincident with the plane as possible. However, due to the large number of viewpoints, wide coverage, and relatively complex structure, there is a high possibility of spatial interference during the movement process. Therefore, planning not only needs to consider the position of the viewpoint, but also its posture and spatial interference.

[0004] Therefore, the existing ship weld inspection path planning method has the technical problem of being unable to take into account the requirements of refined inspection of both planar and three-dimensional structures. Summary of the Invention

[0005] The purpose of this application is to overcome the above-mentioned technical deficiencies and propose a method, device, electronic equipment and storage medium for cabin weld inspection path planning to solve the technical problem in the existing technology that it is difficult to take into account the refined inspection requirements of planar and three-dimensional structures.

[0006] In order to achieve the above technical objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a method for planning a path for detecting a ship cabin weld, comprising: Conduct 3D spatial modeling based on point cloud data of ship cabins; Generate the minimum valid viewpoint set according to the constraints; An optimal global path is obtained according to the valid viewpoint set.

[0007] In some embodiments of the present application, performing three-dimensional spatial modeling based on point cloud data of the ship cabin includes: Quickly split the plane inside the cabin; Extract the contours of the bulkhead and identify the point cloud data of the holes.

[0008] In some embodiments of the present application, the rapid splitting of the plane within the cabin includes: Randomly selecting an initial point from the point cloud data, and screening candidate points that meet the neighborhood density condition through a spatial index structure; Performing geometric consistency verification on the initial point and the candidate points to generate an initial seed point set; Performing plane fitting on the initial seed point set and dynamically expanding neighborhood points using a region growing strategy to complete the current plane segmentation; Repeat the above steps until all point cloud plane segmentation is completed.

[0009] In some embodiments of the present application, identifying point cloud hole data of the bulkhead includes: The optimal projection plane is determined by principal component analysis, and the three-dimensional point cloud is orthogonally projected to a two-dimensional point set; A point cloud hole contour is extracted according to the two-dimensional point set.

[0010] In some embodiments of the present application, generating a minimum valid viewpoint set according to the constraint conditions includes: Configure optical parameter constraint judgment; Configure visibility constraint determination; Filter the optimal close viewing point.

[0011] In some embodiments of the present application, performing three-dimensional spatial modeling based on point cloud data of the ship cabin includes: Preprocessing the point cloud data; The geometric contour line parameters of each plane contour are extracted using projection transformation; The mathematical representation of the orthogonal relationship of the wall is achieved through the fusion of plane equations.

[0012] In some embodiments of the present application, generating a minimum valid viewpoint set according to the constraint conditions includes: Configure viewpoint generation rules: the viewpoint spacing must meet coverage constraints and avoid obstacles. Configure the conditions for passage between viewpoints: the passage path is parallel to the wall coordinate axis and avoids obstacles.

[0013] In some embodiments of the present application, obtaining the optimal global path according to the valid viewpoint set includes: Add traffic constraint optimization model; Design removal and repair operators; Configure the adaptive selection policy.

[0014] In some embodiments of the present application, the adding of the traffic constraint optimization model includes: Configure path selection variables and sequence number variables; Generate a path cost expression with minimizing the inspection path cost as the objective function; Configure constraints: coverage integrity, motion continuity, and 3D topology access constraints.

[0015] In some embodiments of the present application, the design of the removal operator and the repair operator includes: The adjacent weld viewpoints are randomly removed; Multi-plane collaborative viewpoint removal; Remove the path with the shortest total length; Local low-quality path removal; Path cost mutation area removed; Missing viewpoints in the removed path after repair.

[0016] In some embodiments of the present application, the configuration of the adaptive selection strategy includes: Dynamically update the selection probability according to the operator scoring rule; A roulette wheel mechanism is used to allocate weights of the removal operator and the repair operator.

[0017] In a second aspect, the present application further provides a cabin weld inspection path planning device, which is used to execute the cabin weld inspection path planning method as described in any embodiment of the first aspect, comprising: a three-dimensional modeling module configured to process the point cloud data and generate a three-dimensional space model of an orthogonal layout; A viewpoint generation module is configured to generate a minimum valid viewpoint set according to the constraint conditions; The path planning module is configured to optimize the viewpoint traversal order and simulate and verify the optimal global path.

[0018] In a third aspect, the present application further provides an electronic device, including a memory and a processor, wherein: The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the cabin weld detection path planning method described in any one of the first aspects.

[0019] In a fourth aspect, the present application also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the cabin weld detection path planning method described in any one of the first aspects.

[0020] Compared with the existing technology, the technical solution provided by this application brings the following beneficial technical effects: This application establishes an efficient three-dimensional model based on the orthogonal layout characteristics of ship cabins, realizes multi-plane segmentation and precise extraction of geometric contours of complex environments, significantly reduces the complexity of point cloud processing, improves modeling efficiency, and enhances the model's anti-noise ability. By dynamically generating a minimum effective viewpoint set. Under the premise of ensuring full coverage detection of welds, it greatly reduces redundant observation nodes, avoids invalid movement in a small space, adapts to the detection needs of plane and three-dimensional structures, and improves the detection adaptability and resource utilization of complex enclosed cabins. By constructing an optimization model with the shortest path as the goal, multiple constraints are comprehensively considered. The weld detection path planning problem is converted into a three-dimensional viewpoint sorting and traversal problem with directional information, while maintaining a feasible solution structure, the local optimization capability is enhanced, and the solution space search efficiency is effectively improved. Significantly shorten the robot movement time and improve detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required for use in the embodiments: Figure 1 This is a flow chart of a method for planning a path for detecting a ship cabin weld according to an embodiment of the present application; Figure 2 This is a plane segmentation effect diagram of the cabin wall in the embodiment of the present application; Figure 3 This is a schematic diagram of bulkhead hole identification in an embodiment of the present application; Figure 4 This is a schematic diagram of contour line extraction in an embodiment of the present application; Figure 5 This is a schematic diagram of viewpoint generation in the schematic diagram of contour line extraction in an embodiment of the present application; Figure 6 This is a schematic diagram of contour line extraction in the embodiment of this application Figure 3 3D path planning renderings; Figure 7 This is a structural diagram of a cabin weld inspection path planning device in an embodiment of the present application; Figure 8 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0023] Those skilled in the art will understand that in this specification, the wording "including" is an open-ended expression, which means that the described features exist but does not exclude other features. The directional words "up", "down", "left", "right", etc. are exemplary directions based on the drawings. Features defined as "first" and "second" implicitly include one or more of the features. Singular expressions can also be used in the plural. "Multiple" means two or more. The terms "installed", "connected", and "connected" can be fixed connections, detachable connections, or integrated connections; they can be directly connected, or indirectly connected through an intermediate medium, or they can be internal connections between two elements. In addition, "connected" can include wireless connections.

[0024] The purpose of this application is to overcome the above-mentioned technical deficiencies and propose a method, device, electronic device and storage medium for cabin weld inspection path planning to solve the technical problem in the existing technology that it is difficult to take into account the viewpoint position, viewpoint posture and spatial interference.

[0025] In order to achieve the above technical objectives, this application adopts the following technical solutions: like Figures 1 to 6 In a first aspect, the present application provides a method for planning a path for detecting a ship cabin weld, comprising: S1. 3D spatial modeling based on point cloud data of the ship cabin; S2. Generate a minimum valid viewpoint set based on the constraints; S3. Obtain an optimal global path according to the valid viewpoint set.

[0026] This application establishes an efficient three-dimensional model based on the orthogonal layout characteristics of ship cabins, realizes multi-plane segmentation and precise extraction of geometric contours of complex environments, significantly reduces the complexity of point cloud processing, improves modeling efficiency, and enhances the model's anti-noise ability. By dynamically generating a minimum effective viewpoint set. Under the premise of ensuring full coverage detection of welds, it greatly reduces redundant observation nodes, avoids invalid movement in a small space, adapts to the detection needs of plane and three-dimensional structures, and improves the detection adaptability and resource utilization of complex enclosed cabins. By constructing an optimization model with the shortest path as the goal, multiple constraints are comprehensively considered. The weld detection path planning problem is converted into a three-dimensional viewpoint sorting and traversal problem with directional information, while maintaining a feasible solution structure, the local optimization capability is enhanced, and the solution space search efficiency is effectively improved. Significantly shorten the robot movement time and improve detection efficiency.

[0027] In some embodiments of the present application, step S1 performs three-dimensional space modeling based on point cloud data of the ship cabin, including: S11. Rapidly split the plane inside the cabin; S12. Extract the contour lines of the bulkhead and identify the point cloud data of the holes.

[0028] Because cabins generally adopt an orthogonal layout with horizontal decks and vertical bulkheads, their point cloud data exhibits a pronounced axial distribution in the Cartesian coordinate system. Specifically, the deck plane is parallel to the XY coordinate system, the bulkhead planes are parallel to the YZ / XZ planes, and T-shaped stiffeners, as typical supporting members, are orthogonally connected to the main structure. The algorithm exploits this to quickly perform preliminary clustering or segmentation of the point cloud data according to these primary planar orientations. The original point cloud data is segmented into several point cloud clusters representing different cabin planes (such as the left wall, right wall, front wall, rear wall, floor, ceiling, etc.).

[0029] For each planar point cloud cluster, the algorithm analyzes whether there are continuous areas within it that are not covered by the point cloud. This is typically achieved by calculating the point cloud density, finding boundary points, or using image processing hole filling / detection algorithms (such as morphological operations). After identifying holes, further information such as their location, size, and shape is extracted. The location and characteristics of the holes on each bulkhead plane are output.

[0030] In some embodiments of the present application, the step S11. quickly segmenting the plane inside the cabin includes: S111. Randomly select an initial point from the point cloud data and filter candidate points that meet the neighborhood density condition through a spatial index structure; S112. Verify the geometric consistency of the initial point and the candidate points to generate an initial seed point set; S113. Performing plane fitting on the initial seed point set and dynamically expanding neighboring points using a region growing strategy to complete the current plane segmentation; S114. Repeat the above steps until all point cloud plane segmentation is completed.

[0031] The RANSAC algorithm is a robust estimation and analysis method that estimates the model parameters of a point cloud dataset through continuous iteration. However, when using the RANSAC algorithm for point cloud plane fitting, the selection of the three initial sample points in the original point cloud dataset is completely random, which greatly increases the possibility of obtaining points outside the plane in the dataset. The resulting model parameters often fail to meet the requirements. Moreover, when the number of sampling times is constant, the more times the initial points are selected outside the plane, the fewer model sets that meet the requirements, the smaller the probability of obtaining the optimal model, and the lower the accuracy of the plane fitting. At the same time, the RANSAC algorithm's determination of inliers is based solely on the distance from the point in the dataset to the plane model. Any point that meets the distance requirement is considered an inlier, which can also lead to misidentification. To address the above issues, the present invention changes the seed initial point selection strategy based on the spatial proximity principle of points in the same plane and the normal vector orientation characteristics of the planes in the cabin. At the same time, based on the internal point determination method of region growing, it completes the rapid segmentation of each plane in the cabin. The specific implementation process is as follows: Randomly select an initial point from the original point cloud dataset P without duplication, organize the point cloud using the kd tree structure and count the points within the neighborhood with a radius of r. If the number of points in the neighborhood is less than the point number threshold Np, randomly select points from the dataset P again until a neighborhood that meets the threshold condition is found, and then select another two points from its neighborhood with a radius of r. Compare the normal angle between the initial point and the other two points. If the result is less than the angle threshold, the current three points are used as the initial seed points.

[0032] Use the least squares method to perform plane fitting on the current initial seed point; Region growing, calculate the Euclidean distance d = {d1, d2, d3, …, dn} of each point in the neighborhood to the plane, set an appropriate distance threshold dt, calculate the distance di of all remaining points to the plane, and regard the points that meet di ≤ dt as inliers.

[0033] Step 5: When the seed point is empty, the current plane point segmentation is completed, and the above four steps are repeated to complete the plane segmentation of all point clouds.

[0034] In some embodiments of the present application, step S12 of extracting the contour of the bulkhead and identifying the point cloud data of the hole includes: S121. Determine the optimal projection plane through principal component analysis and orthogonally project the 3D point cloud onto a 2D point set; S122. Extracting a point cloud hole contour based on the two-dimensional point set.

[0035] The core task of cabin hole identification lies in extracting and detecting hole boundary points. Due to the lack of topological relationships between point clouds, point cloud hole identification is more difficult than network models. A-shape overcomes the shortcomings of point cloud boundary point shapes and possesses a degree of adaptability, enabling fast and efficient extraction of boundary point clouds. For a planar point cloud of arbitrary shape, assume the existence of a rolling circle with a radius of α. When the radius of the rolling circle is sufficiently small, every point in the point cloud can be considered a boundary point. If the radius of the rolling circle is gradually increased to a certain extent, it will only roll along the boundary, thus outlining the boundary trajectory of the point cloud.

[0036] To identify holes in 3D cabin point clouds, the α-shape algorithm is only suitable for detecting outline points in 2D point clouds. Therefore, extracting the hole outline from the point cloud requires projecting the point cloud. Principal component analysis (PCA) is used to determine the optimal projection plane π. The 3D point cloud P⊂R³ is then orthogonally projected onto π to obtain the 2D point set P'⊂R². The projection process must also meet topological conditions to ensure the geometric invariance of the hole structure. This allows the hole locations to be identified and further information about the location of the hole and surrounding point clouds to be obtained.

[0037] In some embodiments of the present application, step S2 generates a minimum valid viewpoint set according to the constraint conditions, including: S21. Configure optical parameter constraint determination; S22. Configure visibility constraint determination; S23. Select the optimal close viewing point.

[0038] In this embodiment, a close-up viewpoint generation model for bulkhead weld coverage is constructed. First, viewpoint detection and constraint determination are performed. Viewpoint selection is affected by the robot's camera position. Therefore, initial candidate viewpoints must be determined based on the camera's optical parameter constraints, visibility constraints, and occlusion constraints.

[0039] As shown in step S21, the camera's visible area is limited by the focal length of the lens and the size of the target surface. To ensure that the camera can obtain a clear image of the object being measured, the object is required to be at a distance between the closest and farthest acceptable focus. This distance range is called the depth of field, where Dnear is the near point distance, Dfar is the far point distance, and Dbest is the optimal close viewing distance of the monocular camera:

[0040] Where f is the focal length, d is the target surface size, and SR is the range of the object being measured, that is, the format size at the optimal measurement distance.

[0041] Assume that the center of the weld surface set is A, the center of the bottom of the image acquisition cone is B, the viewpoint position is C, φ is the angle between vector CA and vector CB, and the cone angle is γ. At this time, for the weld surface, the judgment conditions that meet the optical parameter constraints are as follows:

[0042] Define the camera's optical center as D and the normal vector of a point E on the surface of the object to be measured as s. In actual measurement, due to the robot's size limitations, a threshold δ must be given; otherwise, the image acquisition requirements cannot be met. That is, the camera's visibility must satisfy the following formula:

[0043] For a regular polyhedral cabin structure composed of finite planar bulkheads, its planar weld inspection can be achieved by calibrating the inspection path through the head and tail viewpoints, and using robot motion control to achieve continuous camera image acquisition. The weld to be inspected is composed of a finite number of planar wall intersections, and each weld is the intersection of two planes:

[0044] When the weld trajectory undergoes a sudden change in direction at the intersection of three orthogonal planes, i.e., at the fillet weld, its effective viewpoint will be located within the observation cone constructed by the normal vectors of the three planes. This not only fully covers the three-dimensional morphology of the weld turning point, but also serves as a key turning point in global viewpoint planning, achieving the connection of multiple continuous inspection paths through spatial geometric constraints. Among them, the candidate viewpoint at the fillet weld is located at a geometric position that maintains a specific distance from the three planes:

[0045] Where da, db, dc>0, which is the preset observation distance threshold after viewpoint detection constraint determination.

[0046] Further, continue to generate as follows: Step 1: Offset each plane outward by a distance dw to obtain a new plane: ; Step 2: Solve the intersection of any three offset planes: ; Step 3: Existence and uniqueness verification: The candidate viewpoint set Vabc has a unique solution if and only if the three plane normal vectors are linearly independent: ; When the three planes are collinear, that is, the normal vectors are coplanar, then the candidate viewpoint set forms a straight line: ; Step 4: Reduce redundant viewpoints: In dense areas of fillet welds such as corners and edges, the proportion of redundant viewpoints is high. Assign each viewpoint to the nearest centroid to form K clusters. Recalculate the centroid of each cluster, that is, take the average of all viewpoints in the cluster as the new centroid. Repeat the assignment and update steps until the centroid no longer changes significantly or the maximum number of iterations is reached, generating the minimum valid viewpoint set P.

[0047] In some embodiments of the present application, step S1 performs three-dimensional space modeling based on point cloud data of the ship cabin, including: S13. Preprocessing the point cloud data; S14. Extracting geometric contour line parameters of each plane contour using projection transformation; S15. Mathematical representation of wall orthogonality through plane equation fusion.

[0048] The close-up viewpoint planning process is completed based on the orthogonal characteristics of the structure. First, point cloud preprocessing is implemented. By filtering out outlier noise points in the point cloud data, the wall-rib composite structure is segmented into multiple planes based on the improved RANSAC algorithm, and the geometric contour line parameters of each plane contour are extracted using projection transformation. A three-dimensional spatial representation model containing complete structural features is further constructed, and the mathematical representation of the wall orthogonal relationship is achieved through plane equation fusion. Finally, the distribution of candidate viewpoints is determined based on spatial geometric constraints and structural position constraints. The density clustering algorithm is used to calculate the centroid of each area to generate the minimum valid viewpoint set, providing observation nodes that meet the full coverage requirements for subsequent path planning.

[0049] The three-dimensional spatial structure satisfies the contour lines formed by the intersection of the patches between different planes. Therefore, the set of segmentation planes obtained in step S11 is fitted with the plane equations by the least squares method:

[0050] Record the normal vectors of each plane and geometric parameters, and project the original point cloud along the normal vector direction to the corresponding fitting plane to obtain a two-dimensional projection point set , extract the plane boundary contour polygon based on the α-shape algorithm and output the vertex sequence , combined with the orthogonal characteristics of the cabin, through corner detection from Extracting geometrically salient key points . Among them, the intersection equation of adjacent planes is calculated:

[0051] Among them, ni and nj are the normal vectors of the two planes, and t is the scale coefficient.

[0052] According to the actual point cloud distribution range of the two planes, the intersection line is cut to the valid interval to generate a structured intersection segment , and with Perform spatial matching between endpoints to establish topological connections. Finally, by aligning the coordinate axes, correcting non-orthogonal errors, and smoothly interpolating the offline contour points, a continuous and structurally complete closed contour line is generated.

[0053] In some embodiments of the present application, step S2 generates a minimum valid viewpoint set according to the constraint conditions, including: S24. Configure viewpoint generation rules: the viewpoint spacing satisfies coverage constraints and avoids obstacle areas; S25. Configure the conditions for passage between viewpoints: the passage path is parallel to the wall coordinate axis and avoids obstacles.

[0054] As can be seen from the above, the welds to be inspected in the cabin cover multiple bulkhead planes and completely coincide with the plane intersection lines. This viewpoint generation model includes the following key constraints, which together ensure the feasibility of viewpoint generation: Viewpoint generation rules in S24: Generate a set of candidate viewpoints based on key points on the wall , and needs to meet the following requirements: (1) The distance between viewpoints dwmin ensures coverage.

[0055] (2) The viewpoint does not overlap with the obstacle area:

[0056] Conditions for passage between viewpoints in S25: two viewpoints 、 Connectable if and only if: (1) Straight line segment Does not intersect with any obstacles; (2) Directional constraints: Coordinate axis parallel to the wall In some embodiments of the present application, step S3 of obtaining the optimal global path according to the valid viewpoint set includes: S31. Add traffic constraint optimization model; S32. Design removal operators and repair operators; S33. Configure the adaptive selection strategy.

[0057] Viewpoints are discrete points in three-dimensional space that contain directional information, and near-view path planning can be regarded as a TSP problem, especially the sorting and traversal of viewpoints, thereby improving inspection efficiency.

[0058] Therefore, the present invention adds a traffic constraint optimization model based on the viewpoint inspection TSP problem, designs more directional removal operators and repair operators, in the hope of increasing the algorithm convergence speed and solution accuracy, and the overall algorithm framework.

[0059] First, a wall-climbing robot is a wall-climbing robot, capable of continuous planar movement only, not across two walls. Therefore, the central space is an obstacle space. Second, if environmental obstacles appear between viewpoints, they must be avoided. Finally, due to the orthogonality of walls, a complete traversal of the main line segment requires a parallel orientation.

[0060] In some embodiments of the present application, the step S31 adds a traffic constraint optimization model, including: S311. Configure path selection variables and sequence number variables; S312. Generate a path cost expression with minimizing the inspection path cost as the objective function; S313. Configuration constraints: coverage integrity, motion continuity, and three-dimensional topological access constraints.

[0061] To ensure the robot's motion safety and wall adhesion continuity, a robot near-viewpoint coverage path planning framework is constructed, taking into account the robot's adsorption motion characteristics and the three-dimensional wall topology. First, the decision variables need to be defined.

[0062] As in step S311, the path selection variables are defined. Aiming at the requirement of normalized collision-free inspection of welds in a closed cabin environment, the topological relationship of the robot motion sequence is constructed to describe the path direction:

[0063] Where, i, j: represents the viewpoint in the set P; Define the sequence number variable, and further define the sequence number of access viewpoint i, the sequence variable ui:

[0064] Where m: represents the number of viewpoints in the set P, and P: represents the set of all available viewpoints.

[0065] As in step S312, minimizing the inspection path cost is used as the objective function, and a continuous coverage path that satisfies the motion constraints is generated through a mathematical programming method, as shown in the following expression.

[0066]

[0067] Where P is the set of valid viewpoints to be covered in the cabin; Lij represents the path cost of the wall-climbing robot moving from viewpoint i to viewpoint j.

[0068] The path cost expression is:

[0069] As in step S312, the constraints include: (1) Coverage completeness: The robot is required to traverse all preset viewpoints to ensure that no viewpoints are missed.

[0070]

[0071] (2) Motion continuity: Construct Miller-Tucker-Zemlin constraints to force the path to form a single chain structure through the monotonicity of ordinal variables and eliminate subloops:

[0072] (3) 3D topological traffic constraints: Disconnected walls are usually formed due to obstacles between viewpoints, which makes it impossible to establish a directly accessible path. An adjacency matrix aij is established to limit the feasible paths, requiring them to transition only between topologically adjacent walls and prohibiting them from crossing discontinuous surface areas.

[0073]

[0074] aij is determined by ray collision detection: if the line segment from viewpoint i to j intersects the obstacle an odd number of times, then aij = 0, otherwise aij = 1. The specific detection process is as follows: Step 1: Extract the polygonal mesh of cabin obstacles, where obstacles are divided into three categories: hole obstacles, no-fly obstacles, and bulkhead obstacles.

[0075] Step 2: Parameterize the detection rays along the path segment and calculate the number of intersections with the obstacle boundary.

[0076] Step 3: Determine the feasibility of the path according to the even-odd rule and update the adjacency matrix.

[0077] In some embodiments of the present application, the step S32 of designing the removal operator and the repair operator includes: S321. Random removal of adjacent weld viewpoints; S322. Multi-plane collaborative viewpoint removal; S323. Remove the path with the shortest total length; S324. Local low-quality path removal; S325. Remove path cost mutation area; S326. Fixed missing viewpoints in removed paths.

[0078] A suitable removal operator needs to add more capacity relaxation and spatial relaxation while removing as few viewpoints as possible, thereby increasing the possibility of improving the current solution. Based on the objective functions of the viewpoint scale within the cabin and the minimum path cost, the present invention sets 6 destruction operators and 2 repair operators.

[0079] In S321, the random removal of adjacent weld viewpoints specifically includes a neighbor removal operator: based on the structural characteristics of the confined space in the cabin, an improved Dijkstra algorithm is used to establish a three-dimensional path distance matrix. When calculating the viewpoint spacing, the bulkhead plane distribution, T-plate structural form, and equipment movement constraints are comprehensively considered to construct a navigation grid model that includes physical obstacles. When traversing the solution sequence, a dynamic neighbor table is established for each viewpoint, and adjacent welds in the same plane and cross-plane key connection points are stored first. The removal strategy adopts a two-stage operation: first, any viewpoint of the current solution is selected, and j viewpoints with plane association are randomly selected from its neighbor table; if there are insufficient viewpoints, they are randomly supplemented from viewpoints in other planes to ensure multi-plane collaborative optimization.

[0080] First, the Dijkstra algorithm is used to calculate the distance matrix between all viewpoints. Each viewpoint is traversed in turn, and the set of its j closest viewpoints is stored in the neighbor table (if there are equal distances, all equidistant viewpoints are stored). A viewpoint is randomly selected from the current solution, and some viewpoints are randomly selected from the neighbor table of that viewpoint and removed together. If the number of viewpoints to be removed exceeds the neighbor parameter j, the remaining viewpoints to be removed are randomly selected from the current solution. When the number of viewpoints to be removed is 3, viewpoint 3 is randomly selected from the current solution. Then, the neighbor table of viewpoints 4, 5, and 6 corresponding to viewpoint 3 is found. Viewpoints 4 and 5 are randomly selected from this set and removed along with viewpoint 3.

[0081] In S322, multi-plane collaborative viewpoint removal specifically includes a discontinuous removal operator: A cross-plane jump removal strategy is designed based on the distribution characteristics of multiple bulkhead planes. By analyzing the spatial distribution pattern of the current solution, viewpoint segments containing multiple plane transition nodes are preferentially selected for removal. Based on the number of viewpoints to be removed, a viewpoint segment is randomly selected from the current solution and removed directly. When the number of viewpoints to be removed is 3, viewpoint segments 3, 7, and 1 are randomly selected from the current solution and removed.

[0082] A continuous removal operator is also included: Considering the requirements of single-plane inspection path optimization, a maximum continuous removal length parameter is set. When selecting continuous viewpoints within a plane, the algorithm prioritizes removing continuous sequences containing structural turning points, taking into account the structural characteristics of the T-plate. Path reconstruction after removal forces the algorithm to re-plan the inspection order within that plane, avoiding local optima.

[0083] Randomly remove a continuous subpath of viewpoints from the current solution, disrupting the original path structure. This operator randomly selects a starting position and removes a specified length of continuous viewpoints to generate a new solution and update the path cost. Suppose the current solution contains the viewpoint sequence [1, 2, 3, 4, 5]. If three viewpoints are randomly removed starting at position 2, viewpoints 2, 3, and 4 are removed, leaving the remaining sequence [1, 5], and the path length is recalculated.

[0084] In S323, the shortest total path length removal specifically includes the maximum distance removal operator: The actual movement distance is calculated based on the in-cabin navigation grid, taking into account device size constraints. The remaining path length after removing each viewpoint from the current solution is calculated. The shortest remaining path is found by sorting, and the corresponding viewpoint is removed from the current solution. Assume that after calculation, removing viewpoint 6 from the current solution results in the largest decrease in total path length, so it is removed.

[0085] In S324, local low-quality path removal specifically involves the minimum connection cost removal operator: by analyzing the connection costs between adjacent viewpoints in the path, the lowest-cost connections are preferentially disconnected to remove the corresponding viewpoints. Assuming that low-cost connections are more easily replaced, and each connection corresponds to two viewpoints, the predecessor viewpoints in the connection are removed here. This destruction of these connections creates optimization opportunities for the subsequent repair phase. Assuming that the connection cost from viewpoint 3 to viewpoint 5 in the current solution is 2 (the lowest cost across the entire path), viewpoints 3 or 5 are preferentially removed, prompting the algorithm to explore more optimal connections when reconstructing the path.

[0086] In S325, removing areas of sudden cost (not absolute cost) in a path involves a cost fluctuation removal operator: This operator detects areas of sudden cost fluctuations in a path and prioritizes removing viewpoints that cause significant fluctuations. This operator precisely destroys unstable connections along a path. For example, if the connection costs of three consecutive viewpoints, ABC, are 5 (from A to B) and 15 (from B to C), respectively, the fluctuation value of |15-5| = 10 will be prioritized. Removing viewpoints in such areas eliminates cost spikes in the path, creating an opportunity to rebuild a smoother path.

[0087] In S326, the missing viewpoints in the path removed after repair include a greedy repair operator: the path length of each repair node after repair is calculated from the solution to be repaired, and the repair node with the shortest path length is found by sorting and repairing it. After calculation, the total path between viewpoints 6 and 7 to repair viewpoint 2 is the shortest, so viewpoint 2 is repaired between viewpoints 6 and 7.

[0088] Noise greedy repair operator: Add the noise coefficient u when the greedy repair operator calculates the total path length after viewpoint repair:

[0089] Among them, u is the noise coefficient, r is a random number uniformly distributed in the interval [-1, 1], costreal is the actual fitness value, and dmax is the maximum value in the distance matrix.

[0090] In some embodiments of the present application, the step S33 configures the adaptive selection strategy, including: S331. Dynamically update the selection probability according to the operator scoring rule; S332. Use a roulette wheel mechanism to assign weights to the removal operator and the repair operator.

[0091] In each iteration, the removal and repair operators are selected through a roulette mechanism according to the probability of the operator being selected. The key to viewpoint traversal is the use of the neighborhood structure, the removal operator set The selection probability is set to , repair operator set The selection probability can be set as , after each inner loop iteration, the probability of the operator being used is updated according to the formula:

[0092] Where i is the number of iterations of the current inner loop; is the reaction coefficient for controlling the probability update, The larger the value, the more the operator update probability change is affected by the current effect score, and vice versa, the operator probability change is more affected by the previous historical probability; Represents the probability value of the nth operator in the i+1th inner loop; Represents the score of the nth operator in the current inner loop, Represents the number of times the nth operator is used in the current inner loop. represents the expected sum of scores of all remove / repair operators in the current inner loop, and k is the total number of remove or repair operators.

[0093] The score iteration will be updated according to the following rules: if the operator improves the current solution and is better than the historical optimal solution, it will be increased. , takes the value 4; if the operator improves the current solution, it increases , takes the value 2; the solution obtained by the operator perturbation is accepted and added , the value is 1.

[0094] To sum up, the algorithm flow is as follows: Step 1: Initialize the algorithm and remove the operator set , repair operator set , set the initial parameters.

[0095] Step 2: Generate a feasible solution S in the solution space and record it as the current solution and the historical optimal solution S*, and evenly distribute the initial probability values ​​of each operator.

[0096] Step 3: Use the roulette wheel method to randomly select a set of repair operators and removal operators from the removal operator set and the repair operator set according to probability, and use them to perturb the current solution S to obtain a new solution, denoted as S'.

[0097] Step 4: Calculate the path length of S'. If the path length of the new solution is less than the historical optimal solution S*, update S.

[0098] Step 5: Determine whether the inner loop end condition is met. If not, return to Step 3. Otherwise, update the deviation value, and then update the probability of the operator being selected based on the number of times and scores of each operator in this inner loop.

[0099] Step 6: Determine whether the algorithm meets the total number of outer loops M. If so, end and output the historical optimal solution. If not, return to Step 3.

[0100] like Figure 7 In a second aspect, the present application further provides a cabin weld inspection path planning device 1, which is used to execute the cabin weld inspection path planning method as described in any one of the embodiments of the first aspect, comprising: a three-dimensional modeling module 11 configured to process point cloud data and generate a three-dimensional space model of an orthogonal layout; A viewpoint generation module 12 is configured to generate a minimum valid viewpoint set according to the constraint conditions; The path planning module 13 is configured to optimize the viewpoint traversal order and simulate and verify the optimal global path.

[0101] The cabin weld detection path planning device 1 provided in the above embodiment can implement the technical solution described in the above cabin weld detection path planning method embodiment. The specific implementation principles of the above modules or units can be found in the corresponding contents in the above method embodiment, which will not be repeated here.

[0102] like Figure 8 In a third aspect, the present application further provides an electronic device 2, comprising a memory 21, a processor 22, and a display 23, wherein: The memory 21 is used to store programs; The processor 22 is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the cabin weld detection path planning method described in any one of the first aspects.

[0103] In some embodiments, the processor 22 may be a central processing unit (CPU), a microprocessor, or other data processing chip, configured to execute program codes stored in the memory 21 or process data.

[0104] In some embodiments, the memory 21 may be an internal storage unit of the electronic device 2, such as a hard disk or memory of the electronic device 2. In other embodiments, the memory 21 may also be an external storage device of the electronic device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 2.

[0105] In some embodiments, display 23 can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 23 is used to display information on electronic device 2 and to present a visual user interface. Components 22 and 23 of electronic device 2 communicate with each other via a system bus.

[0106] In a fourth aspect, the present application also provides a computer-readable storage medium for storing computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the cabin weld detection path planning method described in any one of the first aspects.

[0107] Compared with the existing technology, the technical solution provided by this application brings the following beneficial technical effects: A hierarchical point cloud segmentation method is proposed to address the structural characteristics of orthogonal cabins. Based on the axial distribution of the T-shaped bulkhead stiffeners, normal vector clustering is used to achieve rapid segmentation of the main wall surface. For complex local structures, an improved region growing algorithm and dynamic point selection strategy are introduced to improve segmentation accuracy through geometric feature constraints. A weld spatial distribution model is established based on multi-plane geometric intersection theory, and an environmental map is constructed that includes the topological connection relationships of the wall surfaces and the three-dimensional coordinates of the welds, providing a structured spatial representation for subsequent planning.

[0108] Combining visual sensor parameters with weld inspection requirements, a dual-constraint viewpoint generation model was established: the inspection coverage domain was defined based on the field of view angle and working distance, and the minimum observation angle threshold was set based on the resolution requirements. A spatial projection method was used to solve the visible domain envelope of the weld segments, generating an initial set of viewpoints that met the full coverage criteria. Furthermore, the kinematic characteristics of the wall-climbing robot were integrated, and constraints on wall transition feasibility and posture stability were introduced. A clustering optimization algorithm was used to eliminate redundant viewpoints, generating an optimal observation sequence that balances inspection quality and motion efficiency.

[0109] To address the limitations of traditional planning methods for cross-wall path optimization, an optimization model is constructed with the shortest path as the goal, comprehensively considering multiple constraints such as motion continuity, obstacle avoidance safety, and detection accessibility. A topology-aware directional remove-and-repair operator is designed to enhance local optimization capabilities while maintaining a feasible solution structure. An adaptive weighting strategy is used to dynamically optimize operator combinations, effectively improving the efficiency of the solution space search.

[0110] By developing a modular magnetic adsorption robot platform to verify the theoretical model, a pendulum-type adsorption mechanism and a multimodal drive unit were designed to support dynamic switching between straight-ahead, turning, and oblique movement modes. Experiments have shown that the system maintains stable adsorption during transitions between orthogonal walls, the path generated by the planning algorithm shows complete coverage in complex topological structures, and the viewpoint distribution and motion trajectory are collaboratively optimized. Compared with traditional methods, this application demonstrates significant advantages in path continuity, environmental adaptability, and computational efficiency, providing a scalable technical path for automatic detection of confined cabins.

[0111] Those skilled in the art will understand that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, changed, rearranged, decomposed, combined, or deleted.

[0112] The specific implementation methods of the present application described above do not limit the scope of protection of the present application. Any other corresponding changes and modifications made based on the technical concept of the present application should be included in the scope of protection of the claims of the present application.

Claims

1. A method for ship cabin weld inspection path planning, characterized in that: include: Conduct 3D spatial modeling based on point cloud data of ship cabins; Generate the minimum valid viewpoint set according to the constraints; An optimal global path is obtained according to the valid viewpoint set.

2. The method for ship cabin weld inspection path planning according to claim 1, characterized in that: The three-dimensional space modeling based on the point cloud data of the ship cabin includes: Quickly split the plane inside the cabin; Extract the contours of the bulkhead and identify the point cloud data of the holes.

3. The method for ship cabin weld inspection path planning according to claim 2, characterized in that: The method of quickly splitting the plane inside the cabin includes: Randomly selecting an initial point from the point cloud data, and screening candidate points that meet the neighborhood density condition through a spatial index structure; Performing geometric consistency verification on the initial point and the candidate points to generate an initial seed point set; Performing plane fitting on the initial seed point set and dynamically expanding neighborhood points using a region growing strategy to complete the current plane segmentation; Repeat the above steps until all point cloud plane segmentation is completed; The step of extracting the contour line of the bulkhead and identifying the point cloud data of the holes includes: The optimal projection plane is determined by principal component analysis, and the three-dimensional point cloud is orthogonally projected to a two-dimensional point set; A point cloud hole contour is extracted according to the two-dimensional point set.

4. The method for ship cabin weld inspection path planning according to claim 1, characterized in that: Generating a minimum valid viewpoint set according to the constraint conditions includes: Configure optical parameter constraint judgment; Configure visibility constraint determination; Filter the optimal close viewing point.

5. The method for ship cabin weld inspection path planning according to claim 1, characterized in that: Obtaining an optimal global path according to the valid viewpoint set includes: Add traffic constraint optimization model; Design removal and repair operators; Configure the adaptive selection policy.

6. The method for ship cabin weld inspection path planning according to claim 5, characterized in that: The added traffic constraint optimization model includes: Configure path selection variables and sequence number variables; Generate a path cost expression with minimizing the inspection path cost as the objective function; Configure constraints: coverage integrity, motion continuity, and 3D topology access constraints.

7. The method for ship cabin weld inspection path planning according to claim 5, characterized in that: The design removes the operator and repairs the operator, including: The adjacent weld viewpoints are randomly removed; Multi-plane collaborative viewpoint removal; Remove the path with the shortest total length; Local low-quality path removal; Path cost mutation area removed; Fixed missing viewpoints in removed paths; The configuration adaptive selection strategy includes: Dynamically update the selection probability according to the operator scoring rule; A roulette wheel mechanism is used to allocate weights of the removal operator and the repair operator.

8. A ship cabin weld inspection path planning device, characterized in that: The method for executing the path planning method for ship cabin weld inspection according to any one of claims 1 to 7 comprises: a three-dimensional modeling module configured to process the point cloud data and generate a three-dimensional space model of an orthogonal layout; A viewpoint generation module is configured to generate a minimum valid viewpoint set according to the constraint conditions; The path planning module is configured to optimize the viewpoint traversal order and simulate and verify the optimal global path.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein, The memory is used to store programs; The processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps in the cabin weld detection path planning method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the cabin weld detection path planning method described in any one of claims 1 to 7.