1. Introduction
NDT is a critical technique used to assess the integrity of materials or structures and is widely employed in aerospace, nuclear energy, construction, and manufacturing industries [
1]. With continuous advancements in society and science, intelligent robotics technology (machines with the ability to take actions and make choices) is gaining widespread application in the field of NDT. Intelligent robots offer the potential to enhance efficiency, reduce human errors, and mitigate risks through autonomous scanning and testing capabilities. Such systems are becoming increasingly feasible for NDT application due to recent innovations in collaborative robotics [
2]. Katerina recently introduced a robotic human–machine collaborative system designed to fulfil the automation requirements of NDT measurement processes within the steel production industry [
3]. Canzhi, through studying dual-robot synchronous motion systems, proposed a trajectory-planning -based solution to tackle NDT challenges specific to semi-enclosed regions of complex curved composite material components. This method allows for precise trajectory planning and the successful detection of all artificial porosity defects with diameters equal to or greater than 3 mm [
4]. The IntACom project, led by the TWI Technology Centre (Wales) and backed by aviation partners and the Welsh Government, has successfully developed a robotic NDT system for the rapid inspection of complex geometric composite components [
5]. In addition, reference [
6] presents a robot-assisted ultrasonic non-destructive testing system designed for the automated inspection of aerospace engine blades. The system effectively detects defects as small as 0.15 mm and offers high precision in thickness measurement.
In the domain of robotic NDT, path planning plays a pivotal role in achieving efficient autonomous inspection [
7]. In the case of complex geometric structures, such as those found in the aerospace or automotive sector, it is usual for a highly skilled robotic and NDT operator to decompose the problem into a series of manageable inspection regions (typically a small raster region), taking care to avoid any obstacles during the planning phase, as evident from the current research methods [
8]. Some efforts have been made to automate this process, utilising live feedback from vision or other sensors. For example, reference [
9] proposed an innovative approach that combines force sensors, laser sensors, and RGB cameras to achieve multi-scale, collision-free robotic path planning and execution for NDT. This novel method allows for efficient path planning on noisy and incomplete point clouds generated by low-cost sensors, without relying on surface primitives. However, these approaches have some limitations with respect to the NDT probe footprint and/or geometric structure, while still requiring some level of manual optimisation. Similarly, the study in reference [
10], focusing on path planning within substation environments, underscores the importance of optimising algorithms for specific contexts, particularly where the frequency and angle of turns are key evaluative metrics.
To address these challenges, a novel method is proposed for an autonomous path-planning solution based on graph-theory techniques. This approach is inspired by the algorithm introduced in reference [
11], which effectively implements path planning by incorporating specific constraints in a weighted directed graph. This has provided a significant theoretical basis for our study in navigating complex environments. This solution leverages the digital model of the component and NDT probe footprint to generate paths autonomously with a greater degree of coverage, without the need for user interventions. Additionally, it addresses the need for the avoidance of obstacles and explores optimisation algorithms to improve the connectivity and traversal of nodes. In sum, this innovative autonomous path-planning solution offers a significant advancement in NDT within complex environments, setting a new benchmark for efficiency and precision.
Furthermore, the path-planning process incorporates movement restrictions, whereby the robot is limited to moving towards the nearest connected node with a preferred direction (the one with the least cost) and defines prohibited areas as obstacles. The proposed solution adopts a two-stage planning approach, initially utilising graph-based techniques and relevant concepts to determine the preferred travel directions (those that limit a sudden change in robotic movement) and subsequently employing Dijkstra’s algorithm [
12] to find paths to the next enclosed node, as needed.
3. Method
While the use of graph theory provides a mechanism to represent the NDT robotic path-planning problem in 3D space, it does not in itself provide a mechanism for robotic path planning and traversal. For this, several challenges need to be overcome. Firstly, having represented the surface of a component to be inspected as a series of 3D points in space, a method is needed to optimally connect the relevant nodes (those most favourable to the robotic movement). Secondly, weights need to be computed for node connections to establish the best next movement. Thirdly, obstacles need to be accounted for (those areas prohibited for robotic movement), as does keeping track of the visited nodes. Finally, there may be scenarios where the graph traversal will become trapped (traversed into a corner). For this, a solution is needed to ensure that full surface coverage is achieved.
Our solution is to leverage graph theory, KD-Tree data structure optimisation, a novel algorithm for computing node weights, and Dijkstra’s algorithm to provide an efficient NDT robotic path-planning solution in both two-dimensional and three-dimensional spaces. The following outlines our novel solution:
Initially, continuous surface data extracted from the CAD models are represented as a discrete triangular mesh. This is usually the starting point in any NDT path-planning step, with a CAD model being a digital twin of the component and environment. Using the Poisson disk sampling algorithm, these triangular meshes are converted into finer NDT inspection points. The output is a list of randomly ordered points in a 3D space, each representing an NDT inspection point. For example, the surface of a component may be several meters in size (represented as a triangular mesh within the CAD model). The NDT process (depending on the inspection requirements) may require that data are captured every 5 mm or so. The Poisson disk sampling algorithm provides a mechanism to generate these points, which will form the nodes of the graph (in this example, approximately 5 mm separation between points). An example is given in
Figure 2.
Represented as vertices in the graph,
. Here,
is the vertex set, E is the edge set, and
is the set of weights. The vertices
denote the inspection points extracted from the CAD model, the edges
indicate the potential paths between these points, and the weights
are determined based on the actual inspection cost or time complexity based on robotic movement. In the specific implementation of this paper, the weights
represent the robotic movement priority in the following four directions: forward, backward, left, and right. Considering the presence of restricted areas within the path-planning environment, we have designed a hybrid path-planning strategy. This is illustrated in
Figure 3.
Represented here in a two-dimensional space for simplicity, each inspection point is an un-ordered list. Based on an initial robotic start position (the start node of the graph), KD-Tree optimisation is used to find the inspection point to the current node. This search is limited to a narrow field of view and repeated for four quadrants, such that the nearest points forward, back, left, and right are computed. These points are added to the graph as new nodes and connected directly to the current node. A weight is then computed for each node edge based on the following preferred order of movement: forward, back, left, and right.
This ensures that robotic movement has a preferred direction of forward (least travel time to next node), with back, left, and right being optional choices when no forward node is present. This results in a natural raster path as the preferred robotic movement. This concept has previously been explored by the authors through the complete-surface-finding algorithm (CSFA) [
24], which incorporates flood-fill algorithms (FFAs) as a heuristic process to propagate through maps or networks, thereby discovering all positions within a connected surface or graph. Building upon this foundation, our current work introduces a modified flood-fill algorithm that enhances the process by incorporating graph theory, where localised knowledge and movement are used instead of this new approach based on graph theory. This new approach is particularly suited for un-ordered points, as it does not enforce a raster path. Instead, the algorithm computes node–node connections based on the least costly movement.
Extending
Figure 3, in this example, the final graph after computation of weights is given in
Figure 4. In this illustration, the green point denotes the starting point, the arrows indicate the direction of path traversal, and the grey points represent the restricted areas. As shown in
Figure 4, there are some use cases where the path planning will reach a “dead-end”—meaning that all surrounding nodes are either already visited or are within restricted areas with no other eligible nodes available—whereafter the algorithm automatically switches to Dijkstra’s algorithm for localised path planning. This is illustrated in
Figure 4, where the red point indicates the switch. The final escape path is depicted in
Figure 5. This mechanism allows the algorithm to effectively escape the “dead-end” while avoiding the restricted areas, thereby identifying the next unvisited compliant node. This is repeated recursively until all nodes have been visited.
In this context, Dijkstra’s algorithm solves for the shortest path from a source vertex to all other vertices in a weighted directed graph . Initially, a vertex set is established, containing vertices for which the shortest path has already been determined—initially including only . Concurrently, we maintain a distance vector dist, where signifies the current shortest path length from to .
The complete algorithm can be summarised as follows:
Within the directed graph framework, each vertex is assigned a state value, denoted as . Initially, this state value is set to positive infinity, represented by ∞, indicating that the shortest path length from the starting vertex to remains undetermined. The only exception is the source vertex, which has its state value set to 0, representing a 0 distance from itself. The current node is assigned as the initial starting node—vertex . This can be any node within the graph, but preferably user-selected based on the optimal starting position.
- 2.
State Propagation
Upon evaluating a vertex
, it acts as a vertex of a triangle, extending towards the following four primary directions: front, back, left, and right. Consequently, four triangular regions are associated with it, each containing a set of points, as shown in
Figure 2. Within each triangular extension, the algorithm sifts through the enclosed points, and, based on the Euclidean distance coupled with directional priority, it selects an optimal adjacent point. This strategy ensures that the adjacent points are chosen not only based on distance, but also on directional preference, ensuring path continuity and maximising spatial utilisation.
- 3.
Data Structure Optimisation
Considering the complexity of navigation in a three-dimensional space and potential data scalability challenges, the adoption of the KD-Tree data structure becomes imperative. Storing vertices from the graph within a KD-Tree ensures an efficient nearest-neighbour query within a time complexity of thereby significantly improving the algorithm’s performance efficiency.
- 4.
State Update
Once the least costly path from the current node to the connected nodes is determined, the current node is updated to this new position and the previous node marked as visited— is marked as processed. Furthermore, is incorporated into the set , which contains all vertices for which the least costly path has been determined. This is repeated until the current node has no available unvisited connections (i.e., a dead-end state encountered).
- 5.
Dead-end Escape
A “dead-end” is met when all proximal points in the four primary directions from a vertex have either been traversed, fallen within an obstacle, or aligned with the model’s edge. Dijkstra’s algorithm is used to allow the probe to escape based on the principle of the shortest path to the nearest unvisited nodes traversing through the graph. Then, we return to Step 4 and repeat until all nodes are visited.
The pseudocode of the hybrid algorithm used in this study is presented in Algorithm 1.
Algorithm 1: The pseudocode of the hybrid algorithm |
Function calculate_distance(nodeA, nodeB): return sqrt((x_b − x_a)² + (y_b − y_a)²) // Euclidean distance
Function find_nearest_unvisited_node(n_current): n_unvisited = {n_i ∈ Node s | n_i.visited = false} // Set of unvisited nodes return argmin_{n ∈ n_unvisited} calculate_distance(n_current, n)
Function update_robot_footprint(n_current): Nodes within the range of robot width from n_current -> visited = true Function move_robot(n_current, direction): n_current = n_current.direction if n_current.direction != null and n_current.direction.visited = false
Function find_path(n_start, n_target): for each n ∈ Nodes: n.tested = false n.w = infinity n_start.w = 0 Queue = {n_start} while Queue != empty: n_current = dequeue(Queue) n_current.tested = true for each n_adjacent ∈ {n_current.forward, n_current.backward, n_current.left, n_current.right}: dist = n_current.w + calculate_distance(n_current, n_adjacent) if dist < n_adjacent.w: n_adjacent.w = dist if n_adjacent.tested = false: enqueue(Queue, n_adjacent)
Path = empty stack n_current = n_target push(Path, n_current) while n_current ! = n_start: n_min = argmin_{n ∈ {n_current.forward, n_current.backward, n_current.left, n_current.right}} n.w n_current = n_min push(Path, n_current) return Path Main program: while there exist n ∈ Nodes such that n.visited = false: n_current = find_nearest_unvisited_node(n_current) if n_current exists: update_robot_footprint(n_current) move_robot(n_current, direction) // direction ∈ {forward, backward, left, right} find_path(n_current, n_target) |
At initialisation, if there is an edge from to w, then is the weight of the edge. If there is no path from to , then is set to infinity.
During the iterative process of the algorithm, a vertex
is chosen where
is the minimum among all vertices not in set
, as follows:
This vertex
is then added to
. At this time,
is the shortest path length from
to
. Moreover, for all vertices
not in
, if a shorter path can be obtained through the newly added vertex
to
, we carry out the following:
then update as follows:
Once all vertices are added to
, the algorithm ends, and the dist value of each vertex
is the shortest path length from
to
. For completeness, the full Dijkstra algorithm applied in this paper is shown in Algorithm 2.
Algorithm 2: Application of Dijkstra’s Algorithm for Determining Shortest Path Lengths in a Graph |
function Dijkstra(G, v0): // Initialize distance array and set of vertices S dist[] = {infinity} // An array to store the shortest distance from v0 to each vertex dist[v0] = 0 S = empty set while S does not contain all vertices in G: // Find the vertex u with minimum dist value and add it to S minDist = infinity u = None for each vertex v in G: if v not in S and dist[v] < minDist: minDist = dist[v] u = v add u to S // Update the shortest distance to other vertices through u for each neighbor w of u: if w not in S: newDist = dist[u] + cost(u, w) dist[w] = min(dist[w], newDist)
return dist |
4. Simulation and Results
In the simulation configuration, a two-dimensional sample space was computationally generated, structured as a grid with discrete vertices, denoted as
, at intervals of six units. Each
encapsulates explicit x and y coordinate values, representing its spatial position within the bi-dimensional domain. Additionally, within this sample space, a specified area with x and y coordinates ranging between 15 and 50 is explicitly demarcated as a prohibited area. This area serves as a simulation mechanism to represent physical obstacles or impassable regions within the sample space. In
Figure 6, the red region denotes the coverage area of the probe, with a width of three units. The blue dots signify the discrete vertices
within the sample space grid.
Setting off from the coordinate (0, 0), the algorithm operates according to its pre-determined logic to identify the next feasible node, whilst steering clear of the prohibited zones. It proceeds in this fashion until it has traversed all of the nodes within the sample, thereby formulating an optimal path for probe inspection. The global path is indicated by the red line with an arrow in
Figure 7. The resultant route embodies the algorithm’s efficacy in manoeuvring through a constrained environment, and it is potentially the most efficient trajectory under the given parameters.
In order to assess the reliability and generalisation capability of the hybrid algorithm, we devised a series of diverse sample scenarios for validation.
Figure 8 shows a distinct L-shaped domain. This configuration is bifurcated into the following two segments: the first is a vertically oriented rectangle with dimensions of 60 units in width and 240 units in height, originating at the coordinates (40, 40); the second is a horizontally oriented rectangle measuring 200 units in width and 60 units in height, spanning from (40, 40) to (240, 100). Within this L-shape, an obstacle of 30 units in width and 40 units in height is positioned, ranging from (50, 80) to (80, 120).
Figure 9 presents an inverted “T” configuration. The main body is a vertically aligned rectangle of 80 units in width and 240 units in height, with starting coordinates of (100, 40). Atop this, a horizontal rectangle extends, sized at 200 units in width and 60 units in height, ranging from (40, 40) to (240, 100). An internal obstacle, measuring 40 units in width and 70 units in height, is located between coordinates (120, 80) and (160, 150).
Figure 10 shows a specimen reminiscent of a “rectangular ring”. This construct predominantly comprises the following two elements: the external perimeter is a rectangle of 200 units in width and 240 units in height, with its origin at (40, 40), while the internal component is a rectangle of 80 units in width and 160 units in height, commencing at (100, 70). Within this “rectangular ring,” another obstacle, spanning 40 units in width and 70 units in height, occupies the region from (100, 10) to (150, 50). Through validation across various two-dimensional geometric samples, the hybrid algorithm demonstrates pronounced reliability in the bi-dimensional space. The algorithm not only adapts efficiently to a myriad of geometric scenarios, but also adeptly avoids obstacles, ensuring pathway integrity and superior optimisation, whilst navigating clear of a dead-end.
In order to more profoundly and intuitively elucidate the advantages of the application of the KD-Tree in data processing, this study tabulates the data processing speeds when employing the KD-Tree data structure versus those without it, as shown in
Table 1. Furthermore, to quantify the performance discrepancy between the two, we have also calculated the performance enhancement rate.
In order to further assess the performance of the algorithm, this study tested it on a 3D point cloud data model of a car door. This model was processed using the open-source software MeshLab and transformed into a point cloud representation, as shown in
Figure 11, consisting of 9709 sampled points. The path result of the 3D data processed through a hybrid algorithm is shown in
Figure 12, where the coordinate system is represented red, green, and blue arrows corresponding to the X, Y, and Z axes, respectively.