HAL Id: hal-03549347

https://hal.archives-ouvertes.fr/hal-03549347

Submitted on 31 Jan 2022

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of sci-

entic research documents, whether they are pub-

lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diusion de documents

scientiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Distributed Prediction of Unsafe Reconguration

Scenarios of Modular Robotic Programmable Matter

Benoit Piranda, Pawel Chodkiewicz, Pawel Holobut, Stéphane Bordas, Julien

Bourgeois, Jakub Lengiewicz

To cite this version:

Benoit Piranda, Pawel Chodkiewicz, Pawel Holobut, Stéphane Bordas, Julien Bourgeois, et al.. Dis-

tributed Prediction of Unsafe Reconguration Scenarios of Modular Robotic Programmable Matter.

IEEE Transactions on Robotics, 2021, 37 (6), pp.2226 - 2233. �hal-03549347�

1

Distributed prediction of unsafe reconﬁguration

scenarios of modular-robotic Programmable Matter

Benoˆ

ıt Piranda1, Paweł Chodkiewicz2, Paweł Hołobut3, St´

ephane P.A. Bordas4, Julien Bourgeois1, and Jakub

Lengiewicz3,4

1University of Bourgogne Franche-Comt´

e, FEMTO-ST Institute, CNRS, France

2Faculty of Automotive and Construction Machinery Engineering, Warsaw University of Technology, Poland

3Institute of Fundamental Technological Research, Polish Academy of Sciences, Poland

4Department of Engineering, Faculty of Science, Technology and Medicine, University of Luxembourg

Abstract—We present a distributed framework for predicting

whether a planned reconﬁguration step of a modular robot will

mechanically overload the structure, causing it to break or lose

stability under its own weight. The algorithm is executed by

the modular robot itself and based on a distributed iterative

solution of mechanical equilibrium equations derived from a

simpliﬁed model of the robot. The model treats inter-modular

connections as beams and assumes no-sliding contact between

the modules and the ground. We also provide a procedure

for simpliﬁed instability detection. The algorithm is veriﬁed in

the Programmable Matter simulator VisibleSim, and in real-life

experiments on the modular robotic system Blinky Blocks.

Keywords: Self-reconﬁguration, Modular robots, Distributed al-

gorithms, Mechanical constraints, Programmable Matter.

I. INTRODUCTION

Materials able to autonomously assume any shape are

the dream of engineers. Currently, the most advanced arti-

ﬁcial systems possessing elements of this functionality are

modular self-reconﬁgurable robots—machines composed of

robotic units (modules) which can bond together, move over

one another and communicate, as well as store and process

information [1]. They may be compared to swarms of ﬁre ants

forming bio-mechanical structures from their own bodies [2].

Cooperation of millions of tiny, densely-packed modules is

expected to produce the desired emergent shape change of the

entire ensemble. A system of this kind would be a realization

of the futuristic concept of Programmable Matter [3].

The operation of densely-packed self-reconﬁgurable robots

is based on the movement of modules from one part of

the robot to another. This poses not only the challenging

hardware problem of designing miniaturized modules able to

operate in large 3D ensembles, but also the software problem

of controlling this motion. If the robot is autonomous, its

operation must be collectively planned and controlled by the

modules, taking into account geometric and mechanical con-

straints on reconﬁguration at each stage of motion. Although

ofﬂine approaches could be used to check these constraints

efﬁciently for a number of selected conﬁgurations, the less

efﬁcient online approaches must be used in general to handle

any shape or any possible interaction with obstacles.

Geometric constraints result from the fact that modules

need sufﬁcient space to make a planned move but also must

constantly remain in physical contact with other modules [4].

Mechanical constraints, in turn, result from the requirements

of integrity and stability of the entire robot—the structure

cannot break at inter-modular junctions or lose balance during

reconﬁguration. The mechanical constraints can be neglected

in some special cases, like reconﬁguration under no external

loading (weightlessness) or 2D reconﬁguration on ﬂat ground

with perpendicular gravity as the only loading. Otherwise, they

usually need to be considered.

Currently, almost all algorithms for planning and control-

ling self-reconﬁguration of densely-packed systems take only

geometric constraints into account, like in [5], [6], [7], [8],

[9]. An up-to-date survey of self-reconﬁguration algorithms for

modular robots can be found in [10]. By contrast, works on the

mechanical behavior of densely-packed modular structures are

few, present mostly centralized procedures, and rarely discuss

reconﬁguration. Examples can be found in [11], focused on

optimizing the compliance of modular tools, and in [12], aimed

at predicting the mechanical behavior of structures produced

by additive manufacturing. As a separate research direction,

special types of modular structures were investigated in [13],

[14] and [15] to check the possibility of using modular robots

as collective actuators. Autonomous reconﬁguration planning

that takes into account both geometric and mechanical con-

straints remains a challenging open problem, some aspects of

which are investigated in this work.

In the present paper, we develop the approach introduced

in [16] much further into a more realistic framework. Arbitrary

3D structures are investigated, for which a linear-elastic FE

model is again adopted, with the addition of unilateral contact

conditions which represent interaction with the surroundings.

Two failure modes are considered: overloading of inter-

modular connections and loss of balance, both checked in

a distributed manner. Two methods of checking the loss of

balance are proposed: (1) a simpliﬁed one, valid for structures

standing on a ﬂat surface, and (2) a model-based one, which is

more general but requires solution of the mechanical balance

equations with contact conditions. Veriﬁcation is performed

in a dedicated simulator VisibleSim [17], as well as exper-

imentally on the real robotic modules Blinky Blocks [18].

The computational cost and several possible extensions of the

applied weighted Jacobi iterative solver are also discussed.

2

II. DI ST RI BUTED PREDICTION OF THE MECHANICAL STAT E

OF A RO BOT

A. Basic characteristics of a modular robot

For the purposes of algorithmic mechanical analysis, a

modular robot will be represented only by its connection

topology and inter-modular connection strengths. We will

focus on structures built of cubic Blinky Blocks [18], which

are arranged on the Cartesian grid. However, in principle, the

proposed approach can handle other connection topologies.

From the information-theoretic point of view, a modular

robot has a distributed and asynchronous computing archi-

tecture, with mesh connection topology corresponding to the

communication network of modules [19]. In Blinky Blocks,

information can only be directly transferred between adjacent

modules, so the communication network has the same con-

nection topology as the modular robot itself. Such neighbor-

to-neighbor-only communication imposes strict limits on the

information-passing abilities of the system and requires special

algorithms for effective prediction of mechanical failures.

B. Problem to be solved

Reconﬁguration of a modular robot can be broken down

into simple steps. A single step consists of (a) releasing some

inter-modular connections, (b) shifting modules which have

been freed into nearby positions and, ﬁnally, (c) creating new

connections at the new locations. As an alternative way of

restructuring one may consider attaching new modules to a

structure and discarding some old ones. Each reconﬁguration

step can potentially cause failure of the structure, which

is in general irreversible. To avoid it, a prior mechanical

analysis can be performed to ascertain that the planned new

conﬁguration is mechanically safe.

We restrict further presentation only to the case of attaching

additional modules to an existing structure. Nevertheless, the

whole idea can also be applied to a complete reconﬁguration

step. In such a case, the mechanical analysis would need to be

performed for each of the above stages (a), (b) and (c) of the

planned reconﬁguration step. The step would be considered

permissible if the structure was predicted to be safe after each

of the three stages. Since this kind of reconﬁguration cannot be

easily performed on Blinky Blocks, we do not further develop

this topic in the present paper.

Algorithmic prediction of two failure modes, shown in

Fig. 1, will be analyzed, expanding on the ideas proposed

in [16]. The ﬁrst one is when addition of new blocks increases

stresses at some inter-modular junctions beyond the holding

capacity of connectors, as a result of which the structure

breaks, Fig. 1a. The second one is when the structure loses

balance when the new modules are added, Fig. 1b.

C. Overview of model-based failure prediction

We propose a distributed procedure which can predict both

types of failure simultaneously. It approximately solves a

special mechanical problem for the robot with new modules

attached and can be customized to handle different module de-

signs. The procedure has several distinctive features, described

in detail in the succeeding sections:

(a) (b)

Fig. 1. Two types of failure after an additional module (gray dashed line) is

attached: (a) breakage of a connection; (b) loss of overall stability. The red

lines designate failing connections.

•The modular robot is represented by a Finite Element

(FE) model; see Sec. II-D.

•Two types of connections are assumed: the inter-modular

connection, modeled as a linear-elastic beam, and the

connection between a module and an external support

(e.g., the ground), modeled as a linear-elastic beam with

unilateral no-sliding contact conditions at the support end.

•The mechanical state of a planned conﬁguration with

new modules attached (see Sec. II-E) is obtained by

solving a non-linear problem (non-linearities result from

the contact conditions; see Sec. II-F).

•The problem is solved in a distributed fashion using the

weighted Jacobi iterative scheme (see Sec. II-G).

•After the iterations converge, two failure criteria are

checked: for the loss of balance (see Sec. III-C) and

overloading of connections (see Sec. III-D).

D. Standard 3D frame model

In the adopted FE model, each module pis represented

by a node with 6 degrees of freedom up(3 displacements,

ux,uy,uz, and 3 rotations, τx,τy,τz) and each pair of connected

modules is represented by a beam joining their nodes. A

module in contact with the ground is represented by a special

beam between the module’s node and a “ground” node g, with

ug=0, as it is explained in Sec. II-F. In Fig. 1, the beams are

presented as lines joining the centers of adjacent modules.

In a coordinate system CS whose zaxis points upwards, the

stiffness matrices for a beam joining module pand module q

lying below it read K11

pq =K11 and K12

pq =K12, where:

K11 =E

L3

12Ix0 0 0 −6IxL0

0 12Iy0 6IyL0 0

0 0 AL20 0 0

0 6IyL0 4IyL20 0

−6IxL0 0 0 4IxL20

0 0 0 0 0 JνL2

,(1)

K12 =E

L3

−12Ix0 0 0 −6IxL0

0−12Iy0 6IyL0 0

0 0 −AL20 0 0

0−6IyL0 2IyL20 0

6IxL0 0 0 2IxL20

0 0 0 0 0 −JνL2

,(2)

while E,L,A,Ix,Iyand Jνare the elastic modulus, length,

cross-sectional area, area moments of inertia in the xand y

directions, and scaled torsion constant in the zdirection of the

3

symbol value description

E100 MPa elastic modulus

L,A=L240 mm, 40 ×40 mm2length & cross-sectional area

Ix,IyL4/12 mm4xand ymoments of inertia

Jν=J

2(1+ν)2.25 ·L4/41.6 mm4scaled ztorsion constant (J:ztor-

sion constant, ν: Poisson’s ratio)

M0.06106 kg mass of a block

Fmax

V11.98 N strength of a vertical connection

Fmax

L14.97 N strength of a lateral connection

TABLE I

BLINKY BLOCKS’GEOMETRIC AND MATERIAL PARAMETERS

beam, respectively (see Tab. I). If the two neighbors pand q

are aligned with the zaxis of another coordinate system CS’,

then K11

pq and K12

pq take the form:

K11

pq =ˆ

RpqK11 ˆ

RT

pq ,K12

pq =ˆ

RpqK12 ˆ

RT

pq ,(3)

where

ˆ

Rpq =Rpq 0

0 Rpq ,(4)

Rpq is the 3 ×3 rotation matrix from CS’ to CS, Tdenotes

a transpose, and block matrix notation is used.

The ensemble is in static equilibrium if, for every module

p, the sums of reaction forces and torques between pand all

its neighbors qare equal to the gravitational force and null

external torque acting on p, respectively, given by the vector

Fext

p= [0,0,99.81 ·M,0,0,0]T. The equilibrium equations are:

∀p"∑

q

K11

pqup+K12

pquq#=Fext

p,(5)

with unknown vectors upand uq. After assembling the global

vectors u,Fext and stiffness matrix K, incorporating all degrees

of freedom of the structure, Eq. (5) takes the form Ku =Fext. It

still needs to be extended to account for the modules planned

to be added (Sec. II-E) and contact conditions (Sec. II-F).

The respective quantities for the extended system, called the

perturbed state, will be denoted by symbols with bars.

E. Adding virtual modules

To predict the state of the system one reconﬁguration step

ahead, the algorithm must take into account virtual modules—

the modules which are planned to be attached. This is done in

a simple way: a system analogous to Eq. (5) is built assuming

that virtual modules are present. During computation, virtual

modules are emulated by their existing neighbors, which store

and process variables and messages related to virtual modules.

F. Contact with external supports

We use a simpliﬁed contact model of a cubic module with

an external support, in which the support must be ﬂat and co-

planar with one of the module’s facets. Also, we only analyze

initially existing contact interfaces and assume that no new

ones appear under load. We distinguish two conditions: (i)

a unilateral contact-separation condition (coaxial mode) com-

bined with no-sliding/no-twisting (shear and torsional modes),

(ii) a tilting condition (bending mode). We say that a module

Fig. 2. Regularized contact conditions: (a) a module in contact with the

ground, (b) contact-separation condition for the fzcomponent, and (c) tilting

(stable/unstable) condition for the mycomponent. The dashed lines indicate

the respective “exact” (non-regularized) relationships for the case of a rigid

module in contact with rigid ground.

is in contact if the axial force in the beam representing the

contact is compressive. Otherwise, the module is in separation.

When in contact, the module can only tilt if the bending torque

in the beam exceeds a limit torque which is proportional to

the compressive force (see the explanation below).

Without loss of generality, let us consider a module sup-

ported from below. The module is loaded with the forces and

torques F= [ fx,fy,fz,mx,my,mz]T, which correspond to the

kinematic variables u= [ux,uy,uz,τx,τy,τz]T. The contact con-

dition (see Fig. 2b) takes the form of the Signorini problem:

fz≤0 & uz≥0 & fzuz=0.(6)

Additionally, we require that when the contact is active ( fz<

0), there is no tangential slip (ux=0 & uy=0) or twisting

(τz=0), and the module can only tilt if at least one of the

bending torques exceeds a limit torque. The tilting conditions

(see Fig. 2c) can be conveniently written in the following form:

Φx≤0 & τx·sign(ˆmx)≥0 & Φx·τx=0,

where ˆmx=mx−fy·L/2,Φx=|ˆmx|+fz·L/2; (7)

Φy≤0 & τy·sign(ˆmy)≥0 & Φy·τy=0,

where ˆmy=my+fx·L/2,Φy=|ˆmy|+fz·L/2; (8)

where Lis the module’s size. The tilting (bending) condition

expresses the fact that the torques |ˆmx|or |ˆmy|cannot exceed

the torque 9fz·L/2 produced by the compressive force 9fz

about any of the facet’s edges; see also Fig. 2a.

A supported module is modeled as a beam with the same

elastic constants as two connected modules. This gives the

force-displacement relationship for the case of stable contact

(when the module adheres to the support with an entire facet).

This relationship is then used by a special predictor-corrector

scheme, described below, which provides regularization to the

contact conditions given by Eqs. (6–8).

In the regularized contact scheme for module p, a trial state

is computed ﬁrst, assuming a linear-beam-type connection

with each support q(here, the contact direction is z):

Ftr

pq = [ ftr

x,ftr

y,ftr

z,mtr

x,mtr

y,mtr

z]T=K11

pq ¯

up,(9)

where the term K12

pq ¯

uqis absent because the support is assumed

to be immobile, ¯

uq=0. Then, a corrected vector Fpq is

determined, taking into account two conditions:

4

(i) the unilateral (normal) contact-separation condition com-

bined with no-sliding and no-twisting conditions:

(Fpq :=γ·Ftr

pq for ftr

z≥0 (separation)

(fx,fy,fz,mz) = ( ftr

x,ftr

y,ftr

z,mtr

z)otherwise (contact)

(10)

(ii) the tilting (bending) condition, used only when f tr

z<0, i.e.

when the module is in contact:

mx:=(mtr

xfor Φtr

x<0 (stable)

γ·mtr

x+¯

γ·L

2ftr

y−sign(ˆmtr

x)ftr

zotherwise (tilting)

(11)

my:=(mtr

yfor Φtr

y<0 (stable)

γ·mtr

y−¯

γ·L

2ftr

x+signˆmtr

yftr

zotherwise (tilting)

(12)

where ˆmtr

x, ˆmtr

y,Φtr

xand Φtr

yare computed as in Eqs. (7) and

(8), but using the components of Ftr

pq;γ=10−4and ¯

γ=1−γ.

The corrected contact tangent matrix ¯

K11

pq is obtained as a

derivative of Fpq with respect to ¯

up. Again, the matrix ¯

K12

pq is

disregarded because supports are assumed to be immobile.

Remark: Ill-posedness of the problem is avoided by intro-

ducing a very weak spring, characterized by γ, that prevents

free rigid-body motion of the structure. The drawback of

this approach is poor conditioning of the resulting system of

equations when the robot is unstable, which can deteriorate

the convergence rate of the iterative solver; see Sec. II-H.

However, as it is shown in Sec. III-C, the knowledge of which

supports are active sufﬁces for assessing stability and those are

usually identiﬁed long before convergence is achieved.

G. Weighted Jacobi solution scheme

The global system of equations for the perturbed system, in

which virtual modules are included in the model (Sec. II-E)

and contact conditions are accounted for by the predictor-

corrector scheme (Sec. II-F), reads:

¯

K¯

u=¯

Fext.(13)

Eq. (13) is solved iteratively using the weighted Jacobi

scheme [16]. A single iteration i→i+1 for module preads:

¯

ui+1

p=β¯

Dp

−1 ¯

Fext

p−¯

Rp¯

ui

p−∑

q

¯

K12

pq ¯

ui

q!+ (1−β)¯

ui

p,(14)

where ¯

Dp=diag∑q¯

K11

pqand ¯

Rp=∑q¯

K11

pq−¯

Dpare the

diagonal and the remainder parts of the respective stiffness

sub-matrices, while β=2/3. Initially, we set ¯

u0=0(alter-

natively, the solution for the non-perturbed state, if available,

could be used instead of 0, which would reduce the necessary

number of iterations). Note that in the iteration i+1 only the

values of ¯

ufrom the iteration iare used, and only those from

pand its direct neighbors q. Thus only local communication

is involved and the memory complexity is constant.

In the present implementation, the weighted Jacobi proce-

dure is initiated by the centroid module which sends an Init

message down the spanning tree, broadcasting the number of

iterations to be done (see Sec. III-B for the centroid module

and the spanning tree). Having received the Init message,

each Blinky Block Bpsends its initial vector ¯

u0

p=0to all

CCCT,CM,CSST,CMST CWJ

Execution time O(d)O(˜

d)O(n2)

No. of CPU operat./module O(1)O(1)O(n2)

Total no. of messages sent O(n)O(n)O(n3)

Memory usage per module O(1)O(1)O(1)

TABLE II

COMPLEXITY ASSESSMENTS FOR SUBROUTINES OF THE ALGORITHM.CC

REFERS TO CENTROID SELECTION,CT—TO TRE E CO NST RUC TI ON,

CM—TO FIN DI NG TH E CE NTE R OF M ASS ,CSST—T O THE S IM PLI FIE D

STABILITY CHECK,CMST—TO TH E MO DEL -BASED STABILITY CHECK,

AN D CWJ —TO T HE WE IG HTE D JACO BI PR OCE DU RE.

its neighbors and initializes its iteration counter, iterp=0.

In a given iteration iterp=i,Bpcan receive from any of its

neighbors Bqa message containing ¯

ui

q(displacements of Bq

calculated in iteration i), which is then stored in Bp’s buffer.

When Bphas received ¯

ui

qfrom all its neighbors, it computes

¯

ui+1

p(see Eq. 14), increments its counter, iterp←iterp+1, and

sends ¯

ui+1

pto all its neighbors. The process continues until the

prescribed number of iterations is reached.

Remark. The weighted Jacobi procedure behaves like the

Alpha local synchronizer [20].

H. Convergence properties and possible improvements

The Weighted Jacobi scheme converges if the spectral radius

of the iteration matrix Cβ=I−β¯

D−1¯

Kis less than 1:

ρ(Cβ) = max(|λ1|,...,|λN|)<1,(15)

where λiare the eigenvalues of Cβ. Although in the cases an-

alyzed here convergence is achieved, the number of iterations

is very high, which is a well-known drawback of the method

(the convergence rate tends to 1 when the system grows [21]).

For the one-dimensional spring-in-series system of size

n, we have analytically assessed the number of iterations

necessary to attain an arbitrary relative error to be O(n2). This

is also conﬁrmed numerically in Sec. IV-B for more complex

structures. The assessment shows the low efﬁciency of the

scheme and underlies the complexities provided in Table II.

The framework presented in this work is not restricted to the

weighted Jacobi scheme though. Its efﬁciency can potentially

be signiﬁcantly improved by adapting another method to

solving the considered contact problem in a distributed way.

We will brieﬂy outline the three most promising directions.

Direction 1: The Krylov subspace methods [22] guarantee

that the maximal number of iterations is at most equal to the

number of degrees of freedom of the system, if the problem to

be solved is linear. This can be further improved by appropriate

preconditioning (see our preliminary study [23]). However,

the need for global data aggregation and the non-linearities

introduced by the contact problem require special treatment,

which can deteriorate the time and memory efﬁciency.

Direction 2: Multigrid techniques [24] can more easily

capture long-wave modes of the solution, which should im-

prove the convergence rate. A special version must be devised,

however, taking into account the contact conditions (like

the one recently proposed [25]) and the speciﬁc computing

architecture of the modular robot.

5

create the spanning tree (Sec. III.A)

simplied

stability check?

solve mechanical problem (Sec. II.D-G)

model-based stability check (Sec. III.C)

simplied stability

check (Sec. III.B)

is stable? is stable?

solve mechanical problem (Sec. II.D-G)

overloaded?

(Sec. III.D)

send loss of

balance message

send overload

message

no yes

yes yes

yes

no no

no

Fig. 3. Flowchart of the algorithm.

(a) (b)

Fig. 4. (a) A modular robot (unstable) with a selected centroid (thick blue

line), the center of mass (star) and a spanning tree (arrows). (b) Detection of

whether a given point (star) is inside the convex hull of the support points.

The condition is fulﬁlled if and only if all the straight angles (shaded) sum

up to the full angle (they do not in this example).

Direction 3: The number of degrees of freedom of the

system can be reduced by applying multi-scale methods or

model order reduction techniques [26], [27]. However, it may

be hard to ﬁnd a suitable reduced space online efﬁciently.

III. MECHANICAL STABILITY AND OVERLOAD CHECK

Below we describe computational methods using which

a robot can autonomously predict the two types of failure

shown in Fig. 1, one reconﬁguration step ahead. The methods

utilize a spanning tree, which is discussed ﬁrst in Sec. III-A.

Sec. III-B describes a simple method of checking stability—

without iterations, but restricted to robots standing on ﬂat

ground. Sec. III-C discusses stability veriﬁcation in the gen-

eral case, using the iterative scheme of Sec. II. Finally, in

Sec. III-D, conditions for inter-modular connection breakage

are presented, utilizing the results of the iterative scheme. The

ﬂowchart of the procedure is shown in Fig. 3.

Assessments of complexities of the subroutines of the al-

gorithm are presented in Table II, where nis the number of

modules, dis the radius of the connection graph of the robot,

and ˜

dis the depth of the spanning tree (usually, ˜

dand dare

of the same order; see Sec. III-A for more details).

A. Spanning tree

A spanning tree allows efﬁcient communication inside the

robot. Its construction begins with a choice of the centroid

module, serving as the root, which is selected near the robot’s

topological center; see e.g. Fig. 4a. This can be done automati-

cally [28], but we chose the centroid manually in all examples.

The tree is extended to all modules, starting at the cen-

troid which sends a Tree message to its neighbours. When a

module receives the Tree message for the ﬁrst time, it becomes

a next-level node and sends the Tree message further. This

usually leads to the construction of BFS-like trees of quasi-

optimal depth, without the need for synchronization. However,

in rare cases the resulting tree may be far from optimal, with a

Hamiltonian path over the structure as the worst-case scenario.

The algorithms relying on the tree are then adversely affected.

B. Loss of balance in a simpliﬁed case

It is assumed that the robot is rigid and stands on ﬂat ground

under vertical gravity (Fig. 4a). The modules know their

own masses and positions in a common Cartesian coordinate

system, with z=0 being the ground level. They also simulate

the behavior of their virtual neighbors (Sec. II-E).

The stability check reduces to verifying that the center of

mass of the robot lies over the convex hull of the points of

support. If it does, the robot is stable, otherwise, it is not. The

algorithm proceeds as follows.

(a) The center of mass of the robot is computed. Starting at the

leaves of the spanning tree, each node sums up the masses

of all its subbranches and its own, mi, and likewise the

weighted centers of mass of all its subbranches and its own,

miXi. The two sums are propagated to the parent node and

the process continues. At the centroid, the center of mass

of the robot is retrieved as [X,Y,Z] = (ΣmiXi)/(Σmi).

(b) Xand Yare broadcast over the tree.

(c) For any supporting module i, its safe angle range [αi,βi]is

determined as the sum of safe angle ranges of its corners.

The 180◦safe angle range of a corner pj= [Xj,Yj,0]is

swept by the planar vector [Xj−X,Yj−Y]when turning

90◦left or right. It covers those directions in which the

structure cannot tilt; see Fig. 4b. The safe angle range of

any corner pj= [Xj,Yj,Zj6=0]is assumed to be empty.

(d) The safe angle ranges are summed up over the tree, just

like masses were in step (a). The summation always gives

a single interval, because all considered ranges are either

empty or not less than the straight angle.

(e) The structure is stable if and only if the aggregated angle

range at the centroid equals the full angle.

C. Loss of balance in the model-based approach

In the general case with arbitrarily placed supports, there is

no simple method to predict stability. Sometimes, if a model

of the robot is simple, like under the rigid-body or elasto-static

assumptions used here, there may even be no unique answer.

Since more accurate modeling goes beyond the scope of the

present paper, we will show how to utilize the proposed elasto-

static model with contact and the iterative solution scheme to

check stability in more general cases. The method, however,

does not assure ﬁnding the correct solution in difﬁcult cases

(e.g., when the solution is non-unique by deﬁnition).

The method is based on the observation that, when the

iterative solution scheme has converged, the local state of the

contact conditions is fully determined. It is only necessary to

check whether active supports prevent rigid-body rotation of

the structure (at least three noncollinear support points must

be active), which is achieved by the following procedure:

6

(a) Solve the mechanical problem (see Sec. II) and initiate the

stability check (the spanning tree is used again).

(b) For every module, determine the set of its active corner

points by checking the contact conditions (Sec. II-F):

•No contact →return the empty set.

•Tilting in two directions →return a single corner—the

common point of the two edges of rotation.

•Tilting in one direction →return two corners—the end

points of the edge of rotation.

•Contact & no tilting →return a special ‘stable’ state.

(c) Aggregate information starting at the leaves and moving

up the spanning tree towards the centroid:

•At each module, sum the sets of active points of its

subbranches and its own, obtaining set S. By convention,

adding any set to ‘stable’ gives ‘stable’.

•If the points in Sare noncollinear then set S=‘stable’.

•If multiple points in Sare collinear then leave only two.

•Pass Sup the spanning tree.

(d) The stability check ends at the centroid, with the result

being either ‘stable’ or not.

Excluding the expensive phase of determining active sup-

ports (weighted Jacobi iterations), the complexity of the ap-

proach is the same as that of the simpliﬁed case; see Table II.

The memory complexity per module is constant because each

returned set of points has at most two elements.

D. Overloading of inter-modular connections

Connection overloading is checked when the iterative

scheme has sufﬁciently converged and after checking that the

structure is stable. The forces and torques which act between

module pand its neighbor qare predicted as follows:

[fx,fy,fz,mx,my,mz]T=1

2

ˆ

RT

pq(Fpq −Fq p) =

=1

2

ˆ

RT

pq(¯

K11

pq ¯

up+¯

K12

pq ¯

uq−¯

K11

qp ¯

uq−¯

K12

qp ¯

up),(16)

where ˆ

RT

pq rotates the resulting vector into a coordinate system

in which axial forces are aligned with the zaxis.

To avoid connection breakage, the tensile force fzand

torques mxand my, computed in Eq. (16) in the middle of

the connection, must not overpower the magnetic forces Fmax

binding the modules. (Shear and torsion are omitted, because

Blinky Blocks’ connectors are assumed to be resistant to those

modes of breakage.) The vertical and lateral connections of

Blinky Blocks differ, so that Fmax can take two values; see

Table I. The safety condition for both tension and bending is:

Fmax >2·max(|mx|,|my|)/L+fz.(17)

The check is performed for all connections and the results are

aggregated by the centroid over the spanning tree.

IV. IMPLEMENTATION,SIMULATIONS AND EXPERIMENTS

A. Implementation details

The procedures have been implemented and tested in the

integrated environment developed at FEMTO-ST1. It consists

1Programmable Matter project at FEMTO-ST: https://projects.femto-st.fr/

programmable-matter/.

Fig. 5. Blinky Blocks: functional ones (left and right), and two pieces of a

dismantled one with a top view of the motherboard (in the middle).

of the virtual test bed VisibleSim [17] and the reconﬁgurable

modular robot Blinky Blocks [18], so the same implementation

could be executed on both platforms. The software was

adjusted to be compatible with the real Blinky Blocks Version 1

hardware: reduced ﬂoating-point precision of 4 Bytes was used

and the maximum message size was set to 17 Bytes (messages

containing 6 ×4 Byte-long vectors were split in half).

The program’s ﬂowchart is shown in Fig. 3, and the con-

secutive steps of the algorithm are discussed in the previous

sections. The choice between the simpliﬁed (Sec. III-B) and

the full (Sec. III-C) stability check to be performed is preset

by the user. In the case of the Blinky Blocks hardware,

a preliminary step is additionally performed, in which the

same main program is loaded into each Blinky Block, and a

common coordinate system for a given conﬁguration of Blinky

Blocks is propagated, starting from a special block with preset

coordinates.

The material parameters of the Blinky Block model de-

scribed in Sec. II-D are provided in Table I. All have been

assessed experimentally, except Young’s modulus which was

chosen arbitrarily (its exact value is not essential for assessing

overload and stability). The dimensions and mass have been

measured directly. Connection strengths have been obtained

in a simpliﬁed manner, by ﬁnding the maximum number

of Blinky Blocks that their magnets could hold hanging in

a vertical alignment. The top/bottom and lateral connection

strengths differ because the former is produced by a Lego-

like system reinforced with a central magnet, and the latter by

4 magnets placed in the corners of each face; see also Fig. 5.

B. Simulations and experiments

Six different modular conﬁgurations and failure scenarios

were investigated (see Fig. 6), both in VisibleSim and on

Blinky Blocks2. The sizes of structures ranged from 8 modules

in test #1(a) to 29 modules in test #6(c). Experiments on

substantially larger structures would be difﬁcult due to the high

computational complexity of the algorithm combined with the

limited processing and communication speed of the Version 1

of Blinky Blocks. In the physical experiments, reconﬁguration

of Blinky Blocks was done by manually attaching new modules

to an existing structure. In all the presented cases, the model-

based analysis was involved (addressing both overloading and

loss of stability), which required execution of the weighted

Jacobi iterative scheme. Additionally, in the loss-of-stability

scenarios (Fig. 6 #1-#3), the results obtained with the simpli-

ﬁed and the model-based stability checks were successfully

cross-validated.

2Videos of selected experiments: https://youtu.be/d3aE8GjbYd8

7

Test#1

Test#2

Test#3

Virtual blocks

Global instability detected

7 min / 4000 it.

a) b) c)

22 min / 12000 it.

a) b) c)

Overstressed

Safely stressed

Instability detected

16 min / 9000 it.

a) b) c)

Test#4

Test#5

Test#6

Virtual blocks

Bond breakage detected

Overstressed

Safely stressed

Fixed

a) b) c)

a) b) c)

a) b) c)

9 min / 5000 it.

28 min / 15000 it.

28 min / 15000 it.

Fig. 6. Experiments in VisibleSim and on Blinky Blocks. Computation times and iteration numbers are shown in insets.

Because it is in general difﬁcult to automatically assess the

necessary number of weighted Jacobi iterations, this number

was adjusted manually case by case. The criterion was to

make the number of iterations possibly low while obtaining

correct predictions at the same time. The problem of how the

necessary number of iterations scales with the system size in

a stable case is brieﬂy discussed later. In an unstable case,

this number is expected to be much higher. Following the

conclusion in the ﬁnal Remark of Sec. II-F, in unstable cases

we stopped computations just after all contact states stabilized,

but before numerical convergence was achieved.

Each of the six tests in Fig. 6 shows the results of execution

of the program for two consecutive construction steps of a

particular Blinky Blocks structure. In every ﬁgure, the ﬁrst

construction step (a→b) is designed to be mechanically safe,

while the second one (b→c) to result in failure, which is then

demonstrated in the third part of the ﬁgure (c). Additionally,

in the top row, VisibleSim results are shown for the tests #1

and #4. The tests are split into loss-of-stability (left column)

and overloading (right column) scenarios. From top to bottom,

the scenarios are ordered by complexity, i.e., 2D cases in

tests #1 & #4, 3D cases in tests #2 & #5, and 3D cases with

more complex connection topologies in tests #3 & #6.

The results of calculations are displayed using colors: the

color of a block corresponds to the highest tensile/bending

stress level in any of its connections, as given by the right

hand side of Eq. (17). Green to orange colors represent the

safe stress range, while red indicates potentially overstressed

connections. Blinky Blocks were programmed to blink in red

when tensile stresses in some of their connections exceeded

the critical level, while global imbalance of a structure was

signaled by the centroid module blinking in purple. Blue

Blinky Blocks are ﬁxed—they are attached to the ﬂoor.

In all tests except #6, the predictions are conﬁrmed by phys-

ical experiments. In test #6, breakage is correctly predicted

but ill-localized. This can be observed in Fig. 6-#6(b) which

(a)

size =9

size =10

size =11

size =

12

size =13

size =14

0 20 40 60 80

0.001

0.005

0.010

0.050

0.100

0.500

1

Iteration number ⨯10-3

Relative error

(b)

■■■

■

■

■

●●

●

●

●

●

■N(err<1%)

Fit(N(err<1%))

●N(err<0.1%)

Fit(N(err<0.1%))

9 10 11 12 13 14

0

10

20

30

40

50

60

70

Number of modules

N. of iterations ⨯10-3

Fig. 7. Number of weighted Jacobi iterations necessary to attain a given

accuracy for ﬁxed-arms of different sizes. Size 10 refers to the example in

Fig. 6-#4(a); other sizes have shorter/longer arms. (a) Convergence character-

istics. (b) A quadratic polynomial ﬁt for two accuracy levels.

indicates breakage of the pillars, while the actual breakage

occurs as it is shown in Fig. 6-#6(c). There are two possible

reasons for the observed discrepancy. The ﬁrst one is that the

assumed mechanical model of the modular robot is too simple.

The second one is the omission of twisting torques from the

adopted criterion of breakage. It was also very difﬁcult to keep

the structures #6(a) and #6(b) operational—an effect which

was not expected. In both cases, weight-induced deforma-

tions caused separation of electrical connectors, despite the

structures did not break. This necessitated using additional

supports just to perform computations. We view test #6 as

one of benchmark cases for future research on more accurate

models and failure criteria.

CPU time and convergence properties. Computing ¯

ui

pand

exchanging messages with neighbours takes a Blinky Block

a nearly constant time T≈110.5 ms (9.05 runs per second).

Because communication is local, Tis also the global time

of a single weighted Jacobi iteration, independent of the

conﬁguration. Since the time cost of the other steps of the

algorithm is negligible (see Tab. II), the overall execution time

can be assessed by multiplying the number of iterations by T.

The number of iterations needed to attain a given accuracy

8

greatly depends on the system’s conﬁguration and generally

grows with the number of modules n. Assessment of the num-

ber of iterations is generally not straightforward, even without

considering unilateral contact conditions; see also Sec. II-H. In

Fig. 7 we demonstrate the expected trends for a given family

of conﬁgurations. Fig. 7a shows linear convergence of the

relative error k¯

ui−¯

u∗k/k¯

u∗kas the number of iterations i

grows, where ¯

u∗is the numerically exact solution. Fig. 7b

presents the necessary numbers of iterations from Fig. 7a for

two example relative errors, displaying quadratic growth with

nand conﬁrming the assessments in Tab. II.

V. C ONCLUSIONS AND FUTURE RESEARCH

We presented a distributed algorithm for checking if a

modular robot will retain its mechanical integrity and stability

after new modules are attached to it at prescribed positions.

The algorithm can be used to assess the mechanical safety

of a reconﬁguration step planned by a self-reconﬁgurable

robot. The procedure is designed to run on the modular robot

itself, and we have veriﬁed its predictions through tests in

the dedicated simulator VisibleSim and on the real modular

system Blinky Blocks. To our knowledge, this is the ﬁrst time

three-dimensional modular-robotic structures compute their

mechanical state in a fully distributed manner.

The algorithm can be improved towards: adopting faster

iterative schemes, as discussed in Sec. II-H and tried in

[23]; extending the application range to soft modular robots;

checking the construction/reconﬁguration several steps ahead;

as well as addressing other module geometries and broader

module-support contact scenarios. Future experimental vali-

dation will use the currently produced new version of Blinky

Blocks with faster CPUs and communication, and possibly

quasi-spherical catoms [29] having up to 12 neighbors per

module and electrostatic connectors.

Acknowledgement. This work was partially supported by

the EU Horizon 2020 Marie Sklodowska Curie Individual

Fellowship MOrPhEM (grant No. 800150), by the NCN

Project “Micromechanics of Programmable Matter” (grant No.

2011/03/D/ST8/04089), by the ANR (ANR-16-CE33-0022-

02), the French Investissements d’Avenir program, ISITE-BFC

project (ANR-15-IDEX-03), EIPHI Graduate School (contract

ANR-17-EURE-0002), Mobilitech project and EU Horizon

2020 research and innovation programme (grant No. 811099

TWINNING Project DRIVEN for the Univ. of Luxembourg).

REFERENCES

[1] M. Yim, W. Shen, B. Salemi, D. Rus, M. Moll, H. Lipson, E. Klavins,

and G. S. Chirikjian, “Modular self-reconﬁgurable robot systems,” IEEE

Robotics Automation Magazine, vol. 14, no. 1, pp. 43–52, 2007.

[2] N. J. Mlot, C. A. Tovey, and D. L. Hu, “Fire ants self-assemble into

waterproof rafts to survive ﬂoods,” Proceedings of the National Academy

of Sciences, vol. 108, no. 19, pp. 7669–7673, 2011.

[3] S. C. Goldstein, J. D. Campbell, and T. C. Mowry, “Programmable

matter,” IEEE Computer, vol. 38, no. 6, pp. 99–101, 2005.

[4] A. Nguyen, L. J. Guibas, and M. Yim, “Controlled module density

helps reconﬁguration planning,” in Proceedings of the 4th International

Workshop on Algorithmic Foundations of Robotics, pp. 23–36, 2000.

[5] R. Fitch and Z. Butler, “Million module march: Scalable locomotion for

large self-reconﬁguring robots,” The International Journal of Robotics

Research, vol. 27, no. 3-4, pp. 331–343, 2008.

[6] K. Støy, “Using cellular automata and gradients to control self-reconﬁgu-

ration,” Robotics and Autonomous Systems, vol. 54, no. 2, pp. 135–141,

2006.

[7] B. Piranda and J. Bourgeois, “A distributed algorithm for reconﬁguration

of lattice-based modular self-reconﬁgurable robots,” in Proceedings of

the 24th Euromicro International Conference on Parallel, Distributed,

and Network-Based Processing (PDP), pp. 1–9, IEEE, 2016.

[8] A. Naz, B. Piranda, J. Bourgeois, and S. C. Goldstein, “A distributed

self-reconﬁguration algorithm for cylindrical lattice-based modular

robots,” in 15th IEEE International Symposium on Network Computing

and Applications, pp. 254–263, 2016.

[9] J. Lengiewicz and P. Hołobut, “Efﬁcient collective shape shifting and lo-

comotion of massively-modular robotic structures,” Autonomous Robots,

vol. 43, no. 1, pp. 97–122, 2019.

[10] P. Thalamy, B. Piranda, and J. Bourgeois, “A survey of autonomous

self-reconﬁguration methods for robot-based programmable matter,”

Robotics and Autonomous Systems, vol. 120, p. 103242, 2019.

[11] P. J. White, S. Revzen, C. E. Thorne, and M. Yim, “A general stiff-

ness model for programmable matter and modular robotic structures,”

Robotica, vol. 29, pp. 103–121, 2011.

[12] J. Hiller and H. Lipson, “Dynamic simulation of soft multimaterial 3d-

printed objects,” Soft robotics, vol. 1, no. 1, pp. 88–101, 2014.

[13] J. Campbell and P. Pillai, “Collective actuation,” International Journal

of Robotics Research, vol. 27, no. 3–4, pp. 299–314, 2008.

[14] P. Hołobut, M. Kursa, and J. Lengiewicz, “Efﬁcient modular-robotic

structures to increase the force-to-weight ratio of scalable collective

actuators,” in Proceedings of the IEEE/RSJ International Conference

on Intelligent Robots and Systems, pp. 3302–3307, 2015.

[15] J. Lengiewicz, M. Kursa, and P. Hołobut, “Modular-robotic structures

for scalable collective actuation,” Robotica, vol. 35, pp. 787–808, 2017.

[16] P. Hołobut and J. Lengiewicz, “Distributed computation of forces in

modular-robotic ensembles as part of reconﬁguration planning,” in

Proceedings of the IEEE International Conference on Robotics and

Automation, pp. 2103–2109, 2017.

[17] B. Piranda, “Visiblesim: Your simulator for programmable matter,” in

Algorithmic Foundations of Programmable Matter, Dagstuhl Seminar

16271, p. 12, 2016.

[18] B. T. Kirby, M. Ashley-Rollman, and S. C. Goldstein, “Blinky blocks:

A physical ensemble programming platform,” in CHI ’11 Extended

Abstracts on Human Factors in Computing Systems, CHI EA ’11, (New

York, NY, USA), pp. 1111–1116, ACM, 2011.

[19] A. Tanenbaum, Structured Computer Organization. Pearson Prentice

Hall, 5th ed., 2006.

[20] M. Raynal, Distributed algorithms for message-passing systems,

vol. 500. Springer, 2013.

[21] G. Strang, Linear algebra and its applications. Thomson, Brooks/Cole,

2006.

[22] Y. Saad, Iterative methods for sparse linear systems. Society for

Industrial and Applied Mathematics, 2nd ed., 2003.

[23] J. Lengiewicz, S. P. A. Bordas, and P. Hołobut, “Autonomous model-

based assessment of mechanical failures of reconﬁgurable modular

robots with a conjugate gradient solver,” in Proceedings of the IEEE/RSJ

International Conference on Intelligent Robots and Systems, pp. 11696–

11702, 2020.

[24] W. L. Briggs, V. E. Henson, and S. F. McCormick, A Multigrid Tutorial.

SIAM, 2000.

[25] T. A. Wiesner, A. Popp, M. W. Gee, and W. A. Wall, “Algebraic

multigrid methods for dual mortar ﬁnite element formulations in contact

mechanics,” International Journal for Numerical Methods in Engineer-

ing, vol. 114, no. 4, pp. 399–430, 2018.

[26] P. Kerfriden, P. Gosselet, S. Adhikari, and S. P. A. Bordas, “Bridging

proper orthogonal decomposition methods and augmented newton–

krylov algorithms: an adaptive model order reduction for highly non-

linear mechanical problems,” Computer Methods in Applied Mechanics

and Engineering, vol. 200, pp. 850–866, 2011.

[27] L. Beex, P. Kerfriden, T. Rabczuk, and S. P. A. Bordas, “Quasi-

continuum-based multiscale approaches for plate-like beam lattices

experiencing in-plane and out-of-plane deformation,” Computer Methods

in Applied Mechanics and Engineering, vol. 279, pp. 348–378, 2014.

[28] A. Naz, B. Piranda, S. C. Goldstein, and J. Bourgeois, “Approximate-

centroid election in large-scale distributed embedded systems,” in 2016

IEEE 30th International Conference on Advanced Information Network-

ing and Applications (AINA), pp. 548–556, 2016.

[29] B. Piranda and J. Bourgeois, “Designing a quasi-spherical module for

a huge modular robot to create programmable matter,” Autonomous

Robots, vol. 42, no. 8, pp. 1619–1633, 2018.