Decentralised construction of a global coordinate system in a large swarm of minimalistic robots
Michal Pluhacek, Simon Garnier, Andreagiovanni Reina

TL;DR
This paper presents a decentralized algorithm enabling minimalistic robot swarms to self-establish a shared coordinate system and assign location-based tasks, enhancing collective intelligence with minimal assumptions.
Contribution
The study introduces a novel, resource-efficient algorithm for positional self-awareness in error-prone robots without bearing measurements, applicable to large swarms.
Findings
Successful deployment with up to 200 Kilobot robots
Robots can autonomously create a shared coordinate system
Algorithm requires fewer assumptions than existing methods
Abstract
Collective intelligence and autonomy of robot swarms can be improved by enabling the individual robots to become aware they are the constituent units of a larger whole and what is their role. In this study, we present an algorithm to enable positional self-awareness in a swarm of minimalistic error-prone robots which can only locally broadcast messages and estimate the distance from their neighbours. Despite being unable to measure the bearing of incoming messages, the robots running our algorithm can calculate their position within a swarm deployed in a regular formation. We show through experiments with up to 200 Kilobot robots that such positional self-awareness can be employed by the robots to create a shared coordinate system and dynamically self-assign location-dependent tasks. Our solution has fewer requirements than state-of-the-art algorithms and contains collective…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModular Robots and Swarm Intelligence · Distributed Control Multi-Agent Systems · DNA and Biological Computing
MethodsAttentive Walk-Aggregating Graph Neural Network
∎
11institutetext: M. Pluhacek 22institutetext: Faculty of Applied Informatics, Tomas Bata University in Zlín, Zlín, Czech Republic
22email: [email protected] 33institutetext: S. Garnier 44institutetext: New Jersey Institute of Technology, NJ, USA
44email: [email protected] 55institutetext: A. Reina 66institutetext: IRIDIA, Université Libre de Bruxelles, Brussels, Belgium
Sheffield Robotics, University of Sheffield, Sheffield, UK
66email: [email protected]
Decentralised construction of a global coordinate system in a large swarm of minimalistic robots
Michal Pluhacek
Simon Garnier
Andreagiovanni Reina
Abstract
Collective intelligence and autonomy of robot swarms can be improved by enabling the individual robots to become aware they are the constituent units of a larger whole and what is their role. In this study, we present an algorithm to enable positional self-awareness in a swarm of minimalistic error-prone robots which can only locally broadcast messages and estimate the distance from their neighbours. Despite being unable to measure the bearing of incoming messages, the robots running our algorithm can calculate their position within a swarm deployed in a regular formation. We show through experiments with up to 200 Kilobot robots that such positional self-awareness can be employed by the robots to create a shared coordinate system and dynamically self-assign location-dependent tasks. Our solution has fewer requirements than state-of-the-art algorithms and contains collective noise-filtering mechanisms. Therefore, it has an extended range of robotic platforms on which it can run. All robots are interchangeable, run the same code, and do not need any prior knowledge. Through our algorithm, robots reach collective synchronisation, and can autonomously become self-aware of the swarm’s spatial configuration and their position within it.
Keywords:
self-localisation swarm robotics Kilobots positional awareness minimalistic robotics
1 Introduction
Coordination in natural and artificial collective systems is, fundamentally, a spatiotemporal problem. For two or more agents to coordinate their work, each must have a sense, even if imperfect, of when and where others’ actions have taken place relative to its individual frame of reference. For instance, flocking in birds or schooling in fish is only possible if each individual can quickly adjust their movement (a spatiotemporal attribute) to the movements of their immediate neighbours (another spatiotemporal attribute). Even in fixed groups of interacting agents, for instance, a network of sensors and actuators in a building, the topology (spatial) and timing (temporal) of the interactions will determine the type (e.g., synchronisation, oscillation) and the quality of the collective coordination.
In the context of swarm robotics (Hamann, 2018), a field of research studying the coordination of large groups of simple autonomous robots, the temporal aspect of coordination is relatively easy to solve. Indeed, the microprocessors that control the behaviour of the robots are, essentially, clocks. They provide each robot with an internal temporal frame of reference against which it can log the events that it perceives from its environment. The spatial aspect, that is where an event happens relative to a focal individual, is, however, less straightforward. Traditionally, it is solved using either an external frame of reference (e.g. a Global Positioning System) or implementing a ”mental” mapping mechanism within the robot’s controller (Pritsker, 1984). The former is usually very precise, but GPS signals are not always accessible to the robotic agents (e.g. when they are blocked by obstacles) and their use runs somewhat contrary to the full-autonomy goal of swarm robotics. The latter provides increased autonomy to the robotic swarm but requires significant processing power and memory storage, which may not be available on small or microscopic robotic agents.
Here, we propose an alternative approach using a fully decentralised mechanism that can be implemented in autonomous robots with limited capabilities. In particular, our approach allows a group of robots to build a global coordinate system without requiring external reference information, preset origin, or predetermined roles for the robotic agents. It is designed to work on any robotic platform, even with minimal, undirected communication abilities and noisy distance sensors. To demonstrate the feasibility of our approach, we implemented it using the well-known, minimalist Kilobot platform. We also show that it scales up to large robotic swarms by performing validation experiments with up to 200 real and 1,000 simulated Kilobot units.
The rest of the manuscript will be organised as follows. First, we will give a general description of our approach and compare it with existing approaches in the literature, with a focus on minimalist robots (Section 2). In particular, we will highlight the strengths and limitations of our approach with respect to the existing ones. Then, we will provide a detailed description of the proposed algorithm and its implementation in the Kilobot platform (Section 3). This will be followed by a description of the results of multiple experiments with real and simulated Kilobot swarms demonstrating the capabilities and scalability of the approach (Section 4), before we offer our conclusions on the possibilities that it offers and on directions for future studies (Section 5).
2 Previous work
Through our algorithm, robots can autonomously self-localise within a group and dynamically self-assign roles depending on their position. The algorithm works under the assumption that the robots are organised in a regular formation, in either a rectangular or hexagonal lattice, as illustrated in two examples in Figure 1. Having the robots organised in such regular formations can be particularly convenient for logistics reasons. Indeed, robots are normally stored, charged, transported, and deployed in regular formations: squared and rectangular lattices simplify the working logistics and hexagonal lattices maximise the packing density of robots with circular bodies. In addition to simplifying the transport and deployment logistics, having robots in regular formations can be a requirement for the successful execution of the collective task, for instance, the coherent motion of multi-robot aggregates (Pratissoli et al., 2019) and light pattern display (Alhafnawi et al., 2020). In these works, spatiotemporal coordination was achieved by manually providing the robots with information about their relative position within the formation. Our algorithm, by enabling the robots to self-localise, increases the system’s autonomy.
There are other studies that proposed decentralised algorithms for the construction of coordinate systems and self-localisation in robot swarms. Our solution is able to work with fewer requirements and on simpler robots than state-of-the-art methods. In particular, there are a few decentralised algorithms (Beal et al., 2013; Sahin et al., 2002; Guo et al., 2011; Coppola et al., 2019; Mathews et al., 2017; Wang and Rubenstein, 2021; Batra et al., 2022; Li et al., 2018; Klingner et al., 2019) that allow each robot to compute its relative positioning with respect to the rest of the swarm through the use of distance and directional information about neighbours—i.e. each robot is able to know the relative location of other robots nearby—and in some cases of a global reference orientation (e.g., a compass). On the one hand, our algorithm can work on simpler robots only equipped with noisy distance sensors and transceivers for local broadcasting of small messages. Therefore, with our solution, neighbours’ bearing is not needed, making possible its implementation on Kilobots and other minimalist robotic platforms. On the other hand, our solution requires the deployment of the robots in a regular formation while the robots could operate in arbitrary arrangements in the studies cited above, as long as the robots could communicate with each other. In addition, previous studies that implemented coordinate system construction on Kilobot swarms also required the robot to be deployed in a regular formation, in their case in a hexagonal lattice (Rubenstein et al., 2014b; Gauci et al., 2018). However, in their case, a subset of the robots ran a different code than the rest of the swarm and needed a precise initial placement to form the coordinate system origin and axes orientation. In our swarm, all robots run identical code and do not need any pre-configuration. Every robot can be replaced with any other and their relative position interchanged without compromising the collective behaviour. Additionally, our algorithm executes simpler mathematical operations than the previous methods by Rubenstein et al. (2014b) and Gauci et al. (2018), which can be better suited for minimal computing devices.
3 Self-organised construction of a coordinate system
In order to build a shared coordinate system, the robots run a sequence of three Routines:
- R1.
Neighbourhood construction 2. R2.
Coordinate system construction 3. R3.
Synchronised dynamic role assignment
Each routine is composed of sub-routines that we describe in detail in this section. Figure 2 gives an overview of the full process. Our three routines are designed to be run by each robot comprising the swarm. Every robot runs identical code, therefore, there is no requirement to pre-assign roles before deployment and any robot can replace any other. Despite the robots relying solely on local and error-prone communication, the execution of routines R1 and R2 allows the swarm to build a global-level coordinate system and enables every robot to self-localise within the shared coordinate system. Such capabilities can, then, allow the robots to self-assign roles based on their position within the swarm and on a shared time clock, as showcased with routine R3. The routines’ algorithms are presented in a generic form and are designed to work on both rectangular and hexagonal regular lattices, with exception of routine R2 which has been tailored to build a coordinate system on rectangular lattices only. In fact, the coordinate system in rectangular and hexagonal lattices is structurally different (Snyder et al., 1999), therefore, routine R2 needs to be designed specifically for each type of lattice. For the purpose of this study, we show the construction of the coordinate system (R2) in rectangular lattices only.
Before describing the three routines, we explain how the robots can maintain a time clock synchronised among all the robots, which is a fundamental requirement for the successful execution of our routines.
3.1 A synchronised swarm
In our study, every robot is an autonomous entity that runs the same code and exchanges messages with close neighbours. In several parts of the process, the transition from one subroutine to the next one is based on a shared time clock. However, without any closed-loop control, the independent clocks of a large number of devices can desynchronise over time. On the contrary, implementing a communication protocol that maintains every device in step with the same global clock at all times can require either a global orchestrator or fast communication and large bandwidth. Therefore, in our system, we implement a hybrid solution that combines independent clocks and closed-loop synchronisation: the robots independently measure time during limited periods and periodically exchange synchronisation messages to reset their clocks and avoid large drift.
Individual clocks.
In our implementation, Kilobots are equipped with a microcontroller that runs the robot’s control algorithm at a rate of approximately 32 Hz. The approximate time elapsed from an event (e.g., the start of the process) can thus be measured using the number of control loops that the robot executed (which in the Kilobot’s firmware are expressed as kilo_ticks). This approach is easy to implement and does not require communication among the robots, however, despite calibration by the producer, the Kilobots’ clocks can quickly desynchronise over time. After a few minutes, the difference can become noticeable. Therefore, in our implementation, robots use their internal clock to estimate the time elapsed from the beginning of the current phase of the process (e.g., a subroutine) and synchronise their internal counter at every phase change.
Message-based synchronisation.
When a robot reaches the given time limit according to its internal clock, it moves to the next phase of the algorithm. As soon as this happens, the robot broadcasts a synchronisation message to notify that the next algorithm phase has begun. Any robot that receives this synchronisation signal moves to the next phase and relays the message. As every phase runs for a relatively short time period, the accumulated difference among robot clocks is typically small. Therefore, in large swarms, it often happens that multiple robots independently reach the time limit according to their internal clock before receiving others’ synchronisation messages. Thus, in our system, synchronisation signals are independently generated from multiple sources, decreasing the delay that might occur in spreading a message from a single source throughout a large swarm. This approach has been tested with up to 200 real Kilobots and 1000 simulated robots and the swarm has not desynchronised over extended periods of time nor accumulated any notable delay.
3.2 Routine R1 – Neighbourhood construction
The routine Neighbourhood construction (R1) aims to enable each robot to construct a list of its closest neighbours which can be identified with locally-unique IDs. The routine R1 is composed of three subroutines: SR1a Locally-unique ID assignment, SR1b Neighbour list creation, and SR1c Relative position identification.
3.2.1 Subroutine SR1a – Locally-unique IDs assignment
A locally-unique ID is essential for neighbourhood construction as it allows robots to count the number of robots in their proximity and establish one-to-one communication with each neighbour. This subroutine is composed of two phases presented as pseudocode in Algorithm 1. During the first phase, each robot generates a random ID that it draws from a given range. In our case, the Kilobots use an 8-bit integer in the range [0,255]. The robots broadcast their randomly selected ID. Each received ID is added to a blacklist of already used IDs. If a robot receives a message with an ID equal to its own ID, it selects a new random ID from the same range, excluding the IDs in the blacklist. After sufficient time has elapsed, in our case the time necessary to send about 20 messages (10 s), see line 1 of the Algorithm 1, the subroutine moves to the second phase. In this phase, the robots aim to remove duplicated IDs among their neighbours who may not be in direct communication with each other. However, a robot with two neighbours that use the same ID cannot distinguish between them and this causes problems in subsequent subroutines. In this second phase, each robot generates a new random number and repeatedly broadcasts messages containing four pieces of information: its ID, the just-generated random number, and the ID and the random number received from one of its neighbours. Each new message contains information about a different neighbour, iteratively selected (lines 21-22). For each received message, the robot stores the received neighbour’s ID and the additional random number in a list. The use of the additional random number is necessary to distinguish between its own ID included in the neighbour’s message or the ID from another robot with the same value. The probability of random selection of both the same ID and the same random number reduces exponentially with the range size. For instance, for the Kilobots using two 1-byte numbers, the probability is smaller than 0.002%. When a robot receives a message in which the third piece of information is equal to its ID and the fourth piece of information is not equal to its random number, it means that there are repeated IDs (line 23). Therefore, the robot adds its ID to the blacklist and self-assigns a new random ID. After sufficient time has elapsed, in our case the time to send about 30 messages (15 s, line 2), the subroutine SR1a terminates and the subroutine SR1b begins.
3.2.2 Subroutine SR1b – Neighbour list creation
In order to create a list of its neighbours, a robot must filter incoming messages based on the senders’ distance. In our implementation, the Kilobots exchange messages through infrared (IR) messages and can estimate the sender distance using the IR signal strength Rubenstein et al. (2012). In agreement with the Kilobots’ capabilities, we assume that the robots can only rely on distances without directional information, that is robots cannot know the relative angle of the sender, they can only know its distance.
Subroutine SR1b is composed of three phases, and its pseudocode is shown in Algorithm 1. In the first phase, every robot continues, as it did during SR1a, to broadcast its locally-unique ID. Each robot measures the distance of the incoming messages and records the shortest distance (erroneous values smaller than the robot body-size are discarded, e.g. 33 mm for the Kilobots). After a threshold time, the robots start the second phase. In our case, we combined the first phase of SR1b with the second phase of the subroutine SR1a (line 27 of Algorithm 1), to speed up the process. Based on the shortest distance recorded, the robot computes the maximum neighbourhood radius which it uses to filter the incoming messages and create the neighbour list. A robot only adds to its neighbour list the ID of senders at a distance smaller than . Computing the radius as a function of the estimated shortest distance allows the algorithm to adapt to different spacing and grid layouts.
Subroutine SR1b enables the robots to create their neighbour list when they are organised in the regular lattice topologies of rectangular lattices (as in Fig. 1a) and equilateral triangular lattices, also known as hexagonal lattice (as in Fig. 1b). For the case of hexagonal structures, computing is easier as all robot neighbours are at approximately the same distance. Therefore, can be set to , where is the proportion of tolerable error in placement/sensing. For the case of rectangular lattices we want to identify the Moore neighbourhood, therefore computing is more difficult as it must include robots at different distances: the neighbours on the diagonal are farther than the ones at the sides. Additionally, the rectangular lattices can have different vertical and horizontal distances, that is the lattice’s rows can be closer than the columns are, or vice versa. Given the robots’ limitations (i.e. absence of directional information), subroutine SR1b can only work with an asymmetry between vertical and horizontal distances up to a given limit. The limit is given by the inequality , where and are the inter-robot distances on the two dimensions (rows and columns). Assuming , the inequality states that twice the distance of one dimension should be larger than the distance on the diagonal of the rectangular grid. Thus, we have the constraint that . If we also assume a placement/sensing error , the inequality becomes , resulting to
[TABLE]
Suitable values of must also lay between the two extreme values indicated by the same inequalities, i.e. (and in an analogous way for the equations considering the error ), as also illustrated in Figure 3. The Kilobot algorithms benefit from simple computation, thus, in our implementation, the Kilobots compute , which is a simple equation that lays approximately in the middle of the two extremes of the inequality and worked consistently well for triangular and rectangular lattices (see Figure 1).
Occasionally, it might happen that due to noise in the transceiver (especially in swarms with small spacing between individual robots), the distance of the sender is consistently overestimated. In such instances, messages sent by a valid neighbour are discarded because the estimated distance is larger than . In this case, robots may create an incomplete list of neighbours. Even if a consistent overestimation of distance by a robot is rare, the presence of these errors is relatively high when operating with large swarms because the probability of these rare events occurring increases with the swarm size. Therefore, we implemented a repairing mechanism as the third phase of the subroutine SR1b, which begins 5 s after the start of the second phase. During this repairing phase, each robot broadcasts a message with its ID (sender-ID) and all IDs in its neighbour list (neighbours-IDs). Each robot checks all incoming messages (regardless of the sender’s distance) and if its ID is one of the neighbours-IDs, it adds the sender-ID to its neighbour list. This approach reduces considerably distance estimation errors which are typically asymmetric, that is only one robot in a couple of neighbours overestimates the distance.
3.2.3 Subroutine SR1c – Position group identification
Once the neighbour list is created, subroutine SR1c enables every robot to determine its position group in the lattice (Algorithm 2). Each robot broadcasts messages indicating its ID and the number of neighbours in its list. Once the robots have collected the information regarding the number of neighbours from every neighbour, they use it to determine their own position in the lattice. We consider three possible position groups: CORNER, BORDER, and MIDDLE, as illustrated with colour-coded positions in Figure 1. The robot is positioned on the CORNER of the lattice if it has fewer neighbours than any of its neighbours (line 17 of Algorithm 2). The robot is positioned in the MIDDLE if its number of neighbours is the largest of its neighbourhood (line 23). The robot is positioned on the BORDER of the lattice in all other cases (line 20, i.e. it has neighbours with a higher number of neighbours and it has not fewer neighbours than any of its neighbours). Note that for a known regular topology, this procedure can be simplified as the position in the formation can be derived directly from the number of identified neighbours (e.g. in a rectangular topology the CORNER has 3 neighbours, the BORDER has 5 neighbours, and MIDDLE has 8 neighbours). However, subroutine SR1c, and more generally routine R1, does not require the robots to know the lattice topology in advance. On the contrary, during SR1c, the robots can self-deduce the regular topology they are part of by using the neighbour counts.
3.3 Routine R2 – Coordinate system construction
Routine R2 enables the swarm to create a global coordinate system in which every robot self-localises by computing its 2-dimensional coordinates within the lattice. This routine requires the completion of routine R1 by which robots know the locally-unique IDs of their neighbours and know their position group in the lattice (i.e. CORNER, BORDER, or MIDDLE). This routine has been designed for rectangular lattices, however, our subroutines can be potentially extended to different protocols for building global coordinate systems (possibly in dimensions higher than two) for different lattice topologies, e.g. hexagonal (Snyder et al., 1999). For the rectangular lattice, the 2D coordinates are computed with respect to the x and y axes which correspond to two orthogonal edges of the rectangle (that are randomly chosen in subroutine SR2a). The coordinates start from value (1,1) at the origin (a robot in a corner of the lattice) and indicate the discrete positional values for every robot in the lattice.
3.3.1 Subroutine SR2a – Axes origin and direction
Through subroutine SR2a, one of the four corners is randomly selected as the axes’ origin (Algorithm 3). At the beginning of this subroutine, every CORNER selects a random number, and the CORNER that selected the smallest number is selected as the axes’ origin. Because the four CORNER robots are not in direct communication range, all robots cooperate in the communication by spreading the corners’ random numbers throughout the lattice. In order to minimise bandwidth usage and speed up the information spreading, every robot only relays the lowest random number that it has received so far and ignores any other higher number (lines 19-21). The CORNER robots also stop broadcasting their random number once they receive a message with a number lower than their own (line 16). After sufficient time, which we estimate as the time necessary to send 25 messages (about 13 s), we assume that the message representing the lowest random number of one CORNER robot has reached all other CORNERs. The CORNER robot that has not received any lower random number, then, takes on the role of origin of the axes and sets its coordinates to (x,y)=(1,1).
In order to minimise the probability that two random numbers have the same value, the random number should be uniformly drawn from the largest range possible. For example, in our implementation, the Kilobots can exchange messages with a 9-byte payload (72 bits). Therefore, the CORNER computes its random number in the range . Using such a large range, the probability of two identical 9-byte sequences being generated in two CORNER robots is negligible.
Once the axes’ origin CORNER robot is selected, it is possible to determine the axes’ orientation by assigning coordinates to its neighbours. The axes’ orientation is also randomly determined, this time using information already locally available (from SR1a). The CORNER robot assigns to the BORDER node with the lowest locally-unique ID the coordinate (x,y)=(2,1) and to the BORDER node with the highest ID the coordinate (x,y)=(1,2). As a result, both the origin and orientation of the coordinate system are random and self-emergent in every run. This operation terminates subroutine SR2a and enables the start of subroutine SR2b.
3.3.2 Subroutine SR2b – Lattice dimension measurement
The subroutine SR2b enables the swarm to compute collectively the dimension of the two axes and gives information to the border robots on their position with respect to these axes. Knowing the axes’ dimensions also allows every robot to measure the size of the swarm, a quantity that is typically hard to compute with decentralised algorithms (Saha et al., 2021; Ganesh et al., 2007).
Once the axes’ origin has been selected (SR2a), the first BORDER robot on the x-axis, that is the robot with coordinates (x,y)=(2,1), starts the subroutine SR2b. The robot initialises a counter variable with the value 2 and sends this value throughout the lattice border; at each message hop, the next border robot increases the count by one and relays the message, as displayed in Figure 4. These messages are flagged with a specific header denoting the border-count subroutine SR2b. These messages are composed of four values (in addition to the header); one value is the border count that is increased at each step, while the other three values are initialised to zero and will be edited by the CORNER robots. The algorithmic implementation for this process is shown in Algorithm 4 and indicates that every BORDER robot that did not receive a border-count message yet accepts the message, adds one to the counter, and broadcasts the new value. Three additional rules are necessary for computing correctly the lattice edge dimension. The first additional rule regards BORDER robots that are adjacent to a CORNER robot and received their first message from another BORDER robot. These robots must use a special header in their border-count message. Messages with such special header are only read by CORNER robots so that the other BORDER robot on the diagonal (which did not receive any border-count message yet) will ignore the message and wait for the CORNER robot to send its border-count message with the updated value. The second additional rule requires the CORNER robots to append further information to the border-count message. They include information about their local count that they store in the first zero value composing the message. Therefore the border-count message maintains as separate pieces of information the local count of the three corners traversed during the multi-hop spreading. The third additional rule prevents the execution of the counting in both directions. The rule only applies to the robots with coordinates (x,y)=(1,1) and (x,y)=(1,2); these two robots ignore any border-count message with a count value lower than three. This process ends when the count has travelled around the whole border of the lattice; this happens when a valid border-count message is transmitted to the axes’ origin. This process is independent of timers and can scale to any grid size larger than or equal to .
Once the origin robot receives the total border count, the total count information and the local counts of the CORNER robots are spread throughout the border in the same direction as before until the message is returned to the origin once again. At this point, all BORDER and CORNER robots know the lattice size (total border count and corners’ local counts) and their position on the border with respect to the axes’ origin (their local count value). The robots can use this information to compute the swarm size and will subsequently use it to compute their coordinates in subroutine SR2c.
3.3.3 Subroutine SR2c – Coordinates assignment
Through subroutine SR2c, every robot computes its two coordinates and becomes aware of its position within the full formation. In subroutine SR2c, robots employ the information gathered in SR2b and incrementally assign coordinates, commencing from the edges of the lattice and moving inwards.
Corner and borders.
The corner at the origin already has its coordinates, assigned during subroutine SR2a, (x,y)=(1,1). The other three CORNER and all the BORDER robots use the information exchanged in the border-count messages in SR2b to set their coordinates. The border-count messages contain ordered information on the local count of the three corners encountered during the multi-hop count on the border. We label as C1, C2, and C3, the local counts of the first, second, and third corners encountered during the border-count process (see Figure 4). The CORNERs and the BORDERs then assign their coordinates through Algorithm 5, where is the local count of the robot running the algorithm and coord its coordinates.
Middle robots.
The MIDDLE robots—which are not on the edge of the lattice—assign their two coordinates independently using information locally broadcast by their neighbours. Once any robot self-assigns its coordinates, it broadcasts its values to its neighbours. Each robot locally stores the coordinates of its neighbours and once it receives the coordinates with three consecutive values on one axis, it self-assigns the middle value on that axis. For instance, a robot that receives the coordinates from neighbours and with values , , and , will set its coordinate . Similarly, when a robot receives the coordinates, , , and , will set its coordinate . This process allows every robot to self-assign its coordinates and to become aware of both its position within the lattice and the relative position of all its neighbours. This information can be employed for various subsequent tasks which exploit spatial awareness of the robots (e.g. dynamic role assignment as a function of the robots’ position (Pratissoli et al., 2019), or exploit the swarm-level agreement obtained with routine R2 (e.g. use the coordinates to assign globally-unique IDs).
3.4 Routine R3 - Synchronised dynamic role assignment
Routine R3 consists in assigning a different role, or task, to each robot depending on its coordinates. This operation is achieved by providing all robots with the desired action plan. The plan indicates what is the role of every robot depending on its coordinates and how the roles change over time. While all the robots know the full action plan in advance, each robot only knows its role once it computes its coordinates through routine R2. Using the synchronisation method described in Section 3.1, the robots can also synchronously move to the next step of the action plan. Such a synchronous role change can be interpreted as a change in the swarm state. Enabling swarm state changes allows the programming of robot swarms through swarm-level finite state machines, which can simplify the design of collective behaviour, as was also suggested by previous research (Pinciroli and Beltrame, 2016). Indeed, designing swarm robotics algorithms is complicated as the collective behaviour must be encoded in individual robot rules and the link between swarm and robots can be counter-intuitive. Having the possibility of defining the swarm action plan, while maintaining a fully decentralised approach, can be useful.
In this study, we implemented two types of action plans that differ in how the robots activate. In both action plans, a subset of robots in predefined locations becomes active. In the first case, the active robots activate their motors and move out from the formation. In the second case, the active robots light on their coloured LED and create a collective pattern as shown in Section 4. In the second action plan, robot activation is periodically alternated between a cycle of robot subsets with potentially different active roles (implemented as different light colours). The repeated patterns allowed us to test the robustness of the system (e.g., to maintain swarm-level synchronisation) during several-minute-long runs.
4 Experiments
We tested the algorithms through a series of experiments in simulation and with swarms of real robots. As indicated earlier, the chosen robotic platform is the Kilobot robot (Rubenstein et al., 2012, 2014a), which is a relatively simple robot that can move using vibration motors and exchange IR messages with other robots in a range of about 10 cm. The Kilobots can also estimate the distance (but not the position) of the sender of any received message. Finally, they can show their internal state through a coloured light-emitting diode (LED).
The code to run our algorithm on the Kilobots is open source and available on Github at https://github.com/TBU-AILab/Kilobot-self-localization.
4.1 Simulations
The simulations have been performed with ARGoS (Pinciroli et al., 2012), a modular and efficient simulator for swarm robotics (Pitonakova et al., 2018), that offers a convenient plugin for simulating the Kilobots (Pinciroli et al., 2018). The Kilobot-plugin for ARGoS allows the user to implement robot code that can be transferred without any change from simulation to the robots, therefore easing implementation and testing.
Through simulation, we performed several tests, running numerous independent repetitions (using different random seeds) for each investigated condition. We conducted tests in experiments with up to 1000 simulated Kilobots, where we tested rectangular lattices of different dimensions, from to , and in each case, we varied the inter-robot spacing, from 35 mm to 70 mm. In all our experiments, the swarm successfully completed the process: every robot correctly computed its coordinates and took on its expected role. Figure 5 shows four screenshots of a simulation with Kilobots illustrating the four main phases of the algorithm: neighbourhood construction (Fig. 5a), axes’ origin selection and border counting (Fig. 5b), and assignment of the x-axis values (Fig. 5c) and of the y-axis values (Fig. 5d).
4.2 Kilobot experiments
We also conducted a range of real-robot experiments employing up to 200 Kilobots. We tested different grid sizes, topologies, and inter-robot spacing, as illustrated in Figures 1, 6, 7, and 8. Small-scale experiments, with up to 25 Kilobots, have been conducted in the Swarm Lab at the New Jersey Institute of Technology, while large-scale experiments with 64 to 200 robots have been conducted using the Kilobot infrastructure of Sheffield Robotics (Nikolaidis et al., 2017) at the University of Sheffield.
Scalability.
Kilobot experiments tested the capability of the algorithm to run without change in swarms of different sizes. We conducted experiments with grids of robots (Fig. 6), robots, robots (Fig. 7), and robots (Fig. 8). The figures show key frames of the process, always terminating with the dynamic role assignment in the form of light patterns that show written text. Note that the axes’ origin and orientation are determined at run time and are randomly chosen, therefore in about half of our experiments the text appeared mirrored (when the axes’ orientation is inverted the displayed text is subject to a reflection). For ease of visualisation, we only report images and videos of runs in which the light pattern is displayed in the same orientation as the observer.
In Figure 6, the 25 robots have a cyclic role assignment in which they form the light pattern N-J-I-T. The video of one experiment with 25 robots is available at https://youtu.be/RdUs_EHRnUU. Figure 7 shows frames for a swarm of 100 Kilobots in some of the key algorithm phases which terminate with the cyclic role assignment of two light patterns forming the worlds ”HE-LLO” and ”WO-RLD”. The video of one of the experiments with 100 robots is available at https://youtu.be/KlooXOOvZsY. Finally, Figure 8 shows frames from experiments with the largest swarm tested, organised in a rectangular lattice sized . In these experiments, the cyclic role assignment displays the word ”SWARM” that alternates between two different positions in the lattice. The video of one of the experiments with 200 robots is available at https://youtu.be/S4s6fpWZvMM. Our three experiments with 200 robots took on average 3 minutes to reach completion of routine R2 (where all robots successfully self-assigned their coordinates). While the speed of the process can be potentially optimised by tailoring the time limits of the subroutines to the specific scenario, our tests using the time limits indicated in Section 3 already show a relatively quick process compared with other research experiments that used large-scale swarms of Kilobots (Rubenstein et al., 2014b; Reina et al., 2017, 2018; Gauci et al., 2018).
Lattice topologies and inter-robot spacing.
Through a set of Kilobot experiments, we tested different topologies and spacing among robots. While routine R1 can work on a variety of different regular lattices (as discussed in Sec.3.2), routine R2 has been designed for rectangular lattices only. Figure 1 shows the final stage of routine R1 in the square and hexagonal lattices, in which the robots display with distinct colours their position group (i.e. CORNER, BORDER, or MIDDLE). Figures 6 and 7 show square formation with largely different spacing among robots. Finally, in the experiments of Figure 8, we tested a rectangular lattice (non-squared). In addition, these tests also validate the robustness of our algorithm to misplacement errors which have been introduced by the manual placing of the robots in the lattice formation. For example, in Figure 7 it is possible to appreciate the visible misalignment of some of the robots on the second column from the right, which are particularly evident when the robots have their lights turned on.
Dynamic role assignment.
In Figures 6, 7, and 8, the role assignment consisted in displaying a repetitive cycle of light patterns. We let the swarm run these light patterns for several dozen minutes and in all cases the swarm never desynchronised. In an additional experiment, we tested a different role assignment scenario in which a subset of Kilobots at given locations commenced movement and left the formation. The video of this experiment is available at https://youtu.be/4wlstUNpNcU.
Summary.
The robot experiments confirmed the validity of the proposed algorithm by consistently reaching the successful completion of all routines. In our scalability tests, we showed that the same identical algorithm can be employed for small grids as well for large-scale experiments, in our case up to 200 real robots. The final routine of cyclic role assignment has also been instrumental to validate the possibility of changing the collective state of the swarm in a synchronised way, even in large swarms composed of robots that only use local communication. Additionally, real robot experiments tested the ability of the algorithm to operate under variable levels of communication noise and distance measurement errors, intrinsic to such simple devices. Finally, tests with different topologies and with robot formations with some placement inaccuracies due to manual setup further showed the generality of the proposed approach and its robustness.
5 Conclusion
We proposed here a new decentralised algorithm to allow robot swarms to build collectively a shared reference system through which every robot can self-localise within the group. The location information can, in turn, be used by the robots to compute their unique coordinates and self-assign specific roles depending on their position. Enabling positional self-awareness and location-dependent task allocation can be instrumental to the collective execution of subsequent higher-level operations, such as coordinated motion in formation (Pratissoli et al., 2019) or localised computation (Beal and Viroli, 2015). Our algorithm also enables time coordination of robots’ actions through a combination of open- and closed-loop synchronisation mechanisms. Synchronised behaviour is key to achieving effective coordination, both in group-living organisms (Couzin, 2018) as in artificial swarms (Trianni and Nolfi, 2009; Ghosh et al., 2022). We showcase our solution in a set of experiments comprising up to 200 real robots that create synchronised dynamic light patterns.
The main distinguishing aspect of our approach compared with previous solutions is the possibility of constructing a shared swarm-level coordinate system with swarms of minimalistic robots, which cannot measure the bearing of other robots. Our algorithms can run on robots only able of basic computation, broadcasting small messages, and making noise-prone estimations of the distance of nearby robots. Instead, most previous work could only achieve decentralised self-localisation through more complex robots equipped with range-and-bearing sensors (Beal et al., 2013; Sahin et al., 2002; Guo et al., 2011; Coppola et al., 2019; Mathews et al., 2017; Wang and Rubenstein, 2021; Batra et al., 2022; Li et al., 2018; Klingner et al., 2019). Algorithms for minimalistic platforms have higher portability, due to fewer robot requirements, and can, therefore, be used in a wider range of applications.
We implemented our algorithm on swarms of up to 200 real Kilobot robots, a reference platform for minimalistic collective robotics. While our algorithm does not require the ability to detect the bearing of incoming messages, it assumes the robot swarm to be deployed in formation, creating a regular lattice (e.g. a rectangular lattice). The algorithm can thus exploit the regularity of the lattice and its geometric properties to compute the relative location and bearing of each neighbour. Note that, as discussed in Section 3.2.3, the robots do not need to know a priori their formation, rather through subroutine SR1c the robots can deduce online the lattice topology, distinguishing between rectangular and hexagonal lattices. The deployment of large-scale swarms in regular lattices is motivated by the customary practices of storing, charging, and transporting robots organised in such regular formations. This constraint is also in line with previous studies on collective robotics that required the deployment of the robot swarm in a regular lattice (Rubenstein et al., 2014b; Gauci et al., 2018; Slavkov et al., 2018; Pratissoli et al., 2019). Some of these works also ran self-localisation algorithms on Kilobots without using bearing information on messages, however unlike in our approach, they required the use of a small set of robots with specific locations and algorithms to act as ‘coordinate seeds’ (Rubenstein et al., 2014b; Gauci et al., 2018). A further advantage of our algorithm is the absence of predefined roles, rather robots are able to self-determine their role and position at runtime. All robots run the same code and can be freely interchanged.
Our study has a rather practical focus by running experiments with Kilobot swarms in a variety of conditions, lattice formations, and sizes. Robot experiments confirm the possibility of successfully running our algorithm on simple error-prone devices. In order to improve its robustness, we included in our algorithm a set of mechanisms to compensate for individual errors and collectively reach global coordination. However, future work should further increase the algorithm’s resiliency by including mechanisms to prevent collective failure when robots break at critical locations of the lattice (e.g., the robot at the coordinates’ origin). With the proposed algorithm, the swarm would not be impaired by the random deactivation of robots located in the middle of the formation; however, the functioning of robots on the border or the corner of the formation is essential to collective success. Future solutions to compensate for such breakdowns would remove these single points of failure and achieve higher levels of collective fault tolerance.
Acknowledgements
This work was supported by OP VVV project International Mobility of Researchers of TBU in Zlín project no. CZ.02.2.69/0.0/0.0/16_027/0008464 and by the resources of A.I.Lab at the Faculty of Applied Informatics, Tomas Bata University in Zlín (ailab.fai.utb.cz). A. Reina acknowledges financial support from the Belgian F.R.S.-FNRS of which he is a Chargé de Recherches.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Alhafnawi et al. (2020) Alhafnawi M, Hauert S, O’Dowd P (2020) Robotic canvas: interactive painting onto robot swarms. Artificial Life Conference Proceedings 32:163–170
- 2Batra et al. (2022) Batra S, Klingner J, Correll N (2022) Augmented reality for human–swarm interaction in a swarm-robotic chemistry simulation. Artificial Life and Robotics 27(2):407–415, DOI 10.1007/s 10015-022-00763-w
- 3Beal and Viroli (2015) Beal J, Viroli M (2015) Space–time programming. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 373(2046):20140220
- 4Beal et al. (2013) Beal J, Dulman S, Usbeck K, Viroli M, Correll N (2013) Organizing the aggregate: Languages for spatial computing. In: Formal and Practical Aspects of Domain-Specific Languages: Recent Developments, IGI Global, pp 436–501
- 5Coppola et al. (2019) Coppola M, Guo J, Gill E, de Croon GC (2019) Provable self-organizing pattern formation by a swarm of robots with limited knowledge. Swarm Intelligence 13(1):59–94
- 6Couzin (2018) Couzin ID (2018) Synchronization: The key to effective communication in animal collectives. Trends in Cognitive Sciences 22(10):844–846
- 7Ganesh et al. (2007) Ganesh AJ, Kermarrec AM, Le Merrer E, Massoulié L (2007) Peer counting and sampling in overlay networks based on random walks. Distributed Computing 20(4):267–278
- 8Gauci et al. (2018) Gauci M, Nagpal R, Rubenstein M (2018) Programmable self-disassembly for shape formation in large-scale robot collectives. In: Distributed Autonomous Robotic Systems (DARS 2016): The 13th International Symposium, SPAR, vol 6, Springer, Cham, Switzerland, pp 573–586
