# A Framework for Coverage Path Planning Optimization Based on Point Cloud for Structural Inspection
## 3 Results and Discussion  
A manual flight was performed for 3D reconstruction on a slope located at the Federal University of Juiz de Fora, Brazil, to test the proposed framework. The objective is to perform a 3D reconstruction of this structure, as shown in Figure 10. The reconstruction was based on 300 images. Two test environments were used to validate the framework, a simulation environment in the Gazebo-ROS [52], and a real surface itself. Figure 10: Reconstruction performed through the manual flight. Note in Figure 11 that a world was created in Gazebo-ROS with the presence of the slope and UAV \"Hector_Quadrotor\" [53]. The model in the UAV Gazebo is in Figure 12.  
The chosen metaheuristic optimization methods are the Genetic Algorithm and Bat Algorithm. Fifty initial random populations were created and made available for each algorithm with their respective number of individuals to compare each methodology. The initial population was created using random values that vary according to Table 2. A new set is created for each iteration of the metaheuristic. Still, the same population is used in the GA and in the BA to prevent the initial population's characteristics from changing the algorithms' performance. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Variable** & **Range** & **Representation** \\ \hline \(D_{min}\) & [0.1, 20] & \(\mathbb{R}\) \\ \hline \(D_{S}\) & [1, 20] & \(\mathbb{R}\) \\ \hline \(N_{Vert}\) & [1, 10] & \(\mathbb{N}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters used to create the initial population. Figure 11: Gazebo World. Figure 12: Hector_Quadrotor Model in Gazebo-ROS. The version of the GA used is the version for real numbers was proposed by [PERSON] et al. [54]. The mutation and recombination operators are non-uniform mutation and arithmetic crossover, respectively. The selection method is the roulette wheel. Other operators have been tested. These were the ones that obtained the best results. The BA was used in its original version proposed by [PERSON] [48]. The objective is to analyze each algorithm's behavior while the variation in the number of individuals, considering average, maximum, and minimum values. The number of epochs available is 100, where this is the stopping criterion. Figure 13 presents the comparison in the following criteria:  
1. Time to get the answer (\(Time_{Result}\));
2. Time of mission (\(Time_{Mission}\));
3. Vertical coverage;
4. Horizontal coverage. Regarding finding a solution, the BA presented a better response in all population variations, with lower averages than the GA. In addition, the deviations were smaller, being recommended to avoid wasting time during the flight. In the first result regarding the mission time that the aircraft performs, the genetic algorithm presented better results with a population of 5 and 10 individuals. However, with the increase in population, BA had an average closer to that found by GA, but with fewer deviations. In the result of horizontal coverage, the BA had a better result at all levels, with less variation. Moreover, finally, regarding vertical coverage, the results were very close. Thus, analyzing the data in Figure 13, the BA had a better performance than the GA. Note that the bat algorithm with a population of 50 individuals was chosen to avoid large variations in the results without affecting the increase in computational cost and time to acquire them. The UAV's average speed should be chosen to cover the entire surface, avoiding waste to the equipment. A high speed makes the UAV reach the point faster and allows more coverage. However, if the waypoints are close, it causes losses with the high deceleration to capture the image. It may even be necessary for the drone to return to the position if it exceeds the image to capture the waypoint's position. Low speeds tend to be safer to allow the mission to stop if there is a problem with the equipment, but the potential for surface coverage is reduced. Speeds between 0.1 m/s and 3 m/s were tested.