---
title: 'DANCeRS: Consensus in Robot Swarms'
url: https://www.emergentmind.com/topics/dancers
type: topic
---

# DANCeRS: Consensus in Robot Swarms

Searching arXiv for the named system and closely related work on distributed swarm consensus, factor graphs, and Gaussian belief propagation.
DANCeRS is a distributed consensus and coordination framework for robot swarms that uses Gaussian Belief Propagation on factor graphs to unify consensus in continuous and discrete decision spaces [2508.18153]. In the formulation introduced in "DANCeRS: A Distributed Algorithm for Negotiating Consensus in Robot Swarms with Gaussian Belief Propagation" [2508.18153], a swarm is represented as a factor graph and robots rely on purely peer-to-peer message passing to achieve agreement on global behavior while operating under local communication constraints. The framework is presented through two applications: shape formation with path planning and collision avoidance, and consensus over a set of discrete decisions [2508.18153].

## 1. Definition and scope

DANCeRS stands for **Distributed Algorithm for Negotiating Consensus in Robot Swarms with Gaussian Belief Propagation** [2508.18153]. It is described as a **general, fully distributed consensus and coordination framework for robot swarms**, built on **Gaussian Belief Propagation (GBP)** over **factor graphs**, and explicitly designed to unify consensus over **continuous** global quantities and **discrete** choices within a single mathematical and algorithmic structure [2508.18153].

The central problem is to enable a swarm of \(N\) robots to agree on a global parameter \(\chi\), jointly plan trajectories that respect non-holonomic dynamics and avoid collisions, and reach agreement on a discrete choice when needed [2508.18153]. The method does so by representing swarm state and coupling constraints as a factor graph, running GBP in a peer-to-peer and asynchronous way, using Lie-group GBP for continuous consensus on manifolds such as \(SE(2)\), and embedding discrete decisions into a continuous latent space so they can be handled by the same inference machinery [2508.18153].

A defining feature of the framework is that it does not treat consensus in discrete and continuous spaces as separate problems. This suggests a more unified view of swarm coordination in which formation pose agreement, trajectory coordination, and best-of-\(N\) decision making can be expressed through the same factor-graph formalism [2508.18153].

## 2. Factor-graph and GBP formulation

At any time \(t\), the swarm is modeled as a sparse undirected communication graph
\[
G = (V, E), \quad V = \{V_i\}_{i=0}^{N-1},
\]
where an edge \(E_{ij} \in E\) exists if
\[
\|\mathbf{x}_i - \mathbf{x}_j\| < r_C,
\]
with \(r_C\) the communication radius [2508.18153].

Each robot maintains a local **factor graph stack** with two layers [2508.18153]:

| Layer | Variables | Purpose |
|---|---|---|
| Global Consensus Layer \(\mathcal{G}\) | \({}^{G}X_{i,-k} \in \mathcal{M}\) | Consensus on a global parameter |
| Path Planning Layer \(\mathcal{P}\) | \({}^{P}X_{k,i}\) | Local trajectory optimisation |

The Global Consensus Layer contains a sliding window of robot \(i\)'s belief about the global parameter \(\chi\), together with prior, inter-robot consensus, and temporal factors [2508.18153]. The Path Planning Layer contains planned states over a horizon, along with dynamics factors, a unicycle model factor, and inter-robot collision avoidance factors [2508.18153].

The joint distribution over all variables is factorized as
\[
p(\mathbf{X}) = \prod_s f_s(\mathbf{X}_s),
\]
with each factor taking Gaussian form
\[
f_s(\mathbf{X}_s) \propto \exp\left( -\frac{1}{2} \mathbf{r}_s^\top \Lambda_s \mathbf{r}_s \right),
\]
where
\[
\mathbf{r}_s = \mathbf{z}_s - h_s(\mathbf{X}_s)
\]
and \(\Lambda_s\) is the precision matrix [2508.18153].

Beliefs and messages are represented in information form:
\[
b(x_k) = \mathcal{N}^{-1}(x_k; \eta_k, \Lambda_k),
\]
where \(\Lambda_k = \Sigma_k^{-1}\) and \(\eta_k = \Lambda_k \mu_k\) [2508.18153]. Messages passed between factor and variable nodes are likewise Gaussians in information form [2508.18153].

For variables in Lie groups such as \(SE(2)\), the Gaussian belief lives on the tangent space, and residuals use the right-minus operation
\[
x_i \ominus x_j = \operatorname{Log}(x_j^{-1} \cdot x_i),
\]
so that consensus over pose variables can be handled by Lie-group GBP rather than Euclidean averaging [2508.18153].

## 3. Consensus mechanisms

### Continuous consensus

For continuous consensus, each robot holds a local estimate \({}^{G}X_i \in \mathcal{M}\) of a global quantity \(\chi\) [2508.18153]. Consensus is enforced through three classes of factors [2508.18153].

The **prior factor** anchors robot \(i\)'s belief to its initial estimate:
\[
f_p: \quad h_p({}^{G}X_i) = {}^{G}X_i \ominus {}^{G}x_i^0.
\]

The **inter-robot consensus factor** couples neighboring robots:
\[
f_c: \quad h_c({}^{G}X_i, {}^{G}X_j) = {}^{G}X_i \ominus {}^{G}X_j = \operatorname{Log}\left({}^{G}X_j^{-1} \cdot {}^{G}X_i\right).
\]

The **temporal factor** links consecutive consensus-window variables and preserves past consensus information during disconnections [2508.18153].

Through GBP, neighboring robots’ beliefs are iteratively pulled toward each other and toward prior structure. The sliding window and temporal factors are especially important in dynamic communication graphs, because they allow robots to retain consensus information when links disappear and reappear [2508.18153].

### Discrete consensus

For discrete decisions, DANCeRS chooses \(\mathcal{M} = \mathbb{R}\) and maps discrete options into \([0,1]\) with the quantization function
\[
\gamma: [0,1] \to \{0,\ldots,N_D-1\}, \quad \gamma(x) = \left\lfloor N_D \cdot x \right\rfloor,
\]
with inverse
\[
\gamma^{-1}(k) = \frac{k}{N_D}, \quad k = 0,\ldots,N_D-1
\]
[2508.18153].

A robot’s initial discrete decision \(X_{i,d}\) becomes a prior via
\[
z_p = \gamma^{-1}(X_{i,d}),
\]
and the prior factor is
\[
f_p: h_p({}^{G}X_i) = {}^{G}X_i - z_p.
\]

Inter-robot agreement in the discrete setting is enforced by the scalar factor
\[
h_c({}^{G}X_i, {}^{G}X_j) = {}^{G}X_i - {}^{G}X_j
\]
[2508.18153]. After GBP converges, the continuous consensus value is mapped back to a discrete decision by \(\gamma({}^{G}X_i)\) [2508.18153].

This suggests that discrete consensus in DANCeRS is a continuous relaxation solved by Gaussian inference rather than a separate categorical protocol [2508.18153].

## 4. Robot-local algorithm and communication model

DANCeRS is purely peer-to-peer: robots maintain local variables and factors, exchange small Gaussian messages with neighbors, and never construct the global factor graph centrally [2508.18153]. Each robot maintains a “webpage” that stores outgoing messages for neighbors’ variables and factors [2508.18153].

At runtime, a robot updates its neighborhood using the communication radius \(r_C\), adds inter-robot consensus and collision-avoidance factors when new robots enter range, deletes them when robots leave range, and runs a fixed number \(N_I\) of GBP iterations in each layer [2508.18153]. After message passing, it updates the current and horizon path variables and slides the Global Consensus window by deleting the oldest variable, creating a new variable, and attaching a new temporal factor and prior [2508.18153].

The framework is therefore asynchronous and distributed by construction. Its computational and communication costs scale with local degree and variable dimension rather than with total swarm size, which is presented as one basis for its scalability [2508.18153].

## 5. Shape formation, path planning, and collision avoidance

One of the paper’s two principal applications is shape formation in a \(100 \times 100\) m\(^2\) environment using robots of radius 1 m and non-holonomic unicycle dynamics [2508.18153]. The swarm is assumed to know a canonical formation shape defined by \(N_F\) points \(q_m \in \mathbb{R}^2\), with minimum spacing \(r_S\), and must agree on the global pose of this formation while planning collision-free trajectories to occupy those points [2508.18153].

The formation pose is represented in \(SE(2)\) by
\[
{}^{G}X_{i,0} = \operatorname{Exp}\left(\begin{bmatrix} x_{i,0} & y_{i,0} & \theta_{i,0} \end{bmatrix}\right) \in SE(2)
\]
[2508.18153]. A canonical formation point \(p\) is transformed to the global frame through
\[
p' = {}^{G}X_{i,0} \circ p,
\]
and inverse transformation is given by
\[
p = {}^{G}X_{i,0}^{-1} \circ p'
\]
[2508.18153].

The path-planning state is
\[
{}^{P}X_{k,i} = [x, y, \theta, \dot{x}, \dot{y}, \dot{\theta}]^\top
\]
[2508.18153]. The **unicycle model factor** enforces non-holonomic motion through
\[
f_u: \quad h_u({}^{P}X_{k,i}) = \dot{x} \cos(\theta) - \dot{y} \sin(\theta)
\]
[2508.18153]. Collision avoidance between robots \(i\) and \(j\) at horizon step \(k\) is modeled by the factor
\[
f_r: \quad h_r({}^{P}X_{k,i}, {}^{P}X_{k,j}) = \exp\left(-\frac{| \mathbf{x}_{k,i} - \mathbf{x}_{k,j} |}{d_{\min}}\right),
\]
where \(\mathbf{x}_{k,i} = (x_{k,i}, y_{k,i})\) and \(d_{\min}\) is the minimum separation distance [2508.18153].

DANCeRS also introduces an **occupancy weighting** mechanism for selecting formation points. Each formation point \(q_{i,m}\) is augmented with an occupancy weight \(\tau_{i,m}\),
\[
\tilde{q}_{i,m} = [q_{i,m}^\top,\, \tau_{i,m}]^\top \in \mathbb{R}^3,
\]
and stored in a KD-tree to support fast nearest-neighbor queries in 3D [2508.18153]. The weights are increased for occupied points, decreased over time, and used to bias each robot toward nearby, low-occupancy targets [2508.18153]. The chosen point is then mapped back into the global frame to define the motion goal [2508.18153].

The paper reports that this occupancy-aware selection, combined with GBP-based planning, enables formation assembly even for shapes with disconnected components such as a “wifi” symbol, an exclamation mark, and a smiley face [2508.18153].

## 6. Experimental results and performance

For continuous consensus and shape formation, DANCeRS is evaluated in a \(100 \times 100\) m\(^2\) environment with factor strengths \(\sigma_u = 0.001\), \(\sigma_d = 0.1\), \(\sigma_r = 0.01\), a consensus prior \(\boldsymbol{\sigma}_p = [10, 10, \pi]\), a sliding window \(W = 3\), update interval \(T_S = 1\), and \(N_I = 2\) GBP iterations per timestep [2508.18153]. Fifty trials are run per condition [2508.18153].

The paper defines convergence for formation parameters as mean inter-robot deviation in formation position belief below 0.1 m and heading deviation below 0.01 rad [2508.18153]. On this basis, DANCeRS is reported to achieve **order-of-magnitude faster convergence** than the mean-shift based distributed consensus method of Sun et al. 2023, with convergence improving as communication radius \(r_C\) and number of robots \(N_R\) increase [2508.18153]. The sliding window also reduces the number of iterations to consensus, especially under sparse connectivity [2508.18153].

For discrete decision making, robots are placed in a triangular grid with minimum spacing 5 m, initial random decisions in \(\{0,\ldots,N_D-1\}\), and communication radius \(r_C\) varied in steps of 6 m [2508.18153]. DANCeRS is compared to ECA and PCA [2508.18153]. The reported results show that as \(r_C\) increases, DANCeRS requires fewer iterations; for larger \(r_C\), convergence iterations remain nearly constant as swarm size grows [2508.18153]. ECA is reported to fail to converge at \(r_C = 6\) m, while PCA converges but relies on assumptions the paper characterizes as unrealistic for dynamic networks [2508.18153].

The paper also studies the effect of the consensus factor strength \(\sigma_c\) and reports that a useful upper bound is approximately
\[
\sigma_c \approx \frac{0.5}{N_D}
\]
for discrete consensus [2508.18153]. In a sparse-network experiment with \(N_R = 500\), \(r_C = 6\) m, and a fraction \(\zeta\) of informed robots given strong priors with \(\sigma_p = 10^{-10}\), DANCeRS converges in 80–100% of trials for all tested \(\zeta\) values, while ECA converges in 0% of trials and PCA requires higher seed density to reach comparable success [2508.18153].

## 7. Scalability, robustness, and limitations

The framework emphasizes four system-level properties: **scalability**, **robustness in dynamic graphs**, **purely peer-to-peer communication**, and a **unified treatment of consensus and planning** [2508.18153]. Message dimensionality is equal to the variable dimension, such as 3 for \(SE(2)\) and 1 for discrete consensus, and each robot optimizes only over its local factor graph [2508.18153]. This suggests that DANCeRS is intended for large swarms and low-power platforms where centralized optimization would be impractical.

The paper nevertheless identifies several limitations and assumptions [2508.18153]. The factors are Gaussian or linearized to Gaussian form, so strongly non-linear or non-Gaussian behavior may reduce fidelity [2508.18153]. The continuous formulation assumes access to Lie-group operations such as exponential and logarithm maps [2508.18153]. Static formation shapes require robots to store all formation points, which can be memory-intensive for large shapes [2508.18153]. Discrete consensus assumes a fixed number of options \(N_D\), and the current formulation is not directly adaptive to dynamically changing discrete sets [2508.18153]. The framework also inherits the approximate character of loopy GBP on cyclic graphs, so convergence quality depends on factor strengths and graph structure [2508.18153].

The paper suggests extensions including non-Gaussian beliefs, more expressive encodings of discrete decisions, heterogeneous robot teams, dynamic decision spaces, and real-world deployment under lossy communications and limited compute [2508.18153]. A plausible implication is that DANCeRS is best understood not as a single-purpose consensus routine, but as a general inference substrate for swarm coordination problems that can be enlarged as the factor graph is enriched [2508.18153].

## 8. Position within the literature

DANCeRS is presented as a unified alternative to approaches that treat consensus in discrete and continuous decision spaces as distinct problems [2508.18153]. It is grounded in Gaussian Belief Propagation and factor-graph inference, and its two showcased applications—shape formation with path planning and collision avoidance, and consensus over discrete decisions—are intended to demonstrate the breadth of that formulation [2508.18153].

In that sense, DANCeRS differs sharply from the dance-generation and dance-analysis systems that share a superficially similar acronym or title fragment elsewhere in recent arXiv literature, such as DANCER for pose-guided single-person dance video synthesis [2510.27169] or group choreography generators based on diffusion models [2310.18986, 2403.06189]. Those systems address visual synthesis or choreography generation, whereas DANCeRS addresses swarm consensus and distributed multi-robot coordination [2508.18153].

The paper’s central contribution is therefore algorithmic rather than performative: it reinterprets swarm agreement, motion planning, and discrete choice as local inference in a dynamic factor graph, solved by Gaussian message passing [2508.18153].

Source: https://www.emergentmind.com/topics/dancers