SCAN PLANNING AND ROUTE OPTIMIZATION FOR CONTROL OF EXECUTION OF AS-DESIGNED BIM

Scan-to-BIM systems have been recently proposed for the dimensional and quality assessment of as-built construction components with planned works. The procedure is generally based on the geometric alignment and comparison of as-built laser scans with asdesigned BIM models. A major concern in Scan-to-BIM procedures is point cloud quality in terms of data completeness and consequently, the scanning process should be designed in order to obtain a full coverage of the scene while avoiding major occlusions. This work proposes a method to optimize the number and scan positions for Scan-to-BIM procedures following stop & go scanning. The method is based on a visibility analysis using a ray-tracing algorithm. In addition, the optimal route between scan positions is formulated as a travelling salesman problem and solved using a suboptimal ant colony optimization algorithm. The distribution of candidate positions follows a grid-based structure, although other distributions based on triangulation or tessellation can be implemented to reduce the number of candidate positions and processing time.


INTRODUCTION
A systematic dimensional and quality assessment of as-built construction components with planned works is essential for the timely and successful completion of a construction process, and consequently for saving costs.Progress tracking analysis of construction elements are traditionally performed through practices based on visual inspection and reports created by professional inspectors, and thereby, tools automating the comparison of as-built data with planned works are needed.
In the recent years, Scan-to-BIM systems have been proposed for the dimensional analysis and compliance control of construction components (Bosché et al, 2015).These systems are based on the geometric alignment and comparison of asbuilt laser scans with as-designed BIM models.Point clouds have a high quality in terms of accuracy, precision and resolution (González-Jorge et al. 2011), although these values vary according to the technical characteristics of sensors.
A major concern in Scan-to-BIM procedures is point cloud quality in terms of data completeness.The scanning procedure should be designed to obtain a full coverage of the scene while avoiding major occlusions (Soudarissanane and Lindenbergh 2011).The survey procedure can be addressed from two perspectives whether static or mobile mapping systems are used.When using static mapping systems such as Terrestrial Laser Scanners (TLS), data is acquired at many nearby locations, similar to traditional Total Station surveying.Scans must be combined and registered in the same coordinate system to obtain the complete point cloud of the scene.On the other hand, mobile mapping systems reconstruct 3D point clouds from 2D laser scans based on a continuous 3D positioning estimation (Xiao et al, 2013;Maurovic and Petrovic, 2014).Knowing the trajectory followed by the system during acquisition and the points acquired from each trajectory location, the point cloud can be directly reconstructed.
Although mobile mapping systems have been consolidated in the recent years, most of the survey processes still rely on a static procedure, especially when data quality requirements in terms of accuracy, precision and resolution are very high.
If the LiDAR sensor is stationed using an autonomous robot, this methodology is called stop & go scanning (Borrmann et al, 2008).When the scanning is performed by autonomous robots, the planning and optimization of scans takes on particular relevance (Adán et al, 2015;GonzálezdeSantos et al, 2018) The search for optimal scanning positions is known as the next best view (NVB) problem, and consists on determining the next position for scanner given a previous scan of the scene.Different approaches have been presented in the recent years to solve this problem depending on the availability of previous knowledge of the scene.A study of the scanning geometry effects on point quality is performed by Soudarissanane and Lindenbergh (2011) to determine the optimal number and location of scans from 2D floor plans and lay-outs.Surnmann et al (2003) implement an approximation of the art gallery problem to determine the NBV.The methodology is implemented for an unknown environment and building geometry is simplified to 2D.Walls are detected and projected onto the 2D map.Next, lines representing walls are used to generate a polygon, and for all candidate positions the visible part of the polygon is calculated.The NBV pose is the one maximizing the information gain.Grabowski et al. (2003) implements a method to calculate the NBV from unknown environments.The methodology is based on detecting obstacles and identifying regions in space (2D maps) where data acquisition is maximized.
In addition to methods based on 2D maps, recent approaches discretizing the space into 3D structures such as octree and voxels have been presented to calculate NVB in unknown environments.In most cases, voxelization is used due to its simplicity and a visibility analysis is performed from the scan pose to classify voxels into 'empty', 'occupied' and 'occluded'.The NBV is the one minimizing the number of occluded voxels (Kawashima et al, 2014, Adán et al, 2017, Prieto et al, 2018, GonzálezdeSantos et al, 2018).
This work proposes a method to optimize the number and scan positions for Scan-to-BIM procedures based on stop & go scanning.Therefore, the method starts by a BIM model and results into the shortest route for the autonomous robot visiting once all the optimal scan positions.The semantics of building elements is used to control the quality of acquisition for each building type.Apart from vertical elements, the methodology is planned for different phases of the project.When considering the structural phase, not just vertical elements but also horizontal elements such as beams can be considered in the analysis.
The rest of the paper is structured as follows.Section 2 presents the methodology implemented.The results of the application of the methodology are presented in Section 3.And finally, Section 4 is devoted to conclude the work

METHODOLOGY
The general workflow of the methodology is summarized in Figure 1.
The methodology starts by discretizing the geometry of the building.Dimensions of the autonomous robot are taken into account for determining the candidate positions.Afterwards, a visibility analysis based on a ray-tracing algorithm is performed for all candidate positions and the number and position of scans is optimized.Finally, the optimal route for the autonomous robot is determined from implementing an ant colony optimization algorithm to solve the travelling salesman problem.

Discretization
As previously stated, the methodology considers previous knowledge of the scene in the form of a BIM model.Methodology is designed for the analysis of large-scale buildings as a whole with multiple rooms, and because of that, the analysis is conceived from a 2D perspective.
In a context of construction control and given a BIM model, the first step is the selection of the building elements that are needed to control in a particular construction phase.A floor plan of the elements is exported from BIM to a CAD file, being building elements grouped in layers according to their semantics (i.e.geometric entities representing walls are organized in the 'wall' layer, geometric entities representing columns are organized in the 'column' layer, etc).In addition to the elements that need to be control, floor is required to be exported due it represents the limits of the navigation space.
Because most of the geometric elements are represented by a small set of parameters such as starting and ending point (in case of lines), and vertices (in case of polylines), or centre and radius in case of circles, they are discretized into equally distributed points to facilitate the analysis (Figure 2).The resolution of the discretization is a configurable parameter.

Occupancy map
Once the building elements are discretized, a binary occupancy map is created.The resolution of the map should be lower than the resolution of the discretization in order to avoid empty pixels in the representation of continuous elements (Figure 3).

Candidate positions
Candidate positions are those theoretical places in which an autonomous robot can be placed in order to perform a scan.
The distribution of candidate positions can be carried out using different patterns: a grid, a triangulation, a tessellation or even a random-based distribution.In this paper we implement a grid-base distribution of candidate positions within the navigable space.
The limits of the navigable space are defined by the polyline representing the floor, and the existence of vertical elements such as walls, stairs and columns represent obstacles to navigation.Therefore, the subtraction of obstacles to the limits representing the floor results into the theoretical navigable space.However, the dimensions of the autonomous robot, and a security distance, have to be also considered in the determination of candidate positions.
Figure 4 shows a schema of the generation of candidate positions following a grid-based structure with a certain resolution in X and Y.All those candidates coincident with the position of building elements are discarded (blue), as well as those candidates closer than the security distance (d) to building elements (red).The remaining candidates are considered for further processing.

Visibility analysis
A visibility analysis is carried out for all candidate positions in order to determine the theoretical area of the building elements that would be scanned.For this purpose, a ray-tracing algorithm is implemented considering a maximum scanner range.
In addition to consider the maximum scanner range as a criterion to ensure a good quality of the acquisition in terms of data density, it is also used to delimit the area submitted to the visibility analysis for each of the candidate positions.This is very relevant in terms of computing time.
For each candidate position, all occupied pixels within the maximum scanner range are studied.Pixels will be considered 'not visible' or 'visible' whether the Line of Sight (LOS) between the observer (candidate position) and the pixel is intersecting or not, respectively, with another occupied pixel, (Figure 5).
From the visibility analysis, the area of each type of building element visible from each candidate position is known.This is important because requirements in terms of data completeness vary according to the element type and the analysis going to be performed from the point cloud.For example, more quality is needed if the point cloud depicting columns is going to be used for determining the centre of columns rather than their existence.
Figure 5.The principle of the ray-tracing algorithm.

Scan optimization
Most of the elements of the scene are visible for more than one candidate position.Consequently, scanner positions have to be selected in a way to ensure the acquisition of the elements of interest with the minimum number of scan positions.For this purpose, a back tracking algorithm is implemented.The stopping criteria or the condition it satisfies is related with a minimum area of acquisition.
In addition to the optimal number and position of scans satisfying the minimum area of acquisition, doors are optionally added as scan positions to facilitate the point cloud registration between adjacent rooms.

Optimal route
Previous steps of the methodology solve the problem of determining the optimal number and position of scans for acquiring the indoor environment according to certain criteria.
This section addresses the obtention of the shortest route for the autonomous robot, given a certain number of scan positions and the distance between each pair of scan positions.The problem is formulated as a travelling salesman problem, by which all scan positions have to be visited once and with the particularity of the route is not finishing at the initial position.
It is an NP-hard problem in combinatorial optimization.Consequently, this paper implements a suboptimal solution by implementing an Ant colony optimization algorithm (Dorigo, 1997).This algorithm is based on modelling the behaviour observed in real ants to find short paths between food sources and their nest.The result is an emergent behaviour caused from each ant's preference to follow trail pheromones deposited by other ants.
Before finding the optimal route, distances between pairs of scan positions have to be obtained.For this purpose, a navigable graph between adjacent positions is created (Figure 6).The navigable graph is created from the grid representing the candidate positions (Figure 4).Adjacency between candidate positions is studied to generate the adjacency matrix.If the building is composed of rooms, connected by doors, a local graph is created for each room, and then, local graphs are joined together through the nodes representing doors (Figure 7).This procedure is implemented to enforce the connection between doors (Boguslawski et al, 2016) because it might be the case that no candidate positions are obtained at the doors due to the grid resolution and security restrictions.Once the navigable graph is created, the shortest distance between each pair of scan positions is calculated.For this purpose, the simple Dijkstra algorithm is implemented.This information is used to create a simplified graph in which just nodes representing scan positions and distances between them are represented.This simplified graph is used to implement the Ant colony optimization algorithm for obtaining the optimal path (Figure 6).

Datasets
The methodology has been tested in a real case study, an academic building of the University of Melbourne, Australia, acquired with sensor Zeb-1 (Figure 8).The building has a total area of 336 m2.The point cloud is provided by the ISPRS Benchmark on Indoor Modelling (Khoshelham et al, 2017).

Experiments and results
This section discusses the results obtained from applying the methodology to the abovementioned case study.
Firstly, the building elements of interest are exported from the BIM model to a CAD file (.dxf).Building elements are organized by type in layers, and semantics is kept in the discretization process.Figure 9 shows the six layers discretized, including 'walls', 'stairs', 'columns', 'floor', 'room' and 'doors'.The distribution of candidate positions (in grey) is shown in Figure 10.In this case, the distribution of the navigable space is carried out using a grid-based approach with a regular resolution of 0.5 m.Considering a maximum range of acquisition of 5 m, a visibility analysis is performed for all candidate positions.Afterwards, optimization is carried out taking into account a 90% of coverage as stop condition.As a result, 699 candidate positions are analysed and a total of 17 scan positions (in red) is obtained (Figure 10).The processing time was 82.9 s.
Figure 10.Cantidate positions (in grey), scanning positions (in red) and scanned points (in green) for the case study.
Finally, the optimal route is calculated.Because the building is distributed into rooms connected by doors, a subgraph is initially created for each room, whereupon nodes representing doors are used to join subgraphs into a graph representing the whole navigation space (Figure 11).A coverage of 90% is used as stop condition for selecting the scanning positions in the optimization process.Since the semantic of the scanned points (in green in Figure 10) is known, we can obtain the percentage of points acquired for each type of building element (Figure 13).As a result, the 91.97%, the 98.86% and the 78.00% of visible points corresponding to walls, doors and columns, respectively, is covered by the planned scan.This information is important to perform a quality assessment of the scanning procedure with regard to element type.External circle of Figure 13 represents the percentage of acquired points belonging to each element type.
Figure 13.Statistics of point cloud acquisition by element type

CONCLUSIONS
This paper presents a methodology to optimize, on one hand the number and position of scans for Scan-to-BIM procedures following stop & go scanning, and on the other hand, the shortest route for an autonomous robot visiting once all the optimal scan positions.
Geometric and semantic information of building elements is available from BIM models.The navigable space is discretized using a grid-based pattern and dimensional restrictions of the autonomous robot are taken into account for selecting scan position candidates.Afterwards, a visibility analysis based on a ray-tracing algorithm is performed for all candidate positions and the number and position of scans is optimized.
The shortest route between scan positions is formulated as a travelling salesman problem and solved using a suboptimal ant colony optimization algorithm.For this purpose, distances between each pair of scan positions using Dijkstra are calculated based on a navigable graph representing the navigable space and connecting candidate positions, scanning positions and doors.Distances are used as weights to create a simplified graph connecting just scanning points, which is the one used as input in the ant colony optimization algorithm.
The distribution of candidate positions follows a grid-based structure and this is not optimal.For one side, the number of candidate positions depend on the area of the navigable space.
A high resolution might generate redundant positions for the visibility analysis which is the most time consuming step of the methodology.For the other side, a low resolution might result in a very few candidate positions in case of narrow building shapes (i.e.corridors).Therefore, other distributions based on triangulation or tessellation will be implemented in future work to reduce the number of candidate positions and improve processing time.

Figure 2 .
Figure 2. Rectangle, line and circunference a) represented in a CAD file and b) after discretization.

Figure 3 .
Figure 3. Rectangle, line and circunference a) after discretization and b) after occupancy map generationempty pixels in white, and occupied pixels in black.

Figure 6 .
Figure 6.Workflow summarizing the steps towards route optimization.

Figure 7 .
Figure 7. Graph creation in case of a) absence of rooms, b) presence of rooms.

Figure 9 .
Figure 9. Building elements are organized in layers according to semantics.

Figure 11 .
Figure 11.Graph representing the navigation space within the building.The graph representing the navigation space of the whole building is used to calculate the shortest distances between each pair of scan positions using Dijkstra.Distances are used to weight the simplified version of the graph in which just nodes representing scanning position are represented.The simplified graph is used as input for the Ant colony optimization algorithm.As a result, a route of 90.51 m is obtained.The processing time is 2.5 s including the process of graph creation (Figure12).

Figure 12 .
Figure 12.Optimal route for passing once for all scan positions.