When the robot finishes exploring a closing cell boundary, it searches the topological map for any uncovered cells. Since the topological map is a connected graph, travelling to any uncovered node is a simple matter of finding a path between the current node and the chosen uncovered node in the connected graph.
Lemma 4.5.4. All cells that are added to the topological map will be visited.
Proof. Topological coverage algorithm continues until the map does not contain any uncovered
cell. Therefore, all cells that are added to the map will be covered before the algorithm finishes.
Proposition 4.5.5. All reachable cells in slice decomposition are covered.
Proof. Starting from the initial cell, all reachable cells are either directly or indirectly con-
nected. Lemma 4.5.3 guarantees that all the reachable cells are detected. Lemma 4.5.4 guar- antees that all these reachable cells will also be visited. Lemma 4.5.2 shows the robot will always reach the closing boundary of the cell it is covering. Therefore, all reachable cells in the
environment are detected, visited and covered.
4.6
Complexity
The topological map is a bi-directed graph G(N,E), where N is a list of n nodes, and E is a
list of e edges. Graphs are generally implemented as adjacency lists [53, 73, 93]. An example of representing a graph as adjacency lists is shown in Figure 4.46. The space complexity is therefore O(n+e).
Topological map updates involve insertion and deletion operations on graphs. These are con- stant time operations because insertion and deletion on linked lists are constant time [73]. Searching for an uncovered cell on the topological map is done using breadth-first search. An implementation of breadth-first search adapted from Tanimoto [92] is shown in Algorithm 4.4.
The algorithm requires the topological map G(N,E), a start node, and a goal node as input.
In the coverage algorithm, the start node is the current node the robot is situated at, while the goal node is any node of type uncovered. In the algorithm, predecessor is an array, while open,
closed and path are all linked lists. Initialisation of the predecessor array in lines 1 - 3 takes O(n). Initialisation of the linked lists in lines 4 - 6 is O(1). There are two nested loops between
lines 7 - 27, with the inner loop starting at line 21. The loop terminates either at line 9 when no goal node (uncovered nodes) is found; or at line 19, when the first empty node is opened. Therefore, the outer loop runs O(n) times. The inner loop runs once for each node adjacent
96 Topological Coverage Algorithm 1 2 3 4 (a) 1 4 2 1 1 3 2 4 2 4 2 3 (b)
Figure 4.46: (a) A directed graph. (b) Implementation as adjacency lists. Each node in the graph has a list of nodes it is connected to.
4.7 Summary 97
to the opened node n (line 21). From the adjacency lists, it can be seen that the inner loop
iterates 2e times. Therefore the total time the nested loop iterates is O(max(n,e)). Normally,
there are more edges than nodes in a graph. Thus the time complexity of the nested loop can be simplified to O(e). Combining the loop and the initialisation, the running time of the algorithm
can be expressed as O(n+e). (In the less common scenario where there are more nodes than
edges, the running time is O(n)).
Algorithm 4.4 Standard Breadth-First Search Require: G(N,E), start node, goal node
1: for each node n in N do
2: predecessor(n)← −1
3: end for
4: open←start node
5: closed← ∅ 6: path← ∅ 7: loop 8: if open=∅then 9: return∅ 10: end if 11: n←open(0) 12: open←open - n 13: closed←closed+n
14: if n=goal node then
15: repeat 16: path←path+n 17: n←predecessor(n) 18: until n, −1 19: return path 20: end if
21: for each node m adjacent to n do
22: if m<open and m<closed then
23: open←open+m 24: predecessor(m)←n 25: end if 26: end for 27: end loop
4.7
Summary
The topological coverage algorithm enables a robot to completely cover any unknown environ- ment by incrementally constructing, updating, and storing coverage information in a topolog- ical map. The topological map shares the same set of landmarks with slice decomposition II.
98 Topological Coverage Algorithm
Therefore, it is both a qualitative representation of landmarks in the environment, and a slice decomposition of the same space.
It is very difficult to mark particular regions in the environment as covered in a topological map. This is due to the qualitative nature of the representation. The nodes and edges of the map do not correspond to specific locations in space. This difficulty in storing coverage information within a topological map is overcome by embedding slice decomposition within the map. Even though individual nodes in the map are still not associated with specific areas of space, a combination of nodes now defines a region (a cell) bounded by obstacles.
Completeness and complexity of the topological coverage algorithm are also discussed. Com- pleteness is important because an online coverage algorithm must completely and fully cover all the reachable surface. On the other hand, complexity was not an important issue in prac- tice. Empirical observation shows that the robot spends a lot more time moving through the environment than searching the topological map. There was never any noticeable reduction in performance due to computational requirements of the coverage algorithm.
Newton’s Third Law of Graduation: For every action towards gradua- tion there is an equal and opposite distraction.
Jorge Cham, “Piled Higher and Deeper”, www.phdcomics.com
5
Performance metrics
P
erformance metrics allow quantitative evaluation of results from experiments. They alsoprovide a way to compare different experiments, or algorithms, meaningfully. There are
two questions commonly asked about coverage operations [104]. Firstly, how much of the environment is covered or missed? Secondly, how much time is wasted on revisiting area that is covered already?
The first question can be answered with a measure of the effectiveness of the operation. In
simulation, this is commonly measured by calculating the percentage of grid cells covered [45]. In real robot experiments, existing approaches to estimating percentage coverage include sprin- kling sawdust [97] and using the coverage factor [22]. Neither methods produce a good estimate of the percentage coverage for real robot experiments.
The second question is an inquiry about the efficiency of the operation. For simulated exper-
iments, Gabriely et. al. uses the number of repeatedly covered grid cells [45]. There are two minor flaws with using repeatedly covered cells as a metric. Firstly, a repeatedly covered cell maybe covered more than twice. Secondly, the figure is not normalised against the total num-
ber of grid cells in the environment. There are no existing measure of efficiency for real robot
coverage experiments.
This chapter presents the two metrics that will be used to measure the performance of coverage
experiments in this thesis. Section 5.1.1 defines the effectiveness metric, which is the same
100 Performance metrics
as the one used by Gabriely et. al. [45]. The efficiency metric defined in Section 5.1.2 is an
improvement over the use of repeatedly covered cells. The metric not only estimates the area of re-coverage, it is also normalised against the actual area covered by the robot.
These metrics are useless if the data they require is difficult or impossible to obtain. There-
fore, the rest of the chapter describes practical methods for obtaining and estimating the data needed. Section 5.2 presents methods for estimating the metrics with grid-based simulation en- vironments. Section 5.3 describes estimation in real robot experiments using computer vision techniques.
5.1
Metrics
5.1.1
Effectiveness: percentage coverage
The effectiveness of a coverage algorithm is the amount of the total surface covered by a robot
running the algorithm. Therefore,
C = Area of surface covered
Total reachable surface area (5.1)
The coverage metric C calculates the percentage coverage of an experiment. It requires the estimation of the area of surface covered in an experiment and a measure of the area of reachable surface in the environment.
5.1.2
Efficiency: path length
The efficiency of a coverage algorithm can be measured by the length of the path taken to
completely cover an environment. The path length is related to the time spent on the coverage task if the robot moves in a fairly constant speed.
To make the metric environment independent, it is necessary to normalise the actual path length kPak travelled by the robot. An ideal solution would be to divide the actual path length kPak
by the length of the optimal path. The optimal path is the shortest path possible to cover an environment if the robot starts with a map. Any path generated by an online algorithm, such as the topological coverage algorithm in this thesis, will be longer than the optimal path.
However, Arkin et. al. has shown that finding the optimal coverage path is an NP-hard problem [13]. They proved this by formulating coverage as a travelling salesman problem, with each