# Digital-Twin-Based System for Foam Cleaning Robots in Spent Fuel Pools
## 4 Digital Twin Collaborative Full-Coverage Path Planning Method
### Selection and Improvement of the Full-Coverage Path Planning Algorithm  
The path planning algorithm in this paper can be broadly divided into three main parts:  
(1) Behavior-based coverage for full coverage path planning:  
In the process of full coverage path planning for the robot, considering the relatively stable environment of the fuel-depleted pool and aiming to enhance the simplicity and adaptability of the algorithm, as well as taking into account the computational limitations of the robot itself and the goal of minimizing robot energy consumption to the greatest extent possible, this paper adopted behavior-based coverage. The basic process of behavior-based coverage is as follows: (a) Initialization: Set the starting point of the initial path in advance. (b) Consider the robot's size sufficiently, and partition the map into appropriately sized grids. (c) The system generates the robot's motion path and determines the initial direction. Figure 11: Scene map construction. Upon determining the path, obstacles are detected, and if the robot detects an obstacle, the path is discarded; otherwise, it is considered a candidate path. (d) From all the candidate paths, select the path with the shortest length as the final path. (e) In actual movement, the robot will move linearly in the environment along the path. When an obstacle is detected, it will rotate clockwise \(90^{\circ}\) to achieve an S-shaped movement. Suppose the area around the robot has been completely covered. In that case, the path is determined by applying a genetic algorithm [22; 23] from the current robot position to the endpoint of the uncovered area. This process is repeated until the entire cleaning task has been completed. (2) Improvement with Pure Tracking Algorithm:  
However, the above algorithm has some limitations in practical applications. This is mainly because the planned path after completion only includes the central positions of the map segmentation, with each point being separated by the size of only one cleaning robot. Additionally, the robot only sends the next path planning point when it has reached a certain determined point, which may result in frequent starts and stops during task execution, significantly increasing the hover time of the robot and thus reducing cleaning efficiency. To address this issue, an improvement was made to the complete coverage path planning algorithm by integrating the pure tracking algorithm [24]. The core objective of the pure tracking algorithm is to achieve precise tracking and control of the robot to the target point, ensuring that the robot can move along the expected trajectory and ultimately reach the target position. Its main idea is to dynamically generate and adjust the robot's motion trajectory in real time based on the current state of the robot, the position of the target point, and predefined control strategies, enabling stable tracking of the target point. The specific changes made in this paper were as follows: During the robot's movement, the next path planning point is no longer only sent when the target point is reached. Instead, it is dynamically generated based on the current position and state of the robot. The Euclidean distance between the current robot position and the set target point is calculated based on the feedback pose data from the current robot odometer. The system determines whether the current distance is less than a set threshold at each moment. If it indicates that the robot is close to the target point, the system can immediately send the next path planning point. If it is greater than the threshold, the current motion continues. This allows the robot to move more smoothly during task execution, avoiding frequent stops and achieving a more continuous and efficient motion trajectory. Consequently, this significantly improves the cleaning efficiency and enhances the practicality and benefits of the robot in real-world applications.