Ultrasonic detection track generation method, detection method and system
Through B-spline surface fitting and robotic arm control, the efficiency and accuracy problems of traditional ultrasonic detection methods on complex components are solved, and automated and smooth ultrasonic detection trajectory planning is realized.
Patent Information
- Application Number
- CN202510539641.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
Traditional ultrasonic non-destructive testing methods are inefficient on complex or large-scale special-shaped components, rely on manual operations, and insufficient trajectory planning and surface adaptability, resulting in inaccurate detection results.
The B-spline surface fitting technology is used to map the point cloud data by parameter domain, generating two-dimensional coverage trajectories and reflecting them to three-dimensional space, and combining robotic arm motion control to realize automated ultrasonic detection.
The smoothness and accuracy of detection are improved, trajectory discontinuity and local boundary errors are avoided, and the comprehensive coverage detection of complex components is achieved.
Smart Images

Figure CN120451443A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic non-destructive testing, and in particular to an ultrasonic testing trajectory generation method, a testing method and a system. Background Art
[0002] Ultrasonic nondestructive testing (NDT), with its advantages of high precision, non-destructive nature, and excellent real-time performance, has gained widespread application in industrial testing, particularly in sectors with stringent quality requirements, such as aerospace, automotive manufacturing, and energy equipment. However, traditional NDT methods rely primarily on manual operation, resulting in low efficiency and excessive reliance on operator experience. Traditional methods struggle to achieve comprehensive inspection coverage for complex or large, irregularly shaped components, which can negatively impact test results.
[0003] The rapid development of robotics and 3D reconstruction technology has brought new opportunities for the automation and intelligent development of ultrasonic testing. Robotic arms possess high-precision positioning and motion control capabilities and can be equipped with sensors for automated testing. Furthermore, the application of 3D reconstruction technology enables accurate acquisition of geometric information about complex components and its use in path planning. However, automated ultrasonic testing with robotic arms currently still has some shortcomings in trajectory planning and surface adaptability. These issues, such as point cloud discrete noise resulting in less than smooth trajectories and large local boundary errors, have hindered the widespread application of automated ultrasonic testing technology. Summary of the Invention
[0004] The purpose of the present invention is to overcome the problems of the prior art and to provide an ultrasonic detection trajectory generation method, a detection method and a system.
[0005] The object of the present invention is to achieve the following technical solution: a method for generating an ultrasonic detection trajectory, the method comprising the following steps:
[0006] Collecting point cloud data of the inspection surface of the workpiece being tested;
[0007] Perform parameter domain mapping on the point cloud data, establish the mathematical relationship between the point cloud data and the surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the B-spline surface;
[0008] In the two-dimensional parameter domain corresponding to the B-spline surface, a covering trajectory planning algorithm is used to generate a two-dimensional covering trajectory, which is then inversely mapped into three-dimensional space to generate a three-dimensional detection trajectory.
[0009] In one example, after collecting the point cloud data of the inspection surface of the workpiece to be inspected, the step of splicing the point cloud data is further included:
[0010] The first frame of color depth data is used to anchor the world coordinate system, and the subsequent frame point clouds are aligned with the anchored first frame point cloud frame by frame to obtain a complete three-dimensional point cloud model of the workpiece to be inspected.
[0011] In one example, after the point cloud data splicing processing step, the method further includes:
[0012] The point cloud data of the detection surface in the 3D point cloud model is segmented to obtain a point cloud subset of the target detection area.
[0013] In one example, the obtained B-spline surface is replaced by calculating the optimal B-spline surface, including:
[0014] Assign parameter values to each point in each point cloud data based on the Euclidean distance between the points;
[0015] Establish mathematical relationships between point cloud data and surface control points:
[0016]
[0017] Among them, S(u,v) represents the position vector of the B-spline surface, which is determined by the parameters u and v; N i,p (u) represents the B-spline basis function in the direction of parameter u; N j,q (v) represents the B-spline basis function in the direction of parameter v; P ij Represents the surface control point; i, j represent the index of the control point in the u direction and v direction respectively; n, m represent the dimension of the control point in the u direction and v direction respectively; p, q represent the order of the B-spline basis function in the u direction and v direction respectively;
[0018] An alternating optimization iteration method is used to solve the optimal surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface; the alternating optimization iteration includes: when the parameters are fixed, solving the optimal surface control points; when the control points are fixed, independently solving the parameters for each data point to minimize the error.
[0019] In one example, the reverse mapping of the two-dimensional coverage trajectory to the three-dimensional space includes:
[0020] According to the mathematical expression of the B-spline surface, the coordinates of the trajectory points in the parameter domain are mapped to the three-dimensional space coordinates, and the surface normal vector at the corresponding position is calculated. The position and posture of the end of the robotic arm are generated by combining the normal vector and the space coordinates.
[0021] It should be further explained that the technical features corresponding to the various examples of the above methods can be combined or replaced with each other to form a new technical solution.
[0022] The present invention also includes an ultrasonic detection method, characterized in that the trajectory generation method formed based on any one of the above examples or a combination of multiple examples is implemented, and after obtaining the three-dimensional detection trajectory, the ultrasonic detection method further includes:
[0023] The three-dimensional detection trajectory is smoothed and converted into motion instructions executable by the robotic arm, thereby driving the robotic arm to perform ultrasonic detection.
[0024] The present invention also includes an ultrasonic detection trajectory generation system, characterized in that the system includes:
[0025] An acquisition module, used for acquiring point cloud data of the detection surface of the workpiece being tested;
[0026] The surface fitting module is used to perform parameter domain mapping on point cloud data, establish the mathematical relationship between point cloud data and surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface;
[0027] The trajectory planning module is used to generate a two-dimensional covering trajectory using a covering trajectory planning algorithm in the two-dimensional parameter domain corresponding to the optimal B-spline surface, and to reversely map the two-dimensional covering trajectory to three-dimensional space to obtain a three-dimensional detection trajectory.
[0028] In one example, the ultrasonic detection trajectory generation system further includes a coordinate alignment module and / or a point cloud segmentation module and / or a motion control module;
[0029] The coordinate alignment module uses the first frame color depth data to anchor the world coordinate system, so that the subsequent frame point cloud is aligned with the anchored first frame point cloud frame by frame to obtain a complete 3D point cloud model of the workpiece to be inspected;
[0030] The point cloud segmentation module is used to segment the point cloud data of the detection surface to obtain the point cloud subset of the target detection area;
[0031] It should be further explained that the technical features corresponding to the above system examples can be combined or replaced with each other to form a new technical solution.
[0032] The present invention also includes an ultrasonic detection system, which includes the ultrasonic detection trajectory generation system formed by any one of the above examples or a combination of multiple examples. The ultrasonic detection system also includes a motion control module for smoothing the three-dimensional detection trajectory and converting it into motion instructions executable by the robotic arm, thereby driving the robotic arm to perform ultrasonic detection.
[0033] In one example, the ultrasonic detection system further includes a control unit, a first robotic arm and a second robotic arm connected to the control unit;
[0034] The first robotic arm is integrated with an acquisition module; the control unit is integrated with a surface fitting module, a trajectory planning module and a motion control module; the control unit is also integrated with a coordinate alignment module and / or a point cloud segmentation module; the second robotic arm performs ultrasonic detection according to the executable motion instructions of the robotic arm output by the motion control module in the control unit.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1. In one example, B-spline surface fitting of point cloud data can produce a continuous and smooth surface model, effectively processing the discrete noise in the point cloud data, better adapting to the complex shape of the detection surface, and avoiding the trajectory discontinuity problem caused by irregular shape; at the same time, parametric mapping can ensure that the distribution of point cloud data in the parameter domain is more uniform and reasonable, avoiding the local boundary error problem caused by unreasonable parameter distribution; further, trajectory planning can enable the detection probe to move smoothly along the predetermined path and cover all areas of the detection surface, avoiding detection errors caused by incorrect posture.
[0037] 2. In one example, a world coordinate system is established using the first frame of RGB-D data, and the point clouds of subsequent frames are aligned with the first frame point cloud frame by frame, thereby unifying all point cloud data into the same world coordinate system. The first frame point cloud is used as a benchmark, providing a fixed reference frame for subsequent point clouds, thereby effectively reducing the cumulative error in multi-view stitching and improving the robustness and stability of point cloud data stitching.
[0038] 3. In one example, the positions and parameter values of the control points are optimized simultaneously through an iterative optimization method, so that the B-spline surface can better approximate the point cloud data, solving the problems of trajectory discontinuity and boundary error caused by unreasonable selection of control points and parameters.
[0039] 4. In one example, calculating the normal vector within the parameter domain can determine the end posture of the detection probe at each detection point, ensuring that the detection probe maintains the correct contact angle with the detection surface. At the same time, combined with trajectory planning, it can ensure that the probe can move smoothly along the predetermined path during the detection process and maintain the correct posture, thereby achieving high-precision detection.
[0040] 5. In one example, a dual-arm collaborative inspection system was proposed. One of the arms is equipped with a depth camera to collect point cloud data, while the other arm performs ultrasonic inspection after the control unit outputs the three-dimensional inspection trajectory. This improves the flexibility and real-time performance of the inspection, has strong scalability and practical application potential in the field of ultrasonic inspection, and provides a new idea for the development of automated ultrasonic inspection technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The specific embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The same reference numerals are used in these drawings to represent the same or similar parts. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application.
[0042] Figure 1 A flow chart of a method provided as an example of the present invention;
[0043] Figure 2 A schematic diagram of a point cloud 3D reconstruction process provided by an example of the present invention;
[0044] Figure 3 A schematic diagram of the first frame anchored world coordinate system registration principle provided for an example of the present invention;
[0045] Figure 4 A schematic diagram of trajectory generation based on a B-spline surface provided as an example of the present invention;
[0046] Figure 5 A schematic diagram of a three-dimensional coverage trajectory generation process provided by an example of the present invention;
[0047] Figure 6 An ultrasonic detection system architecture diagram is provided for an example of the present invention. DETAILED DESCRIPTION
[0048] The technical solution of the present invention is described clearly and completely below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0049] In the description of the present invention, it should be noted that the directions or positional relationships indicated by "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. are based on the directions or positional relationships described in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the use of ordinal numbers (for example, "first and second", "first to fourth", etc.) is for the purpose of distinguishing objects and is not limited to this order, and cannot be understood as indicating or implying relative importance.
[0050] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention.
[0051] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0052] In one example, if Figure 1 As shown, a method for generating ultrasonic detection trajectories for complex surfaces includes the following steps:
[0053] S1: Collect point cloud data of the inspection surface of the workpiece to be tested.
[0054] Specifically, the point cloud data of the workpiece to be measured can be collected by a depth camera. Preferably, the first robotic arm (robotic arm B) is equipped with a depth camera to facilitate the collection of multi-angle point cloud data of the workpiece to be measured.
[0055] S2: Perform parameter domain mapping on the point cloud data, establish a mathematical relationship between the point cloud data and the surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the B-spline surface.
[0056] In this step, B-spline surface fitting is performed on the point cloud data to obtain a parameterized smooth surface model.
[0057] S3: In the two-dimensional parameter domain corresponding to the B-spline surface, a covering trajectory planning algorithm is used to generate a two-dimensional covering trajectory, and the two-dimensional covering trajectory is back-mapped to three-dimensional space to generate a three-dimensional detection trajectory. Automatic ultrasonic detection of complex surfaces is then performed based on the three-dimensional detection trajectory.
[0058] The overlay trajectory planning algorithm may be a Boustrophedon Cellular Decomposition (BCD) algorithm. Optionally, a second robotic arm (robotic arm A) equipped with an ultrasonic detection probe performs detection based on a three-dimensional detection trajectory. Both the first robotic arm and the second robotic arm are controlled by a control unit, such as a PC, to transmit point cloud data and ultrasonic detection data in real time.
[0059] In one example, after collecting the point cloud data of the inspection surface of the workpiece to be inspected, the point cloud 3D reconstruction is also included. The point cloud 3D reconstruction includes the point cloud data splicing processing steps:
[0060] The first frame of RGB-D data (color depth data) is used to anchor the world coordinate system. The subsequent point clouds are aligned with the anchored first frame point cloud frame by frame to obtain a complete 3D point cloud model of the workpiece to be inspected. Optionally, the subsequent point clouds are aligned with the anchored first frame point cloud frame by frame using the ICP algorithm.
[0061] Furthermore, if Figure 2 As shown, the cloud data splicing process includes the following sub-steps:
[0062] (1) Arrange calibration points with known three-dimensional coordinates on the working plane (reference plane) and collect the first frame of RGB-D image.
[0063] Specifically, if Figure 3 As shown, in the world coordinate system B A In the first base coordinate system of the second manipulator, a set of calibration points are known. Arranged on the working plane (xy plane), the precise three-dimensional coordinates of these points are in the world coordinate system B A Furthermore, the first robotic arm (robotic arm B) is fixed at a certain position, and the depth camera mounted on the first robotic arm captures the first frame of RGB-D image to obtain the camera coordinate system under the frame
[0064] (2) Obtain the two-dimensional pixel position of the calibration point, combine the camera intrinsic parameters and depth information, and restore the three-dimensional coordinates of the calibration point in the camera coordinate system.
[0065] Specifically, in the first frame RGB-D image, the two-dimensional pixel positions of the calibration points are detected by image processing, and the camera intrinsic parameters (calibrated) and depth information are combined to restore the camera coordinate system of these calibration points. The three-dimensional coordinates of
[0066] (3) Solve the rigid body transformation from the camera coordinate system to the world coordinate system, and anchor the first frame data in the world coordinate system.
[0067] Specifically, using the PnP algorithm, we can get the coordinate system from the camera To world coordinate system B A Rigid body transformation
[0068]
[0069] in, Represents the rotation matrix from the camera coordinate system to the world coordinate system; Represents the translation vector from the camera coordinate system to the world coordinate system.
[0070] Satisfy any point have:
[0071]
[0072] Since the world coordinate system B A The accuracy is high. This transformation accurately "anchors" the first frame of RGB-D data in the world coordinate system, and then uses the first frame point cloud as a benchmark to provide a fixed reference frame for subsequent point clouds, thereby effectively reducing the cumulative error in multi-view stitching and improving the robustness and stability of point cloud data stitching.
[0073] (4) After the second manipulator moves, the posture of the manipulator end at the i-th frame is obtained, the position of the camera in the manipulator base coordinate system is calculated using hand-eye calibration, and the relative transformation between the two frames is estimated through forward kinematics to obtain the initial transformation.
[0074] Specifically, for the i-th frame, the second base coordinate system of the first manipulator {B B The terminal posture in
[0075] Furthermore, the camera installation relationship obtained by hand-eye calibration
[0076] At this time, the camera in the i-th frame is at {B B} in the pose for:
[0077]
[0078] Then directly use the motion data of the second robot arm and the first frame camera pose (Relative transformation between two frames) Calculate the initial transformation value
[0079]
[0080] Among them, the camera pose of the first frame It can be estimated from the forward kinematics of the second robotic arm (combined with hand-eye calibration).
[0081] (5) Taking the initial transformation as the starting point, the point cloud of the i-th frame is rigidly registered with the point cloud of the first frame to obtain the registration result.
[0082] Specifically, the above initial transformation is adopted As the initial value of the ICP algorithm, the point cloud of the i-th frame is rigidly registered with the point cloud of the first frame. Assume that ICP calculates a correction transformation ΔT (i) , so that the precise global pose of the i-th frame is
[0083]
[0084] Among them, the objective function of ICP is:
[0085]
[0086] in, Indicates the jth point in the i-th frame (in in), and Indicates the corresponding matching point in the first frame (in and has passed Convert to {B A}Down).
[0087] (6) According to the registration results, each frame of point cloud is converted to the world coordinate system and converged, and finally the global three-dimensional reconstruction is completed to obtain a complete three-dimensional point cloud model of the workpiece to be inspected.
[0088] Specifically, for each frame, its point cloud data is converted to the world coordinate system {B A}middle:
[0089]
[0090] in, Represents the coordinates of point cloud data in the world coordinate system; p (i) Represents the coordinates of the point cloud of the i-th frame in the local coordinate system. Finally, the point clouds of each frame are aggregated together to achieve global 3D reconstruction.
[0091] In one example, if Figure 2 As shown, point cloud 3D reconstruction also includes detection surface segmentation processing, that is, after the point cloud data splicing processing step, it also includes:
[0092] The point cloud data of the inspection surface in the three-dimensional point cloud model is segmented to obtain a point cloud subset of the target inspection area. Preferably, the point cloud data is denoised, smoothed, and segmented, and a region growing algorithm is used to extract the point cloud subset of the inspection surface of the workpiece to be inspected from the entire point cloud to obtain the target inspection area.
[0093] Specifically, point cloud segmentation is based on the region growing algorithm, which uses the consistency of spatial position and normal vector to segment the point cloud. That is, by changing the seed point selection method to manually select the initial seed point, and using the similarity conditions of spatial distance and normal direction, points that meet the requirements are gradually classified into the same segmentation region, thereby extracting the target detection area. The specific process is as follows:
[0094] (1) Preprocessing and normal vector estimation: After preliminary filtering and noise removal of the 3D point cloud data, the local normal vector is calculated for each point. Optionally, principal component analysis (PCA) is used to estimate the normal vector within the local neighborhood of the point, thus providing a basis for subsequent similarity judgment.
[0095] (2) Manually select a seed point: Manually select a seed point p from the target detection surface s and its corresponding normal vector n s , as the starting point of the region growing algorithm.
[0096] (3) Region growing algorithm: With the seed point as the core, traverse the unsegmented candidate points in the point cloud. For each candidate point p i and its normal vector n i , calculate its distance from a point p in the current area j The Euclidean distance between the two and the angle θ between the normal vectors ij If the following conditions are met:
[0097] ‖p i -p j ‖<d th
[0098]
[0099] Then, point p i Included in the current area. Among them, d th is the preset distance threshold; θ th Represents the maximum allowed normal vector angle. This process is iterated continuously until there are no more candidate points that meet the above conditions, thus forming a complete detection surface area.
[0100] In this example, the spatial information and local geometric features of the point cloud data are used to effectively distinguish the target detection surface from background or noise data. Manually selecting seed points allows for flexible control of the segmentation region, resulting in more accurate extraction of the target detection surface and providing a precise geometric model for subsequent trajectory planning.
[0101] In one example, the obtained B-spline surface is replaced by calculating the optimal B-spline surface, including:
[0102] S21: Assign parameter values to each point in each point cloud data based on the Euclidean distance between the points.
[0103] Specifically, before constructing the B-spline surface model, the discrete three-dimensional data must be mapped to the two-dimensional parameter domain, that is, for each point Q k Assign a pair of parameter values (u k ,v k ), so that the surface mapping can be defined later:
[0104]
[0105] And satisfy the approximate relationship:
[0106] Qk ≈S(u k ,v k ).
[0107] Furthermore, the quality of parameterization directly affects the fitting accuracy. If the parameter distribution can reflect the true geometric characteristics of the original point cloud, it will help reduce the fitting error. The present invention considers the Euclidean distance between points for parameter initialization:
[0108] Assume that the data are arranged in order in a certain direction and define the distance d between adjacent points k for:
[0109] d k =‖Q k+1 -Q k ‖,k=1,2,...,N-1;
[0110] Cumulative total chord length Then, define the parameters as:
[0111]
[0112] For two-dimensional parameterization, it is often necessary to perform similar processing on the two directions, or first use some method to embed the point cloud into a plane (such as using principal component analysis PCA to determine the local plane), and then perform two-dimensional parameterization on the plane to obtain each point Q k The parameter value (u k ,v k ).
[0113] S22: Establish mathematical relationships between point cloud data and surface control points.
[0114] Among them, the B-spline surface is a parametric surface constructed based on the B-spline basis function, and its mathematical expression is:
[0115]
[0116] Among them, S(u,v) represents the position vector of the B-spline surface, which is determined by the parameters u and v; N i,p (u) and N j,q (v) are B-spline basis functions defined in the directions of parameters u and v, with orders p and q respectively; Represents the surface control point; i and j represent the index of the control point in the u direction and v direction respectively; n and m represent the dimensions of the control point in the u direction and v direction respectively.
[0117] The B-spline basis function is defined recursively:
[0118] When p = 0,
[0119]
[0120] For p ≥ 1,
[0121]
[0122] Where U={t0,t1,…,t n+p+1} is the node vector. Similarly, construct the node vector V={s0,s1,...,s m+q+1} and the corresponding basis function N j,q (v).
[0123] The segmented detection surface is a set of discrete three-dimensional point cloud data:
[0124]
[0125] Preferably, in order to ensure the subsequent fitting effect, the raw data often needs to be preprocessed, including noise removal, normalization, and outlier removal. After preprocessing, it is assumed that these points can approximately describe a continuous and smooth surface.
[0126] S23: An alternating optimization iteration method is used to solve the optimal surface control points and the corresponding parameter domain coordinates, achieving accurate fitting and smooth expression of the complex detection surface and obtaining the optimal B-spline surface. The alternating optimization iteration includes: when the parameters are fixed, solving the optimal surface control points; when the control points are fixed, independently solving the parameters for each data point to minimize the error.
[0127] Specifically, the alternating optimization iterative method is used to solve the optimal surface control points and the corresponding parameter domain coordinates, which decomposes the problem into two alternating sub-problems:
[0128] (1) Sub-problem 1 (fixed parameter optimization control point):
[0129] When the parameters of all data points {(u k ,v k )} is fixed, the objective function is:
[0130]
[0131] About control point P ij is a linear least squares problem, which is efficiently solved using normal equations or other numerical methods such as QR decomposition or SVD.
[0132] (2) Sub-problem 2 (fixed control point optimization parameters):
[0133] When the control point {P ij}After being fixed, the parameter pair (u k ,v k ), such that:
[0134] f k (u,v)=||S(u,v)-Q k || 2 ;
[0135] This problem is a nonlinear minimization problem, and this example uses Newton's method or another gradient descent method to update the parameters step by step.
[0136] By continuously alternating and iterating these two sub-problems until the overall error converges to a stable value or meets the predetermined convergence criterion, a more ideal control point and parameter distribution are obtained.
[0137] In one example, if Figure 4 As shown in the figure, based on the two-dimensional parameter domain mapping result after the B-spline surface fitting in the previous example, a covering trajectory planning is performed in the parameter domain to plan a two-dimensional path that meets the coverage requirements, and then it is mapped back to the three-dimensional space. Combined with the surface position and normal vector, a high-precision and continuous three-dimensional detection trajectory is generated. The three-dimensional coverage trajectory generation process is shown in the figure. Figure 5 shown.
[0138] In the parameter domain, (u, v) can be regarded as "conventional 2D image coordinates" and various image processing and contour detection are performed on it: the (u, v) coordinate set representing the detection area is discretized and rasterized to generate a "binary image"; the contour is extracted through the Canny or Sobel operator, and the largest contour is found as the detection area. The small contours distributed inside are regarded as obstacles.
[0139] Compared with performing morphological operations directly in three-dimensional or single-plane projection, "flattening" the surface to its own optimal parameter domain can often reduce the distortion caused by uneven surface curvature, making contour detection and subsequent planning more accurate.
[0140] For the planned {(u k ,v k )} series of path points can be directly mapped to the three-dimensional space through the B-spline surface equation S(u,v) to obtain the three-dimensional detection trajectory q k :
[0141]
[0142] Preferably, inverse mapping the two-dimensional coverage trajectory to three-dimensional space includes:
[0143] According to the mathematical expression of the B-spline surface, the coordinates of the trajectory points in the parameter domain are mapped to the three-dimensional space coordinates, and the surface normal vector at the corresponding position is calculated. The position and posture of the end of the robotic arm are generated by combining the normal vector and the space coordinates.
[0144] At this point, it is necessary to calculate the normal vector of the detection probe. In this example, the B-spline surface is used in (u k ,v k ) is calculated by taking the first-order partial derivative at:
[0145]
[0146] Then the normal vector of the surface at this point is for:
[0147]
[0148] By calculating the normal vector of the detection probe, it is possible to avoid PCA normal vector estimation in the neighborhood of the point cloud, because the parametric surface itself already carries the normal vector information. The normal vector is calculated based on the global geometric information and is not affected by local noise and uneven distribution of the point cloud, so it is smoother and more accurate. At the same time, the normal vector of the detection probe can be calculated to determine the end posture of the detection probe at each detection point, ensuring that the detection probe maintains the correct contact angle with the detection surface. Combined with the three-dimensional detection trajectory q k With normal vector A complete trajectory can be directly constructed to ensure that the probe can move smoothly along the predetermined path during the detection process.
[0149] In one example, the present invention further includes an ultrasonic detection method, which is implemented based on the ultrasonic detection trajectory generation method formed by any one of the above examples or a combination of multiple examples. After obtaining the three-dimensional detection trajectory, the ultrasonic detection method further includes:
[0150] The three-dimensional detection trajectory is smoothed and converted into motion instructions that can be executed by the robotic arm.
[0151] Specifically, an inverse kinematics algorithm is used to calculate the motion trajectory of the robot arm joint space based on the three-dimensional detection trajectory. Spline interpolation processing, such as cubic spline interpolation processing, is performed in the robot arm joint space to further improve the smoothness of the motion trajectory. The smoothed motion trajectory is converted into a robot arm motion instruction, which then drives the robot arm equipped with an ultrasonic probe to complete the actual ultrasonic detection process, thereby realizing an automated full coverage scan of the workpiece surface.
[0152] Preferably, after completing the ultrasonic testing step, the ultrasonic testing method further includes analyzing and processing the ultrasonic testing data. Specifically, the ultrasonic testing data returned by the robotic arm is acquired in real time, and workpiece defects are automatically identified and quantitatively evaluated based on a preset defect recognition algorithm. The test results are then visually displayed to assist in subsequent decision-making and analysis.
[0153] Combining the above examples, we obtain the preferred trajectory generation method of the present invention, which includes the following steps:
[0154] S100: collecting point cloud data of the detection surface of the workpiece to be tested;
[0155] S200: The first frame of color depth data is used to anchor the world coordinate system. The subsequent frame point clouds are aligned with the anchored first frame point cloud frame by frame to obtain a complete 3D point cloud model of the workpiece to be inspected.
[0156] S300: Segmenting the point cloud data of the detection surface in the three-dimensional point cloud model to obtain a point cloud subset of the target detection area;
[0157] S400: Perform parameter domain mapping on the point cloud subset of the target detection area, establish the mathematical relationship between the point cloud data and the surface control points, and use the alternating iterative optimization method to solve the surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface
[0158] S500: In the two-dimensional parameter domain corresponding to the B-spline surface, a covering trajectory planning algorithm is used to generate a two-dimensional covering trajectory, and according to the mathematical expression of the B-spline surface, the coordinates of the trajectory points in the parameter domain are mapped to three-dimensional space coordinates, and the surface normal vector at the corresponding position is calculated. The normal vector and space coordinates are combined to generate a three-dimensional detection trajectory with the end posture of the robot arm.
[0159] Furthermore, based on the above-mentioned preferred trajectory generation method, the ultrasonic detection method further includes:
[0160] S600: Smoothing the three-dimensional detection trajectory and converting it into motion instructions executable by the robotic arm, thereby driving the robotic arm to perform automatic ultrasonic detection operations.
[0161] The present invention uses a depth camera on the first robotic arm to perform three-dimensional reconstruction of the workpiece to be inspected, and then uses a B-spline surface to finely fit the point cloud data of the inspection surface. Trajectory planning is then performed in the two-dimensional parameter domain corresponding to the fitted surface, and the two-dimensional trajectory is back-mapped back into three-dimensional space, resulting in a smooth, continuous, and highly accurate inspection trajectory. Furthermore, first-frame data anchoring technology is used to avoid the cumulative errors caused by dual-arm calibration and multi-view stitching, ultimately achieving automated ultrasonic inspection of complex and irregularly shaped components.
[0162] The present invention also includes an ultrasonic detection trajectory generation system, which has the same technical concept as the above-mentioned ultrasonic detection trajectory generation method, and the trajectory generation system includes:
[0163] An acquisition module, used for acquiring point cloud data of the detection surface of the workpiece being tested;
[0164] The surface fitting module is used to perform parameter domain mapping on point cloud data, establish the mathematical relationship between point cloud data and surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface;
[0165] The trajectory planning module is used to generate a two-dimensional covering trajectory using a covering trajectory planning algorithm in the two-dimensional parameter domain corresponding to the optimal B-spline surface, and to reversely map the two-dimensional covering trajectory to three-dimensional space to obtain a three-dimensional detection trajectory.
[0166] In one example, the trajectory generation system further includes a coordinate alignment module and / or a point cloud segmentation module, preferably including a coordinate alignment module and a point cloud segmentation module. The coordinate alignment module uses the first frame of color depth data to anchor the world coordinate system, allowing subsequent frame point clouds to be aligned with the anchored first frame point cloud frame by frame to obtain a complete three-dimensional point cloud model of the workpiece to be inspected. The point cloud segmentation module is used to segment the point cloud data of the inspection surface to obtain a point cloud subset of the target inspection area.
[0167] The present invention also includes an ultrasonic detection system, which has the same technical concept as the above trajectory generation system, such as Figure 6 As shown, the ultrasonic detection system includes a control unit (PC), a first robotic arm (robotic arm B) and a second robotic arm (robotic arm A) connected to the control unit. The first robotic arm is integrated with an acquisition module, i.e., a depth camera, for collecting point cloud data of the detection surface of the workpiece being tested; the control unit is integrated with a surface fitting module, a trajectory planning module, and a motion control module; the control unit is also integrated with a coordinate alignment module and / or a point cloud segmentation module, preferably with a coordinate alignment module and a point cloud segmentation module; the second robotic arm is integrated with an ultrasonic probe for performing ultrasonic detection operations according to the motion instructions executable by the robotic arm output by the motion control module in the control unit. It can be applied to the automated ultrasonic non-destructive testing of the surfaces of large and special-shaped workpieces, can effectively ensure that the detection surface is not missed, reduce repeated scanning, and at the same time improve the smoothness of the trajectory, the motion stability of the robotic arm, and the accuracy of the detection data, significantly improving the automation level of ultrasonic detection.
[0168] The above specific implementation methods are detailed descriptions of the present invention. It cannot be considered that the specific implementation methods of the present invention are limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, they can make several simple deductions and substitutions without departing from the concept of the present invention, which should be regarded as falling within the scope of protection of the present invention.
Claims
1. A method for generating an ultrasonic detection trajectory, characterized in that: The method comprises the following steps: Collecting point cloud data of the inspection surface of the workpiece being tested; Perform parameter domain mapping on the point cloud data, establish the mathematical relationship between the point cloud data and the surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the B-spline surface; In the two-dimensional parameter domain corresponding to the B-spline surface, a covering trajectory planning algorithm is used to generate a two-dimensional covering trajectory, which is then inversely mapped into three-dimensional space to generate a three-dimensional detection trajectory.
2. The ultrasonic detection trajectory generation method according to claim 1, characterized in that: After collecting the point cloud data of the detection surface of the workpiece to be tested, the step of splicing the point cloud data is also included: The first frame of color depth data is used to anchor the world coordinate system, and the subsequent frame point clouds are aligned with the anchored first frame point cloud frame by frame to obtain a complete three-dimensional point cloud model of the workpiece to be inspected.
3. The ultrasonic detection trajectory generation method according to claim 2, characterized in that: After the point cloud data splicing processing step, the method further includes: The point cloud data of the detection surface in the 3D point cloud model is segmented to obtain a point cloud subset of the target detection area.
4. The ultrasonic detection trajectory generation method according to claim 1, characterized in that: The obtained B-spline surface is replaced by the calculated optimal B-spline surface, including: Assign parameter values to each point in each point cloud data based on the Euclidean distance between the points; Establish mathematical relationships between point cloud data and surface control points: Among them, S(u,v) represents the position vector of the B-spline surface, which is determined by the parameters u and v; N i,p (u) represents the B-spline basis function in the direction of parameter u; N j,q (v) represents the B-spline basis function in the direction of parameter v; P ij Represents the surface control point; i, j represent the index of the control point in the u direction and v direction respectively; n, m represent the dimension of the control point in the u direction and v direction respectively; p, q represent the order of the B-spline basis function in the u direction and v direction respectively; An alternating optimization iteration method is used to solve the optimal surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface; the alternating optimization iteration includes: when the parameters are fixed, solving the optimal surface control points; when the control points are fixed, independently solving the parameters for each data point to minimize the error.
5. The ultrasonic detection trajectory generation method according to claim 1, characterized in that: The reverse mapping of the two-dimensional coverage trajectory to the three-dimensional space includes: According to the mathematical expression of the B-spline surface, the coordinates of the trajectory points in the parameter domain are mapped to the three-dimensional space coordinates, and the surface normal vector at the corresponding position is calculated. The position and posture of the end of the robotic arm are generated by combining the normal vector and the space coordinates.
6. An ultrasonic detection method, characterized in that: Based on the trajectory generation method according to any one of claims 1 to 5, after obtaining the three-dimensional detection trajectory, the ultrasonic detection method further includes: The three-dimensional detection trajectory is smoothed and converted into motion instructions executable by the robotic arm, thereby driving the robotic arm to perform ultrasonic detection.
7. An ultrasonic detection trajectory generation system, characterized in that: The system comprises: An acquisition module, used for acquiring point cloud data of the detection surface of the workpiece being tested; The surface fitting module is used to perform parameter domain mapping on point cloud data, establish the mathematical relationship between point cloud data and surface control points, and solve the surface control points and the corresponding parameter domain coordinates to obtain the optimal B-spline surface; The trajectory planning module is used to generate a two-dimensional covering trajectory using a covering trajectory planning algorithm in the two-dimensional parameter domain corresponding to the optimal B-spline surface, and to reversely map the two-dimensional covering trajectory to three-dimensional space to obtain a three-dimensional detection trajectory.
8. The ultrasonic detection trajectory generation system according to claim 7, characterized in that: The system further comprises a coordinate alignment module and / or a point cloud segmentation module and / or a motion control module; The coordinate alignment module uses the first frame color depth data to anchor the world coordinate system, so that the subsequent frame point cloud is aligned with the anchored first frame point cloud frame by frame to obtain a complete 3D point cloud model of the workpiece to be inspected; The point cloud segmentation module is used to segment the point cloud data of the detection surface and obtain the point cloud subset of the target detection area.
9. An ultrasonic detection system, characterized in that: The ultrasonic detection system includes the ultrasonic detection trajectory generation system according to any one of claims 7-8, and the ultrasonic detection system also includes a motion control module for smoothing the three-dimensional detection trajectory and converting it into motion instructions executable by the robotic arm, thereby driving the robotic arm to perform ultrasonic detection.
10. The ultrasonic detection system according to claim 9, characterized in that: The system includes a control unit, a first robotic arm and a second robotic arm connected to the control unit; The first robotic arm is integrated with an acquisition module; the control unit is integrated with a surface fitting module, a trajectory planning module and a motion control module; the control unit is also integrated with a coordinate alignment module and / or a point cloud segmentation module; the second robotic arm performs ultrasonic detection according to the executable motion instructions of the robotic arm output by the motion control module in the control unit.