Shape Control of Deformable Linear Objects with Offline and Online
Learning of Local Linear Deformation Models
Mingrui Yu, Hanzhong Zhong, and Xiang Li
Abstract— Shape control of deformable linear objects (DLOs)
is challenging, since it is hard to obtain the deformation models.
Previous studies often approximate the models in purely offlineor online ways. This abstract proposes a scheme for shapecontrol of DLOs, where the unknown model is estimated withboth offline and online learning, allowing for both accurate
modeling via offline learning and further updating for new
DLOs via online learning. The simulation and real-world
experiments show that the proposed method can achieve DLO
shape control better than previous works.

I. I NTRODUCTION
Deformable linear objects (DLOs) refer to deformable objects in one dimension [1]. In the field of DLO shape control,a key challenge is to obtain the exact models of DLOs,
because they are hard to calculate theoretically and vary
among DLOs [2]. Some analytical modeling methods can beused to model DLOs [3]–[5]. However, all are approximate
models, and require accurate parameters of DLOs which
are difficult to acquire. Data-driven approaches have been
applied to learn the deformation models. A common method
is to first offline learn a forward kinematics model (FKM)
offline, and then use model predictive control (MPC) inmanipulation [6]–[9]. Reinforcement learning and imitation
learning methods have also been studied [10]–[13]. The
problem is that they are less data-efficient and may get into
trouble manipulating an untrained DLO. Apart from theseoffline approaches, some studies have used purely online
methods to estimate the local linear deformation model ofmanipulated DLOs, which can be applied to any new DLO[14]–[17]. However, these online estimated models are lessaccurate because only limited local data can be utilized.
In this abstract, we propose a scheme for shape control ofDLOs, where the unknown deformation model is estimatedwith both offline and online learning, shown in Fig. 1.
Specifically, we use a radial-basis-function neural network(RBFN) to model the mapping from the state to the local
linear deformation model. In the offline phase, the RBFN istrained on random data. The offline model is then seamlessly
migrated to the online phase as an initial estimation. In the
online phase, an adaptive controller is proposed to control
the shape, in which the RBFN is further updated to adapt
to the manipulated DLO concurrently. Thus, the offline
learning and online learning complement each other. The
system’s stability is analyzed using the Lyapunov method.
Simulation and real-world experiment results are presented to
M. Yu, H. Zhong, and X. Li are with the Department of Automation, Tsinghua University, China. Corresponding author: Xiang Li (xiangli@tsinghua.edu.cn)

DLO

Features

Offline learning
Offlinephase

Target points & Features
Initial model
Manipulator
Online data

Online learning
Updated model

Onlinephase

Desired positions
Controller

Fig. 1. Overview of the proposed scheme for DLO shape control. The
shape of the DLO is represented by multiple features along the DLO. Someof the features are chosen as target points, and the task is defined as moving
the target points to their desired positions.

demonstrate the better performance of the proposed scheme
compared with the previous methods. The full paper [18],video, and code are available at the project website1 . A
further improved work can be found here2 .
II. M ETHODOLOGYThis abstract considers quasi-static shape control of elastic
DLOs, as illustrated in Fig. 1. Some frequently-used notations are listed as follows. The vertical concatenation ofcolumn vector a and b is denoted as [a; b]. The position
vector of the end-effectors is represented as r ∈ ℜn . The
position of the ith feature is represented as xi ∈ ℜl . The
overall shape vector of the DLO is represented as x =[x1 ; · · · ; xm ] ∈ ℜlm , where m is the number of the features.
A. Local Linear Deformation Model
The velocity vector of the DLO features can be locallylinearly related to the velocity vector of the end-effectors
using a Jacobian matrix [14]–[17]. Different from the previous works, we estimate the Jacobian matrix by learning the
mapping from the state (x, r) to the Jacobian matrix J :ẋ = J (x, r)ṙ(1)

Proposition: With the quasi-static assumption, the velocity
vector of the features on the elastic DLO can be related to
the velocity vector of the end-effectors as (1).
Proof: Denote the potential energy of the elastic DLO as
E, which is assumed to be fully determined by x and r. In
the quasi-static assumption, internal equilibrium holds at allstates during the manipulation. That is, ∂E/∂x = 0 at any
state. Consider the DLO is moved from state (x̄, r̄) to state(x̄+δx, r̄ +δr) where δx and δr are small displacements ofthe features and the end-effectors. Denote ∂E/∂x as g(x, r),
1 https://mingrui-yu.github.io/shape_control_DLO/
2 https://mingrui-yu.github.io/shape_control_DLO_2/

∂ 2 E/(∂x∂x) as A(x, r), and ∂ 2 E/(∂x∂r) as B(x, r).
Using Taylor expansion and neglecting higher order terms:𝝓B(x̄, r̄)δr(3)

In slow manipulations, ẋ ≈ δx/δt and ṙ ≈ δr/δt withsmall δt. Then, denoting −(A(x, r))−1 B(x, r) as J (x, r),
we derive (1) and prove the proposition.
Note that (1) can be rewritten as

 

ẋ1
J1 (x, r)

 

..
ẋ =  ...  = 
(4)
 ṙ
.
ẋm

Jm (x, r)where Jk (x, r) is the ((k − 1)l + 1)th to (kl)th rows ofJ (x, r). Thus, it can be obtained thatk = 1, · · · , mẋk = Jk (x, r)ṙ,

B. Offline Learning
We apply a neural network (NN) to approximate theJacobian matrix, in which the input is the current state andthe output is the Jacobian. Two properties of the Jacobian can
be noticed intuitively: 1) translation-invariance: translationof the whole DLO will not alter the Jacobian matrix; 2) approximate scale-invariance: DLOs with different lengths but
similar overall shapes may have similar Jacobian matrices.
Thus, to improve the NN’s generalization ability, we modify
the representation of the input state from [x; r] to
△

(6)

where

x k − p1
xk − p0;,x̄k =∥xk − p0 ∥ ∥xk − p1 ∥p̄ =p1 − p0∥p1 − p0 ∥(7)

(k = 1, · · · , m), where p0 , p1 are the positions of the left
and right grasped ends of the DLO, and q0 , q1 are theorientations of the left and right grasped ends.
Then, (5) can be rewritten asẋk = Jk (ϕ)ṙ,k = 1, · · · , m(8)

We apply a radial-basis-function network (RBFN) [19] torepresent the actual Jacobian matrix as a function of ϕ:vec (Jk (ϕ)) = Wk θ(ϕ),

k = 1, · · · , m(9)where vec(·) refers to the column vectorization operator, and
Wk is unknown actual RBFN weights for the k th feature.
The θ(ϕ) represents the vector of activation functions. We
use the gaussian radial function as the activation function.
Equation (9) can be decomposed as
Jki (ϕ) = Wki θ(ϕ),

i = 1, · · · , nvec(𝑱෠2 )෢𝑚𝑾

vec(𝑱෠𝑚 )Input Layer

RBF Neurons

Output Layer

Fig. 2.
The architecture of the RBFN for learning the local linear
deformation model. The network takes the state representation in (6) as
the input and outputs the estimated Jacobian matrices.

where Jki is the ith column of Jk , and Wki is thethth((i − 1)l + 1) to (il) rows of Wk . Subscribing (10) into(8) yields
ẋk = Jk (ϕ)ṙ =nXJki (ϕ)ṙi =

i=1

n
X

Wki θ(ϕ)ṙi

(11)

i=1

where ṙi is the ith element of ṙ. The estimated Jacobianmatrix is represented as
vec(Jˆk (ϕ)) = Ŵk θ(ϕ)

(12)

(5)

which indicates that different features correspond to different
Jacobian matrices.

ϕ = [x̄1 ; · · · ; x̄m ; p̄; q0 ; q1 ]

𝜽

……

−1

vec(𝑱෠1 )……

δx ≈ − (A(x̄, r̄))

෢1
𝑾
෢2
𝑾

g(x̄+δx, r̄+δr) ≈ g(x̄, r̄) + A(x̄, r̄)δx + B(x̄, r̄)δr (2)where g(x̄ + δx, r̄ + δr) = g(x̄, r̄) = 0. Assuming the
DLO has a positive and full-rank stiffness matrix around theequilibrium point, matrix A is invertible [14]. Then, we have

Estimated
Jacobian matrices

Staterepresentation(10)

where Ŵ is estimated weights. The architecture of the RBFN
is shown in Fig. 2. The approximation error for the k thfeature ek is specified as
ek = ẋk − Jˆk (ϕ)ṙ
n
n
n
X
X
X
=
Wki θ(ϕ)ṙi −Ŵki θ(ϕ)ṙi =∆Wki θ(ϕ)ṙi
i=1

i=1

i=1

(13)
We use the smooth L1 loss [20] of ek for offline training.
C. Adaptive Control through Online Learning
We propose an adaptive control scheme, in which theoffline estimated model is treated as an initial approximation and then further updated during the shape control
tasks. The target points can be any subset of the features,
whose indexes form set C. Then, the target shape vector xc and target Jacobian matrix J c (ϕ) are denoted as
xc = [· · · ; xk ; · · · ], J c (ϕ) = [· · · ; Jk (ϕ); · · · ], k ∈ C. The
velocity vector of the robot end-effectors ṙ is controlled andspecified as†ṙ = −α Jˆc (ϕ) ∆xc
(14)

†
where Jˆc (ϕ) is the Moore-Penrose pseudo-inverse of theestimated Jacobian matrix. In addition, ∆xc = xc −xcdesired
where xcdesired is the desired position vector of the target
points, and α ∈ ℜ is a positive control gain.
The online updating law of the j th row of Ŵki of the
RBFN is specified as
˙ T
Ŵkij
= ṙi θ(ϕ)(η1 ∆xkj + η2 ekj ),j = 1, · · · , l(15)

where ∆xkj is the j th element of the task error ∆xk , andekj is the j th element of the approximation error ek . The
η1 and η2 are positive scalars. Such updating is done for allk ∈ C and i = 1, · · · , n.

TABLE I
P ERFORMANCE OF THE METHODS IN 2D AND 3D DLO SHAPE CONTROL TASKS IN SIMULATION .
Methods

2D tasks
Success
Averageratetask error (cm)

Offlinetraining samples

FKM+MPC
WLS
SAC
Ours(w/o online)
Ours

180k
1000k
30k
30k

(a) Case 1

82/10085/10042/10094/10097/100

Averagetask time (s)Offlinetraining samples

10.48814.351
6.486
8.568
8.512

180k
1000k
30k
30k

1.662
0.992
3.185
0.461
0.457

(b) Case 2(c) Case 3(d) Case 6

3D tasks
Success
Averageratetask error (cm)
52/10055/10010/10069/10092/100

3.298
1.940
3.412
1.446
1.254

(e) Case 7

Averagetask time (s)14.27520.214
8.070
9.521
9.529

(f) Case 8

Fig. 3. Some of the shape control tasks accomplished using our method in real-world experiments. The left end of the DLO is grasped by a UR5 armand the right end is fixed. The green+black circles represent the desired positions of the DLO features. In all cases, the DLO starts from a straight line.
TABLE IIP ERFORMANCE IN REAL - WORLD 2D SHAPE CONTROL TASKS .

(a) 2D(b) 3D8

10-step prediction error (cm)

10-step prediction error (cm)Fig. 4. The simulation environment. The blue points represent the features
along the DLO. The green points represent the desired positions of thefeatures.
Forward Kinematics (MLP)
Forward Kinematics (biLSTM)
Ours

6

Methods

Success
rate

Averagetask error (cm)Averagetask time (s)FKM+MPC
WLS
SAC
Ours(w/o online)
Ours

10/10
9/10
1/10
10/10
10/10

1.394
1.164
4.955
1.153
0.620

7.670
19.08912.30010.0908.220

8Forward Kinematics (MLP)
Forward Kinematics (biLSTM)
Ours

6

B. Shape Control with Online Learning

A. Offline Learning of the Deformation Model

We evaluate the proposed control method and compare itwith other methods. If the final task error is less than 5cm,
the task is regarded successful. The average task error refers
to the average task error of only the successful cases.
1) Simulation: First, we test their performance in both
2D and 3D DLO shape control tasks in simulation. The
manipulated DLO is a new DLO not used in the offline
learning, and 100 cases with different feasible desired shapes
are tested. As shown in Table I, our method significantly
outperforms the compared methods on both success rate andaverage task error, even using much less offline training data.
2) Real-world experiments: We also evaluate these methods in real-world 2D tasks, as shown in Fig. 3. The sameoffline models as those in the simulation are used (no realworld data are collected offline). We separately carry out 5
tests with different feasible desired shapes on two different
DLOs. The results are shown in Table II. Our methodcompletes all 10 tasks and achieves the lowest average taskerror, where the online learning enables faster and more
precise control.

We test the offline modeling accuracy on a certain DLO
and its relationship to the amount of training data, in which
we compare our local linear Jacobian model with nonlinear
forward kinematics models based on multi-layer perceptrons(MLP) or biLSTM. The data are randomly collected in thesimulation. As shown in Fig. 5, the results indicate that our
Jacobian model can achieve higher prediction accuracy withless training data.

This abstract considers the shape control of DLOs withunknown deformation models. First, the offline learning wellinitiates the estimation of the model. Then, the adaptive control scheme with online learning further updates the modeland achieves shape control. The experiments demonstrate theeffectiveness of our method. For more details, please referto the full paper [18].

4
2
0

0

2
4
6
8
Training data samples (×104)

10

4
2
0

0

2
4
6
8
Training data samples (×104)(a) 2D10(b) 3D

Fig. 5. The relationship between the offline modeling accuracy and theamount of training data.

III. R ESULTS
We carry out both simulation and real-world experiments
to validate the proposed method. The simulation environmentis shown in Fig. 4. We choose three representative classesof methods for comparison: 1) learning FKM offline andusing MPC for shape control (FKM+MPC); 2) estimating
the Jacobian matrix online using weighted least squareestimation (WLS); 3) reinforcement learning (SAC).

IV. C ONCLUSION

R EFERENCES[1] J. Sanchez, J.-A. Corrales, B.-C. Bouzgarrou, and Y. Mezouar,“Robotic manipulation and sensing of deformable objects in domestic
and industrial applications: a survey,” The International Journal of
Robotics Research, vol. 37, no. 7, pp. 688–716, 2018.
[2] J. Zhu, A. Cherubini, C. Dune, D. Navarro-Alarcon, F. Alambeigi,
D. Berenson, F. Ficuciello, K. Harada, J. Kober, X. Li, et al., “Challenges and outlook in robotic manipulation of deformable objects,”
IEEE Robotics and Automation Magazine, 2021.
[3] H. Yin, A. Varava, and D. Kragic, “Modeling, learning, perception,and control methods for deformable object manipulation,” Science
Robotics, vol. 6, no. 54, 2021.
[4] S. Duenser, J. M. Bern, R. Poranne, and S. Coros, “Interactive robotic
manipulation of elastic objects,” in 2018 IEEE/RSJ International
Conference on Intelligent Robots and Systems (IROS), 2018, pp. 3476–
3481.
[5] A. Koessler, N. Roca Filella, B. Bouzgarrou, L. Lequievre, and J.-A.
Corrales Ramon, “An efficient approach to closed-loop shape control
of deformable objects using finite element models,” in 2021 IEEE
International Conference on Robotics and Automation (ICRA), 2021.
[6] W. Yan, A. Vangipuram, P. Abbeel, and L. Pinto, “Learning predictive
representations for deformable objects using contrastive estimation,”in 4th Conference on Robot Learning (CoRL), 2020.
[7] W. Zhang, K. Schmeckpeper, P. Chaudhari, and K. Daniilidis, “Deformable linear object prediction using locally linear latent dynamics,”
in 2021 IEEE International Conference on Robotics and Automation(ICRA), 2021.
[8] M. Yan, Y. Zhu, N. Jin, and J. Bohg, “Self-supervised learning of state
estimation for manipulating deformable linear objects,” IEEE Robotics
and Automation Letters, vol. 5, no. 2, pp. 2372–2379, 2020.
[9] Y. Yang, J. A. Stork, and T. Stoyanov, “Learning to propagateinteraction effects for modeling deformable linear objects dynamics,”
in 2021 IEEE International Conference on Robotics and Automation(ICRA), 2021.
[10] X. Lin, Y. Wang, J. Olkin, and D. Held, “Softgym: Benchmarking
deep reinforcement learning for deformable object manipulation,” in
4th Conference on Robot Learning (CoRL), 2020.
[11] L. Rita and K. Yiannis, “Learning shape control of elastoplastic
deformable linear objects,” in 2021 IEEE International Conferenceon Robotics and Automation (ICRA), 2021.
[12] A. Nair, D. Chen, P. Agrawal, P. Isola, P. Abbeel, J. Malik, andS. Levine, “Combining self-supervised learning and imitation forvision-based rope manipulation,” in 2017 IEEE International Conference on Robotics and Automation (ICRA), 2017, pp. 2146–2153.
[13] T. Tang, C. Wang, and M. Tomizuka, “A framework for manipulating
deformable linear objects by coherent point drift,” IEEE Robotics andAutomation Letters, vol. 3, no. 4, pp. 3426–3433, 2018.
[14] D. Navarro-Alarcon, H. M. Yip, Z. Wang, Y. Liu, F. Zhong, T. Zhang,and P. Li, “Automatic 3-d manipulation of soft objects by robotic arms
with an adaptive deformation model,” IEEE Transactions on Robotics,
vol. 32, no. 2, pp. 429–441, 2016.
[15] J. Zhu, B. Navarro, P. Fraisse, A. Crosnier, and A. Cherubini, “Dualarm robotic manipulation of flexible cables,” in 2018 IEEE/RSJ
International Conference on Intelligent Robots and Systems (IROS),
2018, pp. 479–484.
[16] S. Jin, C. Wang, and M. Tomizuka, “Robust deformation model
approximation for robotic cable manipulation,” in 2019 IEEE/RSJ
International Conference on Intelligent Robots and Systems (IROS),
2019, pp. 6586–6593.
[17] R. Lagneau, A. Krupa, and M. Marchal, “Automatic shape control of
deformable wires based on model-free visual servoing,” IEEE Robotics
and Automation Letters, vol. 5, no. 4, pp. 5252–5259, 2020.
[18] M. Yu, H. Zhong, and X. Li, “Shape control of deformable linear
objects with offline and online learning of local linear deformation
models,” in 2022 IEEE International Conference on Robotics andAutomation (ICRA), 2022.
[19] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014.
[20] R. Girshick, “Fast r-cnn,” in Proceedings of the IEEE international
conference on computer vision, 2015, pp. 1440–1448.