# A Full-Coverage Path-Planning Algorithm for a Glass-Curtain-Wall-Cleaning Robot Driven by Ropes
## 3 Wall Modeling  
### Wall Griding  
To clean a large glass curtain wall, the body of the robot must be pulled by the rope of winch 5 to make it continuously jump to overcome obstacles. This is inefficient on walls with densely distributed obstacles. Therefore, a full-coverage path must be planned for the robot to avoid obstacles with as little jumping as possible to efficiently complete the cleaning work. The aim of full-coverage path planning is to find the path that cleans the maximum area. To facilitate robot path planning, the edge learning strategy can be adopted, in which sensors are used to obtain the shape and location information of obstacles on the wall. Through data processing, a three-dimensional model of the wall is constructed to simplify the wall, which is then developed into a two-dimensional plane with length L and width H. This is convenient for the subsequent wall modeling, which is achieved using the grid method to represent the distributed obstacles. Then, the working environment can be  
Figure 1: Robot structure. simplified to a two-dimensional rectangular plane model with length \(L\) and height \(H\) by approximate processing, using grids to represent obstacles, as shown in Figures 2 and 3. To simplify the calculation, the curve length of the surface is straightened to \(L\) of the rectangular model, and the height of the building is taken as \(H\). Therefore, if the wall shape is a straight line, \(L\) is the straight-line length \(l\); if the wall shape is an arc, \(L\) can be calculated according to the arc length calculation formula; if the wall shape is a curve with variable curvatures, a curve function equation is needed, and \(L\) can thus be calculated according to the curve length calculation formula, as shown in Equation (1):  
\[L= \begin{cases}l&\text{\emph{Straight line}}\\ \frac{\theta_{1}\pi r+\theta_{2}\pi r}{180}&\text{\emph{Arc line}}\\ \int_{a}^{b}\sqrt{\left[f^{\prime}(x)\right]^{2}+1}dx&\text{\emph{Variable curvature curve}}\end{cases}  \tag{1}\]  
Based on the two-dimensional rectangular plane model, the operating environment can be developed with the grid method to construct the map, which is relatively simple and convenient in terms of path-planning algorithm design. To facilitate understanding, each grid represents a point on the map. Considering the robot size, computational efficiency, accuracy, and other factors, the grid size was set as  
Figure 3: Wall length solution. Figure 2: Wall modeling. 10 cm. \((x_{i},y_{i})\) is defined as the position coordinates of grid \(k\), where \(x_{i}\) and \(y_{i}\) denote its horizontal and vertical coordinates, respectively. To facilitate the calculation and processing, each grid attribute is assigned a value, as shown in Equation (2). The three values of 0, 1, and 2 are used to represent the three states of the grid: obstacle, uncovered, and covered grids, respectively, so the position attribute of grid \(k\) can be represented as \((x_{i},y_{i},f_{k})\). \[f_{k}= \begin{cases}0&\text{\emph{obstacle raster}}\\ 1&\text{\emph{uncovered raster}}\\ 2&\text{\emph{covered raster}}\end{cases}  \tag{2}\]  
The environmental state of a robot can be judged by assigning grid attributes. As the robot moves, the numbers of covered and uncovered grids change and update. In addition, in the robot's operational environment, some irregular obstacles may exist in the established grid map that do not completely coincide with the grid boundary. To simplify the representation of the grid map model as much as possible, these obstacles must be expanded into the regular grid model during grid map modeling. Based on the acquired wall map, the heuristic algorithm is both simple and operable. However, many wall-climbing robots are limited by insufficient movement and turning abilities and low intelligence during facade maintenance working. Therefore, considering the actual motion of a robot, we developed an improved priority heuristic full-coverage path-planning algorithm based on the reciprocating coverage algorithm.