optimal online coverage path planning with energy constraints · coverage path planning with energy...

9
Optimal Online Coverage Path Planning with Energy Constraints Gokarna Sharma Kent State University Kent, Ohio [email protected] Ayan Dutta University of North Florida Jacksonville, Florida [email protected] Jong-Hoon Kim Kent State University Kent, Ohio [email protected] ABSTRACT We consider the problem of covering an unknown polygonal en- vironment possibly containing obstacles using a robot of square size L × L. The environment is structured as a grid with resolution proportional to the robot size L × L, imposed on it. The robot has a limited energy budget – it has to visit a charging station before it runs out of its energy; there is a single charging station in the environment. In a single time step, the robot can move from one grid cell to one of its four adjacent cells. The energy budget B allows the robot to travel at most B distance, i.e., B grid cells. The objective of the robot is to minimize both total distance traveled to cover the environment (visit each cell of the environment not occupied by obstacles) and the number of visits to the charging station. In this paper, we present the first online coverage path planning algorithm that achieves O (log(B/L))-approximation for both objectives. Our bound is optimal since there exists a lower bound of (log(B/L)) for this problem for both objectives. Simulation results show the efficiency of our approach. KEYWORDS Robotics; Coverage Path Planning; Energy Constraint; Unknown Environment; Approximation ACM Reference Format: Gokarna Sharma, Ayan Dutta, and Jong-Hoon Kim. 2019. Optimal Online Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter- national Conference on Autonomous Agents and Multiagent Systems (AAMAS 2019), Montreal, Canada, May 13–17, 2019, IFAAMAS, 9 pages. 1 INTRODUCTION Coverage path planning which requires a robot (or a team of robots) to fully cover a given area (or a planar environment) possibly con- taining obstacles is a well-studied problem in robotics with many practical applications such as autonomous sweeping, vacuum clean- ing, and lawn mowing. The goal is to plan path(s) so that the robot(s) can visit every point in the area not occupied by the obstacles. For many years, this problem has been studied assuming that the robot(s) have an unlimited energy budget. Therefore, given a robot, a single path can be planned to cover the given environment (pos- sibly containing obstacles) since it can be assumed that the robot can move arbitrarily long distances. The offline version of the prob- lem where robot(s) have knowledge of the environment including obstacles has been well studied, e.g., see [7]. Many algorithms have been proposed such as the boustrophedon decomposition based Proc. of the 18th International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2019), N. Agmon, M. E. Taylor, E. Elkind, M. Veloso (eds.), May 13–17, 2019, Montreal, Canada. © 2019 International Foundation for Autonomous Agents and Multiagent Systems (www.ifaamas.org). All rights reserved. coverage [4, 11], the spiral path coverage [8], and the spanning-tree based coverage [6]. The boustrophedon coverage and spiral path techniques can be adapted to solve the online version of the problem [3, 18] where the robot does not know the details of the environ- ment, e.g., shapes and locations of the obstacles in the beginning, but it can accumulate the knowledge of the environment over time. In practice, robots have energy constraints. This is due to the limited budget of the battery that they operate on, which will run out after moving certain finite distances. A battery-powered robot needs to go back to the charging station to get recharged before the battery runs out. This presents a new topic of coverage path planning under the limits on the distances a robot can move after a full change of battery. This may require planning multiple paths for the robot (instead of a single path in the unlimited energy case) since the robot may not be able to visit all the points in the environment after only a full charge. Recently, there has been a growing interest in solving coverage path planning problem with energy constraints. Strimel and Veloso [16] used boustrophedon decomposition to cover the environment. The robot returns to the charging station when its energy level is too low to continue the coverage. Mishra et al. [12] designed a coverage planning algorithm consisting of multiple robots. To continuously cover the environment, the robots are divided into two groups, workers and helpers. When a worker needs to go back to recharge, an associated helper will continue the worker’s coverage. These studies do not formally analyze their algorithms for performance guarantees, except proving that their methods correctly cover every point in the environment. Shnaps and Rimon [15] modeled the energy consumption of the robot by the length of the path that robot traverses and studied both offline and online versions of the coverage path planning prob- lem (denoted as OfflineCPP and OnlineCPP, respectively, in this paper). For OfflineCPP, they proposed an 1/(1 ρ )-approximation algorithm, where ρ is the ratio between the furthest distance in the environment and half of the energy budget [15]. The approximation factor 1/(1 ρ ) can be arbitrarily large when ρ approaches 1. For OnlineCPP, they proposed an O (B/L)-approximation algorithm, where B is the energy budget and L is the size of the robot (assuming a L × L square robot). For a unit square size robot (i.e., L = 1), the approximation factor becomes O (B). They also established a lower bound of (log(B/4L))-approximation for OnlineCPP (for L = 1, this lower bound becomes (log B)). Recently, Wei and Isler first presented an O (log B/L)-approximation algorithm for OfflineCPP in [18] and improved it to a constant-factor approximation in [17]. Our goal in this paper is to provide a better approximation algo- rithm for OnlineCPP. Particularly, our goal is to close the gap of Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada 1189

Upload: others

Post on 22-Aug-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

Optimal Online Coverage Path Planningwith Energy Constraints

Gokarna Sharma

Kent State University

Kent, Ohio

[email protected]

Ayan Dutta

University of North Florida

Jacksonville, Florida

[email protected]

Jong-Hoon Kim

Kent State University

Kent, Ohio

[email protected]

ABSTRACTWe consider the problem of covering an unknown polygonal en-

vironment possibly containing obstacles using a robot of square

size L × L. The environment is structured as a grid with resolution

proportional to the robot size L × L, imposed on it. The robot has

a limited energy budget – it has to visit a charging station before

it runs out of its energy; there is a single charging station in the

environment. In a single time step, the robot can move from one

grid cell to one of its four adjacent cells. The energy budget B allows

the robot to travel at most B distance, i.e., B grid cells. The objective

of the robot is to minimize both total distance traveled to cover the

environment (visit each cell of the environment not occupied by

obstacles) and the number of visits to the charging station. In this

paper, we present the first online coverage path planning algorithm

that achieves O(log(B/L))-approximation for both objectives. Our

bound is optimal since there exists a lower bound of Ω(log(B/L))for this problem for both objectives. Simulation results show the

efficiency of our approach.

KEYWORDSRobotics; Coverage Path Planning; Energy Constraint; Unknown

Environment; Approximation

ACM Reference Format:Gokarna Sharma, Ayan Dutta, and Jong-Hoon Kim. 2019. Optimal Online

Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents and Multiagent Systems (AAMAS2019), Montreal, Canada, May 13–17, 2019, IFAAMAS, 9 pages.

1 INTRODUCTIONCoverage path planning which requires a robot (or a team of robots)

to fully cover a given area (or a planar environment) possibly con-

taining obstacles is a well-studied problem in robotics with many

practical applications such as autonomous sweeping, vacuum clean-

ing, and lawnmowing. The goal is to plan path(s) so that the robot(s)

can visit every point in the area not occupied by the obstacles.

For many years, this problem has been studied assuming that the

robot(s) have an unlimited energy budget. Therefore, given a robot,

a single path can be planned to cover the given environment (pos-

sibly containing obstacles) since it can be assumed that the robot

can move arbitrarily long distances. The offline version of the prob-

lem where robot(s) have knowledge of the environment including

obstacles has been well studied, e.g., see [7]. Many algorithms have

been proposed such as the boustrophedon decomposition based

Proc. of the 18th International Conference on Autonomous Agents and Multiagent Systems(AAMAS 2019), N. Agmon, M. E. Taylor, E. Elkind, M. Veloso (eds.), May 13–17, 2019,Montreal, Canada. © 2019 International Foundation for Autonomous Agents and

Multiagent Systems (www.ifaamas.org). All rights reserved.

coverage [4, 11], the spiral path coverage [8], and the spanning-tree

based coverage [6]. The boustrophedon coverage and spiral path

techniques can be adapted to solve the online version of the problem[3, 18] where the robot does not know the details of the environ-

ment, e.g., shapes and locations of the obstacles in the beginning,

but it can accumulate the knowledge of the environment over time.

In practice, robots have energy constraints. This is due to the

limited budget of the battery that they operate on, which will run

out after moving certain finite distances. A battery-powered robot

needs to go back to the charging station to get recharged before

the battery runs out. This presents a new topic of coverage path

planning under the limits on the distances a robot can move after a

full change of battery. This may require planning multiple paths for

the robot (instead of a single path in the unlimited energy case) since

the robot may not be able to visit all the points in the environment

after only a full charge.

Recently, there has been a growing interest in solving coverage

path planning problem with energy constraints. Strimel and Veloso

[16] used boustrophedon decomposition to cover the environment.

The robot returns to the charging stationwhen its energy level is too

low to continue the coverage. Mishra et al. [12] designed a coverageplanning algorithm consisting of multiple robots. To continuously

cover the environment, the robots are divided into two groups,

workers and helpers. When a worker needs to go back to recharge,

an associated helper will continue the worker’s coverage. These

studies do not formally analyze their algorithms for performance

guarantees, except proving that their methods correctly cover every

point in the environment.

Shnaps and Rimon [15] modeled the energy consumption of the

robot by the length of the path that robot traverses and studied

both offline and online versions of the coverage path planning prob-

lem (denoted as OfflineCPP and OnlineCPP, respectively, in this

paper). For OfflineCPP, they proposed an 1/(1−ρ)-approximation

algorithm, where ρ is the ratio between the furthest distance in the

environment and half of the energy budget [15]. The approximation

factor 1/(1 − ρ) can be arbitrarily large when ρ approaches 1. For

OnlineCPP, they proposed an O(B/L)-approximation algorithm,

where B is the energy budget and L is the size of the robot (assuming

a L × L square robot). For a unit square size robot (i.e., L = 1), the

approximation factor becomes O(B). They also established a lower

bound of Ω(log(B/4L))-approximation for OnlineCPP (for L = 1,

this lower bound becomes Ω(logB)). Recently, Wei and Isler first

presented anO(logB/L)-approximation algorithm for OfflineCPP

in [18] and improved it to a constant-factor approximation in [17].

Our goal in this paper is to provide a better approximation algo-

rithm for OnlineCPP. Particularly, our goal is to close the gap of

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1189

Page 2: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

B/logB factor between the lower and upper bounds of Shnaps and

Rimon [15] for OnlineCPP.

Objectives and Contributions. We consider the online coverage

path planning problem OnlineCPP with a single robot that has

a limited energy budget B. The planar polygonal environment Pto cover by the robot is not known to it a priori; the number of

obstacles including their shapes and locations are unknown. The

robot is equipped with an obstacle detection sensor (e.g., laser

rangefinder) as well as position sensor (e.g., GPS) to build the map

of the environment. The robot is represented as a square L × L that

moves rectilinearly in P . Initially, the robot is at the only charging

station S that is inside P . The environment P is also represented as

a grid (L × L size cells) laid out on the polygonal area. The energy

consumption of the robot is assumed to be proportional to the

distance traveled, i.e., the energy budget of B allows the robot to

move B units distance (that is, ⌊B/L⌋ cells)1. The robot has to go

back to the charging station S to get its battery recharged before it

runs out of it. It is assumed that the size of P is such that the robot

cannot fully cover P in a single path; i.e., the number of cells in P is

at least ⌊B/L⌋ + 1. The goal of OnlineCPP is to find a set of paths

Π = π1, . . . ,πn for the robot so that

• Condition (a): Each path πi starts and ends at S ,• Condition (b): Each path πi has length |πi | ≤ B, and• Condition (c): The paths in Π collectively cover the envi-

ronment P , i.e., ∪ni=1πi = P .

We will show that any algorithm satisfying simultaneously con-

ditions (a)–(c) correctly solves OnlineCPP. However, we are in-

terested in finding a set of paths Π by an algorithm such that it

optimizes the following two performance metrics:

• Performance metric 1: The number of paths (or number of

visits to S) in Π, denoted as |Π |, is minimized, and

• Performance metric 2: The total lengths of the paths in Π,denoted as

∑ni=1 |πi |, is minimized.

In this paper, we establish the following main theorem for On-

lineCPP for correctness and for both performance metrics.

Theorem 1.1 (Main Result). Given an unknown polygonal en-vironment P possibly containing obstacles and a robot r of size L × Lconsisting of position and obstacle detection sensors initially situatedat a charging station S inside P with an energy budget of B, there isan online algorithm that correctly solves OnlineCPP and guarantees• O(log(B/L))-approximation to the number of paths, |Π |, com-pared to that for an optimal algorithm that knows everythingabout P a priori.• O(log(B/L))-approximation to the total lengths of the pathstraversed by the robot,

∑ni=1 |πi |, compared to that for an op-

timal algorithm that knows everything about P a priori.

The approximations achieved for both performance metrics in

Theorem 1.1 are asymptotically optimal since there is a lower bound

of Ω(log(B/L)) for both metrics for OnlineCPP due to Shnaps and

Rimon [15]. The best previously known algorithm due to Wei and

Isler [17] achieves constant-approximations for both metrics, but

only for OfflineCPP, and their techniques cannot be extended

1We do not consider the charging time of the battery of the robot r while at the

charging station S since this delay does not impact the cost related to these metrics.

to achieve the bound we obtain in this paper. Furthermore, our

algorithm is a significant improvement to that of Shnaps and Rimon

[15] which achieves O(B/L) approximation for OnlineCPP.

Technique. We employ a new technique of traversing the un-

known planar environment P using a Depth First Search (DFS)

traversal used in distributed robotics in different contexts (e.g.,

see [2, 5]). The DFS traversal asks the robot r (which is at S in the

beginning) to traverse the cells of P in the increasing order of depth

through forward and backtrack phases. The map of the environ-

ment P is constructed incrementally while r is running the DFS

traversal such that all the new frontiers (unvisited cells not occu-

pied by obstacles) are eventually visited. To control the path costs,

since the robot has a limited energy budget, it is asked to run the

DFS traversal level by level. That means, the robot first runs its DFS

traversal until some depth from the charging station S . The depthis computed based on its energy budget B (which is known to robot

a priori). After all the cells within that certain depth are covered,

then the robot is asked to increase the depth appropriately to cover

some new cells of P . The DFS traversal running level by level is

exploited to show that for every level, the cost of the technique that

we use will ask the robot to follow a number of paths that is only

a constant factor more than the number of paths that would have

been taken by the robot in the optimal, offline scenario. Therefore,

the approximation of our algorithm becomes proportional to the

number of levels (which is O(log(B/L))) compared to the optimal

cost. Simulation results show the efficiency of our approach.

Roadmap. We discuss related work in Section 2 and model and

some preliminaries in Section 3. We discuss some techniques to

handle the unknown environment, including how to build a map of

the environment on-the-fly and divide the tree map into levels, in

Section 4.We then present and analyze theOnlineCPP algorithm in

Sections 5 and 6, respectively. We then demonstrate our algorithm

through simulation in Section 7 and conclude in Section 8.

2 RELATEDWORKThe most closely related work to ours is due toWei and Isler [17, 18]

and Shnaps and Rimon [15] (as discussed in Section 1). The other

related work in the literature is the coverage of a graph. The goal is

to design paths to visit every vertex of the given graph. Without en-

ergy constraints, it becomes the well-known Traveling SalespersonProblem (TSP) [1]. With energy constraints, this coverage prob-

lem becomes the Vehicle Routing Problem (VRP) [9]. One version

of VRP is the Distance Vehicle Routing Problem (DVRP), which

models the energy consumption proportional to the distance trav-

eled. For DVPR on tree metrics, Nagarajan and Ravi [13] proposed

a 2-approximation algorithm. Li et al. [10] used a TSP-partition

method and their algorithm has a similar approximation to the

work in [15]. Most of these work studied the offline version where

the environment P (including obstacles) is known to the robot a

priori so that pre-processing on the environment can be done prior

to exploration obtaining better approximation. This is also the case

in the algorithm of Wei and Isler [17, 18] for OfflineCPP.

Coverage with multiple robots has also received a lot of attention

(e.g., see [2, 5]). In some cases, the paths planned for a single robot

under energy constraints can also be executed by multiple robots

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1190

Page 3: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

O1

O2

S

Figure 1: An example environment P with two obstacles O1

andO2 and a charging station S inside P . The perimeter of Pis considered as a boundary of P . P is shown decomposed ascells of size L × L same as the size of the robot.

by assigning the planned paths to the robots; using a single robot

or multiple robots does not affect the total energy cost.

3 MODEL AND PRELIMINARIESEnvironment.The environment P is a planar polygon containing a

single charging station S inside it. P may possibly contain polygonal,

static obstacles. P has a boundary that is known to the robot. See

Fig. 1 for an illustration of P with two obstacles.

Robot.We consider the robot r initially positioned at the charging

station S . The robot r moves rectilinearly in P , i.e., it may move

to any of the four neighbor cells (if the cell is not occupied by an

obstacle) of the cell that it is currently positioned. We also assume

that r has the knowledge of the global coordinate system, that

means it knows left (West) and right (East) and up (North) and

down (South) cells consistently from its current position cell.

We have the following observation on the size of P.

Observation 1. If a cell of P is located at distance D from thecharging station S and D > B/2, then robot r cannot fully cover P .

Since the total energy budget is B, for any cell at distanceD away

from S , it needs D amount of energy to reach there from S and the

same D amount of energy to return to S . So if a cell is such that

D > B/2, r will not have enough energy left to either reach the cell

or return to S after the cell is visited. Therefore, what Observation 1

intuitively means is that no cell of P can be farther than B/2 distance(measured in Manhattan distance) from the charging station S .

A path πi is a list of neighboring cells that r visits starting andending with S . Furthermore, a cell c in P is called accessible if thereis (at least) a path πi formed by consecutive cells of P from S leadingto c such that each cell in π is not occupied by any obstacle.

Observation 2. If there is a cell c in P such that there is no pathconnecting S to c , the robot r cannot cover c (and hence cannot fullycover P ), even with an unlimited energy budget.

Notice that this happens onlywhen obstacles within P are located

in such a way that they divide P into two obstacle-free sub-polygons

P1 and P2 with P1 and P2 share no common boundary. Therefore,

we assume that there is no such cell c in P , i.e., all cells not occupiedby obstacles (i.e., free cells) are accessible by r .

Observation 3. If there is at least a path connecting S to any cellc , then c has at least a neighboring cell (out of at most 4 neighborcells) that is not occupied by any obstacle.

S

7 8 9 10 11 12 13

6 7 8 9 10 11 12

5 6 7 8 9 10 11

4 5 6 7 8 9 10

3 4 5 6 7 8 9

2 3 4 5 6 7 8

1 2 3 4 5 6 7

1 2 3 4 5 6

4 5 6 7 8 9 10

3 4 5 6 7 8 9

2 3 4 5 6 7 8

1 2 3 4 5 6 7

1 2 3 4 5 6

10 9 8 7 6 5 4

9 8 7 6 5 4 3

8 7 6 5 4 3 2

7 6 5 4 3 2 1

6 5 4 3 2 1

10 11 12 13

9 10 11 12

8 9 10 11

10 9 8 7

9 8 7 6

8 7 6 5

S SFigure 2: An illustration of contours in the environment Pwith the value in each cell the L1 distance (or Manhattan dis-tance) to it from the charging station S .

TheOnlineCoverage PathPlanningProblemOnlineCPP.TheOnlineCPP problem can be formally defined as follows.

Definition 3.1. Given an unknown planar polygonal environment

P possibly containing obstacles with a robot r having battery budgetof B initially positioned at a charging station S inside P ,OnlineCPPis for r to visit all the cells of P not occupied by obstacles and

accessible from S through a set of paths Π so that

• Conditions (a)–(c) are satisfied, and

• Performance metrics (1) and (2) are minimized.

Approximation. OnlineCPP is a NP-hard problem [14, 15, 17, 18].

Therefore, our goal is to obtain a polynomial time algorithm solving

OnlineCPP optimizing the performance metrics. We measure the

efficiency of any algorithm for OnlineCPP in terms of approxima-tion, which is defined as the worst-case ratio of the cost of the onlinealgorithm for some environment P over the cost of the optimal,

offline algorithm for the same environment P . It is assumed that the

optimal algorithm has complete knowledge of P including obstacles

a priori. We denote the cost of the optimal offline algorithm byOPT .

Definition 3.2. An algorithm solving OnlineCPP provides k-approximation if the cost of solving any instance p of the problem

does not exceedk times the cost (OPT ) of solvingp using an optimal,

offline algorithm.

4 HANDLING UNKNOWN ENVIRONMENT4.1 Decomposition of the Environment PFollowing Wei and Isler [17, 18] and Shnaps and Rimon [14, 15], we

decompose the environment P into grids of same size as the robot

r (i.e., robot r is assumed to be of size L × L) using approximatecellular decompositionmethod of Choset [4]. We call these grids cells.Moreover, following [14, 15, 17, 18], we assume that the obstacles

are such that they do not partially occupy any cell in P , i.e., for acell, an obstacle either occupies it fully or does not occupy it at

all (see Fig. 1 for an illustration where obstacles O1 and O2 do not

partially occupy any cell of P ). However, the obstacles may not

necessarily be of rectangular shapes.

We assume that the charging station S is in a cell in P (Fig. 1).

An equi-distance contour is a poly-line where the cells on it has

the same distance to/from the charging station S (Fig. 2). The cells

on a contour can be ordered from one side to the other (robot r isassumed to have the knowledge of the global coordinate system).

It is easy to see that we can also order the contours based on their

distance to S in a strictly increasing fashion.

Let c be a cell and C be a contour. Let d(c) denote the distanceto S from c and let d(C) denote the distance to S from C . If d(Cj ) =

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1191

Page 4: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

Figure 3: An illustration of changes on contour numbers forthe cells of P in certain situations

d(Ci ) + 1, we say that contour Cj is contour Ci ’s next contour. ThecontourC with d(C) = 1 is called the first contour; this contour has

the at most 4 cells that are neighbors of S .Notice that since P is unknown, the information about contours is

not provided a priori and the robot r has to determine these contours

on-the-fly while under coverage. The robot uses its position sensor

to determine for the cell (it is currently positioned) in which contour

the cell belongs to and also the at most 4 neighboring cells (that

are not occupied by obstacles). The robot r can do this as follows.

Since it has a position sensor with respect to S (which works as

an origin of the coordinate system). It will measure its Manhattan

distance. Consider the cell 12 on the top row in the middle of Fig. 2.

When the robot is at cell 12, it considers a horizontal line passing

through S and the vertical line passing through cell 12. This gives

the information for r that the current position is 12.

This method works if the horizontal and vertical lines passing

through S do not intersect any obstacle present in P . If intersectionhappens, then r uses the approach as described in Fig. 3 to appro-

priately modify in which contour they belong. This is needed since

otherwise the algorithm we design may not visit those cells and

the full coverage of P is not achieved. In the left of Fig. 3, since

the horizontal line passing through S intersects obstacle O1, the

number of the cells based on pure distances from S is problematic

for the cells on the right ofO1 (the cells numbered 6, 7 to 7, 8 bottom

to top). This is because the DSF never visits those cells. The robot rdetects the situation based on the obstacle sensor and corrects the

numbering on-the-fly handing the issue (the right of Fig. 3).

4.2 Constructing a Tree Map of P On-the-flyWe denote the tree map by TP which is constructed incrementally

while the robot r is under coverage. Initially, the robot r is at thecharging station S . In this case, the tree TP has only one node S ,which we call the root ofTP . If there is no obstacle present in P , eachcell (except the cells in the boundary) in P has exactly four neighbor

cells. See the left of Fig. 4 where each cell (except boundary cells)

has 4 neighbor cell as there is no obstacle. Since r has the globalcoordinate system, each of the (at most) four neighbor cells of any

cell c can be consistently labeled West, North, East, and South in

the clockwise order starting from the cell in its left (i.e., West).

The robot r picks the first cell c1 that is not occupied by any

obstacle and includes it inTP as a child of S . If the cell labeled West

is not occupied by any obstacle, then r picks that cell. Otherwise, itgoes in order of North, East, and South until it finds the first cell that

is not occupied by any obstacle and includes it as a child of S . Recall

4 5 6 7 8 9 10

3 4 5 6 7 8 9

2 3 4 5 6 7 8

1 2 3 4 5 6 7

1 2 3 4 5 6

10 11 12 13

9 10 11 12

8 9 10 11

S S1

1

234 5

432

2

6543

3

7654

4

8765

5

9876

6

10987

12119

98

131211

11

1010

10

Figure 4: An example tree map TP on the right constructedfor the environment P shown in the left. It is guaranteed inTP that each cell with distance d from S is included in TP atexactly at depth d from the root S . This means that all thecells at any contour C(d) are at depth d in TP .

that there is at least one cell that is not occupied by any obstacle

(Observation 3). We now have two nodes in TP = S, c1 with c1as a child node of S . Furthermore c1 is a cell in the first contour C1

(i.e., d(C1) = 1). The right of Fig. 4 provides an illustration of the

tree map TP developed for the environment P given in the left.

Notice also that, since r is exploring P while building TP , it willmove to c1 after it is included as a child in TP . Robot r then again

repeats the process of buildingTP from its current position c1. While

at c1, r is only allowed to make one of the neighbor cells of c1 thechild of c1 in Tp and this child node will be in the second contour

C2, i.e., d(C2) = 2. Furthermore, if some cell is already a part of TP ,then this cell will not be included in TP again. This process then

continues. Using this approach, all the cells in the first contour

C1 will be children of S (the root of TP ), all the cells in the second

contour C2 will be children of the nodes of TP that are cells in the

first contour C1, and so on. In Fig. 4, each cell of contour Ci on the

environment P on the left are at depth i in TP shown on the right.

Additionally, if one or more neighbor cells of the robot’s current

cell are occupied by obstacles, they will be detected by the position

sensor (laser rangefinder) and will not be added to Tp .Let TP,f inal be the final tree map of the environment P after

all the cells of P (that are not occupied by the obstacles in P and

accessible from S) are included in TP . Let Depth(TP,f inal ) denotethe depth of the treeTP,f inal ; the root S has depth 0, the child node

of S has depth 1, and so on. Let Nx be the set of nodes in TP such

that the distance from S to each node in Nx is x .

Lemma 4.1. In the tree TP constructed above, each cell c ∈ C suchthat d(C) = x is positioned exactly at depth x in TP .

Proof. Follows easily from construction of TP since the cells at

contour C such that d(C) = x become the children of the cells of

contour Cp such that d(CP ) = x − 1, for 1 ≤ x ≤ B/2.

Lemma 4.2. For any unknown polygonal environment P possiblycontaining unknown number of obstacles, Depth(TP,f inal ) ≤ B/2.

Proof. This lemma follows combining the results of Observa-

tions 1 and 2, and Lemma 4.1; otherwise covering all free and

accessible cells of P is not possible by the robot r of energy B.

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1192

Page 5: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

D1 =0 B1 = B

B2 = B - D2 = (1-γ)B1D2 = B-(1-γ)B1

B’1 = (β+γ)B1D’1 = B-B1’

B3 = B - D3= (1-γ)2B1D3 = B-(1-γ)2B1

B’2 = (β+γ)B2D’2 = B-B2’

Bi = B - Di= (1-γ)i-1B1Di = B-(1-γ)i-1B1

B’i-1 = (β+γ)Bi-1D’i-1 = B-Bi-1’

Figure 5: An illustration of the partitioning of the tree mapTP into levels. The levels are denoted asDi (in the increasingorder from the charging station S which is the root of TP ).The charging station S is at level D1 = 0 and also the nodesup to depthD2. The nodes ofTP starting from depthD2 up toD3 are at level 2, and so on. Bi denotes the energy budget forrobot for level Di (while at depth Di ); at level D1, the energybudget B1 = B. We also define D ′i , such that Di+1 ≤ D ′i ≤ Di+2;for i = 1, D2 < D ′

1< D3. How the values for each Di ,Bi ,D

′i ,

and B′i are computed is also shown. These values depend ontwo parameters γ , β such that 0 < γ , β < 1.

4.3 Partitioning the Tree Map into LevelsWe denote a level of the tree TP by i . To be able to partition TP into

levels, it is not required that TP is known a priori. This helps in

partitioning TP into levels incrementally on-the-fly while under

coverage. We guarantee that this does not have effect on how parti-

tioning is obtained. This guarantee makes easy to run the algorithm

for any unknown polygonal P containing obstacles. Our goal is

to partition TP into levels proportional to B/L (for simplicity, we

assume L = 1 in the description below which works even if L > 1).

Figure 5 provides an illustration on how TP is partitioned into

levels, where D1,D2, . . . ,Di , . . . denote the level boundaries and

all the nodes of TP from Di to Di+1 are considered the nodes of

level-i . Each level i of TP is a set of nodes which are located at

certain depth inTP . We can also say that a level i is defined startingfrom a contour (sayCstar t,i ) and ending at the counter (sayCend,i )such that d(Cstar t,i ) ≤ d(Cend,i ). All the nodes ofTP starting from

Cstar t,i and ending at Cend,i are called the level-i nodes of TP . Allthe nodes ofTP at contourCstar t,i are called the level-i roots ofTP .Level-i roots are denoted by a set Ni = v1i ,v2i , . . ..

According to this definition, it is easy to see that the first level

(level-1) consists of the root of TP , which is the charging station

S , and the nodes of TP up to depth D2 (excluding the nodes of TPat depth D2). Therefore, the starting contour Cstar t,1 for level 1 isS . We say Cstar t,1 is D1 which is 0. At the charging station S , theenergy budget is B. We say that the starting contour Cstar t,2 forlevel 2 is at depth ⌈B − (1 − γ )B⌉ from S , where 0 < γ < 1; we will

set the value of γ later. We denote Cstar t,2 by D2. All the nodes of

TP from contour D1 to D2 are called the level-1 cells. Furthermore,

all the cells at contour D2 are called level-2 roots.We say that the starting contour Cstar t,3 for level 2 is at depth

⌈B − (1−γ )2B1⌉ from S . We denoteCstar t,3 by D3. All the nodes of

TP from D2 to contour D3 are called the level-2 cells. Furthermore,

all the cells at contour D3 are called level-3 roots.This definition then extends to any level i , i > 2. For any level-i ,

the starting and the end contours are Cstar t,i = Di and Cend,i =Di+1, respectively, and all the cells from contourDi to contourDi+1are called the level-i cells and the cells in contour Di+1 are called

level-(i+1) roots.The energy budget for the robot at any level-i root is Bi =

(B − Di ), where Di is the depth of the root level of the level-i .This can also be directly computed using the following formula

Bi = (1 − γ )i−1B; we provide the proof of this below which will

help in proving a bound on the number of levels in Lemma 4.4.

Lemma 4.3. For any i ≥ 0, Bi+1 = B − (1 − γ )iB.

Proof. We prove this lemma by induction. We use two variables

Di and Bi , where Di denotes the depth of level-i from the root of

TP and Bi denotes the energy budget for level-i for the root of thatlevel. We have that for level-1, D1 = 0 and B1 = B. For any level-i ,i > 1, Di = Di−1 + γBi−1, where Bi−1 = B − Di−1.

We argue through induction that, for any i ≥ 1, Di = B − (1 −γ )i−1B. For i = 1, D1 = B−(1−γ )0B = 0, which is trivially true and

serves as the base case. Assuming that Di = B − (1 − γ )i−1B holds

for some i > 1, we now show that Di+1 = B − (1−γ )iB, which will

complete the proof. Particularly, we have that

Di+1 = Di + γBi

= Di + γ (B − Di )= (1 − γ )Di + γB

= (1 − γ )(B − (1 − γ )i−1B) + γB= B − (1 − γ )i−1B − γB + γ (1 − γ )i−1B + γB= B − (1 − γ )i−1B + γ (1 − γ )i−1B= B − (1 − γ )i−1B(1 − γ )= B − (1 − γ )iB.

We are now ready to prove the following lemma regarding the

number of levels for the partitioning approach discussed above.

Lemma 4.4. When L = 1, the number of levels in the tree map TPaccording to the partitioning algorithm discussed above is log 1

1−γ

(B2

).

Proof. Observe that the depth of the tree map TP cannot be

more thanB2(Lemma 4.2). Therefore, the partitioning of TP into

levels stops as soon as (1 − γ )i(B2

)≤ 1, i.e., there is at most one

contour of nodes of TP in a level (notice that these nodes are the

leaves in TP ). Therefore, setting i = log 1

1−γ

(B2

), we have that

(1 − γ )i B2≤ 1 and hence we have i = log 1

1−γ

(B2

)levels in TP .

When L > 1, a simple adaptation gives log 1

1−γ

(B2L

)levels.

5 ALGORITHM SOLVING ONLINECPP

We first discuss the high level ideas of the algorithm and then the

details. In the description of the algorithm and analysis for both

correctness and performance, we assume that L = 1. A simple

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1193

Page 6: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

adaptation of the algorithm and analysis will work when L > 1.

The pseudocode is given in Algorithms 1 and 2.

Overview of the Algorithm. The main idea behind our algorithm

is to incrementally explore the environment P by the robot r to

fully cover P , while at the same time r constructing a tree map TPof P to keep track of the new frontiers that need to be visited by

it to solve OnlineCPP. We ask r to proceed covering of P level by

level as defined in Section 4.3. In order to do this, r explores P and

builds TP up until a certain depth.

Specifically, while at level-1, r covers all the cells that are in

level-1 and some cells that are in level-2. This additional extension

of covering a few nodes at level-2 while covering the nodes at

level-1 provides us extra information about exploring level-2 cells

and makes the algorithm analysis easier for both lower and upper

bounds on the performance metrics. In fact, while at level-1, the

robot r covers the cells from depth D1 to depth D ′1as shown in

Fig. 5, where D2 < D ′1≤ D3.

After all the cells in level-1 (along with some cells in level-2) are

visited, robot r then starts covering the cells in level-2 (along with

some cells in level-3). After all the cells in level-2 (and some cells of

level-3) are visited, r then starts covering cells in level-3 (and some

cells of level-4) and this process continues until all the cells of Pare covered. Notice from the description above that some cells of

each level i > 1 are visited two times by r as they will be visited

first time while r is covering the cells in level-(i − 1) and second

time while r is covering the cells in level-i . We will argue that this

has no asymptotic impact on the bounds of the algorithm.

Within a level, r uses the Depth First Search (DFS) traversal to

visit all the cells in that level. In the beginning, r starts its DFS

traversal from S and visits the leftmost cells of each contour with

increasing depth until it reaches contour at depth D ′1from S. After

depthD ′1is reached while exploring level-1, r backtracks to visit the

remaining cells within depth D ′1from S . After all the free cells until

depth D ′1are visited, then r starts visiting the cells of P in level-2.

Robot r again performs the DFS traversal up to depth D ′2(from S).

After all the cells until D ′2are visited using the DFS approach, r

starts visiting level-3 cells and this process continues until all the

cells of P in all the levels are visited.

Within any level-i , while covering the cells using DFS traversal,

robot r keeps track of its current distance Dcur from S . Dcur is the

shortest L1 (or Manhattan) distance from S to the current cell of

r . In fact, the path from S to the current cell of r is of length Dcursince TP is a tree with root S . Robot r also keeps track of Bcur -

the remaining energy budget. After fully charged at S , Bcur = B.As soon as it transitions to adjacent cell of S , Bcur = Bcur − 1.

Therefore, as soon as Br emain = Dcur , r follows the shortest pathleading to S and returns to S . This way r is positioned at S when

Bcur = 0 and will be recharged to have energy budget B before

starting next path to visit the remaining nodes of TP .To facilitate the exploration of the cells in any level-(i + 1), i ≥ 2,

r selects the nodes of level-i at depth C(Di−1) as the root nodes Ni .

That is, for level-2, the nodes in the end contour C(D1) act as theroot nodes and stored in N2. Generalizing this for any level-i , thenodes in the end contour C(Di−1) act as the root nodes of Ni . And

in level-i , the robot first moves to a node in Ni from S and from

there it moves to the first node of that level that was not already

Algorithm 1: OnlineCPPAlg1 Input: The charging station S and the available energy budget B for rthat is initially at S ; the environment P is not known to r except that Sis inside P and P has a boundary of radius at most B/2 centered at S ;

2 N ← S ;3 for i = 1, 2, . . . , ⌈log 1

1−γ( B2) − 1⌉ do

4 Di ← ⌊B − (1 − γ )i−1B ⌋;5 Di+1 ← ⌊B − (1 − γ )iB ⌋;6 Bi = B − Di ;

7 B′i ← ⌈(β + γ )Bi ⌉;8 D′i ← ⌊B − B′i ⌋;9 while there is at least a node of TP within depth D′i (from S ) that

is yet to be visited do10 Cover(S, i, Di , D′i , Di+1, N );11 N ← N ′;

Algorithm 2: Cover(S, i,Di ,D′i ,Di+1,N )

1 if there is at least one unvisited node in tree TP between depth Di andD′i (D

′i inclusive) then

2 v ← the leftmost unexplored node on TP that is closest from S(the root of TP );

3 move to a node vi ∈ N that is closest to v using a path in TP ;4 move to v from vi through a shortest path in TP ;5 Dv ← the distance from S to v ;6 Br emain = B − Dv ;7 while Br emain ≥ Dv ′ for any node v ′ between depth Di and D′i

(inclusive) do8 explore the unvisited nodes between depth D and D′

(inclusive) using a DFS traversal;

9 insert each new node visited in tree TP making a child

appropriately;

10 decrease Br emain by 1 for each new node the traversal visits;

11 N ′ ← a set of nodes of TP that are at depth Di+1 (note that

Di ≤ Di+1 ≤ D′i );

12 return to S following the tree TP ;

visited in the previous round(s) of exploration. After visiting some

new nodes at that level, r returns to S to be recharged again. If the

path of r does not lead it to visit some new nodes (that were not

already visited), then r does not go to that path.

Particularly, the new frontier of the covered part of TP at level-idefines level-(i+1). The algorithm is then called at each nodev ∈ Nito cover the cells in level-(i + 1). The robot r then first moves from

S to v to explore the new frontier of TP using DFS traversal. When

it is left with energy budget Bcur = Dcur , it heads to S following

the shortest path and in the next path, it starts covering the cells of

level-(i + 1) where it left off in the previous path.

Detailed Description of the Algorithm.We call our algorithm

OnlineCPPAlg. The environment P is unknown to the robot rexcept that S is in P and P has a boundary of radius at most B/2centered at S (in L1 distance). Initially, the robot r is at S with

the energy budget B. This is a special situation of OnlineCPPAlg,

where v = S and B1 = B. In this case of i = 1, we ask r to explore Pusing a Depth First Search (DFS) traversal up to depth D ′

1= ⌊(β +

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1194

Page 7: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

γ )B1⌋; B1 = B. We set later the value of β such that D1 ≤ D ′1≤ D2,

meaning that while at level-1 some cells (nodes) of level-2 are also

visited. The value Di is calculated such that Di = ⌊B − (1−γ )i−1B⌋.Recall also that the DFS traversal is a renowned approach which

is defined as a walk followed by a robot starting at node v building

TP based on the DFS approach. As soon as robot r realizes that ithas the remaining energy that is just enough to reach back to S , itgoes back to S visiting the parent nodes of the tree TP that is built.

For level-2, we ask r to explore P again using the DFS traversal

up to depth D ′2= ⌊(β + γ ) · B2⌋, B2 = B − D2, i.e., all the cells of P

up to contour C(D ′2). Note that D2 ≤ D ′

2≤ D3.

Therefore, for any level-i , i > 2, we ask r to explore P using a

Depth First Search (DFS) traversal up to depth D ′i = ⌊(β + γ ) · Bi ⌋,Bi = B − Di−1, i.e., all the cells of P up to contour C(D ′i ). Note thatDi ≤ D ′i ≤ Di+1. The scenario in the left of Fig. 3 is also handled on-

the-fly running the dynamic contourmodificationmethod discussed

in Section 4.1 so that the DFS can visit the cells affected by the

change as shown in the right of Fig. 3.

6 ANALYSIS OF THE ALGORITHMIn this section, we provide a theoretical analysis of OnlineCPPAlg.

We first prove correctness of OnlineCPP and then provide the

analysis of the costs for the performance metrics (1) and (2).

6.1 Correctness Proof of the AlgorithmWe prove the following theorem for the correctness of OnlineCP-

PAlg. We show that the robot r covers all the grid cells of the

environment P that are free and accessible using OnlineCPPAlg.

Lemma 6.1. Setting β = 3/4 and γ = 1/10 correctly runs On-lineCPPAlg.

Proof. The root nodes in N2 (level-2) has depth D2 = B − (1 −γ )B1 = 9/10B; B1 = B. Therefore, when r reaches a node v ∈ N2,

it has B2 = 9B/10. While at level-1, the nodes up to depth D ′1=

B − ⌊(β + γ )b1⌋ = ⌊(3/4 + 1/10)B1 = B − 17B/20 = 3B/20 are

explored. This satisfies that D2 ≤ D ′1≤ D3.

The root nodes in N3 has depthD3 = B−(1−1/10)2B = 19B/100;B3 = (1−1/10)2B = 81B/100. Therefore, when r reaches a root nodev ∈ N3, it has B3 = 81B/100. While at level-2, the nodes up to depth

D ′2= ⌊(β +γ )B2⌋ = ⌊(3/4 + 1/10)B2 = 17/20 ∗ 9B/10 = 765B/1000

are explored. Note also that D3 ≤ D ′2≤ D4. Therefore, repeating

this process and arguing through induction, for any level-i , we havethat Di+1 ≤ D ′i ≤ Di+2.

Theorem 6.2 (Correctness). OnlineCPPAlg correctly coversthe environment P solving OnlineCPP.

Proof. We will show that using OnlineCPPAlg, robot r cor-rectly explores all the nodes of TP that are at some level-i , i ≥ 1.

To explore the nodes of TP at level-i , the robot has to move first

to a root node of the level-i from S (the node in the set Ni ). Let

vni ∈ Ni be a node on the root of level-i . After reaching vni , r isleft with the energy budget Bi , where Bi = B − Di . And, r is leftwith at least B′ = B − D ′i amount of energy budget while reaching

the first unexplored node v in level i (the is because v may be at

level D ′i ), i.e., the nodes of level-i up to depth D ′i are explored whiler was at level-(i − 1). The robot needs D ′i energy budget to return

to S from v . Therefore, r is left with B − 2D ′i energy budget to

perform exploration at level-i . We have that D ′i <B2for any level

i . Therefore, r can visit at least B − 2D ′i ≥ 1 nodes of level i thatwere not visited before. Finally, after covering of level-i is finished,the algorithm goes to level-(i + 1) as TP has the knowledge of at

least one unexplored cell of P until all the free and accessible cells

of P are covered by r . Since γ > 0, the algorithm continues until

⌈γB⌉ ≥ 1. The theorem follows.

6.2 Analysis of Approximation RatioFor the analysis purpose, we denote byT δv the subtree ofTP rooted

at some node v truncated to depth δ from v . We denote by |TP | thenumber of edges in TP . Denote by N the total number of free and

accessible cells in P . We prove the following lemma for OnlineCP-

PAlg to cover all the cells of P that are in level-1. We show that the

number of paths taken by r while covering all the cells in level-1

are within a constant factor of the number of paths taken by r inan optimal offline algorithm OPT .

Lemma 6.3. Using OnlineCPPAlg, the robot r initially at S coversall the cells in level-1 in XALG paths, where XALG ≤ c ·XOPT , wherec is a positive constant and XOPT are the number of paths generatedby an optimal offline algorithm OPT .

Proof. Let the sub-tree of TP for level-1 be T δS , where v = S

and δ = D ′1. Initially, T δS is completely unexplored. Since r uses the

DFS traversal, the length of the DFS traversal is 2 · |T δS |.Robot r uses x = B −D ′

1= B −B +B′

1= B′

1= (β +γ )B = 17/20B

amount of energy to traverse a part of this DFS traversal, for β = 3/4and γ = 1/10. Therefore, we have that

x · XALG ≤ 2 · |T δS |.

We also know that

2 · |T δS | ≤ 2 · |TP | ≤ 2 · XOPT · B.

Therefore,

XALG ≤2 · XOPT · B

17B/20 ≤ c · XOPT .

Note that in above lemma c = 40/17 = 2.35. We now extend

Lemma 6.3 for any level-i , i > 1.

Lemma 6.4. Using OnlineCPPAlg, the robot r initially at S coversall the cells in any level-i , i > 1, in XALG,i paths, where XALG,i ≤ci ·XOPT ,i , where ci is a positive constant andXOPT ,i are the numberof paths by an optimal offline algorithm OPT for level-i .

Proof. For simplicity in the proof, we discard the costs of On-

lineCPPAlg andOPT to reach to S from a node in level-i and come

back from S to the node in level-i . This is because these costs forour algorithm and the optimal offline algorithm OPT are the same.

After r reaching level-i at some node v , it uses the remaining

energy B′i = B − 2D ′i to explore the edges of T δv of that level.

Therefore, we have the following relation.

B′i · XALG,i ≤ 2 · |T δv |.

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1195

Page 8: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

S

Environment 1

S

Environment 2

(a) (b)

Figure 6: Two 8 × 8 test environments are shown. S denotesthe charging station and the color-coded polylines denotethe levels that the robot has covered: a) Environment 1 (B =32); b) Environment 2 (B = 48). Due to the higher availablebudget, less number of levels are present in Environment 2.

This provides the following:

XALG,i ≤2

B′i· |T δv | ≤

2

B′i|TP \TDi

S |.

For the optimal offline algorithm OPT , in level-i , we have that

B′i · XOPT ,i ≥ |TP \TDiS |.

That means XALG,i ≤ ci · XOPT ,i , where ci ≤ 2.

Theorem 6.5. OnlineCPPAlg achieves O(logB)-approximationfor both performance metrics (the number of paths and the totallengths of the paths).

Proof. We have from Lemma 4.4 that there are log 1

1−γ

(B2

)lev-

els inTP . We have from Lemma 6.4 that for any level-i , the number

of paths of r is within a constant ci factor of the number of paths

by an optimal offline algorithm OPT . Therefore, combining these

two results, we have that the approximation for algorithm On-

lineCPPAlg is cmax · log 1

1−γ

(B2

), where cmax = maxc1, c2, . . .,

the maximum among the ci of all log 1

1−γ

(B2

)levels in TP and

cmax ≤ 2.35.

Proof of Theorem 1.1: Theorem 6.5 proves Theorem 1.1 for L = 1.

Since the cells are decomposed proportional to the size of the robot

L×L, with a simple adaptation of the analysis we obtainO(log(B/L))-approximation on both performance metrics. The correctness anal-

ysis stays the same.

7 SIMULATIONSWe have implemented the proposed algorithm OnlineCPPAlg us-

ing Java programming language on a desktop computer with an

Intel i7-7700 CPU and 16GB RAM. We have created two different

environments with both convex and concave obstacles in them. The

charging station is placed in the bottom-left corner. Both environ-

ments are of the same dimension – 8× 8 (l = 8). The budget B is set

to 32 (unless otherwise mentioned), i.e., four times the size of each

side of the environment. These tested environments are shown in

Fig. 6 (video of simulation: https://youtu.be/rl6J7V5juSQ).In environment 1 (Fig. 6(a)), it takes our algorithm a negligible

amount of time 24.59 milliseconds (ms) to plan the set of paths to

cover the free cells in the environment while correctly mapping the

obstacles in it. Using OnlineCPPAlg, the robot needs to calculate

19 paths to cover the whole environment, i.e., the robot needed to

recharge its battery 19 times. The number of free cells (F) in this

particular environment is 54. Therefore, no algorithm can cover

this environment in less than2FB number of paths. With B = 32,

this minimum number of paths boils down to 3.375. The ratio of

the number of paths required by OnlineCPPAlg to the minimum

number of possible paths is 5.63, denoted by Rt . The sum of the

path lengths for environment 1 is 372.

For environment 2 (Fig. 6(b)), as there are more obstacles in it,

F = 48. We observe an effect of this lower value of F on the proper-

ties of paths generated byOnlineCPPAlg. The sum of lengths of all

paths reduces to 314 from 372 – a reduction of 15.59% in path length

when the number of free cells is reduced by 11%. The theoretical

minimum number of paths possible to cover this particular envi-

ronment under the energy constraint is 3 whereas OnlineCPPAlg

uses 16 paths. Thus, Rt drops to 5.33. Runtime of OnlineCPPAlg

in this case is 24.68 ms.

To see the effect of the maximum energy budget available to the

robot (B) on the number of paths and the corresponding Rt , wealso vary the value of B between 5l and 6l . With B = 5l and B = 6l ,the run times to cover the environment 1 using OnlineCPPAlg

are comparable – 20.49 and 21.72 ms. respectively. As the budget

was higher, the robot could explore more cells in one path rather

than coming back to the charging station frequently to recharge

itself. The total number of paths and the sum of path lengths also

see significant drops to 14 and 319 with 5l , and 10 and 246 with 6lrespectively – reductions of 26% and 47% respectively in number of

paths from B = 4l and reductions of 14.24% and 33.87% respectively

in total path lengths from B = 4l . Rt also reduces from 5.63 (B = 4l)to 5.18 (B = 5l) and 4.44 (B = 6l) respectively.

In environment 2, the effect of increasing B has similar effect to

the environment 1. For example, with both B = 5l and 6l , the num-

ber of paths reduces significantly – 12 and 9 respectively. Although

the robot has more budget to spend, due to the less number of free

cells in the environment and the shape of the obstacles, the robot

cannot leverage it to its maximum potential. Therefore, we notice

improvements in all the performance metrics, but the changes are

comparable to environment 1. Rt drops from 5.33 with B = 4l to 5

and 4.5 respectively with B = 5l and 6l . The sum of path lengths

also reduces to 270 and 215 respectively with B = 5l and 6l from314 with B = 4l .

8 CONCLUDING REMARKSWe have presented the first optimal algorithm for solving On-

lineCPP by a robot with energy constraints and showed that the

cost of our algorithm is always within a factor of O(logB) of theoptimal solution for both performance metrics, the number and the

lengths of the paths. Having the robot and cells of size L × L, L > 1,

our analysis gives O(log(B/L))-approximation. Our algorithm sig-

nificantly improves the O(B/L) approximation of the best previ-

ously known algorithm of Shnaps and Rimon [15]. A promising

direction for future work is to generalize our result to continuous

robot motion. We also plan to test our algorithm in a real-world

setting.

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1196

Page 9: Optimal Online Coverage Path Planning with Energy Constraints · Coverage Path Planning with Energy Constraints. In Proc. of the 18th Inter-national Conference on Autonomous Agents

REFERENCES[1] David L. Applegate, Robert E. Bixby, Vasek Chvatal, and William J. Cook. 2007.

The Traveling Salesman Problem: A Computational Study (Princeton Series inApplied Mathematics). Princeton University Press, Princeton, NJ, USA.

[2] Peter Brass, Andrea Gasparri, Flavio Cabrera-Mora, and Jizhong Xiao. 2009.

Multi-robot Tree and Graph Exploration. In ICRA. 495–500.[3] Young-Ho Choi, Tae-Kyeong Lee, Sanghoon Baek, and Se-Young Oh. 2009. Online

complete coverage path planning for mobile robots based on linked spiral paths

using constrained inverse distance transform. In IROS. IEEE, 5788–5793.[4] Howie Choset. 2000. Coverage of Known Spaces: The Boustrophedon Cellular

Decomposition. Auton. Robots 9, 3 (Dec. 2000), 247–253.[5] Pierre Fraigniaud, Leszek Gasieniec, Dariusz R. Kowalski, and Andrzej Pelc. 2006.

Collective Tree Exploration. Netw. 48, 3 (Oct. 2006), 166–177.[6] Yoav Gabriely and Elon Rimon. 2001. Spanning-tree Based Coverage of Continu-

ous Areas by a Mobile Robot. Annals of Mathematics and Artificial Intelligence31, 1-4 (May 2001), 77–98.

[7] Enric Galceran and Marc Carreras. 2013. A Survey on Coverage Path Planning

for Robotics. Robot. Auton. Syst. 61, 12 (Dec. 2013), 1258–1276.[8] Enrique González, Oscar Álvarez, Yul Díaz, Carlos Parra, and César Bustacara.

2005. BSA: A Complete Coverage Algorithm. ICRA (2005), 2040–2044.

[9] Gilbert Laporte. 1992. The Vehicle Routing Problem: An overview of exact and

approximate algorithms. European Journal of Operational Research 59, 3 (1992),

345–358.

[10] Chung-Lun Li, David Simchi-Levi, and Martin Desrochers. 1992. On the Distance

Constrained Vehicle Routing Problem. Oper. Res. 40, 4 (Aug. 1992), 790–799.[11] Raphael Mannadiar and Ioannis M. Rekleitis. 2010. Optimal coverage of a known

arbitrary environment. ICRA (2010), 5525–5530.

[12] Saurabh Mishra, Samuel Rodríguez, Marco Morales, and Nancy M. Amato. 2016.

Battery-constrained coverage. In CASE. IEEE, 695–700.[13] Viswanath Nagarajan and R. Ravi. 2012. Approximation Algorithms for Distance

Constrained Vehicle Routing Problems. Netw. 59, 2 (March 2012), 209–214.

[14] Iddo Shnaps and Elon Rimon. 2014. Online Coverage by a Tethered Autonomous

Mobile Robot in Planar Unknown Environments. IEEE Trans. Robotics 30, 4 (2014),966–974.

[15] Iddo Shnaps and Elon Rimon. 2016. Online Coverage of Planar Environments by

a Battery Powered Autonomous Mobile Robot. IEEE Trans. Automation Scienceand Engineering 13, 2 (2016), 425–436.

[16] Grant P. Strimel and Manuela M. Veloso. 2014. Coverage planning with finite

resources. 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems(2014), 2950–2956.

[17] Minghan Wei and Volkan Isler. 2018. Coverage Path Planning Under the Energy

Constraint. In ICRA. 368–373.[18] Minghan Wei and Volkan Isler. 2018. A Log-Approximation for Coverage Path

Planning with the Energy Constraint. In ICAPS. 532–539.

Session 4D: Robotics AAMAS 2019, May 13-17, 2019, Montréal, Canada

1197