You are on page 1of 8

Learning to Simulate Tree-Branch Dynamics for Manipulation

Jayadeep Jacob1 , Tirthankar Bandyopadhyay2 , Jason Williams2 , Paulo Borges2 , Fabio Ramos1,3

Abstract—We propose to use a simulation driven inverse


inference approach to model the joint dynamics of tree branches
under manipulation. Learning branch dynamics and gaining
the ability to manipulate deformable vegetation can help with
occlusion-prone tasks, such as fruit picking in dense foliage, as
well as moving overhanging vines and branches for navigation
in dense vegetation. The underlying deformable tree geometry is
encapsulated as coarse spring abstractions executed on parallel,
non-differentiable simulators. The implicit statistical model de-
arXiv:2306.03410v1 [cs.RO] 6 Jun 2023

fined by the simulator, reference trajectories obtained by actively


probing the ground truth, and the Bayesian formalism, together
guide the spring parameter posterior density estimation. Our
non-parametric inference algorithm, based on Stein Variational Fig. 1. Autonomous navigation task: Our field robot obstructed by vegetation.
Gradient Descent, incorporates biologically motivated assump-
tions into the inference process as neural network driven learnt costly environment modifications to improve visibility and
joint priors; moreover, it leverages the finite difference scheme reachability [4]. The harvest success rates of state-of-the-art
for gradient approximations. Real and simulated experiments
methods, in the presence of partial and complete occlusions
confirm that our model can predict deformation trajectories,
quantify the estimation uncertainty, and it can perform better are 50-75% and 5% respectively [3]. Along the same lines,
when base-lined against other inference algorithms, particularly for a mobile robot to perform autonomous navigation in
from the Monte Carlo family. The model displays strong robust- natural environments, such as forests and grasslands; where
ness properties in the presence of heteroscedastic sensor noise; plant foliage, non-compliant branches and dense vegetation
furthermore, it can generalise to unseen grasp locations.
pose obstacles; the conventional approach has been to avoid
Index Terms—Probabilistic Inference, Simulation and Anima-
tion, Field Robots them altogether, quite unlike human subjects who seamlessly
couple locomotion and manipulation to interact with objects,
I. I NTRODUCTION clear the path, and navigate. Having a simulated twin with
inferred dynamics can overcome these barriers to improve
Simulation driven learning approaches have been gaining fruit detection rate and grasp quality in harvesting tasks, and
popularity to address the challenging task of manipulating path planning with contact around obstacles for locomotion.
deformables. In this paper, we study the deformation char- Finally, modelling the deformation behaviour across all branch
acteristics of a tree branch under forces exerted by a robotic grasp locations allows the arm to effectively trade-off the low
arm via simulation-based parameter inference. Learning the force and high reach required at the outer edge vs the high
branch dynamics through simulation has significant practical force and low reach at the inner fork, thereby, amplifying the
ramifications, particularly for the robotics community. First, autonomous decision making capacity of the manipulator.
it adds the missing physics link to visual tree reconstruction
In general, the goal of an inverse inference approach is
works; for example [1][2], to create a complete digital twin
to estimate the latent parameters of a physical phenomenon
with both perceptual features and inferred dynamical prop-
based on its observed effects and subsequently to forecast
erties. Second, such a digital model reduces the reality gap,
future system behaviour. A subclass of this model, commonly
often denoted as the real-to-sim gap in the robotics context,
known as simulation-based inference, leverages high fidelity
and facilitates massively parallel policy learning, inexpen-
simulations to implicitly define a statistical model and perform
sive data collection, safe exploration, and most importantly,
the inference through either frequentist or Bayesian paradigms.
real-time control estimation. On the application front, the
The parameters themselves may not necessarily have any phys-
presence of occlusions from branches, other fruit clusters,
ical meaning [5]; moreover, the objective of the estimation is to
stems and foliage pose a significant challenge to robotic fruit
predict a useful outcome rather than to accurately estimate the
harvesting tasks [3], which are typically addressed through
true parameters [6]. Furthermore, probabilistic inference ap-
1 Jayadeep Jacob is with the School of Computer Science, The University proaches allow for capturing the uncertainty in these variables
of Sydney, NSW, Australia jjac4485@sydney.edu.au and the accompanying effects; therefore, they are considered a
2 Tirthankar Bandyopadhyay, Jason Williams, and Paulo de-facto standard for applications with practical significance,
Borges are with the Robotics and Autonomous Sys-
tem Group, Data61, CSIRO, Pullenvale, QLD, Australia.
particularly within robotics.
(tirtha.bandy,jason.williams,paulo.borges) A broad outline of our workflow is as follows: to begin with,
@data61.csiro.au; we capture the branch geometry with crude spring abstractions
1,3 Fabio Ramos is with the School of Computer Science, The University
of Sydney, NSW, Australia, and with the NVIDIA Corporation, Seattle, USA using purpose-built simulations executed on massively paral-
fabio.ramos@sydney.edu.au lel, GPU based, black-box simulators. Next, we actively probe
the real branches to measure the observed effects of forces. build coarse-grained, but computationally efficient models for
While individual twigs are rigid by nature, the additional de- suturing [11] and fabric management [12], its more accurate,
grees of freedom incurred due to the joint dynamics of coupled but slower counterpart, the finite element method (FEM) mod-
branches makes the problem non-linear and high dimensional. els have been used for object tracking [13] and manipulating
We consider the measured deformation trajectories from the rubber tubes [14]. Perhaps more in line with our own work,
real world as i.i.d samples from a ground truth distribution. both mass-spring and FEM models are used in conjunction,
Finally, guided by a Bayesian model, we use a probabilistic the latter as a reference, to acquire deformation trajectories for
inference algorithm to infer the posterior density of spring motion planning around soft toys [15].
parameters and to predict the branch deformation behaviour. In contrast, dynamic behaviour modelling of tree branches
Overall, our work lies within the broader objective of trans- for active manipulation is rather rare in literature. Spring based
lating the success of manipulation schemes within structured models have been used to aid visual reconstruction of trees
environments, guided by simulation driven inverse inference [16] and to animate the interaction between rain drops and
[7][8], out to the natural world. However, simulation of out- tree branches [17]; however, the spring parameter values are
door environment is beset by both epistemic (e.g., unaccounted assumed and fixed in advance. On the other hand, applying
factors, such as wind; model simplicity) and aleatoric (e.g., spring models to estimate branch behaviour in the presence
blurred vision due to limited lighting, noisy sensors) uncer- of wind loading has been extensively studied in forestry; for
tainties. Therefore, optimisation models that capture point esti- example, to measure the overall sway of tree [18] or to study
mates of simulation parameters, from the frequentist paradigm, windthrow of crops [19]. A comprehensive survey of plant
are not sufficient in place of an uncertainty aware Bayesian deformation behaviour under wind is presented in [20]. Such
model. Although not the focus of this paper, we postulate that, works depend on accurate modelling of the wind forces, can
on a temporal scale, each inferred posterior density can feed only compute parameters in the lateral direction of the wind,
into the next iteration as a prior, leading to faster convergence and therefore they are unsuitable for active manipulation using
over time and that the posteriors can generalise to different robotic arms. To the best of our knowledge, no works exist in
branches, trees and perhaps even across species. the literature that actively manipulate tree branches to estimate
Our experiments demonstrate that the learnt model can the spring parameters through simulation.
estimate deformation trajectories given the end-effector forces, On the inference front, probabilistic methods have been
quantify the model uncertainty, display robustness in presence proposed to estimate parameters to bridge the gap between
of perturbations and can perform the inference in near real simulation and reality, the real-to-sim problem, for rigid bodies
time. Overall, our contributions are summarised as below: [6], granular media [21], and deformables [8]. While these
1) We propose to model the joint dynamics of deformable approaches estimate parameter posteriors through the Bayesian
branches as mass-spring abstractions on a parallel non- framework, they almost always start with an uninformative
differentiable simulator, obtain reference trajectories by prior, a uniform prior to enforce limits, or other well known
actively probing real trees, and infer the spring parame- distributions to represent the subjective belief about the param-
ters via a probabilistic inverse inference algorithm. eters. Weighing the inference technique alone, our approach
2) We incorporate biologically motivated assumptions into appears closest to [6], which introduces a constrained version
the Bayesian inference workflow by formulating in- of the SVGD algorithm inspired by the Lagrange multiplier
equality constraints as differentiable and learnt joint optimization strategy. In comparison, we treat the simulator
prior distributions. as a black-box, do not rely on accurate gradients for the
3) We demonstrate the transfer of the learnt model from simulation rollouts, and our inference formulation can embody
simulation to the real world with two different robot inequality assumptions as prior beliefs.
models operating on distinct physical trees, thereby
additionally validating model independence from both III. A PPROACH
arm kinematics and branch topology.
4) Finally, we show that the learnt model and the predicted A. Mass-Spring-Damper Model
deformation trajectories are robust to noise perturbations
from the sensors and variations in branch grasp locations Our work utilises the well established Mass-Spring-Damper
where the manipulation forces are applied. System (MSS) abstraction to simplify the intricate tree geom-
etry. MSS models are computationally efficient and simple to
II. R ELATED W ORK implement; however, the spring constants are hard to obtain
Manipulation of deformable objects, such as clothes, elastic from material properties without reference models. In this
bands, and ropes has gained much traction over the years, work, we describe the branch structures as cylindrical links
owing to the broad range of ensuing applications. The com- coupled with a torsional spring-damper system (Fig. 2a).
prehensive surveys [9] and [10] detail established techniques The dynamics of a single branch, and consequently that
to represent shapes, mange the dynamics, and apply learning of the entire branch system, can be derived from Newton’s
strategies, all in order to perform control and planning with second law of motion. Given an external torque Text , branch
deformables. While mass-spring models have been used to stiffness P , damping factor D, moment of inertia J, and
(a) (b) (c)
Fig. 2. (a) Mass-Spring-Damper representation of a branch system (b) Parallel instances of our coarse-grain tree geometry simulations, executed on NVIDIA
Isaac Gym. (c) Physical manipulator setups. Left: Kinova Jaco-2 arm on a synthetic plant. Right: Franka-Emika Panda arm on a farm tree.

angular displacement ψ, this relationship can be obtained as: realistic finite element method (FEM) models, we show that
it is sufficient to capture the multi-branch joint dynamics.
Text “ J ψ: ` Dψ9 ` P ψ (1)
Finally, we choose NVIDIA Isaac Gym [23] to simulate
We propose to model the relation f : Text ÞÑ pψ, ψq, 9 by tree structures; specifically, its joint space PD controller to
comparing the model displacement trajectories to reference apply deformation torques and measure the resulting motion
trajectories from the real world. We use physics simulators characteristics. Isaac Gym supports tensor based distributed
to model this MSS abstraction, which additionally helps to environments, and it permits parallel execution of the inference
account for the latent attributes that affect the branch motion, without CPU bottlenecks. However, Isaac Gym simulations are
such as gravity and the branch fork angle. non-differentiable; therefore, unlike [6], throughout this paper
we use finite difference methods to approximate gradients.
B. Tree Simulation
Generating a digital twin for a physical entity enables cost C. Probabilistic Parameter Inference
effective data generation and robust control policy learning; The key idea of our approach is to model the relationship
moreover, GPU-accelerated simulators provide the advantage between the force required to counteract the simulated branch
of faster training and efficient run time inference. This section resistance Tctrl and the resulting branch deformation trajec-
describes our approach to generating crude digital tree replicas tory, through inverse inference of Kp and Kd parameters. The
that run in parallel to perform simulator driven learning. cost of deformation is established by comparing the position
To begin with, we purpose-built a tool for generating tree and velocity trajectories between the ground truth and the sim-
geometry. The geometric structures can be generated from ulation through a loss function. The ground truth trajectories
scratch, or alternatively, it can be integrated with a perception can be generated in two ways; first, as yet another independent
system to create replicas of real world trees. The focus of this articulated body simulation as described in section IV-A, and
paper is the former, where attributes like trunk dimensions, second using real robotic arms on physical trees, as described
number of levels and branch angles can be specified to produce in section IV-B.
the required geometry. The resulting coarse tree model (Fig. To begin with, we define a force profile F as a sequence
2b) takes cues from the natural world to replicate traits of of force vectors applied on the target branch, at a location C,
real trees, such as having a fractal pattern and adhering to the over g time steps.
cross sectional area-preservation principle [22], also known as ␣ (
the Leonardo da Vinci’s rule. Furthermore, our approach is F :“ f0 , f1 , ..., fg | f P R3 .
not bound by branch topology, and it can accommodate larger
The resulting trajectories τ gt and τ sim represent the branch
plant models built from Lindenmayer systems (L-system).
displacement for ground truth and simulation respectively. The
Subsequently, the MSS model is implemented as a multi-
position trajectory τ is computed as the deviation of the
link structure with branches approximated as cylindrical links
the point C from its rest position C0 over time, while the
and branch forks represented by actuated revolute joints. The
derivative with respect to time gives the velocity trajectory τ9 .
branch motion is simulated via a proportional–derivative (PD)
A general parameter inference problem is characterised by
controller governed by tunable stiffness and damping gain
three terms: a parameterised simulator function, a loss defini-
parameters, θ “ tKp , Kd u. Consequently, the branch motion
tion and an inference framework. First, we define the simulator
estimated by the PD controller is:
as a function S that steps forward in time, given simulation
9
Tctrl “ Kp ψ ` Kd ψ, (2) parameters θ and force profile, to roll out a trajectory τ sim
over time.
where Tctrl is the controlling torque exerted by the simulated
branch to offset the positional ψ and velocity ψ9 errors. S : pθ, si , fi q ÞÑ si`1 , θ P RN
The final structure is represented with a simulator agnostic 6 τ θsim :“ sθ0 , sθ1 , ..., sθg ,
␣ (
unified robotics description format (URDF). While the sim-
plified mass-spring model is an imprecise approximation of where N is the simulation parameter count. For each branch,
the ground truth, particularly when compared to other more we take N “ 2 to represent its PD coefficients, Kp and Kd .
The relationship to be modelled then is f : F ÞÑ pτ , τ9 q. The algorithm starts with n randomly initialised points in
Second, we define the loss L over simulation parameters as RN , termed as particles, representing draws from the target
deviations of the branch position and velocity trajectories from density. At each step of the iteration, the particles are pushed
a ground truth. closer by a small step size ϵ P R as below:
› ›
› θ
Lpθq :“ ›τ θsim ´ τ gt ›2 ` ›τ9 sim ´ τ9gt › .
› › ›
2 θit`1 Ð θit ` ϵϕ˚ pθit q @i “ 1, 2, ..., n, (7)
Finally, similar to [6] and [8], we use Bayesian inference where θit represents the ith particle at time step t and ϕ˚ repre-
to quantify the uncertainty associated with the simulation sents the optimal function that minimises the Kullback–Leibler
parameters. The canonical Bayes’ rule relates the parameter (KL) divergence between the distribution represented by the
posterior probability density ppθ|τ sim q to the corresponding current particle state and the expected distribution, ppθ|τ sim q
likelihood ppτ sim |θq and the prior p0 pθq, in our case. However, in contrast to SGD, this minimisation
is performed in a space of functions, named the Reproducing
ppθ|τ sim q 9 ppτ sim |θq p0 pθq. (3) Kernel Hilbert Space (RKHS), uniquely identified by a kernel
While point estimates of optimal parameters can be obtained as function k : RN ˆ RN ÞÑ R. We use the popular Radial Basis
||θ´θ 1 ||2
θ˚ “ argmin Lpθq, i.e., by minimising the objective function, Function (RBF) kernel: kpθ, θ1 q “ expp´ 2σ2 q, where the
θ P RN bandwidth σ is computed using the median heuristic. Using
we instead attempt to successively sample promising regions
the Stein approximation from [25] to compute the steepest
of the posterior density ppθ|τ sim q in order to capture its
direction of descent in RKHS, i.e, the optimal function ϕ˚ :
multiple modalities. Furthermore, we propose to compute the
n
likelihood term by translating the objective function to a 1 ÿ
Boltzmann distribution along the lines of simulated annealing ϕ̂˚ pθq “ kpθj , θq∇θj log ppθj |τ sim q ` ∇θj kpθj , θq.
n j“1
architectures [24]
While SVGD allows for placing the particles on a GPU and
e´Lpθq{kT
ppτ sim |θq :“ 7 Lpθq ě 0, (4) performing the operations independently, the traditional per-
Zθ formance bottleneck has been in executing the simulations to
where Zθ is the constant set of all possible energy states, k the derive the gradients. In our case, the term ∇θj log ppθj |τ sim q
Boltzmann constant, and T the fixed annealing temperature, is approximated via finite differences instead. Our simulator
e´Lpθq{kT p0 pθq choice, Isaac Gym, is non-differentiable but supports effi-
6 ppθ|τ sim q “ , (5) cient gradient approximations through GPU based simulations;
Zθ Zτ
therefore, the entire inference process runs in parallel. On
where Zτ is the normalisation constant. We do away with the substituting the prior and likelihood terms from (5), we obtain:
intractable Zθ Zτ term by choosing Stein Variational Gradient
n
Descent algorithm (SVGD) as our inference algorithm as 1 ÿ Lpθq
described in III-D. ϕ̂˚ pθq “ ´kpθj , θq∇θj `
n j“1 kT
While our approach can be generalized to a full 3D system,
in this paper, we only consider deformations in the vertical kpθj , θq∇θj log p0 pθj q ` ∇θj kpθj , θq. (8)
plane, implemented by restricting the force profile to the Notice that the intractable constant terms from Boltzmann
gravity-axis, i.e., perpendicular to the ground. Similarly, we distribution and from the Bayes’ rule, Zθ and Zτ vanish due
ignore the discontinuous dynamics of branch rupture resulting to the gradient, which is a quintessential feature of SVGD.
from intolerable forces. Finally, we treat each τ sim trajectory
as an i.i.d sample from the underlying distribution, compute E. Joint Parameter Inference
the likelihood term (4) over multiple trajectories, and use the A multi-branch joint parameter estimation problem is an
log form to avoid vanishing floating points, extension of (3) to R coupled branches that actively take part
ÿ ´Lpθq in the joint dynamics.
log ppτ sim |θq :“ ´ log Zθ . (6)
τ
kT ppθ1 , ..., θR |τ sim q 9 ppτ sim |θ1 , ..., θR q p0 pθ1 , ..., θR q (9)
D. Stein Variational Gradient Descent This includes the child branch which is actively probed and all
In this section, we provide an overview of the SVGD [25] its main parent branches up to the fork where any deformation
and its utility in estimating branch simulation parameters. is observed due to the probing.
SVGD belongs to a family of Variational Inference methods
that takes an optimisation approach to simulate intractable F. Smooth Box Prior
probability distributions. SVGD has been shown to converge We use the prior p0 pθq from (5) to define a search range
faster than alternatives such as Markov Chain Monte Carlo for the inference algorithm in order to ensure convergence
(MCMC) predominantly due to its deterministic and iterative within a reasonable time. Using a uniform prior results in
progression, akin to the traditional Stochastic Gradient Descent non-differentiable regions around the prior limits. For that
(SGD) optimisation. reason, we use the Smoothed Box prior from GPyTorch library
[26] to generate a smoothed version of the uniform prior to the possibility of learning directly from the tree geometry in-
ensure differentiability at all points. Given a box defined by stead of hand coding an assumption a priori. Most importantly,
the lower (θl ) and upper (θu ) bound of simulation parameters we assert that this approach is consistent with the Bayesian
B :“ tθ | θ P rθl , θu s, θ P RN u, and a variance σ 2 , the fully paradigm, where assumed knowledge is expressed with priors,
differentiable smoothed box prior is approximated as: unlike other methods that penalise constraint violations at the
` dpθ, Bq2 ˘ likelihood - CSVGD [6], for example.
p0 pθq „ exp ´ a However, parameter estimation with (10) and (12) generates
2σ 2 non-trivial flat regions in the target density, thereby slowing
where the distance d is defined as dpθ, Bq “ min
1
|θ ´ θ1 |. down the inference process. A better alternative is to penalise
θ PB
the difference in parameters as per the prior belief.
G. Neural Network based Inequality Prior #
0 θ1 ě θ2
Further to constraining the search range with a smooth box ypθ1 , θ2 q :“ (13)
prior, we propose to incorporate biological assumptions on ´ηpθ2 ´ θ1 q θ1 ă θ2
the relationship between the branch parameters into the prior #
p0 pθq when more than one branch is involved. 1 θ1 ě θ2
6 p0 pθ1 , θ2 q « (14)
For the simplest multi-branch case, where R “ 2, i.e., one e ´ηpθ2 ´θ1 q
θ1 ă θ2
parent child pair each with a single parameter θ1 P R and
θ2 P R respectively, an inequality assumption that defines the where η is a scaling factor that determines the sharpness of
joint parameter relationship could be: the gradient and η ą 0. Note that we do not make any
# assumptions about the relationship between the parameters
0 θ1 ě θ2 when the relationship is valid, and the penalty applies only
ypθ1 , θ2 q :“ , (10) when the constraint is violated. For the simple inequality case
´η θ1 ă θ2
we implemented using (14), the reduction in search space is
where η is a scaling factor and η " 0. We propose to approximately of the order of 2n , n being the number of priors.
train a simple one-hidden layer, feed forward, neural network
regressor to model y, and then use the predicted y 1 as an IV. E XPERIMENTAL S ETUP
approximation for log of prior, i.e., log p0 pθ1 , θ2 q « ypθ1 , θ2 q. The following subsections describe our experimental strate-
# gies and the evaluation metrics used.
1 θ1 ě θ2
6 p0 pθ1 , θ2 q « , (11) A. Sim-to-sim
´η
e θ1 ă θ2 In the most basic set up, we capture both ground truth and
implying that the child branch parameter θ2 (either Kp or the replica measurements from the Isaac Gym simulator. While
Kd ) is assumed to be lower than that of the parent θ1 . The the geometric representation of the branch structure is same
intuition is that from the area-preservation principle [22], the in both (as described in III-B), the execution process remains
child branch cross-sectional area is less than that of the parent, independent, i.e., no information is leaked between ground
while elasticity theory dictates that the bending stiffness is truth and inference workflows except for the force-deformation
proportional to the area for a cylinder. The neural network is profiles. As opposed to the hardware experiments, in the sim-
modelled as: to-sim case, we use the simulator API to apply the deformation
ÿ forces rather than using simulated arms. On the other hand,
y 1 pθ1 , θ2 q “ w0 ` wk σpwk0 ` wk1 θ1 ` wk2 θ2 q, (12) in both simulated and real experiments, the force profile is
k
constrained to the gravity axis.
where σ is any activation function, k the number of hidden
units, and w the network weights. B. Hardware Platforms for Real-to-sim
We justify our design choices with the following arguments: This section describes the scenario where the ground truth
First, the regressor ensures that the predicted y 1 is continuous is captured from real world using physical arms. To show that
and fully differentiable at all points in the domain, subject our framework is agnostic to arm kinematics, we use two in-
to the network activation function choice. Second, equation dependent hardware platforms (Fig. 2c) for the measurements:
(11) guarantees that p0 pθq is non-negative. Third, the use 1) a Kinova Jaco-2 6 DoF curved wrist manipulator, and 2) a
of SVGD as the inference algorithm renders irrelevant the Franka-Emika Panda 7 DoF manipulator. In the first setup, we
need to normalise p0 pθq. Therefore, y 1 can indeed be con- use the Kinova manipulator to probe and deform an artificial
sidered as an un-normalised probability density that satisfies olive tree. In contrast, we operate the mobile base mounted
the differentiability requirements of the term ∇θj log p0 pθj q Franka arm on a much larger, real farm tree.
from (8). Fourth, training the model on a log scale prevents A few general principles applicable to both execution modes
prior values from getting extremely small to machine limits, are examined below. The end-effector grasp pose is taken as
keeps it comparable to the likelihood, and therefore adequately synonymous to the branch force location C; therefore, the
constrains the SVGD convergence to the region of interest. Cartesian trajectory of the end-effector acts as a proxy for the
Finally, using a trained model to predict joint prior opens up branch deformation τ , computed as the deviation of the branch
point C from its nominal pose C0 . To infer the joint parameters d) Stein Variational Gradient Descent (SVGD). In each of
of coupled branches, we only measure the trajectories of the the four baseline algorithms, we use the smooth box prior
child branch to which the arm is attached, obviating the need described in section III-F to set the search limits, and wherever
for visual tracking of its parents. Since the arms are not a gradient is required, i.e., for all options except the MCMH
integrated with force-torque sensors at the end-effector, the algorithm, we use a finite difference based approximation. This
forces are measured indirectly, and consequently the readings scenario is executed using the sim-to-sim setup with a multi-
are rather noisy; however, we show that our framework is branch simulated tree geometry, imitating a joint parent-child
robust to such distortions. Additionally, we neither use a branch motion. We keep all hyper parameters, such as the
perception mechanism to capture the tree characteristics nor number of iterations and the particle count, similar across the
do we attempt automated grasping. algorithms. In the gradient based methods, we use an Adam
In both cases, we use the Robot Operating System (ROS) to optimizer with a small learning rate to guide the descent.
control the arm, deform the branches and acquire observations.
Finally, we measure the branch attributes essential to create
the digital replica, which are: the radius, length and density of
the branch; and the angle at which the branch forks from its
parent. While it is not necessary to simulate the entire tree, it
is imperative that all upper level branches that participate in
the joint dynamics of the target branch are accounted for. The
density of wood material however, is assumed to be constant
for a tree species (or the synthetic material), which can be
derived indirectly from the mass and volumetric measurements
of a single cut out fragment.

C. Evaluation Metrics
To assess the reliability of the estimation, first we compare
the inferred parameter distribution with the pre-specified,
parameter values from the ground truth, using the sim-to-
sim setup. In both sim-to-sim and real-to-sim experiments,
we compare the unseen ground truth deformation trajectory
to the predicted samples drawn from the estimated trajectory
distribution ppτ sim |θ˚ q corresponding to the converged par-
ticle set θ˚ . Additionally, in the latter case, we compute the Fig. 3. Comparison of NNSVGD (ours) against baseline inference algorithms.
95% confidence interval over the estimated trajectories and Samples from the predicted distribution of test deformation trajectories
ppτ sim |θ˚ q is shown in blue against the preset ground truth τ gt in red
assess the fraction of true trajectory points that fall within the
interval. The distribution itself is constructed from the samples The results in Fig. 3 indicate all gradient based methods out-
of trajectories corresponding to θ˚ , leveraging Kernel Density perform the random-walk based MCMH. Furthermore, sam-
Estimation with Gaussian kernels and Scott’s rule of thumb ples from the Stein based methods, i.e., SVGD and NNSVGD,
for bandwidth selection. In the validation experiments for are better distributed around the ground truth τ gt trajectory,
the sim-to-sim setup, we use half the measured ground truth while additionally displaying sharper convergence and lower
trajectories to infer the spring parameters and the other half to prediction uncertainty. With the same setup, the benefit of
evaluate the quality of inference. In the hardware experiment, having a neural network based prior, described in section
we use k-fold cross validation due to the smaller sample size. III-G, is best illustrated by comparing it against the posterior
In either case, the evaluation trajectories are unseen during the parameter density with only a smooth box prior. This result in
parameter inference workflow. Fig. 4 is intuitive in that the added inequality prior forces the
V. E XPERIMENTS AND R ESULTS outer branch (branch 2) spring parameters to have a sharper
convergence towards the truth. Furthermore, we observe that
We assess the quality of our approach using the following for the inner branch (branch 1), the parameter uncertainty is
experimental scenarios. better captured with the addition of a prior.
A. Baselines B. Robustness
In the first scenario, illustrated in Fig. 3, we baseline In the second scenario, we perform two sets of experiments
our inference approach, SVGD with a neural network prior to measure the robustness of the model against erratic sensors
(NNSVGD), against four alternatives, which are: a) the clas- and variations in branch grasp locations. In the first, we inject
sical Metropolis–Hastings (MCMH) algorithm b) Stochas- Gaussian noise of standard deviation σ into the ground truth
tic gradient Hamiltonian Monte Carlo (SGHMC) method c) inference and evaluation force trajectories, leveraging the sim-
Stochastic Gradient Langevin dynamics (SGLD) and a basic to-sim setup. The results in Fig. 5, computed as an average
from the olive tree experiment is shown in Fig. ??. The
converged NNSVGD particles and the corresponding defor-
mation trajectory samples are used to construct a trajectory
distribution ppτ sim |θ˚ q and a 95% confidence interval for
each time-step, shown in Fig. 8 and Fig. 9.

Fig. 4. Joint posteriors obtained for a multi-branch setup with and without
the neural network prior. The red dots indicate the preset ground truth for
stiffness and damping parameters

over 30 unseen test force-deformation trajectories, show a


progressive degradation in the estimation sample quality, for Fig. 7. A single observation of ground truth force profile F applied by the
Kinova end-effector and the resulting position deformation trajectory τ gt .
increased noise levels. Notice the high level of noise, its heteroschedastic nature, the initial force
Secondly, we vary the grasp locations, selected randomly offset and the lag in the measured forces, despite the simplistic scenario.
along the branch, where the force is applied. This experiment
mimics the situation where the arm needs to ascertain whether
to grasp towards the outer edge of a branch to reduce the
applied forces, or move towards the inner fork due to the arm
reach constraints. The obtained results, illustrated in Fig. 6,
confirm that our model can successfully infer the deformation
on one location using trajectories obtained by grasping another.

Fig. 5. The line charts compare the estimated and the unseen ground truth
deformation trajectories for varying noise σ, measured relative to the applied Fig. 8. Top: Kinova experiment results. Bottom: Franka experiment results.
force, keeping the grasp location fixed. The bar chart shows the percentage of The shaded regions represent the 95% confidence interval of the predicted
true points from the ground truth trajectory outside the the 95% confidence trajectory distribution, estimated with K-fold cross-validation. The red dashed
interval alongside the interval width (lesser the better for both metrics). lines represent the unseen ground truth position deformation trajectory

Fig. 6. The line charts compare the estimated and the unseen ground truth
deformation trajectories for varying grasp locations, keeping the noise σ fixed.
The grasp location is represented as a fraction of the branch length, from the
parent joint; for instance, Loc: 0.75ℓ indicates the mid point of the second
half of the branch, i.e, towards the outer edge. Fig. 9. CI attributes Left: Kinova experiment. Right: Franka experiment.
The plots show the percentage of true points from the ground truth outside
the the 95% confidence interval alongside the width of the interval for each
C. Hardware Experiments trajectory (lesser the better for both).
Here, we perform real-world experiments and capture multi-
ple pairs of force-deformation trajectories using the two setups The results show that despite the heteroschedastic noise in
described in section IV-B. A single ground-truth observation the ground truth, our model is able to predict the deformation
quite well. Across the three synthetic tree trajectories, on an 6 Heiden, E., Denniston, C. E., Millard, D., Ramos, F., and Sukhatme, G. S.,
average, 95.6% of true points are contained within the 95% “Probabilistic inference of simulation parameters via parallel differentiable
simulation,” in 2022 International Conference on Robotics and Automa-
confidence interval, and the average width of the interval is tion (ICRA). IEEE, 2022, pp. 3638–3645.
3.3cm. Similarly, for the real tree, 92.6% of true points lie 7 Chebotar, Y., Handa, A., Makoviychuk, V., Macklin, M., Issac, J.,
within the interval and the average interval width is 5.4cm. Ratliff, N., and Fox, D., “Closing the sim-to-real loop: Adapting sim-
ulation randomization with real world experience,” in 2019 International
We deem both set of metrics as acceptable for a majority of Conference on Robotics and Automation (ICRA). IEEE, 2019, pp. 8973–
practical applications discussed earlier. Remarkably, these high 8979.
quality real-world predictions are obtained by using as little 8 Antonova, R., Yang, J., Sundaresan, P., Fox, D., Ramos, F., and Bohg, J.,
“A bayesian treatment of real-to-sim for deformable object manipulation,”
as three training trajectories. However, from the real-world IEEE Robotics and Automation Letters, vol. 7, no. 3, pp. 5819–5826, 2022.
branch behaviour, we observed that our approach works the 9 Yin, H., Varava, A., and Kragic, D., “Modeling, learning, perception, and
best for deformation in regions that are closer to the horizontal control methods for deformable object manipulation,” Science Robotics,
vol. 6, no. 54, p. eabd8803, 2021.
(`450 to ´450 from the ground axis). Given the force is 10 Arriola-Rios, V. E., Guler, P., Ficuciello, F., Kragic, D., Siciliano, B., and
applied along the gravity axis, this corresponds to a region Wyatt, J. L., “Modeling of deformable objects for robotic manipulation:
where its normal component significantly outweighs the sheer. A tutorial and review,” Frontiers in Robotics and AI, p. 82, 2020.
11 Schulman, J., Gupta, A., Venkatesan, S., Tayson-Frederick, M., and
Therefore, the proposed method could be improved by using Abbeel, P., “A case study of trajectory transfer through non-rigid registra-
the branch angles captured through perception to apply normal tion for a simplified suturing scenario,” in 2013 IEEE/RSJ International
forces to the branch instead, or alternatively, by representing Conference on Intelligent Robots and Systems. IEEE, 2013, pp. 4111–
4117.
a single real branch with multiple links to increase pliability, 12 Makris, S., Kampourakis, E., and Andronas, D., “On deformable
both of which we leave aside for future consideration. object handling: Model-based motion planning for human-robot co-
manipulation,” CIRP Annals, 2022.
VI. C ONCLUSION 13 Bozic, A., Zollhofer, M., Theobalt, C., and Nießner, M., “Deepdeform:
Learning non-rigid rgb-d reconstruction with semi-supervised data,” in
In this work, we have demonstrated a method to learn Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern
Recognition, 2020, pp. 7002–7012.
the dynamic behaviour of tree branches by utilising the 14 Rambow, M., Schauß, T., Buss, M., and Hirche, S., “Autonomous ma-
simulation-based parameter inference approach. In addition, nipulation of deformable objects based on teleoperated demonstrations,”
we described a method for injecting biological assumptions in 2012 IEEE/RSJ International Conference on Intelligent Robots and
Systems. IEEE, 2012, pp. 2809–2814.
into the Bayesian model via a neural network prior. Previous 15 Frank, B., Stachniss, C., Schmedding, R., Teschner, M., and Burgard, W.,
works on tree dynamics are either focused on perception or “Learning object deformation models for robot motion planning,” Robotics
on the biological aspects of the tree; therefore, they are not and Autonomous Systems, vol. 62, no. 8, pp. 1153–1174, 2014.
16 Yandun, F., Silwal, A., and Kantor, G., “Visual 3d reconstruction and
designed for active branch manipulation, a key requirement for dynamic simulation of fruit trees for robotic manipulation,” in Proceedings
robotic harvesting and locomotion tasks. The comprehensive of the IEEE/CVF Conference on Computer Vision and Pattern Recognition
results indicate a robust model that captures the parameter Workshops, 2020, pp. 54–55.
17 Yang, M., Huang, M.-C., Yang, G., and Wu, E.-H., “Physically-based
uncertainty quite well even under noise and grasp location per- animation for realistic interactions between tree branches and raindrops,”
turbations. Future work in this direction are as follows: First, in Proceedings of the 17th ACM Symposium on Virtual Reality Software
the spring model can be alternatively built from a perception and Technology, 2010, pp. 83–86.
18 James, K. R. et al., “A study of branch dynamics on an open-grown tree,”
acquired branch topology [1]. Second, a generalised version of Arboriculture & Urban Forestry, vol. 40, no. 3, pp. 125–34, 2014.
the model could be used to learn branch manipulation policies. 19 Baker, C., “The development of a theoretical model for the windthrow
Third, severe discrepancies between model estimates and true of plants,” Journal of Theoretical Biology, vol. 175, no. 3, pp. 355–372,
1995.
deformation behaviour could be used as an indicator of poor 20 De Langre, E., “Effects of wind on plants,” Annu. Rev. Fluid Mech.,
tree health or branch rupture. Overall, we foresee works that vol. 40, pp. 141–168, 2008.
entail combining our uncertainty aware model with visual tree 21 Matl, C., Narang, Y., Bajcsy, R., Ramos, F., and Fox, D., “Inferring the
material properties of granular media for robotic tasks,” in 2020 IEEE
reconstruction works, generalising it to different branches, and International Conference on Robotics and Automation (ICRA). IEEE,
eventually generating robust control policies for manipulation. 2020, pp. 2770–2777.
22 Minamino, R. and Tateno, M., “Tree branching: Leonardo da vinci’s rule
R EFERENCES versus biomechanical models,” PloS one, vol. 9, no. 4, p. e93535, 2014.
23 Makoviychuk, V., Wawrzyniak, L., Guo, Y., Lu, M., Storey, K., Mack-
1 Lowe, T. and Pinskier, J., “Tree reconstruction using topology optimisa- lin, M., Hoeller, D., Rudin, N., Allshire, A., Handa, A., and State, G.,
tion,” Remote Sensing, vol. 15, no. 1, p. 172, 2022. “Isaac gym: High performance gpu-based physics simulation for robot
2 Quigley, E., Lin, W., Zhu, Y., and Fedkiw, R., “Three dimensional learning,” 2021.
reconstruction of botanical trees with simulatable geometry,” Proceedings 24 Kirkpatrick, S., Gelatt Jr, C. D., and Vecchi, M. P., “Optimization by
of the ACM on Computer Graphics and Interactive Techniques, vol. 4, simulated annealing,” science, vol. 220, no. 4598, pp. 671–680, 1983.
no. 3, pp. 1–16, 2021. 25 Liu, Q. and Wang, D., “Stein variational gradient descent: A general
3 Zhou, H., Wang, X., Au, W., Kang, H., and Chen, C., “Intelligent purpose bayesian inference algorithm,” Advances in neural information
robots for fruit harvesting: Recent developments and future challenges,” processing systems, vol. 29, 2016.
Precision Agriculture, vol. 23, no. 5, pp. 1856–1907, 2022. 26 Gardner, J., Pleiss, G., Weinberger, K. Q., Bindel, D., and Wilson, A. G.,
4 van Herck, L., Kurtser, P., Wittemans, L., and Edan, Y., “Crop design for “Gpytorch: Blackbox matrix-matrix gaussian process inference with gpu
improved robotic harvesting: A case study of sweet pepper harvesting,” acceleration,” Advances in neural information processing systems, vol. 31,
Biosystems Engineering, vol. 192, pp. 294–308, 2020. 2018.
5 Cranmer, K., Brehmer, J., and Louppe, G., “The frontier of simulation-
based inference,” Proceedings of the National Academy of Sciences, vol.
117, no. 48, pp. 30 055–30 062, 2020.

You might also like