A Distributed Algorithm for Gathering Many Fat Mobile Robots in the Plane Chrysovalandis Agathangelou Chryssis Georgiou Marios Mavronicolas Department of Computer Science University of Cyprus Tuesday, July 23 rd, 2013
Gathering Mobile Robots
Gathering Mobile FAT Robots
[ Czyzowicz, Gąsieniec, Pelc 2009 ]
Gathering Mobile FAT Robots [ Czyzowicz, Gąsieniec, Pelc 2009 ]
Gathering Mobile FAT Robots [ Czyzowicz, Gąsieniec, Pelc 2009 ]
Gathering Mobile FAT Robots [ Czyzowicz, Gąsieniec, Pelc 2009 ]
Dangerous Environments Space Underwater Military Nanotechnology Scientific Computation Motivation
Anonymous, Identical, Oblivious, Fault Free No Global Coordination System/Communication Fat Robots- Unit Discs Non Transparent Unlimited range of vision/Snapshots C amera Asynchronous [Czyzowicz, Gąsieniec, Pelc 2009] Chirality Model
Model Look-Compute-Move Cycles Adversary Controls speed of robots Determines wait time Can stop robots while moving Liveness conditions
Distributed Algorithm that solves the gathering problem for n fat robots State Machine Representation ◦ Model, problem and algorithm Contribution
Form a Convex Hull No three robots on the same line Full Visibility All Robots are aware of it Conceptual Phase 1
Goal: Form a Connected Configuration All are aware of the Connected Configuration High Level Idea: Converge Do not Lose Convex Hull Do not Lose Full Visibility Conceptual Phase 2
Conceptual Phase 2 Example
Conceptual Phase 2 Example Conceptual Phase 2 Example
Distributed Algorithm Local algorithm run independently and asynchronously by each robot when in state Compute
The Algorithm-Diagram Start OnConvexHull IsTouching NotChangeToChange Connected NotOnStraightLine SpaceForMoreSeeOneRobotSeeTwoRobots NotOnConvexHull NotTouching AllOnConvexHullNotAllOnConvexHull NotConnected OnStraightLine NoSpaceForMore Not On Convex Hull Not Touching Another Robot Must Change Convex HullNo Need To Change Convex Hull Touching Another Robot
Procedure IsTouching Problem: r i is touching with another robot/s They block each other from moving Solution: Priority to the closest robot to Convex Hull Priority to the rightmost robot with the same distance from Convex Hull Using Chirality
Procedure IsTouching Example 1 r1r1 r2r2 r3r3 r4r4 r5r5 r6r6
Procedure IsTouching Example 2 r1r1 r2r2 r3r3 r4r4 r5r5 r6r6
The Algorithm-Diagram Start OnConvexHull IsTouching NotChangeToChange Connected NotOnStraightLine SpaceForMoreSeeOneRobotSeeTwoRobots NotOnConvexHull NotTouching AllOnConvexHullNotAllOnConvexHull NotConnected OnStraightLine NoSpaceForMore On Convex Hull Not All on Convex Hull or Not fully Visible Not on Straight Line
Procedure SpaceForMore If r i is tangent with a robot that they are not adjacent on the convex hull it moves outside of the convex hull at distance Else it stays at its current position
Procedure SpaceForMore Example riri r1r1 r2r2 r3r3
Procedure NoSpaceForMore r i moves with direction outside of the convex hull at distance rlrl r riri m
The Algorithm-Diagram Start OnConvexHull IsTouching NotChangeToChange Connected NotOnStraightLine SpaceForMoreSeeOneRobotSeeTwoRobots NotOnConvexHull NotTouching AllOnConvexHullNotAllOnConvexHull NotConnected OnStraightLine NoSpaceForMore On Convex Hull Not All on Convex Hull or Not Fully Visible On Straight Line Not In The Middle Of Two Other Robots
Procedure SeeTwoRobots r i moves with direction outside of the convex hull at distance rlrl r riri
The Algorithm-Diagram Start OnConvexHull IsTouching NotChangeToChange Connected NotOnStraightLine SpaceForMoreSeeOneRobotSeeTwoRobots NotOnConvexHull NotTouching AllOnConvexHullNotAllOnConvexHull NotConnected OnStraightLine NoSpaceForMore On Convex Hull All on Convex Hull and Fully Visible All Robots Form One Connected Configuration Not One Connected Configuration
Procedure NotConnected Priority to the smallest components to move to larger components Priority to the components with the less distance from their right component to move If all components have equal priority (symmetrical) they start to converge Using Chirality
Procedure NotConnected Example
Procedure NotConnected Example
Procedure NotConnected Example
Bad Configuration type 1 Fully Visible Configuration All robots are on the convex hull A robot r m has a view of a previous configuration (due to asynchrony) No Space for More Robots on the Convex Hull
Bad Configuration type 1 Example rlrl rmrm r r r+1
Bad Configuration type 2 Fully Visible Configuration All robots are on the convex hull A robot r m2 has a view of a previous configuration Four robots are on the same line
Bad Configuration Type 2 Example rlrlr r m1 r m2
Safe Configuration All robots are on the convex hull All robots have full visibility All robots are aware of it
Correctness Outline Good Configurations Safety Properties If not all robots are on the convex hull or not full visibility, the convex hull can only expand If all robots are on the convex hull and fully visible, the convex hull can only shrink Liveness Properties Eventually all robots will be on the convex hull and fully visible If all on the convex hull and fully visible eventually they form a connected configuration All Configurations If there exists a bad execution fragment, eventually a safe configuration is reached and bad configurations can no longer happen
Algorithm Simulation In C language Used GP142 library Used Pthread library
Algorithm Simulation
Conclusion Chirality Solved for n robots Is knowledge of n necessary? Is Chirality necessary? Is it possible to solve the problem with faulty robots?
Thank you!
Appendix
Proof-Lemma
Function On-Convex-Hull Uses Graham Algorithm
Function Move-to-Point Called if a robot wants to touch another robot
Function Find-Points Returns the points on convex hull that a robot can move.
Function Connected- Components Returns the set of the components
The Algorithm-Diagram Start OnConvexHull IsTouching NotChangeToChange Connected NotOnStraightLine SpaceForMoreSeeOneRobotSeeTwoRobots NotOnConvexHull NotTouching AllOnConvexHullNotAllOnConvexHull NotConnected OnStraightLine NoSpaceForMore
Procedure Start If current robot r_i is on the convex hull move to state OnConvexHull. Else move to state NotOnConvexHull Uses function On-Convex-Hull
Procedure NotOnConvexHull Robot r_i is not on the convex hull If r_is touching another robot move to state IsTouching else move to state NotTouching
Procedure NotTouching Call Function Find-Points If it returns at least 1 point go to state NotChange Else go to state ToChange
Procedure ToChange Choose the closest point on the convex hull with space at least a diameter of a robot and move to it
Procedure NotChange Choose the closest point returned by Function Find Points and move to it
Related Work-Models ASYNC, SSYNC, FSYNC Unlimited vs Limited visual range Transparent vs Non Transparent robots Fault Tolerance (Crash, Byzantine, None) Memory vs Oblivious Anonymous vs with IDs Point vs Fat robots
Related Work-Models Agrement on Coordination system (compass) Accuracy of Measurements Non Context Environments (maps/obstacles) Multiplicity Detection Dimensions 2d-3d
Procedure OnConvexHull Robot r_i is on the convex hull boundary If all robots are on the convex hull boundary and no 3 robots are on the same line move to state AllOnConvexHull else move to state NotAllOnConvexHull
Procedure NotAllOnConvexHull If robot r_i is on straight line with any other 2 robots move to state OnStraightLine else it moves to state NotOnStraightLine
Procedure NotOnStraightLine If there exists a space of at least a robot diameter on the convex hull boundary move to state SpaceForMore Else move to state NoSpaceForMore
Procedure OnStraightLine If r i is in the middle and in straight line with any 2 other robots it moves to state SeeTwoRobots Else it moves to state SeeOneRobot
Procedure SeeOneRobot r i stays in its current position
Procedure AllOnConvexHull If all robots are connected r_i moves to state Connected Else it moves to state NotConnected
Correctness Proof Phase 1 Convex hull expands or stay the same Eventually all robots will be on the convex hull Eventually no three robots will be on the same line
Correctness Proof phase 2 All robots stay on the convex hull All robots have full visibility Robots start to converge carefully Eventually all robots will gather
Bad Configuration Overcome Proof Convex hull expands Robots must reach 1/n in order to start converge (Procedure NotConnected) Robots reach "safe distance" Adversary cannot continue to do the same Robots stop and take a snapshot