1. Introduction
The advancement and the increasing application of manufacturing technology have widely expanded the use of CMMs. Measuring the tolerances of manufactured parts is a required daily concern in the production cycle of the manufacturing industry. A key task of this process is the inspection of the manufactured part using a CAD drawing. Many of the manufactured parts come from the same CAD drawing. Thus, their inspection process can be automated and performed repeatedly by a CMM without the need for operator intervention. The CMM’s probe path planning can be generated either manually or using a path planning method. Several methodologies have been developed for finding the optimal path that connects two points without causing any collision or damage to the robot. Some of the successful path planning algorithms are the ant colony optimization (ACO) [
1], genetic algorithms [
2], rapidly exploring random tree (RRT) [
3], neural network [
4], probabilistic roadmap algorithm (PRM) [
5] and A* algorithm [
6].
Coordinate measurements can be performed using a CMM or directly on machine tools. Measuring systems can be classified into two main types based on whether they are equipped with contact or non-contact measuring probes [
7]. The machines equipped with contact measuring probes are widely used in inspection tasks. However, the disadvantage of their inherent low speed is the only reason that prevents them from being used profitably for the repetitive measurement of complex parts [
8]. During the measurement process using a CMM, only a finite number of points on the examined part are sampled [
9].
A CMM is utilized to capture the spatial coordinates of a single or multiple points on the component’s surfaces. The acquired data are used to mathematically formulate the geometrical and dimensional attributes of the components. Parameters measurable with a CMM include distances between points, feature centers, lines or planes, as well as diameters of circular, cylindrical or spherical features, and angles formed between lines, planes or axes. Moreover, the evaluation of parameters related to the tolerances can be performed such as flatness, cylindricity, surface profile, parallelism, angularity, perpendicularity, coaxiality and symmetry. These parameters provide essential information for ensuring that the examined component complies with the design specifications.
1.1. Literature Review
Sadaoui et al. proposed an approach for generating the path of a laser sensor integrated with a CMM on different measurement planes [
10]. Morozov et al. suggested a computer-aided scan path planning applied using a robotic arm for non-destructive testing [
11]. Masood et al. nominated an algorithm to generate the tool path using point cloud data [
12]. Fountas and Vaxevanidis used swarm-based evolutionary algorithms for the 3D tool path trajectory optimization [
13]. Lin et al. recommended an approach for measurement path planning of airfoils [
14]. Stojadinovic et al. presented a path planning model based on a CAD model for measuring a prismatic part using a CMM [
15]. Wan et al. suggested an optimization to the inspection path of a propeller to reduce the inspection time by 60% and decrease the inspection error by 8 μm [
16]. Ma et al. proposed a contour-based path planning method using Monte Carlo estimation in the cost function [
17]. Mansour et al. proposed a hybrid optimization method to determine the optimal placement of a measured component in the operation space of a CMM and the optimal trajectory of the CMM’s probes in order to reduce the measurement time [
18].
Jin et al. proposed a modified RRT algorithm for generating paths and used a B-spline interpolation algorithm to smooth them [
19]. Ou et al. introduced a method that combines adaptive visibility graphs and the A* algorithm to improve the path planning efficiency of mobile robots [
20]. Li et al. used an improved twin delayed deep deterministic policy gradient algorithm for improved path planning generation in a dynamic environment [
21]. Shujuan et al. used an A*, the Hungarian and a genetic algorithm with an improved bat algorithm for assigning multiple target points and solving the path planning problem in a dynamic environment [
22]. Huang et al. proposed an improved bidirectional RRT* path planning algorithm with adaptive search strategy assignment mechanism in order to find the optimal path in 3D environments [
23]. Zhou et al. suggested a bio-inspired algorithm that uses the basic mechanisms of plant growth, including phototropism, negative geotropism and branching for finding the optimal path in a 3D environment with static obstacles [
24]. Chowdhury et al. nominated a reverse glowworm swarm algorithm for solving the path planning problem in a 3D environment with static and dynamic obstacles [
25].
1.2. Problem Statement
Many times, multiple measurements in different areas need to be taken to fully measure a component. Using a CMM with a contact measuring probe, due to its manufacturing limitations, requires more time, and the search for a solution to speed up the measuring process using the existing machines is an open field of research. The measuring time can be increased unnecessarily due to the fact that the measurements in the different areas of the part are not performed in the optimal order, and the measuring probe travels long distances from one area to another. Thus, the component’s measurement time is increased without gaining any advantage.
1.3. Contribution
Currently, despite the wide application of path planning algorithms in mobile robots, their use in measuring multiple path optimization is very limited. In this paper, the methodologies proposed in [
26,
27] are combined in order to minimize the probe’s travel distances between the multiple areas of measurements. Furthermore, a novel use of the grid environment for representing 3D CAD components in the context of path planning is presented. The objective function of [
27] is also modified properly in order to enable the algorithm to be applied for the purpose of finding the optimal path in an environment where the number of obstacles is significantly higher than the number of free movement points. The methodologies were applied for the 3D path planning of CMM with a contact measuring probe for the task of inspection of manufactured parts from a CAD file in order to optimize a production cycle in the manufacturing industry. Through the presented methodology, a new field of application for the well-known Traveling Salesman Problem (TSP) is highlighted, extending its use beyond classical optimization contexts. Specifically, TSP principles are adapted and applied to optimize measurement sequencing in CMM processes, demonstrating their relevance in a novel industrial and metrological setting.
3. Results
The 5-axis CMM shown in
Figure 7a was used for the application of the proposed procedure.
Figure 7b shows the experimental measuring component. A large number of measurement procedures provided by CMMs can be simulated on the experimental measuring component. More specifically in this example, measurements are conducted on the inner perimeter of two holes, around the small cylinder in area 1, at two points on the surface of the workpiece and on the inclined surface of area 8. In
Figure 7b, the positions of the points on the surface of the component are shown in purple. Furthermore, in this example, a thin grid environment is used to emphasize the description and clear presentation of the methodology. The positions of the measurement points and the accuracy of the results can be significantly improved by using a denser grid environment. The presented methodology was developed using Matlab R2016a (The MathWorks, Inc., Natick, MA, USA) and python (Python Software Foundation, Wilmington, DE, USA). The operation of the CMM was facilitated using the PC-DMIS 2021.2 (Hexagon Manufacturing Intelligence, North Kingstown, RI, USA) software package.
Figure 8 shows the 3D environment and the modeling of the component in the form of obstacles resulting from the CAD file. The points where the measurement procedures will be performed are marked in green. In the case where the measurement points are located around the perimeter of the component, during the environment creation process, it would be necessary to have free movement points around the component. However, in the examined scenario, the measurement points are located on the component, thereby it is not necessary to add additional free movement points surrounding the component. Adding additional free points increases the complexity of the 3D space and the computational resources without benefiting the search for finding a shortest path.
The parameters used for the 3D path planning algorithm are the following, MaxIt = 50, MaxStepsNum = 30, numFish = 130, fishTryNum = 15 and δ = 0.2, w1 = 1.4 w2 = 0.3, w3 = 4. The variable MaxIt represents the maximum iteration number for AFSA, MaxStepsNum specifies the maximum allowable number of nodes in a generated path; if the MaxStepsNum number is exceeding, the path is discarded as a non-optimal solution. The parameter numFish represents the number of fish in the swarm. Regarding the creation of the obstacle, heatmap were defined as obsHeatVal = 150, heatIncrCoef = 0.4, obsNearHeatVal = 90, obsNearHeatVal2 = 40. The parameter obsHeatVal represents the heat value of each obstacle, the heatIncrCoef corresponds to the coefficient of increasing the heat across the map, the parameters obsNearHeatVal and obsNearHeatVal2 represent the update of heat values in the first and the second stage of heatmap’s creation. The bonuses of the heatmap are divided in the following way. If the heatmap value, hv, for the point where the fish is located is less than
, then the objective function of the possible points that are distanced
is calculated by a coefficient bh = 1.15, where mh is the mean of heatmap values, da is the length of the side from an elementary square of the grid. If the
and
for the points distanced
or da the bh = 1.06. If the
and
for the points distanced
bh = 1.06. If
for the points distanced
or
bh = 1.06. The parameters for ACO and solving the TSP are the following MaxItTSP = 40, α = 1, β = 1, q = 0.2, p = 0.3, gAnt = 0.2, D = 100 and initPher = 600. Comprehensive descriptions of the parameter tuning process in ACO and AFSA are available in the original research works cited in references [
26] and [
27], respectively.
In this section, the results from the proposed procedure are presented.
Figure 9 shows in magenta the path resulting from the above procedure. The algorithm efficiently finds the shortest path that connects all the measuring points. Thus, the sequence of carrying out the measurements is determined in order to reduce as much as possible the probe’s transfer time between the measurement areas and accelerate the measuring process. It is worth noting that the final path even takes advantage of the size of the hole in area 3 so that the probe approaches the target point passing as close as possible to the component’s surface without touching it. The straight segments that connect the distant target points without passing through any intermediate point are due to the use of the multiple laser method.
Figure 10a–h show the CMM’s probe location during the execution of the resulting path. The probe was successfully moved to the final coordinates of the resulting points without colliding with the experimental component. As can be seen from the images, the piece was placed in the inner part of a vice in order to immobilize it and keep it stationary during the measurement process. This procedure is widely applied in the measurements. It is worth noting that the positions of the vice and the point O (0,0,0) of the component’s virtual grid in the CMM operating space are known. The transfer of the probe to the initial coordinate position of the resulting path is carried out from a safe area to ensure that there will be no collision before the path is executed. As the measurements are to be performed above the plane of the vice and the designed path will lie within the component’s volume or the space above it, the vice does not influence the measurement process and therefore does not require to be modeled in the grid environment. If measurements were to be conducted on the side surface of the component, it is probable that the created path would traverse through the spatial area occupied by the vice. Under these circumstances, it would be necessary to model in the grid environment the parts of the vice that may hinder the movement of the probe. The entire vice would need to be modeled in the grid environment in the case where the locations of the examined measurements were on multiple components in the CMM’s operation environment.
Figure 11a–d depict the length distribution diagrams of the length per iteration of the formed alternative points sequences. Although the initial total path length is relatively high, the algorithm, after some iterations, converges towards the optimal solution. The length of the resulting path is 327.53 mm. The total computational time for formatting the required paths and solving the TSP was measured at 148.7 s.
The sequence of inputted points does not affect the length of the final solution; it alters the resulting path length per iteration diagram as well as the dynamics of the algorithm’s convergence. This is evident in
Figure 11a–d where each diagram was generated from a different inputted sequence of points. The variations in the dynamics of the convergence of the algorithm are not related to the sequence of input points but to its inherent stochastic behavior and the initial values of the parameters. Specifically, the roulette wheel method enables the random selection of all the available options. Even though the possibility of selecting some options is low, they can still be selected. This variability can lead to different convergence patterns.
The presented methodology cannot be compared with some of the state-of-the-art (SOTA) methods due to the fact that SOTAs have not yet been applied by researchers to solve the problem of finding the optimal sequence of measurements using a CMM. Until now, there is no alternative methodology to address the TSP in a complex environment with obstacles. The current approaches are limited to cases where the path length between regions is known without taking into account the existence of obstacles between regions [
31]. TSP is applied in fields such as vehicle routing, logistics optimization and various scheduling problems [
31]. Its applications in the CMM and measuring operations remain unexplored. More information on the comparison of the AFSA integrating the ray casting algorithm for the generation of the individual paths with the other SOTAs can be found in [
27].
Figure 12a and
12b present examples of thin and dense grid environments, respectively. The grid environment in both cases represents a space with the same dimension to ensure the comparability between the results. The starting point is represented in green and the ending point in blue. The environment has dimensions
. The grid environment of
Figure 12a consists of 192 discrete points, whereas the grid depicted in
Figure 12b contains 1536. Each district point represents a volume of
in
Figure 12a and
mm in
Figure 12b. The obstacles in both environments represent the same component. In the thin grid, the phenomenon of obstacle overexpansion is strongly observed, especially in the representation of the component’s vertical dimension. It is supported by the fact that, in the thin environment, the vertical dimension is modeled through discrete points corresponding to spatial intervals of 600 mm, while in the dense grid, the same dimension is represented with discrete points of 450 mm. Moreover, the holes of the components in the dense environment are represented with four discrete points, compared to one in the thin grid. The algorithm in both cases has formed the optimal paths. In the case of
Figure 12a, the length of the formed path is 2026.2 mm, while for the grid in
Figure 12b it is 1668.9 mm. The differences between the lengths of the formatted paths are attributed to the phenomenon of the obstacle’s overexpansion. The computational time for path generation was 13.79 s and 97.24 s for the thin and dense environments, respectively.
Figure 12c and
12d presents the diagrams of the formatted path’s length per iteration for the environments in
Figure 12a and
12b, respectively. The diagrams reveal that the variation in path lengths is notably lower in the thin environment than in the dense environment. This is attributed to the fact that in the thin environment, the number of discrete points is lower compared to the dense one; as a result the number of alternative paths that can be evaluated is smaller. The zero entries in the diagram of
Figure 12c represent paths that concluded in dead-ends and were excluded. The parameters utilized for both environments were identical and their values aligned with those presented at the beginning of the section.
The examples presented in
Figure 12a,b evidence that grid density and object representation accuracy influence the algorithm’s convergence speed and the quality of the final solution. The phenomenon of obstacle overexpansion can be avoided by increasing the density of the grid. The dense grid environments favor a more accurate representation of the pieces, especially in cases where there are curved sections or holes. If the utilized grid is too thin, the curved sections and holes may be represented as distorted or vanish entirely. The density and size of the grid should be chosen to align with the geometric characteristics and dimensions of the represented component.
4. Discussion
This paper presented an approach to reduce the measuring time of a component using an existing CMM without any external interference to the machine or the component. The reduction in components’ measuring time contributes to the acceleration of the manufacturing process and reduces the production costs in an efficient, dynamic and intelligent way, without needing to invest additional funds or resources. The proposed methodology can be applied to any component as long as its CAD file is available in advance.
The measurement time is reduced by optimizing the sequence of measurements. The proposed methodology highlights a novel application of the famous TSP, expanding its scope beyond conventional optimization domains. By tailoring TSP-based optimization to the sequencing of measurements in CMM processes, the study establishes its applicability and value in advanced industrial metrology.
This paper presented the modeling of a component based on its CAD information by appropriately defining the feasible movement points and obstacles in the 3D grid method. Its modeling also takes into account the component’s areas where the measurements will be conducted so that the final results can be executed by the CMM in real-world conditions. An artificial fish swarm algorithm integrated with a ray casting algorithm was successfully modified to meet the requirements of the CMM’s measurement process. The results of the formed 3D paths are used by an ant colony optimization algorithm to solve the Traveling Salesman Problem in a 3D environment with obstacles. The problem’s solution provides the final path and sequence of measurements taking into account the particularities of each component. The final path is also taking advantage of the areas that are located very close to the workpiece and the CMM can move freely without colliding with any part of the manufactured component.
A crucial element for the successful implementation of the presented methodology is the representation of the components in a grid environment. The dimensions and density of the grid impact the algorithm’s convergence rate and the quality of the final path. In thin grids, the phenomenon of obstacle overexpansion may occur, leading to a generalized or less detailed representation of the component’s geometric features. However, thin grids reduce the algorithm’s execution time. In dense grid environments, the phenomenon of obstacle overexpansion is mitigated. They also allow a more accurate precise representation of component geometric characteristics, particularly in the presence of curved profiles or holes. The increased numbers of discrete points in dense grids lead to a longer convergence time for the algorithm. In the examined examples, the algorithm required 85,81% less time in the thin grid to determine the optimal path. Nonetheless, in the dense grid, it generated a path that was 17.63% shorter.
The combination of modeling and algorithms presented in this paper ensures that the final path is the shortest possible and can be applied in real-world conditions. Future research may include the following: