Trajectory Modification Considering Dynamic Constraints of Autonomous Robots
Trajectory Modification Considering Dynamic Constraints of Autonomous Robots
Trajectory Modification Considering Dynamic Constraints of Autonomous Robots
Abstract
The classic "elastic band" deforms a path generated by a global planner with respect to the shortest path length while
avoiding contact with obstacles. It does not take any dynamic constraints of the underlying robot into account directly.
This contribution introduces a new approach called "timed elastic band" which explicitly considers temporal aspects of
the motion in terms of dynamic constraints such as limited robot velocities and accelerations. The "timed elastic band"
problem is formulated in a weighted multi-objective optimization framework. Most objectives are local as they depend
on a few neighboring intermediate configurations. This results in a sparse system matrix for which efficient large-scale
constrained least squares optimization methods exist.
Results from simulations and experiments with a real robot demonstrate that the approach is robust and computationally
efficient to generate optimal robot trajectories in real time. The "timed elastic band" converts an initial path composed of
a sequence of way points into a trajectory with explicit dependence on time which enables the control of the robot in real
time. Due to its modular formulation the approach is easily extended to incorporate additional objectives and constraints.
Generation &
Obstacles
context of service robotics the modification of a path is a Modification
74
state spaces even though this paper considers a differential The majority of components of the objective function are
drive mobile robot moving in a planar environment with local with respect to B as they only depend on a few
three global and two local degrees of freedom. number of consecutive configurations rather than the en-
tire band. This property of locality of TEB results in a
sparse system matrix, for which specialized fast and effi-
2 Timed Elastic Band cient large scale numerical optimization methods are avail-
able [11].
The classic "elastic band" is described in terms of a se- The objective functions of the TEB belong to two types:
quence of n intermediate robot poses xi = (xi , yi , βi )T ∈ constraints such as velocity and acceleration limits formu-
R2 × S 1 , in the following denoted as a configuration in- lated in terms of penalty functions and objectives with re-
cluding position xi , yi and orientation βi of the robot in spect to trajectory such as shortest or fastest path (Eq. 18)
the related frame ({map}, Fig. 2): or clearance from obstacles (Eq. 8). Sparse constrained
optimization algorithms are not readily available in robotic
Q = {xi }i=0...n n∈N (1) frameworks (e.g. ROS) in a freely usable implementation.
Therefore, in the context of "timed elastic band" these con-
The "timed elastic band" (TEB) is augmented by the time straints are formulated as objectives in terms of a piecewise
intervals between two consecutive configurations, result- continuous, differentiable cost function that penalize the
ing in a sequence of n − 1 time differences ΔTi : violation of a constraint (Eq. 6).
τ = {ΔTi }i=0...n−1 (2) ( x−(xSr −) )n if x > xr −
eΓ (x, xr , , S, n) (6)
Each time difference denotes the time that the robot re- 0 otherwise
quires to transit from one configuration to the next config-
xr denotes the bound. S, n and affect the accuracy of the
uration in sequence (Fig. 2). The TEB is defined as a tuple
approximation. Especially S expresses the scaling, n the
of both sequences:
polynomial order and a small translation of the approxi-
mation.
B := (Q, τ ) (3)
7
f (B) = γk fk (B) (4) 6
k
e (x)
5
B∗ = argminf (B)
K
(5) 4
B
3
75
ance of static or dynamic obstacles. Both objective func- ing time intervals:
tions are similar with the difference that way points attract
2(vi+1 − vi )
the elastic band whereas obstacles repel it. The objective ai = (11)
function rests upon the minimal separation dmin,j between ΔTi + ΔTi+1
the TEB and the way point or obstacle zj (Fig. 4). In the For the sake of clarity, the three consecutive configurations
case of way points the distance is bounded from above by are substituted by their two related velocities in Eq. 11.
a maximal target radius rpmax (Eq. 7) and in case of obsta- The rotational acceleration is computed similar to Eq. 11
cles it is bounded from below by a minimal distance romin by considering rotational velocities instead of translational
(Eq. 8). These constraints are implemented by the penalty ones. Considering a differential drive mobile robot, the
function in Eq. 6. relationship between the wheel velocities and the transla-
tional and rotational velocities vi and ωi of the robot center
point are computed according to:
fpath = eΓ (dmin,j , rpmax , , S, n) (7)
vwr ,i = vi + Lωi (12)
fob = eΓ (−dmin,j , −romin , , S, n) (8)
vwl ,i = vi − Lωi (13)
According to Fig. 3, the signs of the separation dmin,j and
in which the parameter L denotes half of the robot wheel-
the bound romin in Eq. 8 must be swapped to realize a
base.
bounding from below.
Differentiating Eq. 12 and Eq. 13 with respect to time
Notice, that the gradient of these objective functions can be
leads to the corresponding wheel accelerations. The wheel
interpreted as an external force acting on the elastic band.
velocities and acceleration are bounded from above and
below according to the manufacturer specifications. The
translational and rotational inertia of the robot could be in-
cluded in an obvious way, but in this first implementation
we have not yet done so.
76
with the direction vector: Path
⎛ ⎞ {zj}
xi+1 − xi
di,i+1 := ⎝ yi+1 − yi ⎠ (16) Initialization
0
B(Q,τ)
fk (xi , xi+1 ) =
sin βi ⎠ + ⎝ sin βi+1 ⎠ × di,i+1
Trajectory modification
Associate TEB states with
0 0 waypoints/obstacles
Generate hyper-graph
penalizes the quadratic error in the violation of this con-
straint. A potential 180◦ orientation change is taken care Hyper-graph
B*(Q,τ)
2.4 Fastest path Possible?:
Verify trajectory
Yes/No
Previous "elastic band" approaches obtain the shortest path
B*(Q,τ)
by internal forces that contract the elastic band. Since our
approach considers temporal information the objective of Calculate control variables
a shortest path we have the option to replace the objective
v,ω
of a shortest path with that of a fastest path, or to combine
those objectives. The objective of a fastest path is easily Obstacles Robot Odometry
&
achieved by minimizing the square of the sum of all time Environment
differences.
n
fk = ( ΔTi )2 (18)
i=1 Figure 6: Control flow of TEB-implementation
This objective leads to a fastest path in which the interme-
diate configurations are uniformly separated in time rather
than space. The required hyper-graph is a graph in which the amount of
connected nodes of one single edge is not limited. There-
2.5 Implementation fore an edge can connect more than two nodes. The TEB
problem (Eq. 4) can be transformed into a hyper-graph that
Figure 6 shows the control flow of the implemented TEB. has configurations and time differences as nodes. They are
In the initialization-phase an initial path is enhanced to an connected with edges representing given objective func-
initial trajectory by adding default timing information re- tions fk or constraint functions. Figure 7 shows an ex-
specting the dynamic and kinematic constraints. In our ample hyper-graph with two configurations, one time dif-
case the initial trajectory is composed of piecewise linear ference and a point shaped obstacle. The velocity bound-
segments with a pure rotation followed by a translation. ing objective function requires the mean velocity which re-
Such a path representation in terms of a polygon is com- lates to the euclidean distance between two configurations
monly provided by probabilistic roadmap planners [9]. Al- and the required travel time. Hence it forms an edge con-
ternatively, Reeds-Shepp-paths are easily enhanced to ad- necting those states of B. The obstacle requires one edge
missible trajectories [10]. which is connected to the nearest configuration. The node
At each iteration, the algorithm dynamically adds new con- representing the obstacle is fixed (double circle), thus its
figurations or deletes previous ones in order to adjust the parameters (position) cannot be changed by optimization
spatial and temporal resolution to the remaining trajectory algorithms.
length or planning horizon. A hysteresis is implemented
to avoid oscillations. The optimization problem is trans- After verifying the optimized TEB, control variables v and
formed into a hyper-graph and solved with large scale op- ω can be calculated to directly command the robot drive
timization algorithms for sparse systems which are con- system. Before every new iteration, the re-initialization-
tained in the "g2o-framework" [11]. phase checks new and changing way-points which can be
useful if way-points are received after analyzing short-
range camera or laser-scan data.
77
x0 Velocity fvel x1
b
fo
tacle
ΔT0
Obs
o1
Figure 7: Velocity and obstacle objective function formu- Figure 10: Trajectory with way points: constraint
lated as a hyper-graph approx. 2
1.4
Right wheel
150 Left wheel
1.2
1
0 50 100 150
nz = 5481
0.8
v [m/s]
78
approach is to surround an obstacle with a band with op-
posite orientation than the trajectory at the closest point,
glue them at tangential point and cut the resulting trajec-
tory at this point to obtain one that passes the obstacle on
the other side. After optimizing this trajectory, it is decided
This paper presents a novel approach for real time trajec- [8] Fiorini, P.; Shiller, Z. Motion planning in dynamic
tory modification with timed elastic bands. It rests upon environments using velocity obstacles, International
the augmentation of the classic "elastic band" theory by Journal on Robotics Research, Vol. 17, No. 7, July
temporal information. The proposed method makes it pos- 1998, pp. 760-772
sible to not only to consider geometric constraints on the
path but to simultaneously account for dynamic constraints [9] Kavraki, L.E. et al. Probabilistic roadmaps for path
of the mobile robot. The algorithm operates in real-time planning in high-dimensional configuration spaces,
and thereby directly generates commands for the underly- IEEE Transactions on Robotics and Automation, Vol.
ing robot motion controller. The method is highly flexible 12, No.4, August 1996, pp.566-580
and is easily adapted to different robot kinematics and ap- [10] Reeds, J.A.; Shepp L.A. Optimal paths for a car that
plication requirements. goes both forwards and backwards, Pacific Journal
Future work is concerned with the development of a sparse of Mathematics, Vol. 145, No. 2, 1990, pp. 367-393
constraint optimization framework, thus rendering the cur-
rent formulation of constraints in terms of penalty func- [11] Kümmerle, R. et al. g2o: A General Framework for
tions obsolete. A different direction of research is to make Graph Optimization, Proc. of the IEEE Int. Conf. on
the elastic band "jump over obstacles". Technically the Robotics and Automation (ICRA), May 2011
79