Multi-Robot Motion Planning with Communication

A thesis submitted to the

Graduate School of University of Cincinnati

In the partial fulfillment of the requirements for the degree of Master of Science

In the Department of Electrical and Computer Engineering Of the College of Engineering and Applied Science

By Harmandeep Kaur Buttar Thesis Advisor and Committee Chair: Dr. Raj Bhatnagar

Abstract

A successful motion planning algorithm was designed and implemented on multiple high performance KheperaIII robots. 2 KheperaIII robots finds a dynamic path from the specified source to the targeted destination avoiding collisions in an unpredictable environment processing real-time data exchanged within robots by distributed communication on a well-spaced grid where boundaries are used as landmarks ascertained by the infrared sensors. Distributed communication was implemented by implementing server and client on every robot in the system with the help of multi-threads. This algorithm hence, is successful implementation in the field of motion planning and coordination with autonomous robots. Also in this thesis, is explained the centralized and decoupled behavior of the motion planning algorithms on the multi robots. The implementation of the algorithm over KheperaIII robots aimed at representing the successfulness of this technique in practical cases, as the work in this field is still relatively new.

i

ii

Acknowledgements

I would like to take this opportunity to express my gratitude to my thesis advisor, Dr. Raj

Bhatnagar, whose guidance, encouragement and patience, inspired me to work on this project. I am extremely grateful to him for his support and co-operation which helped me in successfully completing my Master’s degree. I would also like to thank Dr. Carla Purdy and Dr. Manish

Kumar for their presence on my thesis committee.

I would also like to thank Robert Montjoy for his technical support in the research lab. Most importantly, I would like to thank my family and friends for their love and support. I would like to dedicate this work to them.

iii

Table of Contents

Abstract…..…………………………………………………………….………….....…….i

Acknowledgements……….………………….…………………..…………….………...iii

Table of Contents……...………...………………………………….…...... …...... iv

List of figures…….………………………….…………………...... ………...………….vi

Chapter 1. Introduction …………………………..……………………………………....1

1.1 Introduction…………………………………………………………….…………1

Chapter 2. Literature Review……………………………………………………………...6

2.1 Background…………………………………………..……………………...... 6

2.2 Introduction to Multi-Robot Motion Planning………………………………….....7

2.3 Technical Specifications for KheperaIII Robot…………………………………...8

Chapter 3. Algorithm……………………..……………………………………..….……10

3.1 Terminology Used..………….……..………………….……………………...…10

3.2 Assumptions made…………………………….………………….…...………....11

3.3 Motion Logic for the Robots……………………………………………………..12

3.4 Real-Time Distributed Communication………………………………………….13

3.5 Implementation of Real Time Communication………………………………….14

3.6 Pseudo-Code of the Algorithm…………………………………………………..15

Chapter 4. Results and Analysis…………………………………………………………22

Chapter 5. Conclusions and Future Work………………………………………………..26

5.1 Comparing Approaches……………………………………………………………...26

iv

Bibliography ………………………………………………………………….……………30

v

List of Figures

Figure 1. Representation of the directions assigned in workspace………………………………12

Figure 2. Communication among robots sharing their real time position information………….14

Figure 3.The simple path taken by the robot from the specified source to the specified destination in workspace free of obstacles…………………………………………………………………...22

Figure 4. Movement of the multi-robot on the workspace with dynamic obstacles……………..24

Figure 5. Movements of multi-robot on the workspace with dynamic obstacles…………….28

vi

Chapter 1: Introduction 1.1. Introduction

This thesis addresses the problem of adjusting paths of robots in response to non-stationary obstacles encountered when the robots are following their paths towards their goal locations. We solve this problem in the context of distributed decision making, that is, when there is no central agent making plans for each of the robots. Also, some centralized agent does not inform the robots of their current locations, but each robot keeps track of its current location by counting the grid marks as it travels on a marked terrain. This situation is a simplified model for situations in which the robots determine their locations based only on local landmarks. We show in this thesis that our algorithm can achieve this goal in the context of two Khepera robots traversing a terrain marked by grid lines. The main problem that we address is of two robots starting from their starting cells on the grid and seeking to trade places by moving to each other’s location. On the way they seek to avoid running into each other. The collision avoidance is done only when the two robots are about to move into the same grid cell at the same time. Our focus is on developing a generalizable algorithm that can easily be adapted to many other similar situations. The path planning and collision avoidance algorithms defined in this thesis are executed in a distributed manner. We can state the difference between Centralized and Decentralized approaches by defining basic differences between these approaches as follows:

1. Centralized Approach: This approach, as name suggests, has a centralized approach to

decision making. Every entity performs work based on decisions made by the central

entity. The centralized approach has an advantage of completeness and global

optimization, but a major disadvantage lies in high dimensional configuration spaces

becoming computationally intensive [12]. 1

2. Decentralized Approach: This approach unlike centralized, is distributed in nature where

decision-making is distributed among all the entities present in the system. They perform

better in high dimensional configuration space systems.

This algorithm implementation involves planning a trajectory from the source to the destination on a 2-dimensional grid, for two Khepera-III robots, and appropriately updating it based on the communication among the robots about their current locations and plans for movement in the immediate future. Robots use decentralized approach to path planning and collision avoidance by making their own decisions to reach from their source to destination locations avoiding the dynamic obstacles encountered along the way. The algorithm is tested for only two robots in this thesis but the approach is generalizable for more robots trying to achieve similar goals.

Distributed artificial intelligence is an attractive field of research which deals with making machines perform intelligent tasks based on cooperative exchange of required information. Making multiple machines learn and imitate human intelligence and cooperative behavior while performing tasks is a challenging research topic and this thesis addresses a small problem in this direction. The field of artificial intelligence is characterized as :“The central problems of AI include such traits as reasoning, knowledge, planning, learning, communication, perception and the ability to move and manipulate objects” [1]. All these problems lead to the task of integrating artificial intelligence algorithms with the machines, to make the machines think and perform in the same manner as humans would perform under the given circumstances.

The field of Distributed Artificial Intelligence aims to make groups of cooperative machines intelligent by sharing minimum requisite information among them about a specific task and then performing in a similar or superior fashion as compared to a group of cooperating humans. Such

2 intelligent groups of robots or autonomous agents are very useful in various applications such as industrial plants, space exploration, defense situations, and domestic chores.

Recent commercial and research popularity of the autonomous and humanoid robots has directly hinted on the emphasis being placed upon the improvement of overall functionality of intelligent robots and their cooperative groups. One important area for autonomous robots is trajectory planning algorithms and obstacle avoidance during navigation, which is also an important research problem [13]. Navigation is an integral part of the autonomous robots for making coordinated movements of the robots possible. Path planning algorithms are designed to navigate the robots efficiently along the shortest possible paths in an unknown or known environment. One of the extensively studied problems in this area is the real time path planning of the robots with collision avoidance. This thesis addresses the path planning problems as real time problems to be solved, with our algorithm designed to keep the two robots from colliding while navigating along their paths. The path planning algorithms are designed based on a number of different types of criteria. The cost of the path taken to move from the source to the destination is one of the important criteria in path planning algorithms. Some of the real world applications which require and need to employ these algorithms include:

 Manufacturing floor: Manufacturing floor control is one such system where several

"intelligent" entities work together to achieve a global manufacturing work instead of a

central controller assigning jobs to these individual entities to achieve the respective

result. The overall system links various machine tools/entities by different makers.

Computers are embedded in this system to help control the operation of these tools where

information and decision making is logically and geographically distributed among

different manufacturing entities. [15]

3

 Video games: Modern video games exhibit human like behaviors and are developed with

higher level of sophistication. Path planning algorithms are implemented to design a

player’s movements dynamically with respect to other player’s movements.

 Hazardous situations in war: Unmanned ground vehicles (UGV) are sent to the enemy

territories and are expected to gather required information. They need to collaborate with

each other and avoid collisions.

 Hazardous Industrial situations: Robots are used in modern industries where robots can

carry large amount of loads which are dangerous for humans to move and with quick

repeatability. Also the advantage of these robots is largely taken in radioactive

environments where it is extremely dangerous for humans to work.

 Self-driving automobiles: Self driving automobiles are an example of intelligent

machines driving without any human help. A recent activity in this field involved

Google’s self driving car taking a blind man to a Taco Bell.

The movement of the robots avoiding obstacles is handled by path planning algorithms.

Navigation of humanoids robots is handled by path planning algorithms where the movement is dynamically changed with the change of the environment.

The most often used path planning algorithms include Djikstra’s Algorithm, Best first Search

(Greedy algorithm) and A* search algorithm.

1. Djikstra’s algorithm: This algorithm is the shortest path finding algorithm. The robot follows

this algorithm if, moving from the source to destination, it follows the shortest distance node

out of all neighboring nodes connected to the destination. This algorithm hence enables a

robot to move on to all the shortest distance nodes and designs the shortest path from

specified source to destination. But it has a disadvantage, if there is an unforeseen obstacle

in the path, Djikstra’s Algorithm might generate the worst or longest path. 4

2. Best first Search algorithm: This algorithm, also known as the greedy algorithm, works by

selecting the node that is closest to destination with help of the heuristic. Best first search

uses only the heuristic and not any other factor to select node to be expanded for planning a

path towards the destination. The disadvantage of this algorithm is that it depends upon the

efficiency of the heuristic to determine efficiency of an algorithm. It might not always be the

best path planning algorithm.

3. A* search algorithm: It is a combination of the path-cost (g(x)) from the starting node to the

current node and the heuristic function (h(x)), i.e. (g(x) + h(x)). This path-planning

algorithm results in more efficient paths in terms of lower cost and shortest distance. This

algorithm unlike BFS Algorithm, also takes into account the distance already travelled from

source to the current node.

These path-finding algorithms form a basis for the algorithm developed in this thesis. But

instead of static obstacles, our algorithm addresses dynamic obstacles. This path-planning

algorithm is implemented on the Khepera-III robots with the terrain designed on a 2-

dimensional grid starting from the specified source to the specified destination in a partially

known environment avoiding dynamic obstacles. As the two autonomous robots move from

the specified source to destination, they have a possibility of colliding with each other,

termed as dynamic collisions. The optimality of the algorithm depends upon the correctness

of path to the destination while avoiding collisions with dynamic obstacles. The grid is

identified by the infrared sensors of these KheperaIII robots. The identification of the

dynamic obstacles is implemented by distributed communication among Khepera III robots

by exchanging information about their respective positions on the grid, while planning a

trajectory from the specified source to the destination. Also, the task can be termed as

distributed intelligent task performed by multiple robots with distributed communication. 5

Chapter 2: Literature Review

2.1 Background:

According to Clark et. al. motion planning in multi robots is implemented through Centralized or

Decentralized approaches [8]. The Centralized approach as discussed in Chapter 1 differs from the Decentralized approach by having a central master robot allocating tasks for all the other robots working in its network, whereas in the Decentralized approach, the motion planning for each robot is done independently by every robot in its own network [7]. As multi-robot motion involves multiple robots working or walking on the same workspace making the configuration space prone to collisions, collision detection and avoidance plays an important part. Also, research in motion planning has presented several approaches to help avoid collisions. According to Masehian et. al., 2 techniques to avoid collisions are the Velocity Tuning, and Prioritizing which are defined below [7].

Velocity Tuning: This technique adjusts speed of the moving robots to help the robots avoid collisions with each other and hence allow them to move collision free. Robots either decelerate or stop their respective movement while traversing to their respective trajectories according to the algorithm designed.

Prioritized technique: This technique assigns priorities to the robots in motion, in their respective trajectory. Different priorities are assigned to individual robots depending on the algorithm.

These priorities determine what path should be taken by an individual robot to avoid head on collisions once detected. The collision resolution designed in our algorithm is based on this prioritized technique.

6

Multi-robot system applications have wide areas of implementation as mentioned in previous chapter. Some more application are in the fields of underwater or space exploration, transportation, some military applications such as guarding, escorting, patrolling and strategic behaviors [11].

The algorithm in our thesis has been designed to achieve optimality with the tasks being performed in multi robot systems. 2.2 Introduction to Multi-Robot Motion Planning

As described above, the main emphasis of this thesis is on the multi robot motion planning. This thesis designs a motion planning algorithm which was implemented on 2 KheperaIII robots.

Advantage of multi-robot scenario ensures that work is performed much more efficiently and faster, than can be performed by a single robot [3]. In a multi-robot scenario, the tasks assigned are divided into multiple sub-tasks and hence would ensure the faster execution of the tasks [5].

Also, as the tasks are distributed into multiple sub-tasks that get distributed among other robots, the overhead on each robot would be much less and hence would also ensure the quality of implementing a particular task assigned. The proper coordination among these multi-robots is an important criterion for the proper execution of the tasks to be performed [4]. As mentioned in previous chapter, Centralized and Decentralized defines multi-robot system. These two approaches have their respective advantages and disadvantages as mentioned above. One of the overheads Centralized approach has over Decentralized is that a central robot has a Degree of

Freedom equal to the addition of Degree of Freedom for all robots in the system, while in

Decentralized approach each robot is responsible for their own respective Degree of Freedom which would be much less intensive on the system as compared to the single robot handling

DOFs for all the robots. Apart from having such an overhead on single robot, which would lead

7 to degradation of the performance, this approach is highly vulnerable as well. As the centralized agent makes central decision for all the other robots in the environment, this agent, if it malfunctions, would lead to the failure of the entire system [5]. The decentralized approach, in comparison, is much more robust against failures and also faster in performing the tasks.

This thesis presents work to develop a motion-planning algorithm for multi robot scenario with decentralized approach. The algorithm developed is a motion planning algorithm with distributed communication implemented on multiple robots. Though there has been extensive research on the path planning exploration for the single robot, exploration in the field of multi-robot is relatively new. [6] This thesis represents an approach of motion planning with

KheperaIII robots with Decentralized approach.

2.3 Technical Specifications for KheperaIII Robot

In our thesis, algorithm developed is implemented and tested on KheperaIII robots with the

Korebot II board. Korebot II board provides a standard embedded Linux Operating System. The algorithm designed is implemented and tested on KheperaIII robots. These miniature robots are designed and manufactured by K-Team in Mobile Robotics. These new generation small sized

robots are very helpful in the lab

research work. This Khepera robot

has 9 infrared sensors and 5

ultrasonic sensors to help with the

research work. These sensors are

usually helpful in obtaining

information about the environment

8 or the configuration space on which these robots tend to move. It includes a DC motor and has 2 wheels. The Korebot II has C/C++ cross compiler which provides an environment for C/C++ programming. [3] The Khepera robots in our algorithm helps identify the new coordinates separated by a black thick line on the 2-dimensional grid. The infrared sensors on these Khepera robots helps identify the different coordinates on the grid separated by white and the black lines on the 2 dimensional grid. Once the source coordinate positions are specified with the direction our robot is facing, robots start moving towards the destination and updating the values identified by the infrared sensors. These values updated are also exchanged with other robots with the help of distributed communication. The distributed communication is implemented with the help of server and client with multi-threading. The working of this algorithm is further explained in next chapter.

9

Chapter 3: Algorithm

The Algorithm developed by us, as explained in the introduction section, is a path-planning algorithm for multiple cooperating robots. This path-planning algorithm for the multiple robots with distributed communication traverses the path from the given source to the destination, communicating the updated position values with each other. This communication of updated position helps avoid the dynamic obstacles. Hence, this algorithm implemented successfully traverses the path from the source to the destination, under all circumstances. 3.1. Terminology used:

Source coordinates: These define the coordinates where the robot would start its movement on the 2-dimensional grid.

1. Destination coordinate: These coordinates which will be specified to the robot are the

final coordinate position where the robot has to reach.

2. Static Obstacles: Obstacles which are static and are immovable. There is no static

obstacle in the experiments in this thesis. This term is used only for the reference

purposes.

3. Dynamic Obstacles: These obstacles are hence, moveable obstacles. In this thesis

dynamic obstacles are defined to be moving robots running into each other while moving

from source to destination.

4. Update coordinate method: This method updates values from one point to another by

incrementing coordinates defined in the workspace. In this thesis, to make the algorithm

constant for the all the different types of experiments, x-coordinate is always assumed to

10

be updated first until it reaches its destination and y coordinate updated later, until any of

the coordinate goes in diversion.

5. Diversion: This is an algorithm defined in our main algorithm, wherein the robots take

the specified route after running into a dynamic obstacle. 3.2. Assumptions made:

Following are the assumptions during implementation of this algorithm:

1. Algorithm always starts with the robots facing the North Direction.

2. The algorithm starts with the Update coordinate method: According to this method we

adopted here, the values are updated calculating the difference between the source

positions with the destination position.

 It is further assumed in this method that initially, x-coordinate position will be

updated to match the destination position. After the x-coordinate matches the

destination position, the y-coordinate will be updated to match the y coordinate

destination position. For example, with the source position being (0,0) and the

destination position being (4,4). The x position is updated to first to (4,0) and after the

x position equals its destination , the y coordinate is updated to its destination position

(4,4).

3. Algorithm specifies 4 directions around the environment. These directions have been

provided with the following values in the algorithm.

a. NORTH = x update.

b. SOUTH = x decrement.

c. EAST = y update.

d. WEST = y decrement.

11

Also these directions are given constant values. These values never change and are

important for the correct movement of the robot. The values provided are as follows:

NORTH = 1, EAST = 2, SOUTH = 3, WEST = 4.

Figure 1 Representation of the directions assigned in workspace.

3.3. Motion Logic for the Robots:

The values assigned to the directions help in the movement of the robots towards their goal directions. This can be clearly seen with the following example:

Suppose the source position specified is (0, 0) and the destination to be reached is (4, 4). As the robot initially is always assigned the North direction, the Robot has North direction as its starting value by default. According to the algorithm, x needs to be updated to reach its destination position coordinated. Now as defined previously, North = x update. Hence |value(North)- North

|= 0.

Hence the x stays in the same direction and continue updates the values, until x reaches the destination position. After this x update, the y needs to be updated. Now from source y coordinate to move to destination y coordinate, it has to update the y coordinate. The robot needs to move to East direction as EAST = y update.

12

Now to change direction from North to EAST:

|NORTH-EAST| = |1-2 | = 1.

That means, the robot will take 1 right turn. The point to be noted is that robot always assumes to take right turn. If the robot was to move to South or West directions, the robot would have taken

|NORTH –SOUTH| = 2 and |NORTH –WEST| = 3 right turns respectively. And hence, to avoid making it a complicated process, we do not take negative values into consideration. These values keep all the movements by the robots stable as proved by the implementations. This explained clearly the logic of the movements taken by the robots while performing motion planning.

3.4. Real-Time Distributed Communication:

Distributed communication among robots is important for the decentralized approach, as the robots need to communicate with each other to achieve their goal. Every robot develops its own plan to move on the 2-dimensional grid and they have their own new values. For moving ahead in the grid without colliding with other existing robots on the field, exchange of information about their respective positions would help robots avoid possible collisions among the robots.

Hence, the distributed communication is implemented among the robots to exchange real time information about their respective updated positions. The following information is exchanged between the robots:

13

ROBOT A ROBOT B

Figure 2. Communication among robots sharing their real time position information.

Both the robots here exchange their respective “Present” coordinate values and “Next” prospective coordinate values on the grid. The values received from the other robots are termed as follows:

1. Other robot’s “Present” value = “Other” value.

2. Other robot’s “Next” value = “Obstacle” value

This represented the actual communication which takes place between the robots.

3.5. Implementation of Real Time Communication:

Distributed Communication on these KheperaIII robots is implemented by the following design.

1. Server is implemented to receive the required information: The robots when update the

coordinate information, also communicates this updated information with other robots to

help avoid dynamic collisions. The Server receives the other robot’s updated coordinate

value. The server thread is run continuously to receive the updated information at any

moment it is sent from the other robot.

2. Client is implemented to send the specified information: The Client thread is

implemented in the algorithm such that it sends the information as soon as it is updated in

14

the system. A client thread becomes active when the robots updates its coordinate value

and send this information to the other robot instantly.

This Server and Client are implemented using the UDP Protocol over TCP/IP protocol.

Also, the implementation of the Server and Client is done using threads. Threads help in executing the procedures simultaneously. [10] This helps the exchange of information without any delay. The Server thread is being called in a while loop and continues to receive information untill the robot reaches its destination position. The Client thread is being called only when the value is updated. As soon as the value gets updated, the Client thread is being called which sends the updated information.

This provides the technical description of the implementation of the Distributed communication among our robots.

3.6. Pseudo-Code of the Algorithm

As explained in the previous chapters, this thesis involves design and implementation of the path planning algorithm for multi robots to identify a path from specified source to the destination without colliding with the dynamic obstacles. The source and the destination will be provided as input and also the direction is specified as default direction at the starting position. This path planning algorithm is explained further with the help of the pseudo code.

Explanation of the Path Planning Pseudo-Code:

This pseudo-code discusses the working of the KheperaIII robots to identify the possible obstacles in the defined environment. The trajectory taken by the KheperaIII robots is explained in detail in the following pseudo code. As shown in the algorithm, the values of source and the destination are specified. The direction of the KheperaIII robots is specified according to the

15 initial direction of the KheperaIII robots. Also, the motor controllers need to be initialized to start the movement of the KheperaIII robots. This algorithm is implemented on the 2-dimensional grid where the cells are separated by wide black lines. As these black lines are passed by the robots, the position coordinate values are updated with the help of the infrared sensors on the KheperaIII robots according to different infrared values of white and black lines. After the values are updated, this updated real time information is exchanged between the multiple robots to further decide on the movements to reach their respective destinations. The information provided to the

KheperaIII robots and exchanged among them makes them aware of the environment in which they plan a trajectory.

The coordinate values are specified in {x,y} format as the 2-dimensional grid can be identified in the terms of x dimension and y dimensions. The path is planned such that initially the robot moves towards the x destination coordinate values and once the x destination coordinate is reached, the robot further moves towards the y destination coordinate value to reach to its final destination position, until some dynamic obstacle is not identified on the path. If there are no collisions detected, the Khepera robots reach its specified destination position. But, the

KheperaIII robots might run into each other as 2 robots are walking to their destination on the same grid. The collision avoidance algorithm is also a part of this pseudo code which is shown from line numbers 13 to 27. The identification of the obstacle is explained in pseudo code further in this chapter. This pseudo code covers steps the robots take to avoid dynamic collisions and to plan a path in real time when the dynamic obstacles are found. The collisions are handled by the diversion part of the pseudo code. If the robots encounter the possible collisions in the future, it enters the diversion part of the algorithm according to the priority that a particular robot possesses. The robots which have less priority would change their path according to the diversion algorithm and the higher priority robots will continue moving on the same path. As this 16 algorithm makes real time decisions on the movement of the Khepera robots, it makes the algorithm dynamic in nature.

Path Planning Algorithm:

1. BEGIN 2. Input: Source and Destination coordinates, Direction assigned to KHEPERA III 3. Initialize Khepera III Motor Controller 1 and 2. 4. While( source coordinates != destination coordinates) 5. if (!obstacle) // If no obstacle is present on the trajectory 6. while (source x coordinate ! = coordinate) 7. Update source x coordinate 8. while (source y coordinate != destination y coordinate) 9. Update source y coordinate. 10. endwhile 11. endwhile 12. Path found successfully. 13. elseif(obstacle) //If an obstacle is present in the trajectory 14. if(source x coordinate != destination x coordinate) 15. if(x = lower priority) //Priority decisions are made 16. Diversion() 17. return 18. elseif(x = higher priority) 19. Do Nothing. 20. return 21. elseif (x has reached destination) 22. if(y = lower priority) 23. Diversion() 24. return 25. else 26. Do Nothing. 27. return 28. endif 17

29. endif 30. endif 31. endif 32. endwhile 33. END

The identification of the obstacle and handling of the same is explained in next section.

Obstacle Avoidance:

As explained in the previous sections, the position information for the robots is exchanged with the help of distributed communication. Once this information is exchanged, at particular instance a robot has the following information in the multi-robot scenario:

1. Present coordinates: the present coordinate positions which the robots possess.

2. Next coordinates: the new coordinate positions calculated by the robot to move to the next coordinate position on the grid.

3. Other coordinates: the coordinate information received about the present coordinate position of the other robot on the same grid.

4. Obstacle coordinates: the next coordinate position calculated by the other robot.

Explanation of the Pseudo Code for the Obstacle Avoidance:

Pseudo code for the obstacle avoidance is an important part of the path planning algorithm implemented on the Khepera robots avoiding obstacles. As explained in the previous sections, the Khepera robots keep track of their present and the future moves and also keep track of the other robots present and the future moves to plan their obstacle free path. If the Next coordinate values of the present Khepera robot coincides with the obstacle coordinate values or the other coordinate values, the diversion part of the algorithm is called. This would signify the other robot 18 as a dynamic obstacle in the path of the 1st robot from source to destination. As the Diversion part is called, one of the Khepera robots changes their course of movements to avoid colliding with the other robots.

Pseudo Code for Obstacle Avoidance:

1. Begin 2. Input: Next Coordinates, Other Coordinates, Obstacle Coordinates. 3. If ( Next Coordinates EQUALS Other Coordinates) Or (Next Coordinates EQUALS Obstacle Coordinates)

Obstacle Found.

else

No Obstacle Found.

endif 4. end

Once the obstacles are identified, one of the robots would enter diversion part of the pseudo algorithm and the other robot would continue on the same path. This is done on the basis of the priorities assigned in the beginning to the robots. This can also be identified as a “Prioritized

Technique”.

 Prioritized Technique: Priority is assigned to the given entities, according to which the

tasks are assigned. Higher priorities will be assigned different tasks as compared to

the lower priorities. In this algorithm, the robot whose position coordinates are

smaller would get into diversion and the other higher priority would continue on the

same path.

The higher priority is assigned as the robot having higher value of the x coordinate n vice versa.

19

Pseudo Code for Diversion:

1. Begin 2. Input: Xpresent , Ypresent, Xother, Yother 3. If (Xpresent < Xother) 4. Changes the route. 5. else if(Xpresent > Xother) 6. Continue with the same route. 7. else if(Xpresent == Xother) 8. if(Ypresent < Yother) 9. Change the route 10. else if (Ypresent > Yother) 11. Continue on the same route 12. endif 13. endif 14. end

As explained in the above pseudo code, the values are prioritized according to their present values:

1. Higher x coordinate value = higher priority.

2. Lower x coordinate value = lower priority.

The computation on the values will be done by the if-else loop. The robot which will be doing

“Change of the Route” will make this dynamic decision based on the algorithm written below.

The robot’s present and destination coordinates are compared. According to the diversion algorithm, the robots with lower priority would change the route according to the “Change of

Route” algorithm, whereas the robots possessing the higher priority would remain on their original path. The next section would include explanation for the “Change of Route” pseudo code. The appropriate decision for the new path will be made after doing mathematics on all the options for the new path.

20

Pseudo Code for “Change of Route”:

1. Begin 2. Input: (Xpresent, Ypresent), (Xdestination, Ydestination) 3. if (Xpresent != Xdestination) 4. if(Ypresent != Ydestination) 5. Update Y 6. Continue with algorithm. 7. else if (Y present == Ydestination) 8. if(Ypresent != Ymax) 9. Update Y 10. Continue with algorithm. 11. else 12. Decreement Y 13. Continue with algorithm. 14. end if 15. end if 16. else if (XPresent == Xdestination) 17. if(Xpresent != Xmax) 18. Update X 19. Continue with algorithm. 20. else 21. Decreement X 22. Continue with algorithm. 23. end if 24. end if 25. end

This pseudo code makes all the mathematical calculations to design the path for the 2 Khepera robots on the 2-dimensional grid to safely traverse a path from the source to the destination. The path is taken considering all the scenarios based on the directions the robot posses, the position the robots posses, the position relative to the extreme positions of the grid.

21

Chapter 4: Results and Analysis

This chapter illustrates the working of the designed algorithm on the KheperaIII robots on the 2- dimensional grid. Different scenarios are represented which also present the worst cases for this algorithm, where the robots would definitely end up with the possible collisions. This presents the practical working of this algorithm, and represents the way algorithm would avoid the possible collisions and dynamically traverse a new path to their respective destinations.

Scenario 1: Movement of KheperaIII robot from the specified source to destination on 2- dimensional grid with no static or dynamic obstacle.

As shown in figure 4.5, the robot shows the path it takes from the specified source to the destination in the workspace which is free of any obstacle, static or dynamic obstacles.

NORTH

D(A)

S(A)

SOUTH

Figure 3: The simple path taken by the robot from the specified source to the specified destination in workspace free of obstacles.

22

The algorithm requires the source and destination to be specified to the robot to make the robot partially aware of the environment in which it is walking. Infrared sensors of the

KheperaIII robots help increment the coordinates separated by the black lines of the grid. Once the robot starts moving from the specified source to the specified destination, it uses the above defined Update coordinate method to reach to its destination. As explained before, while moving from the source position to the destination position, the x coordinates are updated first and the y coordinate values are updated once x coordinate equals its destination coordinates. This motion algorithm remains same for all kind of scenarios. Also as said above, the robot always starts with the default North direction and changes direction depending upon its destination coordinates.

This motion algorithm successfully traverses in all the 4 directions i.e. North, South, East and

West.

Once the destination is reached, the robot movement stops at the destination coordinates. This scenario had only one robot moving from the source to the destination position, to see the path planning for the single robot on the given grid.

Scenario 2: Movement of the multi-robot on the workspace with dynamic obstacles.

Figure 4.6 shows the movement of the two robots from their specified sources to the specified destinations. The S(A) is the specified source for the Robot A, and D(A) is the specified destination of the Robot A. Similarly the S(B) is the specified source of the Robot B, and D(B) is the specified destination of the robot B. The dotted lines show the respective movements of the two robots. The movement of Robot A is represented by the red dotted line and the movement of the Robot B is represented by orange dotted line. As represented in the figure 4.6, the movements of the robots occur when they walk on the given workspace i.e. 2-dimensional gird in our case. In this multi-robot motion planning scenario, we have specified source and 23 destination to the respective robots, making them partially aware of the environment on which they are going to find a trajectory from their source to the destination.

S(A) D(A)

D(B) S(B)

Figure 4

As the robots start their movement towards their respective destinations on the 2-dimensional grid while updating their coordinates, robots exchange the updated coordinate information with each other with the help of distributed communication. This helps make them aware of their environment in which they are walking and also of any possible collisions with each other or called as dynamic obstacles. As the robots starts moving to their destinations, they take the trajectory updating and moving on the x coordinates and after the x source coordinates equals the x destination coordinates, the y coordinates are updated. These robots run into each other while moving on their trajectory. The algorithm further calls the “obstacle avoidance” and “diversion” pseudo codes to decide on the movements, once the dynamic obstacles are found.

24

As seen from the cases implemented, the algorithm is successful in designing the dynamic path while avoiding the obstacles or interference with multi robots. The multi-robot synchronization and the coordination had been an important issue, which was successfully dealt with the help of the distributed communication implemented on these robots. The distributed communication helped the algorithm to update the current and future positions of the moving robots which helped identify the dynamic collisions. The successful implementation of distributed communication among the multi robots, their synchronization and generalized path planning algorithm for all the robots in the system makes this algorithm efficient and simplistic for the system. This implementation can be further modified to be implemented on three or more robots.

This algorithm hence, is successful implementation in the field of motion planning and coordination with autonomous robots.

25

Chapter 5: Conclusions and Future Work

As the multi-robots system involves multiple robots operating on the same workspace, it becomes mandatory to deal with the collision avoidance and unpredictability of the situations occurring. The tasks performed with multiple robots are prone to collisions among the robots as the environment of the workspace is usually not fully known. This makes obstacle avoidance a crucial and significant part of motion planning. This thesis involved practical implementation of the motion planning algorithm with obstacle avoidance with decentralized technique. Distributed communication is implemented for the robots to communicate and exchange information regarding their position coordinates. The decentralized approach is taken due to its varied number of advantages over the Centralized technique as discussed in Chapter 4.

5.1 Comparing Approaches:

Multi-robot system applications with either centralized or decentralized approaches aim to make the system capable to help maneuver the robots safely in an unknown environment or terrain

[12]. As both centralized and decentralized approaches have been implemented to optimize the coordination of multi- robots in a dynamic unknown environment, [14] following is the comparison of these two approaches as the final chapter of this thesis concludes:

Centralized Approach: This approach has been successful in providing optimal solutions to the movement of multi-robot system in a dynamic and unpredictable environment. The approach has led to successful implementation giving obstacle free trajectories [12]. But this approach has a

26 major disadvantage; the complexity of the central major robot is exponentially high due to addition of DOFs to itself for all other robots present in the system.

The disadvantages of working with the Centralized approach are following:

1. Complexity: As the central robot in an environment is responsible for designing the path

for all robots present in the grid, the complexity with the central robot is higher as

compared to other robots present on the grid. Number of robots would add up the

complexity for the central robot and would lead to a highly complex design system.

Number of Robots = {n1, n2, n3…}

Complexity for the central robot to design path for every robot: {o (n1) + o (n2) + o (n3)

+……}

2. Speed: As the central robot does the calculations for all the robots on the grid, it would

slow the system. The amount of information exchanged will put much of an overhead on

the communication system. The large amount of overhead on a single robot for the

calculations and also on the communication system for this path planning system

decreases the chances for the centralized approach to be considered for this system, as it

would lead to big overhead on a single robot.

3. Synchronization: The synchronization of communicating information is a difficult task to

achieve. The communication is implemented with threads and information transmission

to all the robots by a single robot demands lot of synchronization with every other robot

on the field.

27

Decentralized Approach: This approach has every robot planning its own trajectory which would lead to not so complex systems. The complexity is distributed among all the robots in the system.

Also, this approach is faster than centralized approach. One of such approaches, Reactive style planning has been proven to successfully enable faster real time planning. [12]

Example of Decentralized Approach:

Movements of multi-robot on the workspace with dynamic obstacles.

Figure 4.7 shows the movement of two robots from their specified source to the specified destination. The S(A) is specified source for Robot A, and D(A) is specified destination of

Robot A. Similarly, S(B) is the specified source of Robot B, and D(B) is specified destination of

Robot B. The dotted lines show respective movements of the two robots. In this multi-robot motion planning scenario, unique source and destination have been assigned to each robot, making them partially aware of the environment on which they are going to find a trajectory from their source to the destination.

Figure 5 28

As the robots start their movement towards their respective destinations on the 2-dimensional grid while updating their coordinates, robots exchange the updated coordinate information with each other with the help of distributed communication. The approach taken in this thesis is

Decentralized approach, and has proven to be successful for planning obstacle free trajectories using distributed communication. It is an effective approach for experimenting and implementation of the algorithm on the KheperaIII robots and has been proven successful. The advantages of decentralized approach over centralized approach can be determined by comparing following characteristics:

1. Complexity: As individual robot is responsible for planning their respective paths, this

makes system less complex.

2. Speed: The communication is done with the few values being exchanged as compared to

the previous system, which makes this decentralized system more fast and reliable.

3. Synchronization: as all the robots exchange few values, making them easy to

communicate and synchronize the positions with other robots on the field. Future Work:

1. Successful test cases have been implemented with the algorithm developed for motion

planning of multi robot path planning. But as the field is relatively new, more such

algorithms might need to be tested involving more technologies in the algorithm. Path

planning algorithms like A* search algorithm, Best First Search algorithm might be

implemented for more complex environments. Costs can be attached to the paths to

exploit the implementation of the above said algorithms for such complex environments.

2. Number of robots could be increased for this algorithm. Algorithm could be stretched

further to include the capability to work with increased number of robots.

29

Bibliography:

[1] Wikipedia. http://en.wikipedia.org/wiki/Artificial_intelligence.

[2] Wikipedia. http://en.wikipedia.org/wiki/Autonomous_robot

[3] M.M. Quottrup, T. Bak, R.I. Zamanabadi. Multi-Robot Planning: A Timed Automata

Approach. In Robotics and Automation, 2004. Proceedings. ICRA ’04, IEEE International

Conference on, volume 5, pages 4417-4422, May 2004.

[5] Multi-Robot Planning and Coordination . http://www.frc.ri.cmu.edu/~axs/multi-robot.html

[6] R. Simmons, D. Apfelbaum, W. Burgard, M. Fox, D. an Moors, S. Thrun, and H. Younes.

Coordination for Multi-Robot Exploration and Mapping in proceedings of the AAAI National

Conference on Artificial Intelligence, 2000.

[7] E. Masehian, Azadeh H. Nejad. A Hierarchical Decoupled Approach for Multi Robot Motion

Planning on Trees in IEEE International conference on Robotics and Automation, May 3-8,

2010, Alaska, USA.

[8] C.M. Clark, S.M. Rock, J.C. Latombe. Dynamic Networks for Motion Planning in Multi-

Robot Space Systems networks in 2003 IEEE International Conference on Robotics and

Automation.

[9] Wikipedia. http://en.wikipedia.org/wiki/User_Datagram_Protocol

[10] Posix Threads Programming. https://computing.llnl.gov/tutorials/pthreads/

[11] G.G. Rigatos. Multi-Robot Motion Planning Using Swarm Intelligence in International

Journal of Advanced Robotic Systems, November 2008.

[12] C.M. Clark, S.M. Rock, J.C. Latombe. Motion Planning for Multiple Mobile Robot Systems using Dynamic Networks in 2003 IEEE International Conference on Robotics and Automation.

30

[13] J. Kuffner, K. Nishiwaki, S. Kagami, M. Inaba, H. Inoue. Motion Planning for Humanoid

Robots in Proc. 11th Int’l Symp. of Robotics Research, ISRR 2003.

[14] C. Le Pape. A Combination of Centralized and Distributed Methods for Multi-Agent

Planning and Scheduling in Robotics and Automation, IEEE International Conference on 13-18

May 1990.

[15]G. Yuh-Jiun Lin, J.J. Solberg. Integrated Shop Floor Control Using Autonomous Agents in IIE Transactions, Volume 24, Issue 3, 1992.

31