Chapter 15: Swarm Robotics
Lesson 3: Collective Transport and Construction
This lesson develops rigorous models and control laws for groups of simple robots that cooperatively transport heavy objects and assemble structures using only local sensing and communication. We connect rigid-body mechanics and graph-theoretic load sharing with stigmergic construction rules, and provide multi-language implementations of simplified collective transport controllers.
1. Conceptual Overview
Collective transport refers to a swarm of robots manipulating and moving a common object that is too large or heavy for a single robot. The object is modeled as a planar rigid body with configuration \( q_o = (x_c, y_c, \theta) \) and mass/inertia \( m, I \). A set of robots \( i = 1,\dots,N \) exert contact forces \( \mathbf{F}_i \in \mathbb{R}^2 \) at positions \( \mathbf{r}_i \in \mathbb{R}^2 \) expressed in the object frame.
Collective construction concerns building a structure (e.g., a wall, a 2D shape, or a 3D lattice) by depositing modular elements (bricks) on a discrete set of sites. Each robot follows local rules based on nearby occupancy and markers, producing a desired global structure through emergent behavior.
In this lesson we will:
- Derive object-level motion equations under multi-robot contact and friction constraints.
- Design object-level controllers and distribute loads across robots using graph-Laplacian dynamics.
- Formalize construction rules as constrained Markov processes over discrete structures.
- Implement a simple multi-robot transport controller in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica.
flowchart TD
S["Start with many simple robots"] --> O["Detect heavy object / build sites"]
O --> A["Approach and surround object or frontier"]
A --> F["Agree on reference direction and desired motion"]
F --> L["Distributed load allocation among robots"]
L --> T["Transport object toward goal region"]
T --> C1["Select construction site on frontier"]
C1 --> C2["Place element and update local markers"]
C2 --> REND["Repeat until target structure is completed"]
2. Mechanics of Collective Transport
We model the object as a planar rigid body with center-of-mass (CoM) position \( \mathbf{c} = (x_c, y_c)^\top \) and orientation \( \theta \). Robot \( i \) applies a contact force \( \mathbf{F}_i \) at point \( \mathbf{r}_i \) in the object frame (with origin at CoM). The net force and torque about the CoM are
\[ \mathbf{F}_{\text{net}} = \sum_{i=1}^N \mathbf{F}_i, \quad \tau_{\text{net}} = \sum_{i=1}^N \mathbf{r}_i \times \mathbf{F}_i. \]
In planar motion we may represent \( \mathbf{r}_i = (r_{ix}, r_{iy})^\top \) and \( \mathbf{F}_i = (F_{ix}, F_{iy})^\top \), so the scalar torque is
\[ \tau_{\text{net}} = \sum_{i=1}^N (r_{ix} F_{iy} - r_{iy} F_{ix}). \]
The planar rigid-body dynamics are
\[ m \ddot{\mathbf{c}} = \mathbf{F}_{\text{net}}, \qquad I \ddot{\theta} = \tau_{\text{net}}. \]
For heavy objects on high-friction surfaces, quasi-static assumptions often hold: inertial terms are small relative to friction forces. A simple model is
\[ \mathbf{F}_{\text{net}} - \mathbf{F}_{\text{fric}}(\dot{\mathbf{c}}) \approx \mathbf{0}, \quad \tau_{\text{net}} - \tau_{\text{fric}}(\dot{\theta}) \approx 0. \]
2.1 Contact parameterization and friction cones
We decompose each contact force along a normal \( \mathbf{n}_i \) and tangential direction \( \mathbf{t}_i \):
\[ \mathbf{F}_i = \lambda_i^n \mathbf{n}_i + \lambda_i^t \mathbf{t}_i, \]
with Coulomb friction constraints
\[ \lambda_i^n \ge 0, \qquad \left|\lambda_i^t\right| \le \mu_i \lambda_i^n. \]
The feasible set of contact forces is a friction cone at each contact. For algorithmic purposes, one often linearizes this cone by approximating it with a polygon (e.g., four edges).
2.2 Wrench mapping and load-sharing problem
Assume each robot pushes approximately tangentially to a desired translation direction \( \mathbf{d} \in \mathbb{R}^2 \) with \( \|\mathbf{d}\| = 1 \), so \( \mathbf{F}_i = f_i \mathbf{d} \) with scalar magnitudes \( f_i \ge 0 \). Then
\[ \mathbf{F}_{\text{net}} = \left(\sum_{i=1}^N f_i\right)\mathbf{d}, \quad \tau_{\text{net}} = \sum_{i=1}^N f_i \left(r_{ix} d_y - r_{iy} d_x\right). \]
Define the wrench vector and the wrench mapping matrix
\[ \mathbf{w} = \begin{bmatrix} F_x \\[0.3em] F_y \\[0.3em] \tau \end{bmatrix}, \quad \mathbf{A} = \begin{bmatrix} d_x & \dots & d_x \\ d_y & \dots & d_y \\ r_1^\perp \cdot \mathbf{d} & \dots & r_N^\perp \cdot \mathbf{d} \end{bmatrix}, \quad \mathbf{f} = \begin{bmatrix} f_1 \\ \vdots \\ f_N \end{bmatrix}, \]
where \( r_i^\perp = (-r_{iy}, r_{ix})^\top \) and \( r_i^\perp \cdot \mathbf{d} = r_{ix} d_y - r_{iy} d_x \). Then
\[ \mathbf{w} = \mathbf{A}\mathbf{f}. \]
Given a desired wrench \( \mathbf{w}_d \) at the object level (e.g., from a feedback controller), the load-sharing problem is to find \( \mathbf{f} \) such that \( \mathbf{A}\mathbf{f} = \mathbf{w}_d \), respecting non-negativity and friction constraints.
2.3 Minimum-norm load sharing
If we temporarily ignore inequality constraints and assume \( \mathbf{A} \) has full row rank (3), the minimum-norm solution to \( \mathbf{A}\mathbf{f} = \mathbf{w}_d \) is
\[ \mathbf{f}^\star = \mathbf{A}^\top (\mathbf{A}\mathbf{A}^\top)^{-1}\mathbf{w}_d. \]
Sketch of proof. Consider the optimization problem
\[ \min_{\mathbf{f}} \tfrac{1}{2}\|\mathbf{f}\|^2 \quad \text{s.t.} \quad \mathbf{A}\mathbf{f} = \mathbf{w}_d. \]
The Lagrangian is \( \mathcal{L}(\mathbf{f},\boldsymbol{\lambda}) = \tfrac{1}{2}\|\mathbf{f}\|^2 + \boldsymbol{\lambda}^\top(\mathbf{A}\mathbf{f} - \mathbf{w}_d) \). Stationarity in \( \mathbf{f} \) yields \( \mathbf{f} + \mathbf{A}^\top \boldsymbol{\lambda} = 0 \), hence \( \mathbf{f} = -\mathbf{A}^\top \boldsymbol{\lambda} \). Enforcing the constraint:
\[ \mathbf{A}\mathbf{f} = -\mathbf{A}\mathbf{A}^\top \boldsymbol{\lambda} = \mathbf{w}_d \quad \Rightarrow \quad \boldsymbol{\lambda}^\star = -(\mathbf{A}\mathbf{A}^\top)^{-1}\mathbf{w}_d. \]
Substituting back gives \( \mathbf{f}^\star = \mathbf{A}^\top (\mathbf{A}\mathbf{A}^\top)^{-1}\mathbf{w}_d \). This is the unique solution of minimum Euclidean norm.
3. Distributed Load Sharing via Graph Laplacians
The solution \( \mathbf{f}^\star \) above requires centralized computation. In a swarm, robots have limited communication and should adjust their loads using local neighbor information. We model robot communication by an undirected, connected graph \( \mathcal{G} = (\mathcal{V}, \mathcal{E}) \) with \( |\mathcal{V}| = N \). The (weighted) Laplacian \( \mathbf{L} \in \mathbb{R}^{N \times N} \) is
\[ L_{ij} = \begin{cases} \sum\limits_{k \in \mathcal{N}_i} a_{ik} & \text{if } i=j, \\[0.7em] -a_{ij} & \text{if } i \neq j \text{ and } (i,j)\in \mathcal{E}, \\[0.3em] 0 & \text{otherwise}, \end{cases} \]
where \( a_{ij} > 0 \) is the weight of edge \( (i,j) \).
3.1 Consensus-based force allocation
Suppose an object-level controller prescribes a desired net force magnitude \( F_d > 0 \), with robots aligned along a common direction \( \mathbf{d} \) (e.g., the direction from object to goal). A natural choice is to split the load equally: \( f_i^{\text{ref}} = F_d / N \). Define the vector \( \mathbf{f} = (f_1,\dots,f_N)^\top \) and the error \( \mathbf{g} = \mathbf{f} - (F_d/N)\mathbf{1} \). Consider the distributed dynamics
\[ \dot{\mathbf{f}} = -\alpha \mathbf{L}\mathbf{f} - \beta \left(\mathbf{f} - \tfrac{F_d}{N}\mathbf{1}\right), \]
where \( \alpha,\beta > 0 \). In terms of \( \mathbf{g} \),
\[ \dot{\mathbf{g}} = -\alpha \mathbf{L}\mathbf{g} - \beta \mathbf{g} = -(\alpha \mathbf{L} + \beta \mathbf{I})\mathbf{g}. \]
3.2 Lyapunov analysis
Let \( V(\mathbf{g}) = \tfrac{1}{2}\mathbf{g}^\top \mathbf{g} \). Then
\[ \dot{V} = \mathbf{g}^\top \dot{\mathbf{g}} = -\mathbf{g}^\top(\alpha \mathbf{L} + \beta \mathbf{I})\mathbf{g} = -\alpha \mathbf{g}^\top \mathbf{L}\mathbf{g} - \beta \|\mathbf{g}\|^2. \]
For a connected undirected graph, \( \mathbf{L} \) is symmetric positive semidefinite with eigenvalues \( 0 = \lambda_1 < \lambda_2 \le \dots \le \lambda_N \), and \( \mathbf{g}^\top \mathbf{L}\mathbf{g} \ge 0 \). Hence
\[ \dot{V} \le -\beta \|\mathbf{g}\|^2. \]
By comparison with the scalar system \( \dot{z} = -2\beta z \), we obtain \( \|\mathbf{g}(t)\|^2 \le e^{-2\beta t}\|\mathbf{g}(0)\|^2 \), i.e. exponential convergence to \( \mathbf{g} = \mathbf{0} \). Therefore each robot's force converges to \( F_d/N \) while preserving the total force sum.
To incorporate friction or maximum torque limits, each robot projects its local update onto the feasible interval \( f_i \in [0, f_{i,\max}] \), where \( f_{i,\max} \) is derived from contact friction and motor constraints.
4. Collective Construction as Local Rules on a Lattice
We represent the workspace as a finite set of discrete sites \( \mathcal{S} = \{1,\dots,M\} \). Each site can be empty or occupied. Let \( x_i \in \{0,1\} \) indicate occupancy of site \( i \), and define the configuration vector \( \mathbf{x} = (x_1,\dots,x_M)^\top \). A desired target structure is a set \( \mathcal{S}_\star \subseteq \mathcal{S} \), or equivalently a target vector \( \mathbf{x}_\star \in \{0,1\}^M \).
4.1 Precedence constraints and dependency graph
Physical stability or design requirements are encoded as a directed acyclic graph (DAG) \( \mathcal{G}_{\text{dep}} = (\mathcal{S}_\star, \mathcal{E}_{\text{dep}}) \), where an edge \( (j \to i) \) means that site \( i \) may be filled only after \( j \) is filled. For example, in a 2D vertical wall, each brick may require that the brick below it and possibly neighbors are already present.
Let \( \text{Pred}(i) \) denote the set of predecessors of site \( i \). A site \( i \in \mathcal{S}_\star \) is said to be enabled in configuration \( \mathbf{x} \) if
\[ x_i = 0, \quad x_j = 1 \; \forall j \in \text{Pred}(i). \]
Robots move over the lattice and may fill any currently enabled site when carrying a brick.
4.2 Stochastic local rules and Markov chains
Consider a simple stochastic rule for a single robot with a supply of bricks:
- Move randomly until an enabled site is found.
- Place a brick at that site.
- Repeat until no enabled site exists.
The global configuration \( \mathbf{x}(k) \) at step \( k \) forms a Markov chain on state space \( \{0,1\}^M \). Because the dependency graph is acyclic and bricks are never removed, any transition strictly increases the number of occupied sites, and the process must terminate in finite time.
Let \( \mathcal{X}_\star \) denote the set of states where all sites in \( \mathcal{S}_\star \) are filled and no additional sites can be filled (because they are not in the desired structure). Then any \( \mathbf{x}_\star \in \mathcal{X}_\star \) is an absorbing state. One can show:
\[ \Pr\left[\exists k : \mathbf{x}(k) = \mathbf{x}_\star \mid \mathbf{x}(0) = \mathbf{0}\right] = 1 \quad \text{for some } \mathbf{x}_\star \in \mathcal{X}_\star. \]
That is, the construction terminates almost surely in a valid structure that respects the precedence graph, even though each robot uses only local information.
To bias the construction toward a unique target structure, one can add local markers or potential functions that modify the transition probabilities over enabled sites, leading to an absorbing Markov chain with a single absorbing configuration.
5. Multi-Language Implementation of a Simple Transport Controller
We now implement a simplified collective transport controller. The object CoM position is \( \mathbf{c} \), the goal is \( \mathbf{c}_g \), and the object-level control law is
\[ \mathbf{F}_d = -k_p(\mathbf{c} - \mathbf{c}_g) - k_v \dot{\mathbf{c}}, \]
with gains \( k_p,k_v > 0 \). Robots align with \( \mathbf{d} = \mathbf{F}_d / \|\mathbf{F}_d\| \) and share the scalar load magnitude using the consensus law of Section 3. For simplicity we ignore torque control and assume symmetric placement of robots so that \( \tau_{\text{net}} \approx 0 \).
Below, we provide vectorized or object-oriented code for Python, C++,
Java, MATLAB/Simulink, and Mathematica. In practice, these controllers
would be integrated with simulation or middleware libraries such as
pybullet or ROS 2 (rclcpp,
geometry_msgs), ROSJava, MATLAB Robotics System Toolbox, or
appropriate physics engines.
5.1 Python (NumPy, optional ROS/pybullet integration)
import numpy as np
class CollectiveTransport2D:
def __init__(self, N, kp=2.0, kv=0.5, alpha=1.0, beta=1.0, mass=10.0, dt=0.01):
self.N = N
self.kp = kp
self.kv = kv
self.alpha = alpha
self.beta = beta
self.m = mass
self.dt = dt
# Object state
self.c = np.zeros(2) # position
self.v = np.zeros(2) # velocity
self.goal = np.array([1.0, 0.0])
# Robot forces along a common direction d
self.f = np.ones(N) * (1.0 / N)
# Simple ring communication graph
self.L = self._ring_laplacian(N)
def _ring_laplacian(self, N):
L = np.zeros((N, N))
for i in range(N):
L[i, i] = 2.0
L[i, (i - 1) % N] = -1.0
L[i, (i + 1) % N] = -1.0
return L
def step(self):
# Object-level PD control
e = self.c - self.goal
Fd = -self.kp * e - self.kv * self.v
normFd = np.linalg.norm(Fd)
if normFd < 1e-6:
return # already at goal
d = Fd / normFd
Fd_mag = normFd
# Distributed force allocation
g = self.f - (Fd_mag / self.N) * np.ones(self.N)
g_dot = -self.alpha * self.L.dot(g) - self.beta * g
self.f += g_dot * self.dt
# Enforce non-negativity and simple saturation
self.f = np.clip(self.f, 0.0, 5.0)
# Net force on object
F_net = d * np.sum(self.f)
# Update object state (simple Euler integration)
a = F_net / self.m
self.v += a * self.dt
self.c += self.v * self.dt
if __name__ == "__main__":
sim = CollectiveTransport2D(N=6)
for k in range(1000):
sim.step()
if np.linalg.norm(sim.c - sim.goal) < 1e-2:
break
print("Final position:", sim.c)
5.2 C++ (Eigen, ROS 2-ready structure)
#include <Eigen/Dense>
#include <vector>
#include <iostream>
class CollectiveTransport2D {
public:
CollectiveTransport2D(int N, double kp, double kv,
double alpha, double beta,
double mass, double dt)
: N_(N), kp_(kp), kv_(kv),
alpha_(alpha), beta_(beta),
m_(mass), dt_(dt)
{
c_.setZero();
v_.setZero();
goal_ << 1.0, 0.0;
f_ = Eigen::VectorXd::Ones(N_) / static_cast<double>(N_);
L_ = ringLaplacian(N_);
}
void step() {
Eigen::Vector2d e = c_ - goal_;
Eigen::Vector2d Fd = -kp_ * e - kv_ * v_;
double normFd = Fd.norm();
if (normFd < 1e-6) return;
Eigen::Vector2d d = Fd / normFd;
double Fd_mag = normFd;
Eigen::VectorXd g = f_ - (Fd_mag / static_cast<double>(N_)) *
Eigen::VectorXd::Ones(N_);
Eigen::VectorXd gdot = -alpha_ * (L_ * g) - beta_ * g;
f_ += dt_ * gdot;
for (int i = 0; i < N_; ++i) {
if (f_(i) < 0.0) f_(i) = 0.0;
if (f_(i) > 5.0) f_(i) = 5.0;
}
Eigen::Vector2d F_net = d * f_.sum();
Eigen::Vector2d a = F_net / m_;
v_ += dt_ * a;
c_ += dt_ * v_;
}
const Eigen::Vector2d& position() const { return c_; }
private:
Eigen::MatrixXd ringLaplacian(int N) {
Eigen::MatrixXd L = Eigen::MatrixXd::Zero(N, N);
for (int i = 0; i < N; ++i) {
L(i, i) = 2.0;
L(i, (i - 1 + N) % N) = -1.0;
L(i, (i + 1) % N) = -1.0;
}
return L;
}
int N_;
double kp_, kv_, alpha_, beta_, m_, dt_;
Eigen::Vector2d c_, v_, goal_;
Eigen::VectorXd f_;
Eigen::MatrixXd L_;
};
int main() {
CollectiveTransport2D sim(6, 2.0, 0.5, 1.0, 1.0, 10.0, 0.01);
for (int k = 0; k < 1000; ++k) {
sim.step();
}
std::cout << "Final position: " << sim.position().transpose() << std::endl;
return 0;
}
5.3 Java (EJML for linear algebra, ROSJava integration ready)
public class CollectiveTransport2D {
private int N;
private double kp, kv, alpha, beta, m, dt;
private double[] c = new double[2];
private double[] v = new double[2];
private double[] goal = new double[2];
private double[] f;
private double[][] L;
public CollectiveTransport2D(int N, double kp, double kv,
double alpha, double beta,
double mass, double dt) {
this.N = N;
this.kp = kp;
this.kv = kv;
this.alpha = alpha;
this.beta = beta;
this.m = mass;
this.dt = dt;
this.goal[0] = 1.0;
this.goal[1] = 0.0;
this.f = new double[N];
for (int i = 0; i < N; i++) {
f[i] = 1.0 / N;
}
this.L = ringLaplacian(N);
}
private double[][] ringLaplacian(int N) {
double[][] L = new double[N][N];
for (int i = 0; i < N; i++) {
L[i][i] = 2.0;
L[i][(i - 1 + N) % N] = -1.0;
L[i][(i + 1) % N] = -1.0;
}
return L;
}
public void step() {
double[] e = {c[0] - goal[0], c[1] - goal[1]};
double[] Fd = {-kp * e[0] - kv * v[0],
-kp * e[1] - kv * v[1]};
double normFd = Math.sqrt(Fd[0] * Fd[0] + Fd[1] * Fd[1]);
if (normFd < 1e-6) return;
double[] d = {Fd[0] / normFd, Fd[1] / normFd};
double Fd_mag = normFd;
double[] g = new double[N];
double base = Fd_mag / N;
for (int i = 0; i < N; i++) {
g[i] = f[i] - base;
}
double[] gdot = new double[N];
for (int i = 0; i < N; i++) {
double sum = 0.0;
for (int j = 0; j < N; j++) {
sum += L[i][j] * g[j];
}
gdot[i] = -alpha * sum - beta * g[i];
}
for (int i = 0; i < N; i++) {
f[i] += dt * gdot[i];
if (f[i] < 0.0) f[i] = 0.0;
if (f[i] > 5.0) f[i] = 5.0;
}
double Fsum = 0.0;
for (int i = 0; i < N; i++) {
Fsum += f[i];
}
double[] Fnet = {d[0] * Fsum, d[1] * Fsum};
double[] a = {Fnet[0] / m, Fnet[1] / m};
v[0] += dt * a[0];
v[1] += dt * a[1];
c[0] += dt * v[0];
c[1] += dt * v[1];
}
public double[] getPosition() {
return c;
}
public static void main(String[] args) {
CollectiveTransport2D sim =
new CollectiveTransport2D(6, 2.0, 0.5, 1.0, 1.0, 10.0, 0.01);
for (int k = 0; k < 1000; k++) {
sim.step();
}
System.out.println("Final position: (" +
sim.getPosition()[0] + ", " +
sim.getPosition()[1] + ")");
}
}
5.4 MATLAB/Simulink script
In MATLAB, this controller can be implemented directly or packaged as a Simulink block (e.g., using an S-function or a MATLAB Function block).
function collective_transport_demo()
N = 6;
kp = 2.0; kv = 0.5;
alpha = 1.0; beta = 1.0;
m = 10.0;
dt = 0.01;
steps = 1000;
c = [0; 0];
v = [0; 0];
goal = [1; 0];
f = ones(N, 1) / N;
L = ringLaplacian(N);
for k = 1:steps
e = c - goal;
Fd = -kp * e - kv * v;
normFd = norm(Fd);
if normFd < 1e-6
break;
end
d = Fd / normFd;
Fd_mag = normFd;
g = f - (Fd_mag / N) * ones(N, 1);
gdot = -alpha * (L * g) - beta * g;
f = f + dt * gdot;
f = max(0.0, min(5.0, f));
F_net = d * sum(f);
a = F_net / m;
v = v + dt * a;
c = c + dt * v;
end
disp('Final position:');
disp(c);
end
function L = ringLaplacian(N)
L = zeros(N, N);
for i = 1:N
L(i, i) = 2.0;
L(i, mod(i - 2, N) + 1) = -1.0;
L(i, mod(i, N) + 1) = -1.0;
end
end
In Simulink, the same logic can be wrapped in a MATLAB Function block with states representing \( \mathbf{c}, \mathbf{v}, \mathbf{f} \), and the Laplacian \( \mathbf{L} \) provided as a constant matrix.
5.5 Wolfram Mathematica
(* Parameters *)
N = 6;
kp = 2.0; kv = 0.5;
alpha = 1.0; beta = 1.0;
m = 10.0;
dt = 0.01;
steps = 1000;
ringLaplacian[n_] := Module[{L},
L = ConstantArray[0.0, {n, n}];
Do[
L[[i, i]] = 2.0;
L[[i, Mod[i - 2, n] + 1]] = -1.0;
L[[i, Mod[i, n] + 1]] = -1.0;
,
{i, 1, n}
];
L
];
L = ringLaplacian[N];
(* Initial state *)
c = {0.0, 0.0};
v = {0.0, 0.0};
goal = {1.0, 0.0};
f = ConstantArray[1.0/N, N];
Do[
e = c - goal;
Fd = -kp e - kv v;
normFd = Norm[Fd];
If[normFd < 1.0*^-6, Break[]];
d = Fd/normFd;
FdMag = normFd;
g = f - (FdMag/N) ConstantArray[1.0, N];
gdot = -alpha.(L.g) - beta g;
f = f + dt gdot;
f = Map[Min[5.0, Max[0.0, #]] &, f];
Fnet = d Total[f];
a = Fnet/m;
v = v + dt a;
c = c + dt v;
,
{k, 1, steps}
];
Print["Final position: ", c];
6. Problems and Solutions
Problem 1 (Pure translation condition). A rectangular object of mass \( m \) and moment of inertia \( I \) is pushed by three robots at contact points \( \mathbf{r}_1 = (a,0)^\top \), \( \mathbf{r}_2 = (-a,0)^\top \), \( \mathbf{r}_3 = (0,b)^\top \) in the object frame. All forces are aligned with the world \( x \)-axis: \( \mathbf{F}_i = (f_i, 0)^\top \). Derive the conditions on \( f_1,f_2,f_3 \) for pure translation along the positive \( x \)-axis with zero angular acceleration.
Solution.
The net force is \( \mathbf{F}_{\text{net}} = (f_1 + f_2 + f_3, 0)^\top \). To move along the positive \( x \)-axis we require \( f_1 + f_2 + f_3 > 0 \). The torque about the CoM is
\[ \tau_{\text{net}} = \sum_{i=1}^3 (r_{ix} F_{iy} - r_{iy} F_{ix}) = (a \cdot 0 - 0 \cdot f_1) + (-a \cdot 0 - 0 \cdot f_2) + (0 \cdot 0 - b \cdot f_3) = -b f_3. \]
For pure translation we require \( \tau_{\text{net}} = 0 \), hence \( f_3 = 0 \). Therefore any choice of \( f_1,f_2 \ge 0 \) with \( f_1 + f_2 > 0 \) and \( f_3 = 0 \) yields pure translation along the \( x \)-axis.
Problem 2 (Consensus convergence rate). Consider the scalar force consensus dynamics on a ring of \( N \) robots:
\[ \dot{\mathbf{g}} = -\alpha \mathbf{L}\mathbf{g} - \beta \mathbf{g}, \]
where \( \mathbf{L} \) is the ring Laplacian with unit weights, and \( \alpha,\beta > 0 \). Show that the slowest exponential convergence rate is at least \( \beta \), and discuss how the ring size \( N \) affects the additional term from \( \mathbf{L} \).
Solution.
Because \( \mathbf{L} \) is symmetric, it admits an orthonormal eigenbasis with eigenvalues \( 0 = \lambda_1 < \lambda_2 \le \dots \le \lambda_N \). The dynamics can be decomposed along these eigenvectors; for each mode with eigenvalue \( \lambda_k \), the scalar evolution is
\[ \dot{g}_k = -(\alpha \lambda_k + \beta) g_k. \]
Hence \( g_k(t) = g_k(0)\exp\!\big(-(\alpha \lambda_k + \beta)t\big) \). For the consensus subspace \( k = 1 \), we have \( \lambda_1 = 0 \), but \( g_1(0) = 0 \) since \( \mathbf{g} \) has zero sum by construction. The slowest decaying nontrivial mode corresponds to \( \lambda_2 \), giving a rate \( \alpha \lambda_2 + \beta \ge \beta \). For a ring graph, \( \lambda_2 = 2 - 2\cos(2\pi/N) \), which behaves like \( \mathcal{O}(1/N^2) \) for large \( N \). Thus larger rings slow down the additional improvement from consensus (via \( \alpha \lambda_2 \)), but the baseline damping \( \beta \) guarantees at least rate \( \beta \).
Problem 3 (Precedence DAG correctness). Let \( \mathcal{G}_{\text{dep}} \) be a finite DAG on sites \( \mathcal{S}_\star \). Consider the deterministic construction rule:
- Find any enabled site \( i \).
- Fill site \( i \).
- Repeat until no enabled site exists.
Prove that the final configuration fills all sites in \( \mathcal{S}_\star \) and respects all precedence constraints.
Solution.
Because \( \mathcal{G}_{\text{dep}} \) is finite and acyclic, there exists at least one topological ordering of the sites, \( i_1,\dots,i_{|\mathcal{S}_\star|} \), such that each predecessor of \( i_k \) appears earlier in the sequence. At the beginning, \( i_1 \) has no predecessors and is enabled, so the procedure must eventually choose it. After filling \( i_1 \), the next site in the topological order whose predecessors are all filled becomes enabled, and so on.
By induction, assume that after some number of steps, the set of filled sites equals \( \{i_1,\dots,i_{k-1}\} \). Then \( i_k \) is enabled (all predecessors lie in \( \{i_1,\dots,i_{k-1}\} \)), so the algorithm can select it. Since every step strictly increases the number of filled sites and the set is finite, the process terminates with all sites in \( \mathcal{S}_\star \) filled, and every edge \( (j \to i) \) has \( j \) filled before \( i \), satisfying the precedence constraints.
Problem 4 (Local construction rule flow). Design a local rule for robots to build a single-layer wall of length \( L \) on a 1D lattice of sites \( \{1,\dots,L\} \), starting from an anchor at site \( 1 \). Each robot carries one brick and has local sensing of its current site and occupied neighbors. Specify a flow of decisions that ensures the wall is built without gaps.
Solution (decision flow).
A simple rule: robots always attempt to place bricks at the rightmost contiguous frontier. Each robot executes:
flowchart TD
R["Robot with brick"] --> SENSE["Sense current site index i"]
SENSE --> FRONT["Is site i-1 occupied and site i empty?"]
FRONT -->|"yes"| PLACE["Place brick at site i"]
FRONT -->|"no"| MOVE["Move right if i < L else move left"]
PLACE --> DONE["Return to source for new brick"]
MOVE --> SENSE
With the anchor at site \( 1 \) initially occupied, only site \( 2 \) satisfies the condition \( x_{i-1} = 1, x_i = 0 \). Once filled, site \( 3 \) becomes the unique frontier, and so on. Inductively, robots fill sites in order \( 2,3,\dots,L \) with no gaps.
Problem 5 (Maximum mass under friction constraints). Assume \( N \) identical robots push an object on a flat surface. Each robot has maximum traction force \( F_{\max} \) and the ground/object friction coefficient is \( \mu_g \). The object mass is \( m \) and gravity is \( g \). Under quasi-static motion, derive an upper bound on \( m \) such that the swarm can move the object at steady nonzero velocity.
Solution.
The total maximum pushing force is \( N F_{\max} \). The friction opposing motion is modeled as \( F_{\text{fric}} = \mu_g m g \) in magnitude. For nonzero steady velocity, the net force must be nonnegative:
\[ N F_{\max} - \mu_g m g \ge 0 \quad \Rightarrow \quad m \le \frac{N F_{\max}}{\mu_g g}. \]
Thus the swarm can transport any object with mass up to \( m_{\max} = N F_{\max} / (\mu_g g) \) under this simplified model.
7. Summary
In this lesson we combined rigid-body mechanics, friction-constrained contact models, and graph-based consensus dynamics to analyze collective transport. We derived wrench mappings and minimum-norm load-sharing solutions, and showed how local Laplacian dynamics achieve distributed force allocation. For collective construction, we formalized precedence constraints using DAGs and interpreted local deposition rules as Markov processes on discrete structures with guaranteed termination. Finally, we implemented a simple object transport controller in several programming languages, illustrating how high-level swarm algorithms connect to practical simulation and middleware environments.
8. References
- Kube, C.R., & Zhang, H. (1993). Collective robotics: From social insects to robots. Adaptive Behavior, 2(2), 189–218.
- Kube, C.R., & Bonabeau, E. (2000). Cooperative transport by ants and robots. Robotics and Autonomous Systems, 30(1–2), 85–101.
- Gross, R., & Dorigo, M. (2009). Towards group transport by swarms of robots. International Journal of Bio-Inspired Computation, 1(1–2), 1–13.
- Werfel, J., Petersen, K., & Nagpal, R. (2014). Designing collective behavior in a termite-inspired construction system. Proceedings of the National Academy of Sciences, 111(19), 7235–7240.
- Berman, S., Halasz, A., Kumar, V., & Pratt, S. (2009). Algorithms for the analysis and synthesis of a bio-inspired swarm robotic system. Swarm Intelligence, 3(1), 1–39.
- Ogren, P., Fiorelli, E., & Leonard, N.E. (2004). Cooperative control of mobile sensor networks: Adaptive gradient climbing in a distributed environment. IEEE Transactions on Automatic Control, 49(8), 1292–1302.
- Martinoli, A. (1999). Swarm intelligence in autonomous collective robotics: From tools to the analysis and synthesis of distributed control strategies. Ph.D. thesis, EPFL.
- Rubenstein, M., Cornejo, A., & Nagpal, R. (2014). Programmable self-assembly in a thousand-robot swarm. Science, 345(6198), 795–799.
- Gazi, V., & Passino, K.M. (2003). Stability analysis of swarms. IEEE Transactions on Automatic Control, 48(4), 692–697.
- Beni, G. (2004). From swarm intelligence to swarm robotics. Swarm Robotics, LNCS 3342, 1–9.