• No results found

A performance comparison of coverage algorithms for simple robotic vacuum cleaners

N/A
N/A
Protected

Academic year: 2022

Share "A performance comparison of coverage algorithms for simple robotic vacuum cleaners"

Copied!
33
0
0

Loading.... (view fulltext now)

Full text

(1)

INOM

EXAMENSARBETE TEKNIK, GRUNDNIVÅ, 15 HP

STOCKHOLM SVERIGE 2018,

A performance comparison of coverage algorithms for simple robotic vacuum cleaners

En prestandajämförelse av täckningsalgoritmer för enkla robotdammsugare

ROBIN GUNNING

KTH

SKOLAN FÖR ELEKTROTEKNIK OCH DATAVETENSKAP

(2)

A performance comparison of coverage algorithms for

simple robotic vacuum cleaners

ROBIN GUNNING

Bachelor’s degree in Computer Science Date: June 5, 2018

Supervisor: Jana Tumova Examiner: Örjan Ekeberg

Swedish title: En prestandajämförelse av täckningsalgoritmer för enkla robotdammsugare

School of Computer Science

(3)
(4)

iii

Abstract

Cheap automatic robotic vacuum cleaners keep their cost down by having less sensors and many of them focus on using a single frontal bumper sensor, this makes it important to be able to get good cover- age of a room with no knowledge of said room. This paper investigates whether the algorithm boustrophedon is enough to get a good cover- age of a simple room with a maximum of two furnitures and only 90 degree corners.

A graphical simulation were made to test the algorithms that are commonly used in cheap automatic robotic vacuum cleaners to com- pare them with the result of only using boustrophedon. The results show that the best algorithms are the non-deterministic random walk and all combined. Boustrophedon tends to get stuck when the room is not empty and it only cleans half the room when starting in the mid- dle of the room, while being the fastest and gets most coverage in an empty room when starting in a corner.

(5)

iv

Sammanfattning

Billiga automatiska dammsugare håller kostnaderna nere genom att minska antalet sensorer och många av dem använder endast en stöt- fångare med stötsensor framtill, vilket gör det viktigt att kunna få en bra täckning av ett rum utan vetskap om rummet. I denna rapport undersöks om algoritmen boustrophedon räcker för att få en bra täck- ning av ett enkelt rum med som mest två möbler och endast 90 graders hörn.

En grafisk simulering gjordes för att testa de algoritmer som van- ligtvis används i billiga automatiska dammsugare för att jämföra dem med resultatet av att endast använda boustrophedon. Resultaten vi- sar att de bästa algoritmerna är den icke-deterministiska random walk och alla algoritmer kombinerade. Boustrophedon tenderar att fastna när rummet inte är tomt och den rengör bara hälften av rummet när man börjar i mitten av rummet, men den är snabbast och får mest täck- ning i ett tomt rum när man börjar i ett hörn.

(6)

Contents

1 Introduction 1

1.1 Purpose . . . 2

1.2 Problem statement . . . 2

1.3 Scope . . . 3

2 Background 4 2.1 Previous research . . . 4

2.1.1 Algorithms . . . 5

3 Method 10 3.1 Simulation . . . 10

3.1.1 Rooms . . . 11

3.2 Benchmarks . . . 13

4 Results 14 4.1 Room type 1 . . . 14

4.2 Room type 2 . . . 16

4.3 Room type 3 . . . 17

4.4 Room type 4 . . . 19

5 Discussion 21

6 Conclusion 23

Bibliography 24

v

(7)
(8)

Chapter 1 Introduction

Most cheap automatic robot vacuum cleaners (from here on called robot cleaner) today combines three or four different path planning algorithms to get the expected coverage as fast as possible. This has sparked the interest to develop efficient algorithms to reduce cleaning time and be as efficient as possible.

There are several types of robot cleaners of available to the public today, however the price range of these robot cleaners varies greatly and there is no set standard of what sensors a robot cleaner should have. This makes almost every robot cleaner unique in the way of getting a good coverage of the room it is supposed to clean. Further- more different robot cleaners and companies has their own algorithms developed to maximize coverage and minimizing the dust on the floor.

Usually the price of the robot cleaner seems to correlate with the num- ber of sensors and how advanced the sensors are [7]. Cheaper models often only have a single sensor which is a frontal bumper (Figure. 1), a micro switch which gets pressed when the robot cleaner bumps in to a wall or another object.

Figure 1: Skantic Robot Cleaner 10 [9]

1

(9)

2 CHAPTER 1. INTRODUCTION

More expensive models often utilize optical sensors to measure how many times the wheels have rotated and some models even use lasers and radar to build virtual maps of the rooms the robot cleaner operate in. Rooms come in all different sizes and shapes and different algo- rithms are likely to have different strengths depending on the type of room. The standard algorithms for cheap robot cleaners are Boustro- phedon, random walk, spiral and wall follow [4].

Boustrophedon travels forward until hitting a wall, when hitting the wall the robot reverses for a while then turns 90 degrees clockwise or counter clockwise then travels for a short period and turns another 90 degrees in the same direction as chosen when hitting the wall. That makes the robot cleaner do an 180 degrees turn while not cleaning the same space twice. When reaching the opposite wall the robot cleaner performs the same set of instructions as before but in the opposite di- rection. This makes the robot cleaner zig-zag between two walls while traversing the room.

Random walk turns a random amount of degrees and travels in a straight path until it hits a wall.

Spiral is a counter clockwise spiral of increasing radius and when hitting an obstacle switches to wall follow and travels in a small half circle until it hit the wall again and continues doing this around the room or until the robot cleaner switches algorithm [4].

1.1 Purpose

The purpose of this report is to compare if a cheap robot cleaner with just a single frontal bumper could get a good coverage with boustro- phedon of a room that has no more than 2 furnitures and only 90 de- grees corners.

1.2 Problem statement

Robots with only one bumper sensor have limited options in what al- gorithms can be used to get coverage in a room. This work aims to per- form a series of empirical tests to classify which of these algorithms get most coverage or if a specific combination of these algorithms is better than another combination. My hypothesis is that Boustrophedon will perform better in every room that only has 90 degrees corners and with a maximum

(10)

CHAPTER 1. INTRODUCTION 3

of two pieces of furniture, meaning that if you have a sparse funitured room no algorithm except boustrophedon is needed to get a coverage of 80% as fast or faster than all the algorithms combined.

1.3 Scope

The focus on this report is to compare if boustrophedon is enough to get a good coverage of a room, and not to improve or implement algo- rithms that outperforms the already existing algorithms.

(11)

Chapter 2 Background

2.1 Previous research

One approach to get good coverage is cellular decomposition which divides the room into several cells and performs the algorithm in each cell [8][3][10]. Each cell is made up of a part of the room, making a new cell at the critical point for each room. The critical point is where the connectivity of a cell changes, for example when an obstacle divides the room. According to Choset and Pignon [2], fewer cells are better as fewer number of cells minimize the number of zig-zag motions the robot has to make, but more cells are guaranteeing the robot exhaus- tively covers the entire environment however this can be countered by making the boustrophedon algorithm have a shorter ”side step”.

Boustrophedon cellular decomposition is combining cellular de- composition with graph theory to generate an Euler tour, which guar- antees complete coverage of the known work space while minimizing the traveled path by the robot. [6]. Using landmark-based topological coverage or grid-based methods improves the coverage of algorithms like boustrophedon [3].

Some previous research has been done in the field of comparing different algorithms for unexplored environments and while the best coverage per minute is achieved when using all the algorithms com- bined, boustrophedon is the next best performing algorithm [4].

4

(12)

CHAPTER 2. BACKGROUND 5

2.1.1 Algorithms

This section contains background of the studies and used algorithms for this thesis. The non-deterministic algorithms are random walk and all combined since those are the only algorithms with random ele- ments. The rest of the algorithms will perform the same every time given the same parameters.

Boustrophedon

Boustrophedon means ox-turning in ancient Greek, and mimics an ox when plowing and makes the robot zig-zag from opposite walls while traversing the room length wise[2][6]. The pseudo code (Algorithm. 1) is a direct translation from the boustrophedon flowchart from Hasan [4]. The algorithm starts by going upwards and then makes the robot cleaner turn 90 degrees right when the front bumper is triggered, and then travels a distance equal to the robot cleaners diameter and turns 90 degrees right again making the robot face downwards. The robot cleaner then travels downwards till the bumper is triggered again. The robot cleaner will now turn 90 degrees left, and then travels a distance equal to the robot cleaners length and turns 90 degrees left again mak- ing the robot cleaner face upwards. After this the algorithm restarts.

The path generated by the algorithm is depicted by (Figure. 2).

(13)

6 CHAPTER 2. BACKGROUND

Start direction up

Let one roboUnit = the diameter of the robot if collision detected then

Move backwards one roboUnit if if count is odd then

Turn 90 degrees clockwise Move forwards one roboUnit Turn 90 degrees clockwise add 1 to count

else

Turn 90 degrees counter clockwise Move forwards one roboUnit Turn 90 degrees clockwise add 1 to count

end else

Move forwards end

Algorithm 1:Boustrophedon [4]

Figure 2: Boustrophedon

In the case where the room/space is known beforehand the boustro- phedon algorithm gains a lot from dividing the room into smaller parts for better coverage. As the obstacles and furnitures in the room are known and divided into cells where the obstacles are, the robot cleaner can easily plan it’s boustrophedon path for every cell. When all the cells have been visited and cleaned, the entire room is cleaned [2]. There is a difference between following the longer or the shorter wall of the room, there will be no difference in coverage however there are some small gains if the robot cleaner follows the long wall of the room as the robot cleaner does not have to make as many turns as

(14)

CHAPTER 2. BACKGROUND 7

when following the short wall which saves battery.

Spiral

The spiral algorithm makes the robot cleaner move in an increasing spiral path. This algorithm works best if the robot is placed in the middle of the room and has enough space to perform the spiral cor- rectly. When the robot cleaner starts this algorithm it starts a right or left hand side spiral from the center point outwards until it the front bumper is triggered. The pseudo code (Algorithm. 2) is a direct trans- lation from the spiral flowchart from Hasan [4].

while no collision do Move forward

Turn right according to turning angle Decrease turning angle

end

Algorithm 2:Spiral [4]

When the front bumper is triggered the robot cleaner stops the spi- ral algorithm and proceeds with another algorithm since starting the spiral algorithm when close to a wall is meaningless [4]. The path gen- erated by the algorithm is depicted by (Figure. 3).

Figure 3: Spiral walk

Random walk

The random walk is a very simple algorithm that only needs a simple front bumper sensor. The robot cleaner just moves in any direction

(15)

8 CHAPTER 2. BACKGROUND

until it hits an obstacle and the front bumper is pressed. When the bumper is pressed the robot cleaner generates a pseudo-random num- ber which decides how much the robot cleaner should turn. From here the algorithm starts over. (Algorithm. 3) is a direct translation from the random walk flowchart from Hasan [4].

Move forward

Let one roboUnit = the diameter of the robot if collision detected then

Move backwards one roboUnit

Turn 180 degrees + or - random(90 degrees) else

end

Algorithm 3:Random Walk

(Figure. 4) depicts how one of the paths the generated by the algorithm might look like.

Figure 4: Random walk

Wall follow

The wall follow algorithm moves forward until the front bumper is triggered, at which point it turns 180 degrees away from the wall and then starts a circular motion until it hit the walls again.The algorithm repeats this procedure until the entire room has been covered along the Walls. This algorithm stays near the walls and never sways far away from them, this means it only cleans the perimeter of the room [4]. This algorithm is seldom used alone but instead combined with the spiral algorithm. (Algorithm. 4) is a interpretation of the wall fol- low flowchart from Hasan [4] and the half circle motion is from my own robot cleaner [1].

(16)

CHAPTER 2. BACKGROUND 9

Move forward

if collision detected then Turn 180 degrees

Move forward with a pre set angle speed else

end

Algorithm 4:Wall follow

(Figure. 5) depicts how one of the paths generated by the algorithm might look like.

Figure 5: Wall follow

Spiral + Wall follow

This is a combination of the spiral and the wall follow algorithm. When the front bumper is triggered while using the spiral algorithm, the robot cleaner switches to the wall follow algorithm. This is useful for when the robot cleaner is starting in the middle using spiral. The al- gorithm switches only once. So when going from spiral to wall follow there is no way to switch back to spiral [5].

All combined

The all combined algorithm is using all of the above described algo- rithms and using a timer to change between them. Starting with bous- trophedon, switching over to random walk and from there switching to spiral and when the front bumper is triggered switching to wall fol- low and then starting the whole cycle over again [4].

(17)

Chapter 3 Method

3.1 Simulation

By making a simulation of a robot cleaner with only a bumper sensor and providing it with a room, the simulation is able to compare and present which algorithm is best suited for that type of room. Other ways to test this by using a real robot cleaner, and clean real rooms. As far as we know there are no funding for this, and making a simulation makes it possible to try out each algorithm separately and in differ- ent combinations. A mathematical and more analytic approach is not possible due to too many variables that need to be accounted for.

The simulation is written in Python and is a graphical implemen- tation of the robot and the room, the robot only has one sensor which is a front bumper that spans 120 degrees on the front of the robot [4].

Floor space will be represented by white pixels and walls and ob- stacles will be black pixels and already cleaned area will be painted with red pixels.

The robot cleaner leaves a trail of red to show where the robot cleaner has cleaned (Figure. 6). Due to how computational heavy count- ing colored pixels is, the simulation counts how much coverage the robot has accumulated every second instead of every frame.

At 100 seconds running time, the simulation ends and the results are presented to the user.

The algorithms used in this simulation are constructed using the flow charts found in Hasan [4].

Cellular decomposition is not used in this study since it focuses on

10

(18)

CHAPTER 3. METHOD 11

cheap robot cleaners and for cellular decomposition more advanced and expensive equipment is needed.

Figure 6: The simulator in running the random walk algorithm

3.1.1 Rooms

There are four different types of rooms, two of which are entirely empty and two that are sparsely furnitured. Corners are only angled at 90 de- grees. The rooms are in the form of a bitmap image file which makes it easy to create new rooms for the simulator to run.

This is the standard room, rectangular and empty (Figure. 7).

Figure 7: Room 1

This ”room” consists of several spaces with half walls and small cor- ners that divide the room (Figure. 8).

(19)

12 CHAPTER 3. METHOD

Figure 8: Room 2

This is the standard room but furnished with a small sofa and an arm chair. The sofa and the arm chair are represented by four points in the room since that is where the legs are. The sofa and the arm chair are tall enough for the robot cleaner move underneath them (Figure. 9).

Figure 9: Room 3

The room with several spaces with half walls and small corners furni- tured with a sofa and an arm chair (Figure. 10).

(20)

CHAPTER 3. METHOD 13

Figure 10: Room 4

The simulation starts by counting the area of the room by counting the white pixels inside of the walls, then the algorithm to use is chosen.

3.2 Benchmarks

As a benchmark, the simulator will run all four of the algorithms with a timer to switch between them (All combined). This is what some cheap robot cleaners use [4]. This is used to as a control to compare if any of the other algorithms are good enough to be used alone.

(21)

Chapter 4 Results

The results come from running the simulation several times for each type of room. The non-deterministic algorithms were tested by com- puting the mean of 10 separate runs, while the deterministic algo- rithms were tested with a single run. The reason some algorithms get stuck at a certain percentage of coverage is that the robot cleaner got stuck and this is how the algorithms should work according to the flowchart in the report by Hasan [4].

4.1 Room type 1

These are the result from room type 1, the empty room. Starting in the bottom left corner (Figure. 11). As seen the boustrophedon gets high coverage quickly and the coverage does not increase as it get stuck in the right upper corner. Starting in the middle of the room shows another story. Boustrophedon only cleans half of the room before it gets stuck in the top right corner of the room (Figure. 12).

14

(22)

CHAPTER 4. RESULTS 15

Figure 11: Results when starting in a corner in room 1

Figure 12: Results when starting in the middle in room 1

(23)

16 CHAPTER 4. RESULTS

4.2 Room type 2

These are the result from room type 2, the room with half walls and small corners. Starting in the bottom left corner the boustrophedon gets stuck in the bottom middle wall and therefore just could clean half the room (Figure. 13), Starting in the middle of the room the bous- trophedon gets stuck at the top right corner of the room (Figure. 14).

Figure 13: Results when starting in a corner in room 2

(24)

CHAPTER 4. RESULTS 17

Figure 14: Results when starting in the middle in room 2

4.3 Room type 3

These are the result from room type 3, the standard room but fur- nished. Starting in a corner boustrophedon gets 60% coverage fast but gets stuck at the armchair (Figure. 15). Starting in the middle of the room boustrophedon gets stuck quickly at the armchair (Figure. 16).

(25)

18 CHAPTER 4. RESULTS

Figure 15: Results when starting in a corner in room 3

Figure 16: Results when starting in the middle in room 3

(26)

CHAPTER 4. RESULTS 19

4.4 Room type 4

These are the result from room type 4, the room with half walls and small corners when furnished. Starting in a corner boustrophedon gets stuck at the bottom and middle wall (Figure. 17). Starting in the mid- dle of the room is even worse for boustrophedon, getting stuck at the armchair (Figure. 18).

Figure 17: Results when starting in a corner in room 4

(27)

20 CHAPTER 4. RESULTS

Figure 18: Results when starting in the middle in room 4

(28)

Chapter 5 Discussion

Most of the time, the non-deterministic algorithms got stuck and could not move past the obstacle in their way.

Spiral gets good coverage when starting in the middle of an empty room as it covers a circle with a diameter the same size as the shortest wall. If there are obstacles in the room, spiral is not the way to go.

If spiral is starting in the corner or close to a wall, the robot cleaner will just spin half a rotation and stop when hitting the wall resulting in roughly 3% coverage.

Wall follow follows the walls nicely and therefore gets good cover- age independent of where the robot cleaner starts. Wall follow almost never get stuck since it always turn 180 degrees when front bumper is hit, this makes the robot cleaner try to drive forward at almost every degree.

Spiral plus wall follow performs as good as wall follow alone unless the room is empty and the robot is starting from the middle. This is be- cause the algorithm start with spiral and when the front bumper is hit it switches algorithm to wall follow, so if spiral does not cover much area it is like running wall follow alone.

Random Walk gets good coverage in any type of room and since it is using random elements it makes it hard to get stuck for a long time.

The problem with random walk is that it is cleaning already cleaned space, but it’s better to clean a bit of cleaned space than to get stuck

21

(29)

22 CHAPTER 5. DISCUSSION

and not clean at all.

All combined gets equally good coverage as random walk due to the random elements in the algorithm. Most of the time it gets coverage faster than random walk since the robot switches between many differ- ent algorithm. As an example spiral might be initiated in the middle of the room when switching from random walk and boustrophedon might be initiated in unexplored areas.

Boustrophedon got stuck a lot of the time, and when the robot cleaner hit the most right wall the boustrophedon could not continue any fur- ther. The robot cleaner just hits the right wall and then turns towards the top wall and hits that wall and turns back towards the right wall, and just keeps repeating that pattern. Boustrophedon performs really well if the conditions are optimal, a rectangular room with four 90 de- grees corners and no obstacles. However when a room has obstacles, boustrophedon almost get stuck every time unless the robot cleaner hits the obstacle exactly in the right position.

The implementation I found of the boustrophedon algorithm did not really meet my expectations, maybe that is just because I did not have enough information about the boustrophedon.

(30)

Chapter 6 Conclusion

I was wrong. Boustrophedon does not perform better in every room with only 90 degrees corners and a maximum of two pieces of furni- ture. Boustrophedon only performs as fast or faster than all combined if the room is a rectangular empty room and the robot cleaner is start- ing in a corner, boustrophedon performs worse in all other kinds of rooms and when not starting in a corner. All deterministic algorithms will most likely get stuck in a room with furniture and that is when all combined shines and random elements prevents the robot cleaner from getting stuck for a longer period of time.

Simulations show that wall follow and all combined are the best al- gorithms to use for a robot cleaner with only one frontal bumper due to not getting stuck where boustrophedon gets stuck and can not con- tinue.

23

(31)

Bibliography

[1] Centurion RDE 125. http://robotdammsugare.org/centurion- rde125/. [Online; accessed 24-Mars-2018]. 2018.

[2] Howie Choset and Philippe Pignon. “Coverage Path Planning:

The Boustrophedon Decomposition”. In: International Conference on Field and Service Robotics. Jan. 1997.

[3] Enric Galceran. “A survey on coverage path planning for robotics”.

In: Robotics and Autonomous Systems 61 (2013), pp. 1258–1276.

[4] Kazi Mahmud Hasan. “Path Planning Algorithm Development for Autonomous Vacuum Cleaner Robots”. Electronics and Com- munication Engineering Discipline Khulna University, Bangladesh, 2014.

[5] T. Palleja. “Modeling floor-cleaning coverage perfirmances of some domestic mobile robots in a reduced scenario”. In: Robotics and Autonomous Systems 58 (2010), pp. 37–45.

[6] Ioannis Rekleitis. “Efficient Boustrophedon Multi-Robot Cover- age: an algorithmic approach”. School of Computer Science, McGill University, Montreal, Canada, 2009.

[7] Roomba - Dammsugartyper. http://www.irobot.se/Home- Robots / Dammsugning. [Online; accessed 16-February-2018].

2018.

[8] Seuk-Woo Ryu. “A Search and Coverage Algorithm for Mobile Robot”. Department of Electrical Engineering, the Sungkyunkwan University, Suwon, Korea, 2011.

[9] Scantic robot cleaner 10. http://robotnyheter.se/2013/

12 / 04 / ny - robotdammsugare - for - 499 - kronor - hos - netonnet/. [Online; accessed 16-February-2018]. 2018.

24

(32)

BIBLIOGRAPHY 25

[10] Sylvia C. Wong. “A topological coverage algorithm for mobile robots”. Depatment of Electrical and Electronic Engineering, The University of Auckland, 2003.

(33)

www.kth.se

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

Both Brazil and Sweden have made bilateral cooperation in areas of technology and innovation a top priority. It has been formalized in a series of agreements and made explicit

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Free elevators are parked in different sectors to provide fast service for pas- sengers.An elevator car that is assigned to a sector where no calls are made parks itself at the

Regarding the questions whether the respondents experience advertising as something forced or  disturbing online, one can examine that the respondents do experience advertising

The individual reactions to the shift in abstract systems can be seen in three different aspects, described in the results of this study as the three perceived

• H1: As more dust is generally accumulated along the walls and corners of a room, following the walls of the room after a first sweep will reduce the cleaning time as the robot

Soil was collected from three locations: an urban garden with a diverse range of vegetables, weeds and wild millet; a monoculture plantation of Japanese cedar and Hinoki cypress;