exploration strategies for robotic vacuum cleaners1295924/fulltext01.pdf · in this thesis, an...

64
IN DEGREE PROJECT MECHANICAL ENGINEERING, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2018 Exploration Strategies for Robotic Vacuum Cleaners SOFÍA NAVARRO HEREDIA KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT

Upload: others

Post on 25-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

IN DEGREE PROJECT MECHANICAL ENGINEERING,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2018

Exploration Strategies for Robotic Vacuum Cleaners

SOFÍA NAVARRO HEREDIA

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF INDUSTRIAL ENGINEERING AND MANAGEMENT

Page 2: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration
Page 3: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X

Master of Science Thesis TRITA-ITM-EX 2018:194

Exploration Strategies for Robotic Vacuum Cleaners

Sofía Navarro Heredia

Approved Examiner Supervisor

August 27, 2018 Martin Törngren Binbin LianCommissioner Contact person

Electrolux Magnus Lindhé

Abstract

In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. Thisexploration would provide information for optimizing the cleaning path beforehand, and wouldallow the robot to relocalize itself or the charger more easily in case it gets lost.

Two elements are needed in order to implement an exploration mode; first, an exploration algo-rithm which will decide the next position of the robot in order to obtain useful information aboutthe environment (unknown areas, empty spaces, obstacles...), and second, an exploration mapwhich stores that information and is updated each time a new relevant position is reached. Theseelements are related and generally both are required for performing successfully the explorationof a specific environment.

A frontier-based strategy is adopted for the exploration algorithm, together with occupancy gridmaps. This strategy has long been regarded as a key method for autonomous robots working inunknown or changing environments. The idea of frontier-based algorithms is to divide the environ-ment into cells of regular size and drive the robot to the frontiers between cells with no obstaclesand cells for which no information has been gathered. It plans one step ahead by choosing a lo-cation which provides new environment information, instead of planning in advance all locationswhere the robot needs to acquire new sensor information.

Based on frontier strategy, two different exploration algorithms are implemented in the project.The first one is called "random frontier strategy", which chooses arbitrarily the frontier to goamong the frontiers set. The second is called "closest frontier strategy", which chooses the closestfrontier as the NBV (Next Best View) the robot should drive to. A path planning algorithm, basedon Dijkstra’s algorithm and a node graph, has also been implemented in order to guide the robottowards the frontiers.

The two methods have been compared by means of simulations in different environments. Inaddition, both exploration strategies have been tested on a real device. It is found that the closestfrontier strategy is more efficient in terms of path length between scanning points, while bothmethods give a similar exploration ratio, or percentage of fully explored cells within the final map.Some additional work is required in order to improve the performance of the exploration method

I

Page 4: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X

in the future, such as detecting unreachable frontiers, implementing a more robust path planningalgorithm, or filtering the laser measurements more extensively.

Keywords: grid maps, frontier-based exploration strategies, NBV, node graph, path planningalgorithm

II

Page 5: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X

Examensarbete TRITA-ITM-EX 2018:194

Strategier för utforskning med robotdammsugare

Sofía Navarro Heredia

Godkänt Examinator Handledare

27 augusti 2018 Martin Törngren Binbin LianUppdragsgivare Kontaktperson

Electrolux Magnus Lindhé

Sammanfattning

I den här rapporten har vi implementerat en utforskningsmod för robotdammsugaren Pure i9.Sådan utforskning skulle ge underlag för att optimera städmönstret i förhand och låta robotenrelokalisera sig själv eller laddaren om den tappar bort sig.

För att implementera utforskning behövs två saker. För det första krävs en algoritm för utforsk-ning, som bestämmer nästa position för roboten, med målet att samla användbar information omomgivningen (okända eller fria områden, hinder etc.) För det andra krävs en karta som lagrarinformationen och uppdateras varje gång roboten når en relevant ny position. Dessa två hängerihop och i allmänhet krävs båda för att framgångsrikt utforska ett specifikt område.

Vi har valt en front-baserad strategi för utforskningsalgoritmen, tillsammans med en rutnäts-karta med sannolikheten för hinder. Denna strategi har länge betraktats som en nyckelmetod förautonoma robotar som arbetar i okända eller föränderliga miljöer. Idén med front-baserade strate-gier är att köra roboten till fronterna mellan celler utan hinder och celler där information saknas.Den planerar ett steg framåt genom att välja en plats som ger ny information om miljön, iställetför att i förväg planera alla platser där roboten behöver samla in ny sensorinformation.

Baserat på front-strategi, har vi implementerat två utforskningsalgoritmer i projektet. Den förstaär en slumpmässig strategi, som godtyckligt väljer en front att åka till, ur hela mängden av fronter.Den andra är en närmaste fronten-strategi som väljer den närmaste fronten som den nästa bästautsiktspunkt som roboten ska åka till. Vi har också implementerat en algoritm för banplanering,baserad på Dijkstras algoritm och en nod-graf, för att styra roboten mot fronterna.

Vi har jämfört de två metoderna genom simulering i olika miljöer. Dessutom har båda utforsk-ningsstrategierna testats på en riktig enhet. Närmaste fronten-strategin är effektivare med avse-ende på banlängd mellan skanningspunkter, medan båda metoderna ger liknande utforsknings-grad, eller samma procentandel av fullt utforskade celler inom den slutliga kartan.

Nyckelord: Rutnätskartor, front-baserade strategier för utforskning, nästa bästa utsiktspunkt,nod-graf, algoritm för banplanering

III

Page 6: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration
Page 7: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Contents

1 Introduction 11.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Method description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Literature Review and Research 52.1 Exploration maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.1 Grid maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1.2 Line feature-based maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.3 Polygon maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.4 Topological maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.5 OctoMaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.2 Exploration strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.1 Random strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.2 Spiral navigation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.3 Longest lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2.4 Wall-following . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.5 Greedy strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.6 GB-L strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2.7 A-C-G strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.8 IG-CL strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.9 Frontier-based . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.3 Choice of map format and exploration strategy . . . . . . . . . . . . . . . . . . . . . . . 13

3 Implementation 153.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Grid map implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.2.1 Update process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2.2 Turning speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.3 Frontier recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.1 Frontier generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.2 Dilation algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.3 Thinning algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.3.4 Frontier classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.4 Exploration algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.1 Random frontier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.2 Closest frontier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

V

Page 8: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CONTENTS

3.5 Path planning algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.6 Map rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Case Study 314.1 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.1.1 Environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.1.2 Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.2 Comparative analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.2.1 Quantitative results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.2.2 Exploration ratio vs. time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.3 Experimental results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5 Conclusion 41

6 Discussion and Recommendations 43

Bibliography 44

Appendix 47

VI

Page 9: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 1

Introduction

Domestic robots have increased in popularity during the past years. The aim of these robots is tomake customers’ lives easier by saving time and effort. Among the up-and-coming devices is therobotic vacuum cleaner, which cleans houses autonomously.

One of the recently launched devices is the PUREi9, produced by Electrolux. The robot employsthe 3D Vision™ technology, which scans and maps the room to detect and avoid obstacles. Itsinnovative triangular design together with a powerful suction and an external brush allows thevacuum cleaner to reach and clean corners and small areas. In addition, it can be controlledthrough a mobile application, allowing users to set cleaning times, find information about thecleaning status and reports about the previous cleaning sessions including a coverage map.

However, robotic vacuum cleaners in general can have some issues. Narrow slots and high thresh-olds as stairs or thick carpets represent a challenge, in addition to self-localization problems.Another problem that should also be mentioned is detecting non-static obstacles like pets or kids.

1.1 Purpose

Localization problems within robotic vacuum cleaners can lead to difficulties to know which areashave already been cleaned and problems to return home (the charger). Currently, if the globalmap is corrupted or if the location of the robot is arbitrarily changed when running, i.e. if it iskidnapped, the device tries to find home and restarts the cleaning session.

To address these problems, it is necessary a new exploration mode where the robot drives aroundand builds a map of the environment in the fastest possible way. This exploration mode will beimplemented in contrast with its normal cleaning mode whose goal is to cover as much surface aspossible. In addition, it will be useful for building a new map, localize the charger if the devicegets lost, or optimize the cleaning path beforehand.

The expected outcome of the project is to implement two exploration methods for the PUREi9,each one based on a combination of an exploration strategy and an exploration map, and comparethem with respect to path length and exploration ratio (i.e., how similar is the final explorationmap compared to the testing environment).

1

Page 10: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X INTRODUCTION

1.2 Method description

To start with the project, a literature review about exploration maps and exploration strategieshas been carried out in order to choose the most suitable strategies. Exploration maps storeinformation about the environment in terms of occupancy and environment layout. Multiple maptypes can be used simultaneously in order to get the maximum information about the environmentand its segmentation. On the other hand, the purpose of exploration strategies (or explorationalgorithms) is to select the next position the robot should drive to in order to get the maximuminformation about the environment regarding the exploration map. Each strategy selects in adifferent way the Next Best View (NBV), or the next location from where the robot should acquirenew sensory information.

Two different algorithms among the considered exploration strategies have been implemented, aswell as one exploration map layout. The implementation has been accomplished in an iterativeway. First, one basic exploration algorithm and a map layout have been chosen as a baseline.Then, a second and more complex algorithm, that according to the literature review gives betterresults, has been implemented.

To continue, the different exploration modes have been examined by means of a simulated robot insimilar circumstances to investigate and compare their behavior. This comparative analysis hasbeen carried out in terms of path length and exploration ratio. The diverse environments in whichthe simulations have been performed and how the previously mentioned parameters are gatheredis explained as well. In addition, the two methods have been experimentally tested on a real robot.

Finally, the conclusions are outlined and a comparison with the literature research is carried outto observe if the performance of each algorithm is as expected or if the results are incongruousand why. Additionally, a discussion about the outcomes, challenges, and how to continue with theproject in the future is presented.

1.3 Framework

The PUREi9 uses a sensor system based on image detection to recognize objects. Two laser linesand a camera are situated at the front of the robot (Figure 1.1). The camera is placed at the centerwhile the right and left lasers are disposed to the sides, with an angle of 45° and -45° respectively.This disposition allows to detect objects in three dimensions.

When the front camera perceive a laser beam, it takes an image from which it is possible to extractthe laser beam coordinates and translate this information into line segments. These segments areclassified as floor or obstacle segments depending on its position within the image, and are givenin relative coordinates to the robot.

The odometry (the relative position of the robot from a starting point) is calculated regardingthe wheel’s speed, therefore the position of an object can be computed in absolute coordinatesconsidering the starting point of the robot as the origin. However, the odometry value is reallysensitive to slippery environments, so it can result unreliable in some situations.

To minimize localization problems due to a defective odometry, a SLAM (Simultaneous Localiza-tion And Mapping) algorithm is used. This algorithm helps the robot to stay localized in theenvironment and creates a feature-based map which stores the obstacles and the walls detected

2

Page 11: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X INTRODUCTION

Camera

Right laser

Left laser

Figure 1.1: PUREi9 robotic vacuum cleaner and sensor system.

by the device. The SLAM algorithm is less sensitive to odometry problems so it is normally usedfor path planning.

The robot has an already implemented transport service that given a certain position, drives therobot to that location together with obstacle avoidance. This service is used in the project to runthe robot to the NBV from a specific spot, while keeping it away from the walls or objects. Toavoid obstacles, the device has several bumper sensors situated at the front and the sides. Whena bumper event is received, the robot drives backwards in order to prevent further collisions.

Rvcmain is the robot software. This software runs on the Nav board of the robot, which handlesthe less tight real-time sequences such as motion planning, SLAM and the cleaning pattern. TheNav board communicates serially with the Main board microcontroller which runs the tight real-time sequences that control the wheel motors. The Main board does not have an operating systemwhile the Nav board runs real-time Linux.

The simulator is an open source project called Player/Stage. In order to reproduce the behaviorof the robot, Rvcmain is run on a laptop connected to the simulator instead of the Main board. Avisualization tool based on Player/Stage displays the information about the laser scans, the deadreckoning pose and the SLAM algorithm. This program allows to record the data and keeps trackof the position of the robot and how the SLAM map is built.

Finally, the programing language used for the code implementation is C++ and the integrateddevelopment tool is Eclipse.

3

Page 12: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration
Page 13: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 2

Literature Review and Research

This chapter analyzes the relevant literature about robotic exploration. It is divided into the twodifferent elements needed for an exploration mode; a map to store the information and an explo-ration strategy (i.e., where the robot should gather the next information about the environment).

2.1 Exploration maps

In this section, different map types are described from its usefulness perspective in terms of robotexploration.

2.1.1 Grid maps

Occupancy grid maps are a method for building maps from sensory data [1]. They consist of adiscretization of the environment into cells of a fixed regular size. These cells store an occupancyprobability that can be used to classify if the space corresponding to each cell is free, occupied orunknown.

To simplify map estimation and calculate the occupancy probability for each cell given all sensorand pose measurements recorded so far, it can be assumed that the occupancy values of the cellsare independent. This is not always true (since the same obstacle will be usually part of neighbourcells) but makes the problem easier. For instance, in [2] the occupancy probability of a cell c iscalculated as described in Equation (2.1):

p (c)= #hits#hits+#misses

(2.1)

where #hits is the number of beams reflected by an object in the corresponding cell area and#misses is the number of beams passing through the cell without being reflected. p (c)= 0.5 is theprior probability which represents that no information about c is known.

Cells can be classified as one of the three states by thresholding their occupancy probability. Typ-ically, a probability close to 0 corresponds to an empty cell, a value near 1 determines an occupied

5

Page 14: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

cell, and 0.5 is the occupancy probability given by default to an unknown cell. By identifying thecells’ states, grid maps are easy to create and update. An example of occupancy grid map can beobserved in Figure 2.1.

Figure 2.1: Occupancy grid map [3]. The big dots correspond to occupied cells,the small dots to unknown cells and the white spaces are considered as empty.

However, regular grids are memory demanding, and at high resolutions this can turn into a prob-lem. In addition, discretization can lead to accuracy errors. Another drawback with this type ofmaps is that the size of the area intended to be explored needs to be predefined with a fixed num-ber of unknown cells. As the exploration progresses, the cells are updated as empty or occupied.Nevertheless, the total size of the room or environment is usually unknown so it is likely that theinitial predefined map will be too small or bigger than the actual area, which results in a not soefficient procedure.

Map accuracy depends on the cell size; if a detailed map is needed, cell’s size can be reduced inorder to fulfill the accuracy specifications. However, if a fast exploration is required, the size valuecan be increased with the objective of shortening the exploration time.

2.1.2 Line feature-based maps

A feature-based map stores a set of features (points, lines...) derived from sensor measurements[4]. In robotics, features usually correspond to different objects as doors, walls, etc. These featuresare used as landmarks for the robot, and they help it to self-localize within the environment.

In exploration strategies, line features can be stored in the map into two lists of line segments[5]. The first list, obstacle list stores the segments which represent edges of obstacles, whereasthe second list, named free edge list, stores the segments of the free edges of the map or theboundaries between known and unknown areas. The map is modified each time new sensor datais gathered, based on the points recognized by the sensor and transformed into line segments.Next, the line segments are stored in their corresponding list, fusing together the collinear andconsecutive segments to optimize the process.

This strategy allows to compress the information in a more efficient way than grid maps, since

6

Page 15: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

only useful knowledge about the environment is stored [6]. However, less information about theenvironment is known.

Feature-based and grid maps can be combined for exploration strategies [7]. The former is usedmainly for localization while the latter is primarily used for path planning.

2.1.3 Polygon maps

The idea behind this method is to consider the free area scanned by the robot as a polygon createdby computing the union of the different points obtained from the sensor measurements. When thenew position decided by the exploration algorithm is reached, a new polygon is created based onthe sensor data. To calculate the updated exploration map, the current polygon map is includedinto the map created so far (Figure 2.2). This is an iterative process which takes place each timethe robot moves to a new position until the environment is fully-explored and the map has theshape of the room or environment. The information gain of a new position can be calculated byremoving the known region of the expected visibility polygon at that candidate position [8].

Figure 2.2: Polygon map construction process, next position marked in red.

This method seems straightforward for small environments without many objects and does notneed any predefined structure as grid maps. However, if the size of the area to map is considerable,then the number of points which define the polygon map can increase significantly.

2.1.4 Topological maps

These maps represent the relations between the different elements without taking into accountdistance and/or direction. A simple example of topological maps are subway maps (Figure 2.3). Inexploration, topological maps give a segmentation overview of the environment and facilitate thegraphical differentiation of the various rooms which define the whole exploration area. However,

7

Page 16: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

the position of the robot cannot be tracked accurately enough and environment recognition iscommonly hard [9].

Topological maps can also be used together with occupancy grid maps to partition the alreadyexplored area in order to assign robots to different segments [10]. The robots are driven to differenttopological segments of the environment which implies a decrement of the exploration time, a moreefficient dispersion over the exploration area, and the prevention of collisions. They can also behelpful to avoid that a robot starts examining a new room before finishing the exploration of thecurrent one [2].

Figure 2.3: Topological map of Stockholm subway.1

Topological maps can be extracted using Voronoi diagrams from grid maps or feature-based maps.Although doorways can be assurely recognized by this method, a lot of false positive are alsogenerated, therefore a posterior refinement or a restriction when building the Voronoi diagrammight be required [10].

2.1.5 OctoMaps

OctoMap is an open-source 3D mapping framework based on octrees, which represents volumet-rically environment models [11]. The idea of octrees is to recursively divide the space into voxels;

1 Image from MTR available online: https://www.mtr.com.hk/archive/corporate/en/consultancy/MTRSroutemap.pdf

8

Page 17: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

each tree node is divided by eight iteratively until a specified voxel size is reached [12]. Each voxelis then classified with a certain probabilistic occupancy estimation given the laser scans of theenvironment. This occupancy estimation is translated later on into three different voxel’s states:occupied, free or unknown (Figure 2.4).

(a) Volumetric model. (b) Tree representation.

Figure 2.4: Octree representation of free (shaded white) and occupied (black) cells [11].

This method is similar to occupancy grids regarding that the depth of the tree structure determinesthe size of the voxel, analogous distribution to the cells of a grid map, classified as occupied, freeor unknown as well. Nevertheless, it is more efficient in the sense that the size of the voxels canbe different inside the same map representation depending on the level of detail required, so lessdata storage is needed (see Figure 2.5).

(a) Occupied voxels. (b) Occupied and free voxels.

Figure 2.5: Octree map representation [11].

This strategy builds 3D models, but a similar method can be used to implement 2D maps based onlaser scans. Instead of using octrees, each node can recursively be divided by four until the desiredvoxel size is reached to achieve the required resolution.

9

Page 18: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

2.2 Exploration strategies

This section summarizes the literature review about different exploration strategies for mobilerobots describing their advantages and drawbacks. The main issue which all the different ap-proaches try to solve is the Next Best View (NBV) problem or how to select the next position therobot should run to in order to get the maximum information about the exploring area.

2.2.1 Random strategy

In this approach, the next position the robot should drive to in order to acquire new sensoryinformation about the environment is arbitrarily selected [5]. It can be used with grid maps orany other type of exploration maps. If the location is not reachable, the robot should go to a newrandom position.

This strategy is really easy to implement, there is no logic behind to decide which position shouldbe the next one. It can be selected as a "bottom line" to compare to other strategies. However, thismethod is extremely inefficient in terms of time.

2.2.2 Spiral navigation algorithm

In [13] a navigation algorithm using virtual centrifugal force is implemented for exploration jobs.A grid cell map with binary values for each cell (0 - free and 1 - occupied) is used to represent theenvironment. The idea of this method is to follow a predefined trajectory similar to an Archimedesspiral. The robot begins its detection from an initial position like a swirl source, and moves grad-ually extending the detected area. When the robot enters into an already explored area, it willleave from there to a new initial position and another exploration spiral will start from scratch.Wall-following algorithm is specifically used when the robot heads to an obstacle.

This method does not seem so straightforward but the idea can be re-used with a simpler naviga-tion algorithm. In addition, it will likely cover most of the environment and it is really efficient inempty environments. Nevertheless, the exploration of the whole environment is time consumingand a serie of rules are needed to cover all the possible behaviours (wall-following for example).

2.2.3 Longest lines

The motivation of this method is that map quality can quickly increase by heading into openregions of the space to be explored [7]. The idea of this strategy is to perform a full sensor scan(360°) and drive forward in the direction of the longest sensor reading until an obstacle is detected.Then another full sensor scan is performed and the previous direction is flagged as tried. Inthis method the navigational decisions are taken regarding solely the last sensor scan, and nopredefined structure is needed for the exploration map.

This strategy is easy to implement and gives good results at early stages of the exploration.Nevertheless, it is not efficient since it will likely be necessary to come back to map the entireroom/environment or some parts will remain unmapped. It is more difficult to improve rapidly asthe exploration goes on.

10

Page 19: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

2.2.4 Wall-following

This approach consists in two steps [7]. First, the robot performs a full sensor scan and gets closerto the nearest object it can detect; secondly, it keeps a constant distance from the object. As inlongest lines, the navigational decisions do not depend on the map.

This strategy is more reliable than other methods since a reference is followed (the wall or obsta-cle). One of the drawbacks is the crucial importance of the starting point since the reference tofollow will influence the exploration process. Wall-following does not assure to map the open spaceof the room if its size is considerable, or the whole room before leaving it if a doorway is on thepath.

2.2.5 Greedy strategy

This method chooses a possible observation position on the basis of the amount of new informa-tion about the environment the robot is expected to gain from that position. There are differentversions but all have the same principle: move the robot from its current position to the closestlocation of interest. In [5], the strategy is implemented taking into account the three first termsof Equation (2.3) (see below, A-C-G approach), which are related to the reduction of entropy of themap distribution when including a new sensor’s measurement from a candidate location [8]. Thismethod can be considered when evaluating other exploration strategies to compare the contribu-tion of information gain to the selection of the NBV. A probabilistic map representation, such asgrid maps, can be used together with this exploration strategy.

However, this strategy is usually considered only to compare with different exploration algorithms.It does not take into account the distance between the points, just the expected amount of newinformation and the localizability of the robot. Therefore the performance is worse comparing tomethods which do consider the distance to a candidate observation position as well.

2.2.6 GB-L strategy

This strategy creates a group of candidate observation positions in the proximity of frontier cellsgiven the map built so far [14]. Then, a candidate observation position p is evaluated according toEquation (2.2) [5]:

f (p)= A(p) · exp(−λ ·L(p)) (2.2)

where A(p) is an approximation of the unknown area observable from p (information gain term),L(p) is the path length from the actual robot location and p, and λ is a factor that weights theinformation gain from an observation position and the cost to reach it. The candidate whichmaximizes f (p) is selected as the next observation position.

As an advantage, this method takes into account the distance to a candidate observation point(in contrast to the greedy approach). In addition, it seems easier to implement than A-C-G forinstance, and the results are comparable. On the other hand, its effectiveness has been experi-mentally verified but not theoretically, and this strategy is still considered as "complex". Accordingto [2], it is less effective than frontier-based strategies.

11

Page 20: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

2.2.7 A-C-G strategy

It consists on an information-based exploration approach which evaluates a candidate position ac-cording to the map’s entropy. It also takes into account the distance traveled to reach the observa-tion positions. This strategy can be implemented considering the evaluation function in Equation(2.3) [5]:

f (p)= 1N + A

∑i∈A∪N

lnσunc,i

σ+N ln

σ

P+ ∑

i∈Aln

σ

σp,i+N ln

2π× cσ

(2.3)

where N = |N| is the number of new points expected to be sensed from p, A = |A| is the numberof already sensed points likely to be sensed again from p; σunc,i is the standard deviation of themeasurement error due to the robot pose uncertainty, σ is the standard deviation of the sensoraccuracy, P is the expected perimeter of the area to map, σp,i is the prior standard deviation ofthe already sensed point i, and c is the distance to p from the actual position. The best candidatecorresponds to the lower value of f (p).

A-C-G strategy is a complete theoretically based method. The evaluation function is considerablycomplex though.

2.2.8 IG-CL strategy

This method combines two different strategies, Information Gain (IG) and Closest Location (CL).The aim is to determine a compromise between the two evaluation functions, shown in Equation(2.4) [15]:

lnext = argmaxl∈L(c)

[α · E [I(l)]

max l′∈L(c) E [I(l′)]− dc (l, x)

max l′∈L(c) dc (l′, x)

](2.4)

where L(c) is the set of cells with high entropy in its visible range, dc (l, x) is the distance fromthe actual position x to the location l given the current map c, and α is a weight used to influencethe behaviour. E [I(l)] is the expected information gain for a certain position l calculated as theprobability of an observation multiplied by the change of entropy introduced when incorporating ameasurement into the map. Low values of α favour CL while high values makes the method tendtowards IG.

One of the advantages of this strategy is that α can be changed to optimize the results. In addition,it is based on a combination of two methods so it is very robust. It can also be used with coveragemaps and grid maps. Nevertheless, the implementation of the method is moderately complex. Itis similar to the GB-L approach (and therefore results are comparable to A-C-G) which accordingto [2] performs worse than frontier-based strategies.

2.2.9 Frontier-based

This method identify frontiers between explored regions of the environment and areas where noinformation has been gathered [2]. Hence, the robot looks for traversable and reachable regionsclose to unknown regions in the map built so far. Closest frontier strategies specifically calculatethe distance from the robot’s current position to each of the frontier candidates and drive the

12

Page 21: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

robot to the closest one, considered as the NBV. In Algorithm 1, the methodology of the strategy isoutlined. In contrast, a random frontier strategy chooses arbitrarily the next observation positionover the set of frontiers.

Algorithm 1: Closest frontier strategy [2]

1. Determine the set T of traversable cells, i.e., cells which are not occupied or for which noinformation is available.

2. Determine the set R of reachable cells, i.e., all the cells the robot is able to reach from thecurrent position.

3. Determine the candidate set C of cells that are reachable and traversable, i.e.,

C = {c | c ∈ T ∩ R}. (2.5)

4. Determine the set of frontier cells F by checking for every cell in the candidate set C if anyof its 8-neighbors N(c) has unknown occupancy probability:

F = {c | c ∈ C, ∃c′ ∈ N(c) : p(c′)= 0.5} (2.6)

5. Determine the next best view n as being the frontier cell lying closest to the robot’s currentposition r:

n= arg minc ∈ F

l (c, r ) , (2.7)

where l(p,r) is the length of the shortest path from p to r.

Typically, occupancy grid maps are used together with this exploration method. Candidate frontiercells c need to be adjacent to an unknown cell and have an occupancy probability of p (c) ≤ p f reewhere p f ree is the maximum probability of a traversable and reachable cell of being occupied.

However, there are some potential problems for frontier based searching. On one hand, a roommight be visited several times before being fully explored, which implies an inefficient explorationprocess. On the other hand, the region intended to examine might get covered during navigation;in that case, the robot should search for the next frontier before finishing the navigation. Theseproblems can be solved by adding repetitive re-checking and map segmentation.

2.3 Choice of map format and exploration strategy

From the project perspective, the exploration algorithm preferred is frontier-based. This method isstraightforward to implement (unlike greedy, A-C-G or IG-CL) and it is proved to be more effectivethan GB-L strategy [2]. In addition, this method explores the whole environment relatively fast,while random strategy, longest lines and wall-following are less efficient. Finally, it does not needany rule to cover all the behaviors as the spiral navigation algorithm.

The most suitable map layout together with frontier-based is grid maps; it is the typical combina-tion in the literature [2, 3, 14]. Line featured-based maps store information about the obstacleswithin the environment, but it is more complex to distinguish between known and unknown areasthan in grid maps. Polygon maps are not so efficient if the environment to explore is plenty of

13

Page 22: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X LITERATURE REVIEW AND RESEARCH

objects as in a real home; the number of points to store would be significant. Topological mapsare not accurate enough, they just give information about how the environment is segmented. Tofinish, a 2D implementation of OctoMaps would be more memory-efficient but it is a bit more dif-ficult to implement. If required, it would be a straightforward optimization to modify a grid mapimplementation into a more memory-efficient 2D version of OctoMaps.

Grid maps are quite easy to implement and accurate enough if the cell size is chosen appropriately.Although grid maps are computationally more expensive than other alternatives, it is simple tocreate and update them.

14

Page 23: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 3

Implementation

This chapter describes the process carried out to develop the code in order to implement the dif-ferent exploration methods.

3.1 Overview

The overall exploration process is shown in Figure 3.1. Before starting the exploration the gridmap is generated. The prior probability is set as the occupancy value of all the cells since noinformation is known about the environment. The iterative exploration process starts with a360° scan to gather information about the area surrounding the robot. This data is used to updatethe grid map. After this step, the frontiers are computed taking into account the "empty" cellsadjacent to unknown cells (cells whose probability is still the initial one). Next, if frontiers exist,the exploration algorithm chooses a frontier, more specifically the central point of a frontier, as theNext Best View (NBV). The path finding algorithm generates the path to the NBV; in case the cellis not reachable, a new frontier is selected. If none of the frontiers are reachable, the central cellof the last frontier analyzed is selected as the NBV. During the next step, the grid map is updatedwhile the robot drives to the NBV. The obstacle avoider helps the robot to avoid corners and bumpagainst obstacles. When the NBV is reached, the process starts again until there are no frontiersleft. Two map images are generated at each iteration in order to keep track of the process; onedisplays a graymap of the environment recognize so far, and a second one includes as well therobot’s path, the locations of the 360° scans and the frontiers if any.

3.2 Grid map implementation

To implement a grid map, the environment needs to be discretized into small cells. The cells’size depends on the required resolution. If the size is too big the quality of the grid map will beinadequate, but if the size is too small the program will require too much computational processingpower. For this project cells are defined as squares with side length 15 cm, approximately half thedimensions of the robot. This value was considered as a good trade-off between map quality andcomputational speed. The total size of the grid map and the cell resolution can be modified by theuser, as well as the starting point of the robot within the grid map.

15

Page 24: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Figure 3.1: Diagram of the exploration process.

16

Page 25: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

The cell class contains two variables, a float value which represents the log-odd occupancy proba-bility and an enum variable that determines the state of the cell (frontier, node, target, etc.). Log-odd values (calculated with the logit function) are used for simplicity since their update rule usesadditions instead of multiplications. The initial probability of each unknown cell c is p(c) = 0.5,which is transformed to log-odd probabilities regarding Equation (3.1):

logit(p(c))= log[

p(c)1− p(c)

](3.1)

3.2.1 Update process

The grid map is updated when there is available information about the environment. This happenswhen the robot is exploring, i.e. when it performs the 360° scan or when it drives to the NBV, andthe laser lines give information about the surrounded area. The update procedure is divided intothe following three steps.

Processing laser scans

Each laser beam is recognized as a floor line, or a floor and a wall segment if the laser detects anobstacle, in relative coordinates to the robot. The length of the single floor lines varies betweenneighboring laser scans (Figure 3.2). What is more, the end of a floor line does not correspond ingeneral to the starting point of its consequent wall segment, which is translated into unknownareas between the free space and the obstacles (Figure 3.4a). In addition, segments detectedfurther away than 1.5 m are not reliable enough to be included in the map.

(a) Screenshot of the visualization tool. (b) Corresponding map with varying floorlength.

Figure 3.2: Floor lines varying between neighboring laser scans. Unknown cellscorrespond to gray areas and cells detected as free are depicted in white.

17

Page 26: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

In consequence, the laser scans need to be modified. The range of the laser lines was settled to 1.5m, so all the information above this value is disregarded.

On one hand, if the scan detected is only a floor line, the length is modified to 1.5 m (Figure3.3a). If the line was shorter and an obstacle was on the way, the laser would have detected it andexpressed it as a wall segment. In addition, if the line was longer it was decided to disregard theinformation further than 1.5 m.

(a) Floor line <1.5 m.

(b) Floor line >1.5 m and obstacle further away.

(c) Floor line and obstacle >1.5 m.

Figure 3.3: Grid map update process depending on the different laser scan cases.White cells are updated as empty and black cells as occupied.

18

Page 27: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

On the other hand, if the scan is given as a floor and a wall line because an obstacle is detected,it is included in the map as an only wall segment whose starting point is the beginning of thefloor line and the end point is the beginning of the wall line (Figure 3.3b). Later on, all the cellsthat compose each wall segment will be updated as empty, but not the cell corresponding to theend point of the line and the adjacent one, which will be updated as occupied. If the floor line islonger than 1.5m, the wall line is disregarded and the prior is shortened to 1.5m and updated as afloor segment (Figure 3.3c). This way each scan is transformed into a single floor or wall segment,eliminating the unknown areas between segments (Figure 3.4b).

(a) Raw map. Unknown areas (gray) betweenfloor (white) and wall (black) segments.

(b) Map whose laser scans have beenprocessed.

Figure 3.4: Difference between a raw map and a processed map.

The segments are converted into absolute coordinates later on considering the dead reckoning poseof the robot.

Bresenham’s line algorithm

This algorithm is used to find a straight line between two points in a discrete world. The floorand wall segments are given by two cells, a starting cell and an end cell. However, an algorithm isneeded to find the cells in between which define the line. The method is summarized in Algorithm2.

The algorithm separates between two cases, when the starting and end cell are in the same columnand the remaining cases. If both cells are located in the same column, ∆x is equal zero, leading toa division by zero error when calculating the slope, this is why it is considered as a different case.The occupancy probability is updated as moving up or down (depending on the sign of ∆y) to thenext row. For the remaining cases, it is also necessary to distinguish between abs (∆y) < abs (∆x)and abs (∆x) < abs (∆y). If the former happen, the line between the starting cell and the end cellwill move in columns at every iteration (Figure 3.5 right line); otherwise, a row displacement isperformed instead (Figure 3.5 left line). To calculate when to change the row or the column re-spectively, the error between the mathematical line (straight line) and the discrete approximationis computed. When the error is higher or equal to half of the cell size, a shift is performed tominimize the error and adjust the discretized line to the ideal one.

19

Page 28: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Algorithm 2: Bresenham’s algorithmInput: grid map, starting point (i, j)start, end point (i, j)end , cell_size

∆x = iend - istart∆y = jend - jstart

if ∆x = 0 thenfor (i, j)start to (i, j)end do

updateProbability (i, j)(i, j) := (i, j±1)

endend

elses1 = (±1,0)s2 = (0,±1)

slope = ∆y∆x

if abs (∆x) < abs (∆y) thens1 = (0,±1)s2 = (±1,0)

slope = ∆x∆y

endfor (i, j)start to (i, j)end do

updateProbability (i, j)error := error + slope · cell_size

while error ≥ cell_size2 do

(i, j) := (i, j) + s2error := error - cell_size

end(i, j) := (i, j) + s1

endend

Figure 3.5: Bresenham’s algorithm. The white cell is the starting point and the red cells are theend points. The movements in rows or columns are expressed with arrows.

20

Page 29: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Both the last cell and the adjacent next cell are considered as obstacles when updating the prob-ability of the exploration tests, ensuring that the walls are detected correctly. In this way dis-cretization and small odometry problems are avoided, otherwise walls could disappear if the laserdetects an obstacle within the limit of two cells, leading to misinterpretated frontiers (Figure 3.6).

Figure 3.6: Misinterpretated frontiers in the second step of the simulation.

Frontiers outside the environment can also be generated during the simulation. Walls are con-structed in the simulator without thickness, in consequence if the robot drives too close to thewall it could "see" through it, generating unreachable frontiers outside the environment currentlyexplored. To avoid this situation, a virtual bumper with bigger dimensions than in the real robothas been stated. The goal is to avoid the robot to drive too close to the wall.

Update probability

The log-odd occupancy probability of a cell L(c) is modified as in [11] following the next rule (3.2):

L (c|z1:t)=max (min ( L (c|z1:t−1)+L (c|zt), lmax), lmin) (3.2)

where zt is the sensor measurement to be included, L (c|z1:t−1) is the previous log-odd occupancyprobability of c, and lmin and lmax denote the lower and upper bound of the log-odd values. Sincethis project assumes an static environment, no bounds have been defined for the log-odd values.This way if an occupied cell is detected once as empty, the influence of this erroneous measurementon the log-odd value is minimized. Therefore, (3.2) is transformed into L (c|z1:t) = L (c|z1:t−1)+L (c|zt).

If the cell whose probability wants to be updated corresponds to an empty space, L (c|zt)=−0.4; ifit corresponds to an obstacle, L (c|zt)= 0.85 according to [11]. The update process of the grid mapis graphically explained above in Figure 3.3. Occupancy values higher than the prior probabilitymean cells likely to be occupied and lower occupancy values correspond to cells probably empty.

3.2.2 Turning speed

The turning speed of the robot is also an important parameter affecting the quality of the gridmap. The lower the turning speed, the higher the number of laser scans per cell, therefore moreinformation is acquired about the environment. In Figure 3.7 the map quality of two differentturning speeds is compared.

21

Page 30: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

(a) 48°/s. (b) 26°/s.

Figure 3.7: Map quality regarding turning speed.

To calculate the optimal turning speed, five laser scans measurements are needed per cell. Thisvalue is the number of times the initial probability needs to be updated in Equation (3.2) to con-sider a cell as completely empty or occupied in [11], and drawn as white or black within the mapimages. Consequently, the distance between laser scans should be the cell’s size divided by fiveat the end of the range to assure that all the cells contain sufficient information. By knowing thelaser range (1.5 m) and the frequency of the laser scans (76 Hz), the minimum turning speed is the-oretically calculated as 87°/s. However, the distance between laser scans is not always constant,and a turning speed lower than 87°/s may not be accurate enough (Figure 3.7a). To guaranteemap quality, the turning speed has been set to 26°/s for the project. This value gives an acceptableaccuracy as shown in Figure 3.7b.

3.3 Frontier recognition

The frontier identification process takes place in four different steps:

3.3.1 Frontier generation

The first stage distinguishes all the cells with a log-odd probability lower than the prior probability,which are surrounded by at least one unknown cell. To avoid misidentified frontiers (Figure 3.8), atleast one of the unknown cells has to belong to the 4-neighborhood, i.e. has to be on the right, left,top or bottom of the analyzed cell to consider it as part of the frontier’s set. If the wall is straight,this condition is not necessary, however if the wall or obstacle is angled, a pixel discontinuity canexist when representing the occupied cells, leading to this problem.

3.3.2 Dilation algorithm

The second step is called dilation. The aim of this process is to soften the frontier’s shape byincluding in the frontier’s set the 8-neighborhood of a cell identified as a frontier in the first stage.Discontinued frontiers and frontiers generated by a single unknown cell inside a "known" area canbe easily eliminated using this method and thinning the dilated frontier later on.

22

Page 31: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Figure 3.8: Misidentified frontier cells inside the green circles.

However, different frontiers can be merged together when performing this step, that is why onlythe immediate neighbors are selected. The fact that the adjacent cell of an occupied cell is alsoconsidered as an obstacle helps to minimize merging problems.

3.3.3 Thinning algorithm

To continue, the third step consists on a thinning algorithm based on [16]. This algorithm is arepetitive process in which each iteration is divided into two subiterations (Figure 3.9). In thefirst subiteration the north-west corners and the south-east contour cells of each frontier chainare erased, while in the second iteration the opposite happens (south-east corners and north-westcontour cells are erased). End points and frontier connectivity is secured and the algorithm stopswhen no more frontier cells can be deleted, achieving unitary thickness frontiers. This method issufficiently effective and can be easily implemented.

Figure 3.9: Thinning algorithm process.

3.3.4 Frontier classification

Finally, the set of frontier cells needs to be classified and sorted into different frontier chains.To do this, the first element of the frontier set is selected and assigned to a sequence. Next, ifany of its 8-neighbors is classified as a frontier cell, it is assigned to the sequence as well and itsimmediate cells are analyzed heading to an iterative process. If a frontier cell has more than onefrontier neighbor which is not assigned to the chain yet, one of them is selected for continuing the

23

Page 32: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

procedure and the rest are stored and analyzed later on. This iterative process continues until acell has no more frontier neighbors which have not been already assigned to the sequence or nomore frontier cells are stored to analyze afterwards. If the frontier set contains elements whichare not assigned to any chain, one of those frontiers is assigned to a new sequence and the processdescribed above starts once more. After this process the chain vector contains the cells in thecorrect order, from one extreme to another.

The method is summarize in Algorithm 3:

Algorithm 3: Algorithm to classify the frontiers into different chainsInput: Set of frontier cells FOutput: Set of frontier chains C

while F not empty donext = F0initialize empty vector storedinitialize empty vector chain

while (next defined) or (stored not empty) doif next not defined then

next = stored0endinsert next into chainerase next from Fif next ∈ stored then erase next from storednext undefined

foreach neighbor of next doif neighbor ∈ F then

if next not defined then next = neighborelse insert neighbor into stored

endend

endinsert chain into C

end

The global frontier recognition process can be observed in Figure 3.10.

(a) Frontier generation. (b) Dilation algorithm. (c) Thinning algorithm.

Figure 3.10: Frontier recognition process. The frontiers are represented in red,the robot position in purple/green, and the center of the frontier in light blue.

24

Page 33: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

3.4 Exploration algorithms

3.4.1 Random frontier

Random frontier exploration-based method chooses randomly the frontier the robot should driveto. Instead of selecting randomly between all the different frontier cells, the robot will choosea random central point among all the different frontier chains. If the path planning algorithmcannot find the way to the target, the robot will select once again a random frontier among therest of frontiers. If none of the frontiers is reachable, the robot will just drive to the last frontieranalyzed, trying to reach it with the help of the obstacle avoider.

This method is easy to implement and it is considered as a baseline to compare other explorationalgorithms. However, exploration is inefficient in terms of time and path length since the robotdrives back and forth between the different frontiers.

As an example, Figure 3.11 shows a small exploration sequence for this method. It can be observedthat the robot keeps going from one side of the map to the opposite one, instead of exploring firstthe right part of the environment and then the bottom-left one or vice versa. The inefficiency ofthe exploration depends on the environment, it is less straightforward when the number of roomsis larger and their connectivity is complex.

Figure 3.11: Exploration sequence of the random frontier method.

25

Page 34: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

3.4.2 Closest frontier

Closest frontier exploration-based method chooses the closest frontier as the NBV the robot shoulddrive to. Therefore the robot does not waste time going from one side to the other side of the roomor environment.

To calculate the closest frontier, the robot needs to compute the path length from the actual posi-tion to all the different middle frontiers cells and select the shorter one. The length of the path iscalculated regarding the node graph of 360° scans the robot has performed previously. The pathcomputation procedure is explained in detail in the next section.

In Figure 3.12 the robot explores first the bottom-left part of the room and it finishes the explo-ration in that area before moving to the right side of the environment.

Figure 3.12: Exploration sequence of the closest frontier method.

26

Page 35: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

3.5 Path planning algorithm

The source code of the robot has an already implemented transport service which can drive it tothe position needed together with obstacle avoidance. If the coordinates of the NBV are given tothe transport service, it is likely that the robot will bump repeatedly against walls and it will haveto find an alternative path as it computes the direct route from the actual position to the target.This occurrence takes long time due to the fact that the robot uses wall following to continue theway after bumping against an obstacle and it does not remember how the environment looks likein order to find an alternative path. However, if a set of reachable relative positions is stored, therobot can be guided by means of a path planning algorithm within those positions to reach thetarget and save time. This set of reachable positions is called node graph, and only certain nodesare reachable from an specific position within the node graph, called neighbors.

Dijkstra’s algorithm finds the shortest paths between nodes in a graph. This method is an exam-ple of best-first search algorithm, which expands the exploration of a graph following a specifiedheuristic, in Dijkstra’s case distance [17]. A starting point (also called source or parent) needs tobe defined, as well as the neighbors or reachable positions from each of the nodes.

Given a source node, the algorithm assigns to all its neighbors (or children) the distance from thesource to the neighbor. Next, the algorithm picks the child node with the minimum distance tothe source and assigns to each of its neighbors the distance previously designated to the child plusthe distance from the child to its neighbor, i.e. the distance from the source to the node currentlyevaluated. If there is a distance already assigned to that node, the algorithm keeps the smallestone. The iterative process continues until all the nodes have been analyzed, always selecting forthe next iteration the node with the minimum assigned distance from the source which has notbeen evaluated. The distance initially allocated to the parent is zero so it is assured the procedurestarts from the source. If the aim of the method is to find the shortest path to a specific node, theprocess finishes when the node which is going to be analyzed is the target position. The method isgraphically explained in Figure 3.13.

A method based on Dijkstra’s algorithm has been implemented for this project. The nodes aredefined as the locations where the robot has performed a 360° scan, and neighbors are defined astwo nodes for which no obstacle is detected in between. To find if there is an obstacle in between,a similar function to Bresenham’s algorithm is used. Rather than updating the probability, aboolean value is returned answering if there is an occupied cell on the way or if all the probabilitiescorrespond to empty cells. In addition, the previous node the robot drives to before reaching thetarget is defined as a neighbor of the latter, even if there is an obstacle in between. This wayneighbour nodes not identified correctly because of wall corners are incorporated into the nodegraph; however, it can also lead to false positives.

The algorithm procedure is depicted in Algorithm 4. The previous target is defined by calculatingfirst the closest reachable node to the target, or just the closest one if for all the nodes there isan occupied cell on the way. In this manner, if there is not a feasible path to the target becauseof a wall, the transport service will be used to reach it from the previous target. Afterwards,the algorithm starts the iterative process explained above. Finally, the shortest path is defined bycoming back from the previous target to the source through the nodes having the shortest assigneddistance.

27

Page 36: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Figure 3.13: Dijkstra’s algorithm process.

3.6 Map rendering

To have a graphical representation of the exploration sequence, two different image formats aregenerated after each 360° scan. These formats allow bitmaps to be transmitted as text files.

The first format is a portable graymap format (.pgm) and it displays the exploration map createdso far. Each text file starts with a string which defines the file format, P5 in this case, where5 corresponds to a gray scale type and binary encoding standard. The P is common to all thedifferent formats but the number changes depending on the map type (white & black, gray scaleor RGB) and the encoding standard (ASCII or binary). In the following line, the number of pixelsper rows and columns is established to set the dimensions of the image. The third line indicatesthe maximum value for each pixel, typically 255. In pgm files, the minimum value 0 correspond toblack pixels and the maximum value to white pixels. The following lines contain the pixel valuesseparated by spaces. The number of columns is the width value and the number of rows the heightvalue.

28

Page 37: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

Algorithm 4: Path planning algorithmInput: nodes set n, source, targetOutput: node’s path between source and target

distance = infforeach node : ni do

if dist (node, target) < distance and noObstacles thenprev_target = nodedistance = dist (node,target)

endend

if prev_target ∉ n thenprev_target = closest node to target

endinitialize di to store the shorter distance between source and niset di to inf for all ni 6= sourceset di to 0 for ni = sourceinitialize previ to store the closest neighbor of ni

while not all ni analyzed donode = node with minimum di not analyzedif node = prev_target then breakflag node as analyzed

foreach neighbor of node not analyzed doif dist (source, neighbor) < dneighbor then

dneighbor = dist (source, neighbor)prevneighbor = node

end

endendset j to prev_target

while prev j defined doinsert prev j at the beginning of pathj = prev j

endinsert prev_target and target at the end of path

To calculate the pixel value of every cell, the log-odd occupancy probabilities have been thresh-olded between -2 and 3.5, same values as the lower and upper bounds lmin and lmax used forEquation (3.2) in [11]. A log-odd occupancy value equal or lower than -2 corresponds to an emptycell and therefore it is represented in white. On the other hand, a value equal or higher than3.5 corresponds to an occupied cell and it is represented in black. Log-odd values between -2 and3.5 are linearly converted to pixel values between 255 and 0 respectively, and are represented indifferent intensities of gray color.

The second format is a portable pixmap format (.ppm), which file type corresponds to P6. It issimilar to the graymap format but instead one single pixel value, three values are assigned per

29

Page 38: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X IMPLEMENTATION

pixel. These three values contain information about the RGB colors (red-green-blue), from 0 tothe maximum value specified at the beginning of the text file. The same information than in thegray scale map is displayed, as well as the robot path (blue/purple), the positions of the 360° scans(light green), the frontiers (red), and the target or the central cell of the frontier the robot isheading (light blue).

An example of the images generated with these two formats is shown in Figure 3.14.

(a) Gray scale. (b) Color.

Figure 3.14: Generated map formats.

30

Page 39: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 4

Case Study

This chapter outlines the results based on the simulation experiments. The simulations are car-ried out for each method and environment, and the results are collected in terms of distancebetween scanning points (path length), exploration ratio and time.

4.1 Method

The different environments used to introduce variability in the simulations and examine the be-havior of the robot within different situations are detailed in this section. In addition, the param-eters used to analyze and compare the results are explained.

4.1.1 Environments

Four different environments have been designed in order to test the behavior of the robot depend-ing on the exploration method (Figures 4.1 and 4.2). Five different starting positions for eachenvironment have been selected randomly inside the green circle.

(a) Office. (b) Fractal. (c) Maze.

Figure 4.1: Testing environments. The green circles represent the starting area, the rednodes symbolize the different rooms and their relations are depicted with straight lines.

31

Page 40: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

The first layout (Figure 4.1a) corresponds to an "office" environment. The idea behind this topologyis to have a central node, the corridor, connecting all the different rooms. If the robot is exploringone room and it decides to explore the room to the right, first it needs to come back to the corridorto reach it.

The second layout (Figure 4.1b) is a "fractal" environment. Within this distribution, the rooms areconnected somehow by a central node but it is not possible to reach all the rooms from this nodeas before.

The third environment (Figure 4.1c) is called "maze". It is considered as a single room with someobstacles and walls the robot needs to avoid to complete the exploration.

The last layout is a representation of a living room (Figure 4.2). It depicts a more realistic environ-ment than the three above since the device is mainly going to be used in domestic environments.

Figure 4.2: Top view of a living room and testing environment based on it.

4.1.2 Metrics

Path length, exploration ratio and time have been measured in order to compare the methods.

Path length is defined as the sum of euclidean distances between the 360° scans. This value isnot the exact length of the robot’s path since it does not take into account the detours the robotneeds to take in order to avoid the walls or obstacles. If the path planning algorithm does not finda direct path to the target, the robot will drive straight to it using the obstacle avoider and wall-following in case of collisions. This leads to a longer robot’s path which is not useful to compare theexploration methods. However, computing the euclidean distance between 360° scans minimizesinaccurate measurements due to transport or bumping problems when driving to the NBV.

Exploration ratio is defined as percentage of the number of pixels of the final map which havebeen completely explored, i.e. pixels which are represented as completely white or black. Thisnumber is compared to the ideal number of pixels which should be fully explored at the end ofeach simulation.

Finally, exploration ratio vs. time is compared for each method to have an insight of which strat-egy explores the environment in a shorter time. However, these results should be considered asan approximation due to the fact that time is influenced by many parameters which are not rep-resentative for the comparative study.

32

Page 41: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

4.2 Comparative analysis

For this section, ten simulations have been performed per exploration method and environment.The two methods have been tested under the same conditions and within the same environments.Five different starting positions are defined per environment, therefore, two simulations beginfrom each starting point in each of the environments for every strategy. The results of each simu-lation differ since random noise is added in the measurements and the dead reckoning.

4.2.1 Quantitative results

The numerical outcomes of path length and exploration ratio are exposed below.

Path length

The results in terms of path length are shown in Table 4.1 and Figure 4.3. For each of the environ-ments, the most efficient method regarding path length average and standard deviation has beenhighlighted in green in Table 4.1.

Table 4.1: Path length (in meters).

EnvironmentsOffice Fractal Maze Living room

TestStrategy Random

frontierClosestfrontier

Randomfrontier

Closestfrontier

Randomfrontier

Closestfrontier

Randomfrontier

Closestfrontier

Test 1 65.70 47.43 66.29 31.64 10.96 10.89 100.66 36.91Test 2 100.22 52.69 49.52 35.60 10.40 10.53 81.71 41.02Test 3 89.88 45.41 55.17 39.48 24.01 12.53 78.33 48.32Test 4 102.98 57.78 50.01 31.92 24.96 10.78 67.01 35.18Test 5 82.26 50.71 63.98 34.28 14.63 10.78 87.06 36.62Test 6 88.07 44.77 60.25 34.05 5.30 10.60 95.16 46.88Test 7 63.24 59.92 60.11 33.91 13.66 14.48 68.34 42.02Test 8 67.27 49.94 55.72 36.41 17.59 11.80 92.23 38.23Test 9 88.61 48.18 62.44 38.27 17.52 10.52 87.57 43.42Test 10 86.32 54.07 62.76 37.75 20.98 10.84 91.98 38.26Average 83.45 51.09 58.63 35.33 16.00 11.38 85.01 40.69

StandardDeviation

13.93 5.05 5.79 2.64 6.26 1.27 11.14 4.46

In Figure 4.3, the information gathered regarding path length for both methods within the differ-ent environments is displayed as a box-plot. On each box, the bottom and top edges indicate thefirst and the third quartiles (which represent the 25% and the 75% of the data respectively); whilethe middle red line represents the median. The whiskers (vertical lines from the boxes) representthe variability outside the first and the third quartile.

In general, it seems that the exploration method used for each of the simulations influences theresults. The median and the variability of the data (represented by the red line and the lengthbetween the edges of the whiskers) are higher for the random strategy within all the methods,

33

Page 42: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

Random Closest

Method

0

20

40

60

80

100

Path

leng

th

Office

Random Closest

Method

0

20

40

60

80

100

Path

leng

th

Fractal

Random ClosestMethod

0

20

40

60

80

100

Path

leng

th

Maze

Random ClosestMethod

0

20

40

60

80

100

Path

leng

th

Living room

Figure 4.3: Box-plots comparing the exploration methods for each of the environments.

as well as the average and the standard deviation in the table. To prove statistically that theexploration method affects the path length results, an ANOVA test has been carried out. ANOVA(ANalysis Of VAriance) tests are used to analyze if the differences between the means are signif-icant comparing the p-values to a threshold (typically 0.05). The p-value is a probability valuewhich indicates the probability of finding the observed results when the null hypothesis is true.If the p-value is lower than the threshold, the null hypothesis is rejected, which means that thedifferences between the means are statistically significant. In this case, the null hypothesis statesthat the path length means are equal for the two methods. The values for the ANOVA test areshown in Table 4.2.

The last column of Table 4.2 corresponds to the p-values for the two methods (columns), the en-

Table 4.2: ANOVA test for the path length.

Source SS df MS F Prob>F

-----------------------------------------------------------

Columns 13677.5 1 13677.5 245.95 6.38002e-25

Rows 35396.1 3 11798.7 212.17 1.15941e-35

Interaction 4200.9 3 1400.3 25.18 3.00826e-11

Error 4004 72 55.6

Total 57278.5 79

ANOVA Table

34

Page 43: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

vironments (rows) and the interaction between method and environment (interaction). The firstp-value is lower than 0.05 which means that there is a statistically significant difference betweenthe path length means regarding the method and therefore the exploration strategy chosen affectsthis parameter. The p-values for the environment and the interaction between method and en-vironment are also lower than 0.05, which means that the environment chosen affects the pathlength value, and that there is an obvious interaction effect of the two parameters.

Exploration ratio

The results in terms of exploration ratio are shown in Table 4.3. For each of the environments,the most efficient method regarding exploration ratio average and standard deviation has beenhighlighted in green as well.

Table 4.3: Exploration ratio (in %).

EnvironmentsOffice Fractal Maze Living room

TestStrategy Random

frontierClosestfrontier

Randomfrontier

Closestfrontier

Randomfrontier

Closestfrontier

Randomfrontier

Closestfrontier

Test 1 99.74 99.20 99.65 99.39 98.98 97.82 99.55 98.77Test 2 99.16 99.08 99.22 99.74 98.78 99.09 99.64 99.40Test 3 99.24 99.50 98.96 99.13 99.40 99.40 99.36 99.68Test 4 98.78 99.66 98.83 99.61 99.80 98.60 99.55 99.22Test 5 99.87 99.91 99.82 99.42 97.59 97.40 99.64 99.52Test 6 99.37 99.33 99.61 98.70 98.00 98.91 99.01 99.06Test 7 98.57 99.33 99.15 99.19 100.00 99.39 99.49 99.37Test 8 99.45 98.78 99.70 99.18 99.80 99.40 99.56 99.32Test 9 99.75 99.41 99.48 99.65 99.20 98.80 99.84 99.55Test 10 99.65 99.91 99.47 99.47 98.14 98.70 99.64 99.52Average 99.36 99.41 99.39 99.35 98.97 98.75 99.53 99.34

StandardDeviation

0.43 0.36 0.33 0.31 0.83 0.68 0.22 0.27

Regarding the results, it seems that both methods give comparable accuracy. A value of one pixelcorresponds to a variation of 0.2 for the exploration ratio percentage in the smallest environment,so actually the difference between the exploration ratios of the different tests is only a few pixels.In contrast with path length, the dissimilarity is too small to be compared graphically with a box-plot. As an alternative, a second ANOVA test has been carried out to prove statistically that themethod does not affect the accuracy of the exploration using the same hypothesis. The results areshown in Table 4.4.

In this case, the last column of the table corresponds to the p-values for the two methods (columns),the environments (rows) and the interaction between method and environment (interaction) re-garding the means of the exploration ratio values. The first p-value is higher than 0.05 whichmeans that there is not a statistically significant difference between the exploration ratio meansregarding the method. Therefore, it can be concluded that the exploration method chosen doesnot affect considerably the exploration ratio. The p-value for the environment is lower than 0.05,which means that the environment in which the robot is simulated statistically affect the explo-

35

Page 44: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

Table 4.4: ANOVA test for the exploration ratio.

Source SS df MS F Prob>F

----------------------------------------------------

Columns 0.1931 1 0.19306 0.86 0.3557

Rows 4.3542 3 1.45139 6.5 0.0006

Interaction 0.2419 3 0.08062 0.36 0.7815

Error 16.0891 72 0.22346

Total 20.8782 79

ANOVA Table

ration ratio. This fact is interesting since the variance between the different exploration ratiosseems irrelevant. However, there is not proof of an interaction effect of method and environment.

4.2.2 Exploration ratio vs. time

This section presents the graphs obtained when comparing exploration ratio and simulation timefor the different methods and environments (see Figure 4.4). Only five simulations for each methodand environment, one from each starting position, are depicted to avoid misunderstanding. Thepoints correspond to the exploration ratio after each 360° scan, and all the data belonging to thesame simulation is linked by a line.

(a) Office. (b) Fractal.

(c) Maze. (d) Living room.

Figure 4.4: Charts comparing the speed of the exploration process regarding the method for eachof the environments.

36

Page 45: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

Several conclusions can be deducted from the graphs. First, the slope of the exploration ratio tendsto slow down as the exploration goes on, as shown in Figure 4.4d. This is reasonable taking intoaccount that, to finish the exploration, the robot needs to drive to small unknown areas betweenthe already scanned space and the walls, for example the corners of a square room. In addition,normally the first scan of a specific room is the one that gives more information about it consideringthat all the area corresponds to unknown cells. In the case of random frontier, the decrement ismore obvious taking into account that the distance between two random frontiers is in generalhigher as exploration goes on; therefore, the robot needs more time to reach the NBV. However,this is not so clear in Figure 4.4c for the closest strategy since the robot uses to explore first one sideof the room and then the opposite one due to the starting point in the center. This fact increasesthe exploration ratio again when around half of the environment has been explored and the robotdrives to the other side.

Second, transport problems when driving towards the target lead to a considerable time incrementwhile exploration ratio keeps static or increases slightly. This is shown in Figure 4.4c, wherethe blue line reaches a plateau or a constant value between 200 and 400 seconds. When therobot cannot find the NBV, it drives around the already explored area until it reaches its target,fact represented in the graph by means of points separated a significant distance. Therefore,an increment in time does not mean an increment in exploration ratio since the zones the robotdrives around have already been explored. This is why the actual path length of the robot andtime have not been considered as representative variables since transport problems will influencethis parameter, and length between scanning points was preferred.

The steps of the exploration processes for the different methods and environments can be found inthe Appendix.

4.3 Experimental results

For this section, the two exploration strategies are tested on a real robot. The device has beenplaced in a long empty corridor to accentuate the differences of the methods (see Figure 4.5).

Different conclusions can be extracted when applying the same conditions as in the simulations.First, the dead reckoning pose is notably more sensitive in the real device than in the simulatedrobot. For the simulations, the odometry has been used to localize the robot since the positionwas accurate enough. However, for the real robot, odometry problems become more importantas the exploration process goes on (Figure 4.6) and the map does not longer look alike the realenvironment. Therefore, the SLAM algorithm should be used to localize the robot when runningthe real device, in order to minimize errors.

Second, the way laser scans are processed is not robust enough in a real environment. For thesimulations, it has been assumed that the laser scans are given as an unique floor segment or as afloor and a wall segment. However, in the real world there are more possibilities which need to betaken into account. When scanning too close to a wall, the robot might not recognize obstacles, andthis could be translated in the map as frontiers outside the environment. In addition, the sensorsystem is quite sensitive to noise and light, and wall segments can be generated erroneously.

To address these problems, some modifications are applied. The frontiers are generated takingonly into account frontiers composed of more than two cells. Therefore, false frontiers caused bysmall gaps within walls in the map are less likely to appear. In addition, some filters are neededfor the laser scans in order to recognize the environment correctly and obtain results comparable

37

Page 46: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

Figure 4.5: Real environment. The explored area is highlighted in greenand the brown object corresponds to an obstacle in order to block the corridor.

Figure 4.6: SLAM features (blue) and laser scans regarding odometry (gray).

to the simulations. First, the single floor lines are shortened to the laser range (1.5 m) if the lengthof the line is higher than this value, as in the simulations. However, the small floor segments arenot lengthened to 1.5 m since it cannot be ensured anymore that if there was an obstacle on theway the robot would have detected it. Second, the wall segments are only taken into account ifthe inclination of the line is lower than ±10°, if the line is longer than 8 cm, and if the starting

38

Page 47: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

point of the segment is at or above the floor. Small wall segments generated because of noisymeasurements are disregarded in this way.

The results obtained when using the SLAM algorithm and the filters explained before are pre-sented below. The exploration process of the random frontier strategy is shown in Figure 4.7 whilethe exploration process of the closest frontier strategy is depicted in Figure 4.8. The results interms of path length between scanning points, fully explored pixels and time are presented inTable 4.5.

Figure 4.7: Exploration process of random frontier strategy in a real environment.

After applying the extra processing discussed previously, it can be concluded that the experimentalresults are comparable to the simulations. Within the random frontier strategy, the robot drivesfrom one side to the other side of the corridor, while the closest frontier strategy finishes to explorethe right side of the corridor before driving towards the top and the left. Path length and timevalues are notably lower for closest frontier strategy, while the difference of explored pixels is notrelevant, demonstrating experimentally the higher efficiency of this strategy.

39

Page 48: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X CASE STUDY

Figure 4.8: Exploration process of closest frontier strategy in a real environment.

Table 4.5: Experimental results.

ParameterPath length (m) Pixels (units) Time (s)

StepStrategy Random

frontierClosestfrontier

Randomfrontier

Closestfrontier

Randomfrontier

Closestfrontier

Step 1 0 0 194 186 14 14Step 2 1.37 1.23 287 280 40 36Step 3 2.59 2.57 384 391 73 65Step 4 4.88 3.65 483 474 107 87Step 5 8.81 4.94 595 577 147 114Step 6 14.06 6.33 706 695 192 141Step 7 18.46 13.06 791 786 234 193Step 8 23.74 14.57 898 903 280 220Step 9 29.83 15.88 1016 1002 332 241Step 10 37.11 16.94 1121 1044 393 262Step 11 38.47 21.78 1209 1139 421 309Step 12 23.21 1216 331

Finalvalues

38.47 23.21 1209 1216 421 331

40

Page 49: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 5

Conclusion

In order to address localization problems for the PUREi9 robotic vacuum cleaner, this thesis im-plements and compares two different frontier-based exploration methods, used together with oc-cupancy grid maps.

An implementation procedure is proposed to develop the code for the different exploration meth-ods. The generation and update process of the grid map is firstly introduced. Then, frontierrecognition is discussed, including frontier generation, dilation, thinning and classification. Next,with these implementations available, the procedure of the two exploration methods is described,i.e. random and closest frontier-based algorithms. It is worth mentioning that a path planningalgorithm, based on Dijkstra’s algorithm and a node graph, is also developed. The aim of this pathplanning algorithm is to drive the robot to a specific location while avoiding to bump repeatedlyagainst obstacles.

Both simulations and experiments are carried out to compare the two exploration methods withindifferent environments and with respect to three metrics: path length, exploration ratio and time.Regarding path length, it is statistically justified that there is a significant difference betweenthe two methods and closest frontier outperforms random frontier strategy. Both methods showsimilar results concerning exploration ratio, and it is statistically proved that there is not a sig-nificant difference between them concerning this parameter. Therefore, an improvement in pathlength does not affect the exploration ratio of closest frontier strategy, making it more efficient.Exploration ratio vs. time for the two methods is also investigated, showing that the explorationratio of both methods tends to slow down as exploration goes on. In addition, an increment in timedoes not mean an increment in exploration ratio since transport problems, where the robot drivesaround already explored areas trying to reach the target, can lengthen the exploration process.

Regarding the experimental results, the exploration methods appear to operate correctly. How-ever, the quality of the map images is not comparable to the ones obtained during the simulationsdue to odometry errors and noise in the sensor measurements. Therefore, the SLAM algorithmis used and some additionally filters are implemented in order to respectively localize the robotaccurately and recognize the environment correctly.

To conclude, closest frontier strategy is preferred over random frontier strategy since it incor-porates some logic to the frontier selection process minimizing path length and performing theexploration in a most efficient way without losing map quality.

41

Page 50: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration
Page 51: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Chapter 6

Discussion and Recommendations

The results of the project are satisfactory since they are consistent with the literature and theexpected outcomes have been accomplished. However, several problems have been encounteredduring this project, which will be discussed below. Moreover, some recommendations will be pro-posed to further improve the performance of the exploration method.

Three main problems occurred during the implementation, adjusting the project accordingly. Time-wise, only two exploration algorithms have been carried out while the initial idea was to implementthree different exploration algorithms together with one or more exploration maps. Simulatorproblems should also be mentioned, such as the fact that the robot could "see" through the walls ifdriving too close to them, generating unreachable frontiers which leads to lengthening infinitelythe exploration process and invalidating the simulation. In addition, a merging frontiers problemmight appear due to the utilization of the dilation algorithm, but it is not so important since therobot will use the obstacle avoidance in case the frontier target is situated next to a wall.

Recommendations to improve the performance of the exploration method in the future are as fol-lows. First, the robot executes right now a 360° scan each time it arrives to a new NBV. However,a smaller scan would be enough since the robot has already examined the direction it comes fromor some nearby areas could be already explored. Second, frontiers might get explored while trans-portation, in which case the robot should recompute the frontiers while driving and direct to a newNBV, shortening the exploration time.

The last and most important issue is that the path planning algorithm implemented is based ona node graph for which is of crucial importance to recognize neighbors correctly. According tothe implementation, the robot looks first for the closest node to the NBV for which there is noobstacle in between. Otherwise it just looks for the closest node to the target, which is normally aneighbor. This condition was set because often a corner or a small part of the wall is in betweenthe straight path from the robot position to the NBV and the algorithm assumes that there is nota feasible path. However, that the closest node is a neighbor of the target is not necessarily truesince the closest node could be in a different room, which would lengthen the exploration processconsiderably. To avoid this problem, it is suggested to build an A* search algorithm which will takeinto account all the reachable and traversable cells of the grid map to find the most efficient pathto the target instead of using only the positions of the 360° scans. A* search algorithm applies adifferent heuristic method than Dijkstra’s algorithm to improve the path finding process [18]. Theevaluation function of a given node takes into account the cost of the path from the source to the

43

Page 52: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X DISCUSSION AND RECOMMENDATIONS

node, as in Dijkstra’s algorithm, but it adds a cost estimate of the remaining path between thenode and the target. This second term is particular to each problem, although it is usually relatedto the distance between the node and the goal position. A* together with a smoothing algorithmto soften the path would give better and more efficient results in terms of time and robot’s pathlength.

Concerning the experimental results, some further modifications are necessary in order to imple-ment a robust exploration method. The laser measurements need to be filtered more extensivelywith the purpose of adapting the method to the real world since the assumptions made for theexperimental results do not correspond with all the possibilities in a real environment.

To finish this report it is necessary mentioning the ethical considerations related to the thesis. Theproject should not set out many ethical problems since it is mainly simulation-based. In addition,the aim is to implement a new behaviour on a device which is already in the market and whosepurpose is to make customers’ lives easier by cleaning houses autonomously. There is no muchrisk of any physical harm, the robot can bump into someone or something when testing on thereal device, but it is programmed to stop in those situations. It could also fall down the stairs orother cliffs, but it is prepared to avoid high thresholds. In case the code is finally integrated intofuture versions of the production software, it should be carefully tested and validated before beinglaunched to assure customers a safe behavior. As a long term effect, it is worth to mention therisk that these robots take jobs from cleaning workers. For now, robotic vacuum cleaners are notso common and mainly used as domestic appliances, but its popularity is increasing rapidly. Thepositive result of the project is to provide the PUREi9 with a new exploration mode which willenable it to intelligently implement a cleaning path thereby reducing the cleaning time, and willhelp the device to self-localize if it gets lost.

44

Page 53: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Bibliography

[1] R. Shade, “Choosing Where To Go: Mobile Robot Exploration.” Doctoral Thesis, Universityof Oxford, 2011, pp. 29–47.

[2] D. Holz, N. Basilico, F. Amigoni et al., “Evaluating the Efficiency of Frontier-based Explo-ration Strategies,” in 2010 41st International Symposium on Robotics (ISR) and 2010 6thGerman Conference on Robotics (ROBOTIK), 2011, pp. 36–43.

[3] B. Yamauchi, “A Frontier-Based Approach for Autonomous Exploration,” in Proceedings ofthe 1997 IEEE International Symposium on Computational Intelligence in Robotics and Au-tomation (CIRA’97), 1997, pp. 146–151.

[4] G. Lidoris, “State Estimation, Planning, and Behavior Selection Under Uncertainty for Au-tonomous Robotic Exploration in Dynamic Environments.” Kassel University Press, 2011,pp. 12–16.

[5] F. Amigoni, “Experimental Evaluation of Some Exploration Strategies for Mobile Robots,” inProceedings of the 2008 IEEE International Conference on Robotics and Automation (ICRA),2008, pp. 2818–2823.

[6] F. Amigoni and V. Caglioti, “An Information-based Exploration Strategy for EnvironmentMapping with Mobile Robots,” in Robotics and Autonomous Systems, Vol. 58, Issue 5, 2010,pp. 684–699.

[7] D. Lee and M. Recce, “Quantitative Evaluation of the Exploration Strategies of a MobileRobot,” in The International Journal of Robotics Research, Vol. 16, Issue 4, 1997, pp. 413–447.

[8] M. Nieuwenhuisen, D. Schulz, and S. Behnke, “Exploration Strategies for Building CompactMaps in Unbounded Environments,” in Proceedings of the 4th International Conference onIntelligent Robotics and Applications (ICIRA), Part I, 2011, pp. 33–43.

[9] S. Thrun, “Learning Metric-topological Maps for Indoor Mobile Robot Navigation,” in Artifi-cial Intelligence, Vol. 99, Issue 1, 1998, pp. 21–71.

[10] K. M. Wurm and W. Burgard, “Coordinated Multi-Robot Exploration using a Segmentationof the Environment,” in 2008 IEEE/RSJ International Conference on Intelligent Robots andSystems (IROS), 2008, pp. 1160–1165.

[11] A. Hornung, K. Wurm, M. Bennewitz et al., “OctoMap: An Efficient Probabilistic 3D MappingFramework Based on Octrees,” in Autonomous Robots, Vol. 34, Issue 3, 2013, pp. 189–206.

45

Page 54: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X BIBLIOGRAPHY

[12] D. Meagher, “Geometric Modeling using Octree Encoding,” in Computer Graphics and ImageProcessing, Vol. 19, Issue 2, 1982, pp. 129–147.

[13] L. Su and M. Tan, “A Virtual Centrifugal Force based Navigation Algorithm for ExplorativeRobotic Tasks in Unknown Environments,” in Robotics and Autonomous Systems, Vol. 51,Issue 4, 2005, pp. 261–274.

[14] D. Holz, N. Basilico, F. Amigoni et al., “A Comparative Evaluation of Exploration Strate-gies and Heuristic to Improve Them,” in Proceedings of the European Conference on MobileRobotics (ECMR), 2011.

[15] C. Stachniss and W. Burgard, “Exploring Unknown Environments with Mobile Robots us-ing Coverage Maps,” in Proceedings of the 18th International Joint Conference on ArtificialIntelligence (IJCAI’03), 2003, pp. 1127–1132.

[16] T. Y. Zhang and C. Y. Suen, “A Fast Parallel Algorithm for Thinning Digital Patterns,” inCommunications of the ACM, Vol. 27, Number 3, 1984, pp. 236–239.

[17] R. E. Korf, “Linear-space Best-First Search,” in Artificial Intelligence, Vol. 62, Issue 1, 1993,pp. 41–78.

[18] R. Dechter and J. Pearl, “Generalized Best-First Search Strategies and the Optimality of A*,”in Journal of the Association for Computing Machinery, Vol. 32, Number 3, 1985, pp. 505–536.

46

Page 55: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

Appendix

This chapter contains the exploration sequences and the final gray scale maps of each methodwithin the different environments.

47

Page 56: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Office environment

Random frontier strategy

Figure 1: Random frontier exploration process within the office environment.

48

Page 57: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Closest frontier strategy

Figure 2: Closest frontier exploration process within the office environment.

49

Page 58: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Fractal environment

Random frontier strategy

Figure 3: Random frontier exploration process within the fractal environment.

50

Page 59: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Closest frontier strategy

Figure 4: Closest frontier exploration process within the fractal environment.

51

Page 60: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Maze room

Random frontier strategy

Figure 5: Random frontier exploration process within the maze environment.

Closest frontier strategy

Figure 6: Closest frontier exploration process within the maze environment.

52

Page 61: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Living room

Random frontier strategy

Figure 7: Random frontier exploration process within the living room environment.

53

Page 62: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

MF224X APPENDIX

Closest frontier strategy

Figure 8: Closest frontier exploration process within the living room environment.

54

Page 63: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration
Page 64: Exploration Strategies for Robotic Vacuum Cleaners1295924/FULLTEXT01.pdf · In this thesis, an exploration mode for the PUREi9 robotic vacuum cleaner is implemented. This exploration

www.kth.se