In collaborative multi-robot localization the robots share some information that is used in the localization process. We describe below the details of the communication between the robots and the developed multi-robot localization approach.
2.1 Messaging
The Nao robots can communicate with each other via a wireless network. They send and receive broadcast messages including some important data such as the position of the ball. In order to realize our algorithm, we add a new message component which includes the following information:
-
player number of the sender,
-
orientation of the sender,
-
mean and variance values of the sender’s estimated position,
-
number of robots seen by the sender and their relative positions.
2.2 Multi-robot Localization
The Circle Method. We represent the possible locations of the robots by circles with orientations. We use circles, because when a robot is observed, its orientation is unknown. If we consider a robot as a thick line, a known center and all possible orientations construct a circle. Each circle can be constructed by the coordinates of its center, an orientation, a reliability value between 0 and 1, and its type. Since they represent the robots, the circles can perceive each other. There are three types of circles:
-
A Circle: This is the circle which a robot claims that it is on. Initially, the number of A circles must be equal to the number of robots.
-
B Circle: This is the circle which a robot claims that it perceives a teammate on.
-
O Circle: This is the circle which is occupied by a robot as its correct location. Initially, there is no O circle. The number of O circles eventually increases while the number of A and B circles decreases.
We assume that particles in the self-localization process (MCL) have a Gaussian distribution. We can calculate the variance and mean of the particles. Robots consider these means as their estimated positions. For an A circle, there is a negative correlation between the variance \(\sigma ^2_A\) and reliability \(\rho _A\). We can say that over a certain variance threshold \(maxVariance\), the robots are completely lost and have 0 percent reliability as in Eq. 1:
$$\begin{aligned} \rho _A = \max \left( 0, 1-\frac{\sigma ^2_A}{maxVariance} \right) \end{aligned}$$
(1)
The radius of a B circle is related to the distance between its location and its perceiver robots location. As the distance increases, the reliability decreases. Distance is normalized by the \(visionDistanceLimit\) which is the maximum distance for perceiving a teammate visually as given in Eq. 2:
$$\begin{aligned} \rho _B = \rho _A \cdot \left( 1- \left( \frac{\text {distance}_{A,B}}{visionDistanceLimit} \right) ^2 \right) \end{aligned}$$
(2)
The radius of a circle is proportional to the reliability value \(\rho \). So, robots with low variance form larger A and B circles. In this way, the intersection possibility of reliable data increases. Initially, we construct A circles for each robots self location estimate and B circles for their perceived teammates as shown in Fig. 1.
Map Merging. After the construction of the circles, we may notice that some circles overlap as seen Figure in 1. We have to merge them in order to have one consistent world model. Binary merging of circles continues until there are no intersecting circles. In order to merge two circles, the following conditions have to be satisfied:
-
They have to be perceived by different robots. This ensures that we do not see two robots, which are close, as a single robot.
-
At most one of them may be an A circle. This ensures that we do not merge two different robot positions as one.
The Merging Process: The merging process goes through the following steps:
-
1.
The new center is the center of mass of the two circles. The coordinates of the center is given in Eq. 3.
$$\begin{aligned} x_{\text {merged}} = \frac{(x_{c1} \cdot \text {area}_{c1} + x_{c2} \cdot \text {area}_{c2})}{ \text {area}_{c1} + \text {area}_{c2}}\nonumber \\ y_{\text {merged}} = \frac{(y_{c1} \cdot \text {area}_{c1} + y_{c2} \cdot \text {area}_{c2})}{ \text {area}_{c1} + \text {area}_{c2}} \end{aligned}$$
(3)
-
2.
New reliability is calculated as in Eq. 4. It is the probability that at least one of the circles is in the correct position. Therefore, the merged circle is more reliable than its constructor circles.
$$\begin{aligned} \rho _{\text {merged}} = 1 - (1 - \rho _{c1}) \cdot (1 - \rho _{c2}) \end{aligned}$$
(4)
-
3.
A circles which perceive these two circles start to perceive the new one instead of them.
-
4.
If one of the merged circles is an A circle, the new circle perceives the circles which were perceived by the A circle before.
-
5.
Constructor circles are deleted.
-
6.
Finally, reliabilities of the circles which perceive a merged circle increase such that they have reliabilities greater than or equal to the merged circle’s reliability. Reliabilities of the other B circles which do not participate in merging also increase when the reliabilities of A circles which perceive them increase. Consensuses between robots lead to more reliable robots.
After all intersected circles are merged; A circles with higher reliability than a certain threshold are converted to O circles as seen in Fig. 2. Map merging algorithm is given in Algorithm 1.
Occupying Circles Based on the Bounty System. We want our players to occupy a circle which suits best for them. The best is selected based on the following three criteria. For each player which has not occupied any circle yet, we give bounty points to possible locations it can occupy. These locations are the A circle itself and B circles which are not perceived by this circle. Pairs \((\text {player}_i, \text {circle}_j)\) gain bounty points based on the reliability of the circle. We developed following metrics to assess reliability of a circle:
-
Bounty by Distance: Pairs gain bounty points related to the distance between \(\text {circle}_i\) and \(\text {circle}_j\). Circles which are close to the current A circle gain more bounty points. In other words, there is a negative correlation between the distance to the A circle and the bounty points. This rewards the circles which are near to the location estimated by the robot itself. The A circle centered at the estimated location of the robot gets the highest bounty as in Eq. 5.
$$\begin{aligned} \text {bounty}_{i,j} = \text {bounty}_{i,j} + \text {BOUNTY}_{dist} \cdot \left( 1 - \frac{\text {dist}(c_i, c_j)}{\text {normalizer}}\right) \end{aligned}$$
(5)
-
Bounty by Reliability: Circles gain bounty points with respect to their reliability points. There is a positive correlation between the bounty points and reliabilities as in Eq. 6
$$\begin{aligned} \text {bounty}_{i,j} = \text {bounty}_{i,j} + \text {BOUNTY}_{reliability} \cdot \text {reliability}_j \end{aligned}$$
(6)
-
Bounty by Visibility: We check candidate circles whether they are in the line-of-sight of occupied circles and they are not perceived by them. If this is the case, the circle loses bounty points. The magnitude of the loss depends on the visibility distribution which is calculated by Eq. 7. If the circle is in the line-of-sight of more than one occupied circle, losses are summed. (Actually, all circles gain visibility points, no one loses but they lose relative to the others’ gains.) The visibility bounty point is calculated by Eq. 8.
$$\begin{aligned} \text {visibility}(k,j) = \left( 1 - \frac{\text {dist}(c_k, c_j)}{visionDistanceLimit}\right) \cdot \left( 1 - \frac{|c_k.headOrientation - \text {slope}(c_k, c_j)|}{visionDegreeLimit} \right) \end{aligned}$$
(7)
$$\begin{aligned} \text {bounty}_{i,j} = \text {bounty}_{i,j} + \text {BOUNTY}_{visibility} \cdot \left( 1 - \sum _{k \in O} \text {visibility}(k,j)\right) \end{aligned}$$
(8)
After these operations, the pair with the biggest bounty is found. (This bounty should be above a certain limit.) If the circle is one of the B circles, the A circle which represents this player moves to this B circle. All the circles perceived by the A circle also move. The circle is converted to an O circle for this player. The process given in Algorithm 2 repeats until it cannot generate an O circle.
By this method, the robots select the best circles for themselves whenever they can. Being close to the robot’s estimated position, high possibility of having a robot on it and low possibility of visibility contradictions makes a circle the best choice as seen in Fig. 3. One can tune the bounty coefficients to have better results. For example; if the bounty coefficient of distance is too small compared to others, it may cause “teleportation” situations.
Rotation Correction. After these procedures, if there are some robots which perceive at least one B circle which is not perceived by the others, we can say that this robot may have incorrect knowledge of its orientation. Then we try to rotate it between \(-\theta \) and \(+\theta \) degrees. The orientation which causes the maximum number of intersections for the circles perceived by the robot becomes the suggested orientation for the robot.
After rotation correction, circles are again merged until there is no intersection as seen in Fig. 4. If there are still B circles which are perceived by only one O circle, this O circle is converted back to an A circle in order to prevent misleading localization information, because these circles may have true positions but faulty orientations.
Combining with Monte Carlo Localization. If a robot can occupy a circle at the end of the Multi-Robot Localization process, this circle is used in self-localization of the robot. Since the self-localization is a Monte Carlo Localization, we inject some particles around the center of the circle. These particles are constructed by adding 2D Quasi-Gaussian noise to the center. Quasi-Gaussian particles are preferred to Gaussian ones, because a previous work [8] has shown that quasi-random numbers have great advantage over actual random numbers in localization. Figure 5 illustrates the difference between Gaussian and Quasi-Gaussian distributions used in this study.
These particles are injected just after the resampling process. The number of injected particles is proportional to the reliability (i.e. radius) of the circle. Orientation of each injected particle is a Gaussian random number with the circle’s orientation as a mean. Since we claim that we inject particles to the real position with the real orientation, these particles gain weights by observations. After resampling, more particles will be sampled from these particles due to their large weights. By this method, we expect to see particles converging to the real position of the robot after a few steps.