pub fn solve_graph_consensus(
config: AdmmConfig,
agents: &[AgentSpec],
edges: &[(usize, usize)],
) -> RoboticsResult<GraphConsensusReport>Expand description
Solve formation consensus decentralized over a communication graph, where each agent exchanges only with its graph neighbors (no global average).
This is the standard edge-based decentralized ADMM for
minimize sum_i (w_i/2)||x_i - a_i||^2 s.t. x_i - offset_i = x_j - offset_j
for every edge (i, j). Each agent keeps an aggregated dual alpha_i over
its incident edges and updates
y_i = (w a_i' - alpha_i + rho * sum_{j in N_i}(y_i + y_j)) / (w + 2 rho deg_i)
using only neighbor values y_j (with a_i' = a_i - offset_i and the
position recovered as x_i = y_i + offset_i, projected onto the box). On a
connected graph it converges to the same weighted-average consensus as the
centralized solver; the convergence rate is set by the graph connectivity.