SP Runk 2008
SP Runk 2008
SP Runk 2008
Student Project
Christoph Sprunk
sprunkc@informatik.uni-freiburg.de
October 2008
Motion planning for wheeled mobile robots (WMR) in controlled environments is con-
sidered a solved problem. Typical solutions are path planning on a 2D grid and reactive
collision avoidance. Active research deals with issues regarding the integration of ad-
ditional constraints such as dynamics, narrow spaces, or smoothness requirements.
Current approaches to motion planning mainly consider a finite number of actions
that can be carried out by the robot at a given time. In this work we present an
approach that resorts to a parametric trajectory representation to overcome these lim-
itations. As representation we choose Quintic Bezier Splines. We conduct global,
explicit planning for velocities along the robots trajectory a prerequisite if smooth
kinodynamics along the path are to be included into the planning process, yet mainly
unaddressed in current work. Our approach guarantees velocity profiles to respect
several kinodynamic constraints and resolves accelerational interdependencies without
iteration.
The proposed approach optimizes a curvature continuous trajectory and maintains
anytime capability. For actual execution the trajectory is forwarded to a separate
feedback controller. The suggested method is able to smoothly update a trajectory to
account for unmapped obstacles, moderate errors in localization, or erroneous plan exe-
cution. Evaluation of our method on real robots shows its applicability and advantages
over a Dynamic Window-based approach.
Contents
1 Introduction 6
2 Related Work 9
4 Trajectory Generation 32
4.1 Initial Trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.1.1 First Derivative Heuristic . . . . . . . . . . . . . . . . . . . . . . 32
4.1.2 Second Derivative Heuristic . . . . . . . . . . . . . . . . . . . . . 35
4.1.3 Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.2.1 Parameters for Spline Optimization . . . . . . . . . . . . . . . . 37
4.2.2 Optimization Method . . . . . . . . . . . . . . . . . . . . . . . . 38
4.2.3 Examination of the Search Space . . . . . . . . . . . . . . . . . . 40
4.2.4 Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3 Updating Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3.1 Odometry Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.3.2 Unmapped Obstacles . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.3.3 Subdivision of Long Paths . . . . . . . . . . . . . . . . . . . . . . 50
4.3.4 Generating an Updated Trajectory . . . . . . . . . . . . . . . . . 50
5 Experiments 53
5.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.2.1 Unmapped Obstacles . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6 Discussion 62
4
Contents
6.1 Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2 Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Bibliography 70
A Splines 71
A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
A.2 Cubic Hermite Spline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
A.3 Cubic Bezier Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
A.4 Catmull-Rom Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
A.5 B-Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
A.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5
1 Introduction
One of the major ambitions in mobile robotics is to enable robots to follow high-level
task instructions, i.e., task instructions that do not contain detailed information on the
steps to be taken for task fulfillment. To reach this goal, autonomous navigation is a
fundamental prerequisite.
The task to navigate autonomously can be divided into the areas of mapping, local-
ization and motion control. The latter is the domain of interest for this work. The
localization within a map is herein assumed to be given, but errors have to be accounted
for. Furthermore, the problem domain includes the presence of a moderate amount of
unmapped obstacles.
The research community has conducted a lot of work in this domain, see for example
[15] for an overview. As a result, basic navigation of a mobile robot (i.e., motion from a
start to a goal position without any further constraints) is considered a solved problem.
However, practical applications advance to more complex problem domains. Un-
manned autonomous vehicles used for heavy cargo load need motion planning to ac-
count for their extreme kinodynamics, for example. One observes that with the prac-
tical use of mobile robots in increasingly complex scenarios, controllability and pre-
dictability of the robots exact behavior gain importance.
Furthermore, wheeled mobile robots (WMR) are expected to navigate safely and
successfully in tight spaces that they share with other moving entities. The ability to
plan and predict the state of the robot more precisely with respect to time and position
is crucial for navigation in narrow spaces and environments that contain unmapped
obstacles for which movements can be anticipated to a certain degree.
In general, increasing weight is put on how the robot reaches its goal, planned paths
are required to consider costs in domains like smoothness, time of travel, and energy
consumption. Car-like robots for instance have strong smoothness requirements if
passenger comfort or safety of impulse sensitive payload are accounted for.
Therefore the research area is still active [9, 16, 19, 37, 39] as the classical approaches
to mobile robot navigation and motion reach their limits with respect to the require-
ments stated above.
6
grid is perfectly suited for costs only considering the paths length, it is insufficient
for applications aiming to optimize more complex measures like time of travel, energy
consumption, or path smoothness. Because of this and due to not accounting for
kinematic constraints, the paths optimality is lost when it is taken to the real problem
domain.
To cope with the problem of straight line paths and ignored kinematics, applications
of A* to higher dimensional state spaces have been suggested. The state space is for
instance augmented by the robots heading and a two-dimensional velocity component.
In order to keep the algorithm computationally tractable, heavy discretization has to be
applied to the state space and the action set has a limited size to control the branching
factor of the search tree. Stachniss and Burgard [32] present an approach where a
higher dimensional A* search is guided by a lower dimensional one to further constrain
the search space.
The paths computed by these approaches are in general continuous in the robots
heading but still have discontinuities in curvature. This means that for instance car-like
robots have to cope with a non-continuous steering angle. While the actual motion of
the vehicle is smoothened by inertia and low level controllers, this induces deviations
from the assumed path. Only accounting for these effects during planning can improve
the predictability of the robots behavior.
Precise manipulator control There is a domain however, where exact, time dependent
motion planning and execution has been reached: the area of multi degree of freedom
actuators and manipulators, mostly in the form of robotic arms [30]. While these
manipulators in general are more capable of executing commands with high precision
than WMR, it is believed that the overall accuracy in trajectory execution is also due
to the small feedback loop involved.
Therefore, recent work tries to transfer some of the precision potential to the domain
of motion planning for WMR by decoupling trajectory planning and execution. A
separate representation of the trajectory is maintained and executed by a feedback
controller. This way the feedback loop is small and one can also benefit from the results
and progress made in the field of control theory [13, 18]. Furthermore, separation of
trajectory and execution of the latter adds a level of abstraction that provides more
flexibility, e.g., easy change of the used controller.
7
1 Introduction
An aspect not covered by most of the current approaches is the necessity to globally
plan for the velocities along the path: thereby it is possible to slow down early enough
when approaching a curve and to account for the effects that changes in the curvature
have on kinodynamics.
A detailed discussion of the related work will be given in the next chapter. First, we
want to motivate the use of splines for locomotion.
Contributions We shortly outline the system we propose for WMR motion planning.
Our system takes as inputs a map of the environment and sparse waypoints that
describe a collision free line path from the current to the goal position. Based on
Quintic Bezier Splines it then creates an initial trajectory along the waypoints and
continues to optimize it as long as planning time is available. During the optimization
velocities along the curve are explicitly planned for to obtain a 2D path that together
with its velocity profile optimizes a cost function, such as the time of travel for example.
When planning velocities, kinodynamics of the robot are accounted for.
The output of the proposed system is a time-parameterized trajectory together with
its first and second derivatives that can be used by a controller to determine location,
speed, and acceleration along the trajectory for every point in time.
As will be shown, the proposed system has anytime capability and we also present a
way to account for unmapped obstacles. Finally, it has to be noted that we evaluated
our approach with experiments on real robots.
8
2 Related Work
In this section the proposed system will be compared to related work in the area of
spline based motion planning for mobile robots.
There exists a variety of motion planning approaches that use splines to represent
trajectories. They all concentrate on several aspects of the problem but none accounts
for all requirements that we consider important: a path that can be exactly followed
by the robot (i.e., curvature continuity), explicit planning for velocities with consider-
ation of kinodynamics, anytime capability, an optimization not prone to local optima,
treatment of unmapped obstacles, and an evaluation of the system on a real robot.
Hwang et al. [11] use Bezier Splines as trajectory model. They present an approach
that extracts significant points from a touch screen based path input and uses these
as pass-through points for a Cubic Bezier Spline. While unmapped obstacles are ac-
counted for, the paths generated by this approach are discontinuous in curvature. The
work of Hwang et al. is used by Mandel and Frese [21] for autonomous wheelchair nav-
igation, in their work they provide a non-simulated evaluation of the approach. Our
approach relies on Bezier Splines as well but uses a higher degree of these polynomials
to overcome the curvature discontinuities.
Another approach to wheelchair navigation is presented by Gulati and Kuipers [10].
They emphasize the need for smooth and comfortable motion and choose B-Splines
as trajectory representation. However, the approach only applies to navigation in
predefined situations without unmapped obstacles.
B-Splines are also used by Shiller and Gwo [31]. In their work they treat the motion
planning task extended to 3D with the help of B-Spline patches and curves. The
evaluation of their approach, that accounts for kinodynamic constraints, is based on
simulation.
The principle of optimizing a spline based trajectory can be found in the work of
Magid et al. [20]. Here, an initially straight-line shaped path is optimized with respect
to a cost function by the Nelder Mead Simplex method. The difference to the approach
we suggest is that the initial path is not obstacle free and that local minima are a
problem for this method, as the simulative evaluation shows.
Sahraei et al. [29] rely on a Voronoi graph to provide information for the generation of
a Bezier Curve based path. The path is not continuous in curvature and the approach
ignores unmapped obstacles, but it has been evaluated by application on a robot.
Another spline related approach is suggested by Thompson and Kagami [34]. Here,
curvature is a polynomial function of the current traveled distance. With these curva-
ture polynomials Thompson and Kagami define obstacle avoiding paths with ad-hoc
speed profiles.
An approach that has received extensive evaluation is the work of Arras et al. [1].
It uses Elastic Bands [26] as part of the navigation function for an extension of the
Dynamic Window approach and showed reliable performance on an overall traveled
distance of more than 3 000 kilometers. With the use of the Dynamic Window, the
approach is subject to the aforementioned drawbacks, but the combination with Elastic
9
2 Related Work
Summary As shown in this literature review, the research community investigates the
benefits of separating the trajectory planning from its feedback execution, yielding a
smaller feedback loop. One also finds that smooth, curvature continuous trajectories
are possible to employ, yet not a priority for the successfully tested approaches, e.g.,
the unmanned DARPA challenge vehicles. Advantages of a parameterized trajectory
representation over one that is stitched together from a finite set of precomputed parts
have emerged. Furthermore, we have seen that little is done in the domain of explicit
velocity planning and optimization.
10
3 Spline Based Trajectories
For our system we will use splines as means to determine the exact 2D path for the
robot. The actual trajectory that controls the exact speed and acceleration at every
single 2D point will then consist of this 2D path and a separately created velocity
profile, thus generating a 3D representation over space and time.
Without reducing the scope of the approach, we only consider forward motion of the
robot along the 2D path. Therefore, the non-smooth 2D path shapes that correspond
to forward motion interrupted by backward motion, e.g., to a 3-point turn, are neither
needed nor desired for our application.
Parametric continuity A parametric curve is said to have n-th degree parametric con-
dn
tinuity in parameter t, if its n-th derivative dt n Q(t) is continuous. It is then also
called C n continuous.
Geometric continuity n-th degree geometric continuity does not require the left-hand
dn
limit and right-hand limit of the n-th derivative dtn Q(t) to be equal but demands
the direction of these vectors to match, i.e., they have to be scalar multiplies of
each other. Note that geometric continuity is trivial for one-dimensional para-
metric curves (e.g., Q(t) R).
For points on a polynomial these continuity constraints are always fulfilled (as deriva-
tives of arbitrary degree are continuous), so the join points of the polynomial segments
are the critical points. In general geometric continuity is a consequence of parametric
continuity of the same degree, unless the particular derivative yields the zero vector.
Then situations can arise in which the left-hand limit points in a different direction
than the right-hand limit although both evaluate to the zero vector at the join point.
11
3 Spline Based Trajectories
3.1.1.1 Drivability
Several properties are necessary to guarantee that a wheeled robot can exactly follow
a trajectory defined by a spline. For the most part, these are continuity properties.
where T is the tangent vector function to the curve and s the curves arc length. [33,
Sect. 13.3, Theorem 10] allows a formulation in an arbitrary parameterization of the
curve Q:
Q0 (t) Q00 (t)
c(t) = . (3.1)
|Q0 (t)|3
Note that, in difference to the original definition, we drop the application of the absolute
value in the numerator to allow a distinction of the curvatures direction (in relation to
an increasing curve parameter t). When moving forward, positive values for curvature
correspond to turning left while negative values indicate a right turn.
As can be seen in Eq. (3.1), control over the first and second derivatives of a para-
metric curve provides control over its curvature. Choosing first and second derivative
suitable for C 2 continuity implies curvature continuity of the spline.
The requirements for a robot driveable spline are summarized and guaranteed with
the demand of C 2 continuity. Note however, that curvature continuity can also be
reached when falling back to G1 continuity. For this, the second derivative has to meet
certain constraints, for details refer to Section 4.3.4.2.
First and second derivative at start To smoothly update a trajectory that is already
being carried out by a robot, one needs to be able to generate trajectories for a moving
robot. More specifically, it must be possible to match the first and second derivatives
to the required heading and orientation/steering angle of the robot.
12
3.1 2D Paths Using Splines
Table 3.1: Key properties of cubic spline families presented in Appendix A. None of
them has all of the desired properties, therefore, higher-order splines are
considered.
3.1.1.2 Planning
In addition to the properties that enable a wheeled robot to follow a trajectory defined
by a spline we also require some properties that will facilitate the process of planning
such a spline.
Localism The first property is called localism. Localism is a property that becomes
important when modifying one segment of a multi-segment spline. We will say that
a spline has localism if changes made at a single segment of the spline only affect
a bounded neighborhood of this particular segment and do not result in changes for
all segments of the spline. This property provides the possibility to locally change the
shape of a spline (for instance to circumvent an obstacle) without the need to reconsider
its global shape. This property can also translate into a computational gain: a large
part of the splines parameters will remain the same after a local change, so one can
expect the computation for the update to be less costly than for a global change of the
splines shape.
Correlation between shape and parameters The second property that will facilitate
planning trajectories with splines is the extent to which the parameters of a spline
correspond to its shape on an intuitive level. When planning a trajectory through an
environment we face the task to define a spline that passes through certain points and
stays clear of certain areas. This task is facilitated a lot if there are relatively direct
correlations between the splines shape and its parameters. Otherwise involved inverse
math had to be employed to retrieve spline instances with given shape properties.
13
3 Spline Based Trajectories
no spline family possesses all required properties. While B-Splines are the only family
to provide C 2 continuity they lack a strong and intuitive correlation between shape
and control points, which is on the other hand provided by Bezier and Catmull-Rom
Splines.
Note that when giving up on localism during the stitching process in Cubic Bezier
Splines and Hermite Splines it is possible to connect them in a C 2 continuous fashion,
however, the resulting splines are highly unstable and respond with heavy oscillation
to single parameter changes. Furthermore, for all spline families in Tab. 3.1 setting the
start points second derivative influences the remaining derivatives of the segment.
Since all of the splines discussed so far consist of cubic polynomials, they have the
same expressive power. To explain why none of the presented families is able to fulfill all
our requirements and that this is impossible for cubic polynomials, we closer examine
the degrees of freedom available.
Each of the continuity levels states m 1 conditions, reducing the degrees of freedom
still available to 4m 3(m 1) = m + 3. If additionally the start and end points of
the segments are demanded to have specific values (e.g., to match a control point)
14
3.1 2D Paths Using Splines
in any of these four constraints will immediately result in a change of the second
derivative at both, the start and end point of the segment. To maintain C 2 continuity
changes are necessary to the following second derivatives: Si+1 00
(0) and Si1
00
(1). As
these cannot be set independently from the other parameters, this introduces shape
changes in Si1 , Si+1 that themselves lead to changes of the second derivatives Si1
00
(0)
and Si+1 (1). These changes now propagate across the whole spline according to the
00
same mechanism.
In conclusion, splines consisting of cubic segments can never provide all of the re-
quired properties at the same time.
The degree of the polynomials forming the spline has to be raised for the spline to meet
all our requirements. While quintic polynomials will turn out to be the solution, quartic
polynomials do not suffice: with the additional degree of freedom that a polynomial
of degree four introduces it is possible to set the second derivative independently from
start and end point and respective tangents. However, the second derivatives at start
and end point depend on each other. If it was now necessary to change the second
derivative at one single point in the spline this change would propagate over the spline
in the same way as before, only that it is not mediated by the parameters for start
and end points and their respective tangents this time. Due to these instabilities and
because changing the second derivative is for instance necessary when a start curvature
has to be matched for a moving robot, quartic polynomials are discarded as segment
type.
As mentioned above, quintic polynomials are the segment type of choice to obtain
both, localism and C 2 continuity. The additional two degrees of freedom introduced
compared to cubic polynomials allow to set the second derivative at start and end point
independently from each other. As the Bezier formulation of splines additionally to the
demanded properties provides the convex hull property (Appendix A.3), Quintic Bezier
Splines will be introduced as the final choice of spline type for trajectory planning.
3.1.2.3 Quintic B
ezier Splines
Intuition Quintic Bezier Splines follow the same intuition as Cubic Bezier Splines.
The first and last control point constitute the start and end point of a segment. The
tangents at start and end are proportional to difference vectors of two particular con-
trol points with the first and last control point, respectively. The second derivatives
at beginning and end of a segment are defined by the corresponding tangent and a
difference vector induced by an additional control point each.
Definition Cubic Bezier Splines can be formulated in the basis spline notation with
the help of the Bernstein polynomials of third degree (refer to Eq. (A.19)). Taking the
15
3 Spline Based Trajectories
BQB,0 BQB,5
4 4 BQB,2
5 BQB,1 BQB,3
2 2
3 3
10 5 5 BQB,4
0 1 2 3 4
5 5 5 5 1
Figure 3.1: The basis splines of a Quintic Bezier Splines segment, also known as the
Bernstein Polynomials of fifth degree. They are defined in Eq. (3.7).
Bernstein polynomials to degree five, one obtains the Quintic Bezier basis splines
t t
BQB,0 (1 t)5
BQB,1 5(1 t)4 t
BQB,2 10(1 t)3 t2
BQB =
= 10(1 t)2 t3 , (3.7)
BQB,3
BQB,4 5(1 t)t 4
BQB,5 t5
which Fig. 3.1 provides a visualization for. Using six control points, a Quintic Bezier
segment is defined as
One can verify that the convex hull property as introduced with the Cubic Bezier
Splines (see Appendix A.3) still holds with Bernstein polynomials of fifth degree as
basis splines. Factoring out the powers of the parameter yields formulation with the
Quintic Bezier coefficient matrix :
S(t) = T CQB
P0 + 5P1 10P2 + 10P3 5P4 + P5
5P0 20P1 + 30P2 20P3 + 5P4
10P0 + 30P1 30P2 + 10P3
= t5 t4 t3 t2 t 1
.
10P0 20P1 + 10P2
5P0 + 5P1
P0
(3.9)
16
3.1 2D Paths Using Splines
P3
P4
P2
P5
P1
P0
Figure 3.2: Quintic Bezier Spline segment. The tangents are depicted in red, for dis-
play the blue second derivatives in the figure have been shortened in their
magnitude by factor 5, the tangents by factor 2, respectively. Please refer
to Eqs. (3.10) and (3.11) for correlation between the control points and the
derivatives.
Fig. 3.2 depicts a Quintic Bezier Spline segment and its tangents at the start and
end point.
During trajectory planning the task arises to set specific tangents and second deriva-
tives at start and end point, respectively. A short inverse calculation shows how to set
the control points to retrieve a requested first derivative ts and second derivative as at
the start point and te , ae at the end point:
1 1
P1 = ts + P0 , P4 = P5 te (3.12)
5 5
1 1
P2 = as + 2P1 P0 , P3 = ae + 2P4 P5 . (3.13)
20 20
We now have the means to define a two-dimensional trajectory for the robot to drive
on. In the remainder of this chapter we address the issue of determining the robots
speed along the trajectory.
17
3 Spline Based Trajectories
vi vi+1
planned velocities
constant acceler-
ation/deceleration
Q(ui )
Q(ui+1 ) spline Q(u) with
planning points (x,y)
s
arc length s
internal spline
ui ui+1 parameter u
Figure 3.3: Planning points for the velocity profile. Placed at equidistant arc length s
along the curve, velocities are planned for these points and constant accel-
eration/deceleration is assumed between them. Dashed lines connect plan-
ning points to their corresponding values for arc length and internal spline
parameter u. In practice, planning points are more densely distributed.
determine which speed and acceleration the robot should have at which point of the
trajectory. By doing so we loose the compact and intuitive character of the spline
induced velocity profile. The critical advantage however is, that we gain strong con-
trol over the velocities and therefore can actively assure compliance with the robots
dynamic constraints.
The next section introduces a method to compute such a separate velocity profile.
3.2.1 Overview
3.2.1.1 Planning for Discrete Points
A velocity profile consists of discrete planning points pi = Q(ui ) distributed along the
trajectory Q(u) and planned translational velocities vi assigned to them. As visualized
by Fig. 3.3, the planning points are distributed equidistant with respect to arc length,
two adjacent planning points pi , pi+1 inscribe an interval on the trajectory with arc
18
3.2 Numerical Velocity Profile
length s . For this way of planning point placement, the splines arc length has to be
determined by numerical integration.
Between the planning points, the robot is assumed to move with constant acceleration
or deceleration. Once the velocities vi , vi+1 are planned for an interval bound by the
planning points pi , pi+1 , the assumption of constant accelerations and the intervals
arc length s can be used to determine the time the robot needs to travel through
the interval. Then it is possible to associate with each planning point pi the time ti at
which the robot will arrive at the planning point. As a consequence, a velocity profile
immediately provides the total time of travel for a trajectory.
Association of both, a time ti and the internal spline parameter ui with planning
points pi = Q(ui ) constitutes the basis for a reparameterization of the spline to be a
function over time: as in practice the planning points are deployed more densely than
shown in Fig. 3.3, appropriate interpolation can be used to obtain this reparameteri-
zation.
19
3 Spline Based Trajectories
planned
velocity
arc length
(a) Isolated constraints: in a first step the maximum translational velocity for
each planning point has been computed. These velocities are independent from
the ones at neighbor points.
planned
velocity
arc length
(b) Establishing forward consistency by decreasing planned velocities, so that
they meet acceleration constraints (red arrows). Maximum velocity at a plan-
ning point depends on the one set for the previous point in time. Constraints
are being propagated beginning at the start point (left), whose velocity is set
to zero in this example.
planned
velocity
arc length
(c) Establishing backward consistency: The spline is traversed in reverse direc-
tion. The velocity at end point (right) is set to zero, now preceding velocities
are decreased to meet deceleration constraints (blue arrows). Maximum veloc-
ity at a point depends on the one set for the next point in time. The velocity
profile is obtained by interpolating between the velocities at the planning points
(black dotted lines).
Figure 3.4: A simplified, schematic depiction of velocity profile generation. The discrete
planning points for velocities have been set equidistant regarding arc length.
Bigger gray dots stand for values inherited from the previous step. This
example accounts for one accelerational constraint only.
20
3.2 Numerical Velocity Profile
Now it is ensured that the velocity at each planning point pi can be reached from the
preceding one pi1 with admissible deceleration. Starting at the end of the curve, the
consistency is now being propagated in reversed curve direction. The resulting velocity
profile is shown with dotted lines in Fig. 3.4c, the velocity at any point on the curve
can be retrieved by appropriate interpolation between planning points, as we assume
constant accelerations.
Note that for multiple accelerational constraints establishing forward and backward
consistency gets more complex, this situation will be accounted for below and is ne-
glected in this overview and the example in Fig. 3.4.
3.2.3 Definitions
We start the presentation of details on velocity profile generation with the introduction
of some notational conventions and definitions. Tab. 3.2 summarizes the ones that will
be used throughout this section. The maximum values for rotational velocity and
accelerations are given by absolute values, we do not distinguish different maxima
for rotation to the left and right, respectively. Furthermore, we assume translational
acceleration and deceleration to be symmetric which is expressed by a common upper
bound atmax given as an absolute value, too.
We will use the convention that a quantitys symbol indexed by i stands for its value
at pi and that we will denote the maximum translational velocity that a constraint
on the quantity imposes as vmax |. The maximum translational velocity due to
maximum centripetal force fmax is for instance written as vmax |f .
1 2
s(t) = at t + vi1 t, t [0, t ], t := ti ti1 (3.14)
2
vi vi1
at = (3.15)
t
s = s(t ) (3.16)
i i1
a = (3.17)
t
21
3 Spline Based Trajectories
Symbol Description
v translational velocity
vmax maximum translational velocity
at translational acceleration
atmax maximum translational acceleration (absolute value)
rotational velocity
max maximum rotational velocity (absolute value)
a rotational acceleration
amax maximum rotational acceleration (absolute value)
f centripetal force
fmax maximum centripetal force
c curvature as introduced in Eq. (3.1)
dobst distance to closest obstacle
t time passed since the beginning of the curve
pi i-th planning point on the curve
ui spline parameter for pi = Q(ui ) R ui
s arc length between planning points, i.e., ui1 kQ0 (u)kdu
i value of quantity at pi
vmax | maximum translational velocity due to constraint on quantity
Table 3.2: Abbreviations and variables used throughout the discussion of velocity pro-
file generation.
Here s(t) stands for the arc length traveled since the beginning of the interval and at is
the translational acceleration that is assumed to be constant within the interval. The
total arc length of the interval is given by s (see also Fig. 3.3).
We will now derive a closed form expression for the time t = ti ti1 traveled
between planning points pi1 and pi and one for the velocity vi at planning point pi .
Both will be used in the remainder of the section.
Closed forms for t , vi With Eq. (3.16) and by solving Eq. (3.14) after t one obtains
s
vi1 vi1 2 2s
t = 2 + . (3.18)
at at at
When ignoring negative values for time and velocities, the solutions for Eq. (3.18) are
given by
q
vi1 vi1 2 2s
at + + at > 0
a2t at
s
t = at = 0 (3.19)
vi1 q
vi1 vi1 2
+ 2s
at < 0, vi1 2s at .
at a2t at
22
3.2 Numerical Velocity Profile
Note that vi1 2s at is a direct consequence of vi 0. For the cases where
at 6= 0 we substitute it using Eq. (3.15) and thus
s
vi1 t vi1 2 2t 2s t
t = + sign(at ) +
vi vi1 (vi vi1 )2 vi vi1
s
vi1 vi1 2 2t 2s t
1+ t = sign(at ) + .
vi vi1 (vi vi1 )2 vi vi1
Both sides of the equation have the same sign in any case, therefore
2
vi1 vi1 2 2t 2s t
1+ 2t = +
vi vi1 (vi vi1 )2 vi vi1
2vi1 2s
1+ 2t t = 0
vi vi1 vi vi1
(vi + vi1 ) 2t 2s t = 0
2s
2t t = 0.
vi + vi1
2s
t = . (3.20)
vi + vi1
A closer look at Eq. (3.20) reveals that this also holds for the case at = 0, as it implies
vi = vi1 . The side condition that arised for the case at < 0 can be safely dropped, as
it is always ture if vi 0. To see this, we derive an expression for vi using Eqs. (3.15)
and (3.19). For the cases at 6= 0 it is
s !
vi1 vi1 2 2s
vi = vi1 + at + sign(at ) +
at a2t at
s
vi1 2 2s
vi = sign(at )at +
a2t at
vi1 2 + 2s at 0
vi1 2 2s at
has to hold, which is trivial for at 0 and translates to vi1 2s at for at < 0.
Note that given a velocity profile, Eq. (3.20) provides the time of travel for each
planning point interval and therefore for the complete trajectory.
23
3 Spline Based Trajectories
For some robots it might be necessary to limit the occurring centripetal forces, which
are given by f = m|c|v 2 . Translational velocities that respect a maximum centripetal
force fmax , fulfill s
fmax
vi [0, vmax |f ], vmax |f = , (3.24)
m|ci |
where m refers to the mass of the robot.
Slow down near obstacles For safety reasons it might be appropriate to require the
robot to drive slower when in proximity of an obstacle. We derive a maximum velocity
vmax |dobst that depends on the distance to the nearest obstacle dobst .
The robot should be able to completely stop before hitting any obstacle. The stop-
ping distance sbrake depends on the stopping time tbrake :
1
sbrake = vtbrake atmax t2brake . (3.25)
2
!
Via v atmax tbrake = 0 we get tbrake = v/atmax and thereby obtain sbrake = v 2 /2atmax .
Under consideration of the distance sreact = vtreact that the robot travels during its
reaction time treact , we now demand:
or differently noted
q
vi [0, vmax |dobst ], vmax |dobst = atmax treact + a2tmax t2react + 2atmax dobst . (3.26)
24
3.2 Numerical Velocity Profile
25
3 Spline Based Trajectories
v2 v1 v2 v2 v1 v1
v1 v2 v1 v1 v2 v2
(a) one interval (b) two intervals (c) empty solution set
Figure 3.5: Schematic figures for the shape of the parabola in vi defined by Eq. (3.31).
The upper row depicts the case ci > 0 (left curve), the lower row the case
ci < 0 (right curve). For ci > 0 the parabolas opening is directed upwards,
while it is directed downwards for ci < 0. For the solution set (depicted
by braces) one can distinguish three basic cases, depicted by (a)-(c). The
explicit interval borders are given by Eq. (3.32) and Eq. (3.33).
vi ci vi1 ci1
amax amax ,
t
26
3.2 Numerical Velocity Profile
For later use, we restate the result, naming both values for vi :
1 p
v1 = (ci + ci1 )2 vi1 2 + 8ci s amax ,
(ci1 ci )vi1 +
2ci
p (3.32)
1
v2 = (ci1 ci )vi1 (ci + ci1 )2 vi1 2 + 8ci s amax .
2ci
1 p
v1 = (ci + ci1 )2 vi1 2 8ci s amax ,
(ci1 ci )vi1 +
2ci
p (3.33)
1
v2 =
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax .
2ci
27
3 Spline Based Trajectories
The lower row of Fig. 3.5 shows the case ci < 0. Here the discriminants in Eq. (3.33)
are always positive, therefore the existence of intersections with the lower bound
(Eq. (3.33)) is guaranteed. The case in Fig. 3.5 (c) is hereby proved to be irrelevant.
The existence of intersections with the upper bound (Eq. (3.32)) determines whether
or not the solution set is split into two intervals (Fig. 3.5 (b) vs. (a)):
v1 , v2 exist (ci + ci1 )2 vi1 2 + 8ci amax s 0 . (3.35)
This is a linear function in vi which intersects the upper bound in the point v1 , the
lower bound in v2 :
2s amax 2s amax
v1 = vi1 , v2 = vi1 . (3.37)
ci1 vi1 ci1 vi1
Solution set Summarizing all previous results, the solution set Ia0 can be stated as
(
[v2 , v1 ] (ci + ci1 )2 vi1 2 8ci amax s < 0
ci > 0
[v2 , v2 ] [v1 , v1 ] (ci + ci1 )2 vi1 2 8ci amax s 0
(
[v1 , v2 ] (ci + ci1 )2 vi1 2 + 8ci amax s < 0
ci < 0
[v , v ] [v2 , v2 ] (ci + ci1 )2 vi1 2 + 8ci amax s 0
vi Ia0 := 1 1 (3.38)
[
v1 , v2 ] ci1 > 0
[v2 , v1 ] ci1 < 0
ci = 0,
ci1 = 0
R
else
Ia = Ia0 R+
0. (3.39)
28
3.2 Numerical Velocity Profile
planned
velocity
atmax
amax
pi1 pi
29
3 Spline Based Trajectories
planned
velocity
atmax
amax
pi1 pi pi1 pi pi1 pi pi1 pi
Figure 3.7: Schematic, non-exhaustive depiction of the overlap problem. During veloc-
ity profile generation a situation can occur, where the admissible transla-
tional velocities respecting constraints for translational acceleration (red)
and the ones for rotational acceleration (blue) do not overlap and therefore
no admissible vi or vi1 can be found. This is due to the current combi-
nation of the curvatures ci1 and ci and the planned velocity vi1 or vi ,
respectively.
execution time. However, there is another solution that forgoes iteration: given the
curvatures ci1 and ci one can analytically determine the biggest upper bound vi1 for
vi1 such that for all vi1 vi1 an overlap of [vmin|at , vmax |at ] and Ia is guaranteed.
To assure that vi then lies within the overlap, the same method can be applied in a
backward fashion due to our symmetry assumptions.
The bounds derived thereby can be treated as additional isolated constraints for vi1
and vi and they are therefore easily integrated into the first phase of velocity profile
generation. As the derivation of the bounds is quite lengthy, we skip it here and refer
the reader to the appendix. The derivation of the upper bound for vi1 can be found
in Appendix B.1, while Appendix B.2 presents pseudo code for its computation.
With the overlap of the intervals guaranteed by isolated constraints we can establish
forward and backward consistency as presented in Section 3.2.1.2. The difference is that
one additionally has to establish consistency with respect to rotational acceleration.
Note that attention has to be paid to choosing the appropriate interval from Ia when
determining the maximum admissible velocity respecting rotational acceleration.
Fig. 3.8 provides a visualization of velocity profiles. It depicts velocity profiles to-
gether with the different isolated constraints for two differently shaped trajectories. The
plots show how the final velocity profile respects constraints on translational velocities
imposed by maximum translational and rotational velocity vmax and max , maximum
centripetal force fmax , obstacle distance dobst , and the aforementioned additional con-
straint that guarantees overlapping of [vmin|at , vmax |at ] and Ia . Furthermore, it can
be observed how accelerational limits affect the final velocity profile: it accelerates and
decelerates smoothly between the minima of the isolated constraints and the start and
end velocity of zero.
The corresponding splines for the velocity profiles can be found in Fig. 4.5, the
smoother spline was generated from the one with sharper curves by the optimization
method presented in Chapter 4. Note how the optimization drastically reduces the
effects imposed by the constraints.
30
3.2 Numerical Velocity Profile
translational
velocity [m/s]
0.8 overlap
obstacles
centripetal
0.6 rotational
vmax final profile
0.4
0.2
0
arc length
(a) Values for a trajectory with sharp curves, see Fig. 4.5a.
translational
velocity [m/s]
0.8 overlap
obstacles
centripetal
0.6 rotational
vmax final profile
0.4
0.2
0
arc length
(b) Values for a smooth trajectory, see Fig. 4.5b.
31
4 Trajectory Generation
This chapter presents how trajectories can be obtained and optimized. Recall that we
are given a map and sparse waypoints as an input to our system. The line path defined
by the waypoints is required to be traversable by the robot, i.e., it is expected to be
free of obstacles.
At first, a trajectory will be generated that closely follows the line path induced by
the waypoints. This trajectory will then be iteratively optimized in 2D shape by moving
around control points and elongating spline tangents at the latter. Optimization will
be stopped if either the optimal trajectory has been found or time constraints prohibit
further computation. With this design our system is able to generate an admissible
trajectory instantly (anytime capability) while efficiently using available computational
resources. Fig. 4.1 provides a schematic overview over this system.
The next section covers the generation of the initial trajectory through the use of
heuristics. The remaining sections provide details on the optimization of the initial
trajectory and the issue of planning a new trajectory while still following the old one.
32
4.1 Initial Trajectory
Initial Trajectory
Optimization
System
Final Trajectory
Figure 4.1: Schematic system overview with processes/functional entities (rounded cor-
ners) and objects (normal rectangles). With sparse waypoints and a map
as input the system first generates an initial trajectory. This trajectory is
then optimized in an iterative fashion.
B (5,5)
2 2
2
2 C (7,2)
D (4,1)
A (0,0)
Figure 4.2: Visualization of the tangent (first derivative) heuristic applied to a Quintic
Bezier Spline. The tangents at control points B and C (red arrows) have
been set according to the heuristic: they are perpendicular to the angu-
lar bisector of the angle inscribed by the particular control points and its
neighbors (dashed blue). Furthermore their magnitude is proportional to
the distance to the nearest neighbor control point.
33
4 Trajectory Generation
B (2,4)
C (5,2)
A (0,0)
(a) Splines
curvature
0
curve param.
-1
-2
-3
-4
-5
Figure 4.3: Second derivative heuristic visualization. Black: a Quintic Bezier Spline,
red: two Cubic Bezier Splines. (a) shows the splines while (b) displays
their curvature profiles. The splines start at point A and B, respectively.
The Quintic Bezier Splines second derivative at point B has been set to a
weighted average of the two Cubic Bezier splines. Except for the second
derivative at point B the Quintic Bezier Splines first and second derivatives
match the ones of the particular Cubic Bezier Splines. Note the curvature
discontinuity at the join point B for the Cubic Bezier Splines.
34
4.1 Initial Trajectory
waypoint. Similar to the inner waypoints the tangents magnitudes are set to half of
the Euclidean distance to the neighbor waypoint.
The suitability of the employed heuristic is shown below during treatment of trajec-
tory optimization (Section 4.2.3).
1 1
SAB : A, A + tA , B tB , B
3 3
1 1
SBC : B, B + tB , C tC , C.
3 3
For the second derivatives of the splines at the point B this yields (refer to Eq. (A.23)):
1 1
SAB (1) = 6
00
A + tA 2 B tB + B = 6A + 2tA + 4tB 6B
3 3
1 1
SBC (0) = 6 B 2 B + tB + C tC
00
= 6B 4tB 2tC + 6C.
3 3
While one could now compute a simple average of the two second derivatives, it makes
even more sense to weight the second derivatives according to the relative size of their
respective segments. We will do this in an inversely proportional fashion, which might
seem counterintuitive at first glance but yields the effect that a long segment will not
dramatically deform a much shorter adjacent segment.
Let the generic weighted average of the second derivatives be
a = SAB
00
(1) + SBC
00
(0) = (6A + 2tA + 4tB 6B) + (6B 4tB 2tC + 6C) .
To define weights with the above mentioned properties, let dAB be the distance
between A and B, say dAB = |AB|, dBC analogously. The weights for the segments
35
4 Trajectory Generation
Start (0,9)
(3,5.5)
(5.5,5) End
(1.5,4)
Figure 4.4: Initial trajectory generation: The given waypoints and the induced line
path are depicted in blue. The red arrow indicates the robots heading at
the start position. The generated initial trajectory is given by the black
solid curve. The black markers indicate the control points of the Quintic
Spline that are not given waypoints. Note that the tangent length has been
reduced to a quarter of the minimum adjacent segment length to achieve
even less deviation from the line path than in Fig. 4.2 for example.
4.1.3 Generation
To generate an initial trajectory, the given waypoints are chosen as start and end
points of Quintic Bezier Spline segments. The remaining control points, that determine
first and second derivatives at the waypoints, are obtained by means of the respective
heuristics presented above. Compared to the original tangent heuristic, tangents are
shortened by factor 2 to achieve less deviation from the waypoint induced line path.
Fig. 4.4 gives an example for an initial trajectory. It shows the given waypoints, the
induced line path, and the initial trajectory as well as the initial heading of the robot.
We now have a trajectory that closely follows the line path induced by the waypoints
in a drive straight and turn fashion and is therefore not colliding with any obstacles.
For this trajectory a velocity profile could be instantly generated and together with
the trajectory provided to a controller for execution. The next section describes how
36
4.2 Optimization
start start
p2
p1
Figure 4.5: Trajectory before and after optimization. (a) shows the initial trajectory
with the gradient induced coordinate system for waypoint translation (black
arrows). In (b) the result of the optimization process is shown. Red markers
stand for spline control points, tangents at inner waypoints are depicted by
red lines. Trajectories are shown in blue above the distance map, where
darker values are closer to obstacles.
this initial trajectory can be optimized iteratively until an optimal solution has been
found or time constraints enforce returning the best trajectory found so far.
4.2 Optimization
The goal of the optimization is to change the initial trajectorys shape in a way that
it yields lower costs, for this work this means that it can be traversed faster. This can
be reached by smoothing the trajectory to have less sharp curves and by reducing the
overall arc length, for example. The optimization has to balance these two potentially
conflicting means to reach its goal of a minimum traversal time while respecting the
robots kinematic and obstacle distance constraints.
In this section we will first introduce the parameters of the spline we are going to
optimize and present the method that is used to do so. Afterwards, an empirical
examination of the search space is conducted to assure the suitability of the employed
optimization method.
For a rough idea of what the method does refer to Fig. 4.5. It shows a trajectory
before and after optimization, the grayscale background of the figures is the correspond-
ing distance map. The optimized trajectory can be traversed faster and the occurring
kinematic constraints are less harsh, as can bee seen in Fig. 3.8. It shows the velocity
profiles and isolated constraints for the splines in Fig. 4.5.
37
4 Trajectory Generation
as optimization parameters. This leaves us with three degrees of freedom per inner
waypoint.
Search space topology The space that we will search for the optimized trajectory
is spanned around the initial trajectory by continuous variation of the above men-
tioned parameters for each of the inner waypoints. The evaluation criterion for each
combination of parameters is the total traversal time. For splines that collide with
the environment an infinite traversal time is assumed. This causes the optimization
procedure to discard these parameter combinations.
Note that we furthermore restrict the search space in the following manner: we do not
continue the search in directions that yield collision causing parameter combinations.
In practice this scenario occurs if there are two paths around an obstacle: we will only
consider the one suggested by the initial trajectory and not incrementally translate
waypoints through the obstacle to reach the other path, a part of the search space that
is disconnected by colliding splines.
38
4.2 Optimization
1 P parameters to be optimized;
2 BestTrajectory initial trajectory;
3 while time left do
4 forall p P do
5 CurrentTrajectory BestTrajectory;
6 repeat
7 (, CurrentTrajectory) RPROP(p, CurrentTrajectory);
8 if evaluate(CurrentTrajectory) > evaluate(BestTrajectory) then
9 BestTrajectory CurrentTrajectory;
10 break;
11 until < ;
12 tryWaypointDeletion(BestTrajectory)
Figure 4.6: Pseudo code for the optimization method based on the RPROP algorithm.
for weight adaption in neural networks. A brief introduction can be found in a technical
report [27], while [28] is the original publication of the algorithm. It is a gradient
descend method that only uses the sign of partial derivatives to determine the direction
of the weight change. The magnitudes of the derivatives are ignored, the actual amount
of change in the weights is determined by an additional heuristic. As the sign of partial
derivatives can be computed by pointwise evaluation of the cost function, this renders
RPROP a derivative free optimization algorithm. Further advantages of the algorithm
are its robustness with respect to local minima and its fast convergence compared to
standard gradient descent methods.
We base our optimization method on RPROP because of its robust and fast con-
vergence and because it is derivative free. The derivative of our cost function is too
involved to be obtained in closed form: deriving the influence of shape parameters
on time of travel on its own involves deriving arc length and curvature functions and
further complexity is introduced with the influence of the distance map on admissible
velocities.
The major difference in our adoption of RPROP is that we do not update all param-
eters at the same time but choose to iterate through them and treat each parameter
as a one-dimensional optimization problem. While doing so, we interweave the opti-
mization of the different parameters, i.e., we do not fully optimize a parameter before
proceeding to the next one. The treatment of one dimensional subproblems is chosen
to reduce the number of gradient sign computations and thereby the number of velocity
profile generations.
Fig. 4.6 gives the pseudo code for the proposed optimization method. Starting with
the initial trajectory it always keeps a reference to the best trajectory so far. As long
as there is time left for optimization the method cycles through the parameters P of
the spline (2D location of the inner waypoints and tangent elongation) and triggers a
one-dimensional optimization using RPROP. As soon as a RPROP step successfully
improved the trajectory, optimization of the parameter is stopped and the method
moves on to the next parameter. The same is true for the case that the step size
computed by RPROP falls below a certain threshold ( in the algorithm). In Fig. 4.6
the function RPROP stands for one step of RPROP optimization that returns a new step
39
4 Trajectory Generation
(g) Scene 7
Figure 4.7: Scenes used for search space inspection. Obstacles are shown in black, the
robots start position is blue and the goal is indicated by a yellow dot.
The waypoints and the line path induced by them are shown in blue. For
examination of Scene 1 the path has been cut after the first four waypoints
(compare Fig. 4.5, it shows initial and optimized trajectory for Scene 1).
size and an updated trajectory. The evaluate function rates a trajectory with respect
to a cost function. The trajectory with the shorter time of travel is chosen. At this
point, other cost measures like anticipated energy consumption or steering effort could
be used instead.
40
4.2 Optimization
Tangent elongation Fig. 4.8 shows the influence of tangent elongation in the initial
trajectory for several scenes. For combinations of tangent elongations for both inner
waypoints p1 and p2 the durations of the velocity profiles are shown.
Initial trajectories have a tangent elongation factor of 0.5 for both inner waypoints
p1 and p2, this combination is found in the the plots lower left corner. The plots
show that elongating tangents in principle allows the spline to be traversed faster.
Beyond a certain point, however, further elongation of the tangents again increases the
durations or even yields trajectories that collide with the environment (white areas).
Increasing durations occur as soon as the trajectory cannot be traversed any faster but
the widened curves lead to a bigger overall arc length instead.
It can be seen that the space is smooth and free of local minima. The plots for the
remaining scenes in Fig. 4.8 look similar.
Waypoint translation Translating inner waypoints can affect the time needed to tra-
verse a trajectory in several ways. Firstly, translating waypoints has a direct effect on
overall arc length and can furthermore lead to a change in curvature at the join points.
Secondly, by translating waypoints, the trajectory can change its distance to nearby
obstacles, influencing induced velocity limits (see Section 3.2.5).
Fig. 4.9 shows how translation of the first inner waypoint (p1) in the initial trajectory
changes time of travel for several scenes. The figure shows the corresponding initial
trajectories and distance maps.
The plots axes represent movement along the gradient direction and orthogonal to
it, this gradient induced coordinate system is visualized with black arrows in the cor-
responding distance maps. Looking at these coordinate systems in the right column of
Fig. 4.9 one observes that movement along gradient direction generally corresponds to
increasing obstacle distance while orthogonal movement corresponds to lateral trans-
lation with respect to the closest obstacle.
The relation between waypoint translation and time of travel is observable in Scene 4
(Fig. 4.9b). From the plot one can see that the optimal position for the waypoint p1 is
41
4 Trajectory Generation
duration [s]
10.5 36
34
8.5
tangent elongation p2
32
6.5 30
4.5 28
26
2.5
24
0.5 22
0.5 2.5 4.5 6.5 8.5 10.5
tangent elongation p1
(a) Scene 1
duration [s]
10.5 28
26
8.5
tangent elongation p2
24
6.5
22
4.5
20
2.5
18
0.5 16
0.5 2.5 4.5 6.5 8.5 10.5
tangent elongation p1
(b) Scene 4
duration [s]
10.5 38
36
8.5
tangent elongation p2
34
6.5 32
4.5 30
28
2.5
26
0.5 24
0.5 2.5 4.5 6.5 8.5 10.5
tangent elongation p1
(c) Scene 7
Figure 4.8: Elongation of tangents for initial trajectory and its effects on time of travel.
The initial trajectory has elongation factors of 0.5 for both tangents (lower
left corner). Darker is better, contours have been added for intervals of
0.5 seconds. Parameters that correspond to white areas yield collisions
with the environment. Figures look similar for the remaining scenes.
42
4.2 Optimization
duration [s]
38
0.8
36
orthogonal movement
0.4
opt
34
start
0
32
p2
-0.4
30
p1
-0.8 opt
28
-0.8 -0.4 0 0.4 0.8
movement in gradient direction
(a) Scene 1
duration [s]
36
0.8 opt
34
orthogonal movement
0.4 32
30
start
0 28
p2
26
-0.4 24 opt
22
-0.8 p1
20
-0.8 -0.4 0 0.4 0.8
movement in gradient direction
(b) Scene 4
duration [s]
40
0.8
38
orthogonal movement
36
0.4 p2
34
start 32
0
30 opt
opt p1
28
-0.4
26
24
-0.8
22
-0.8 -0.4 0 0.4 0.8
movement in gradient direction
(c) Scene 5
Figure 4.9: Translation of waypoint p1 for initial trajectory and its effects on duration.
Right part shows corresponding initial trajectories. In the left part darker
is better, contours have been added for intervals of 0.5 seconds. White
areas correspond to parameter combinations that lead to collisions with
the environment. Optima and start positions are marked. Figures look
similar for the remaining scenes.
43
4 Trajectory Generation
in negative gradient direction and positive orthogonal direction from the start position.
It is indicated by a white marker in the plot and a black one in the distance map in
the right part of the figure.
We also observe that moving p1 closer to the obstacle, i.e., movement in negative
gradient direction, is not feasible without prior lateral movement along the obstacle,
here in positive orthogonal direction. As can be seen in the distance map, moving p1
towards the obstacle leads to a collision of the trajectory on the right side of p1. In the
plot these collisions correspond to the triangular white area in the lower left. Lateral
movement of p1 centers the point below the obstacle and thereby allows passing it
without collision when moving p1 towards it.
The parameter combinations that yield the rectangular white area in the right part
of the plot correspond to moving p1 away from the obstacle beyond a certain threshold.
A look at the distance map reveals that a collision of the trajectory with the obstacle
at p2 is inevitable when moving p1 in positive gradient direction, regardless of any
additional movement in orthogonal direction.
One observes that the search space is smooth and free of local minima for translation
of the first inner waypoint. The plots for the remaining scenes in Fig. 4.9 look similar
to the presented ones and analog observations have been made for the translation of
the second inner waypoint p2.
Combined search space The spaces discussed above only constitute two-dimensional
subspaces of the actual search space, which consists of two inner waypoints with three
parameters each and therefore has six dimensions. As visualization gets difficult for
this dimensionality we have to rely on different means for inspection of the complete
space.
The smoothness of the subspaces suggests that this is also the case for the com-
bined search space. However, interaction effects might occur. We therefore conduct an
exhaustive search in the discretized six-dimensional space for each scene.
For Scene 5 the discretized space contains only one minimum. For the other scenes
several local minima are detected. However, they either yield durations within 0.2 sec-
onds range of the optimum, which is roughly 1% of the total travel time, or they
correspond to extreme parameter settings that yield a considerably higher duration.
As another mean to assess the applicability of the optimization method in the com-
bined space we compare its results to the ones obtained by the aforementioned ex-
haustive search. Fig. 4.10 shows how the proposed optimization method performs in
each scene. It is always able to find a trajectory in the vicinity of the optimum in the
discretized space. In the left part the duration ratio of the searchs trajectory and the
one that is the optimum found by the exhaustive search are plotted against the num-
ber of optimization steps. As soon as this ratio approaches 1, the search has found a
trajectory that is as good as the discretized optimum. For Scene 4 the ratio even drops
considerably below 1. Due to not being limited by discretization the search method
was able to find a better trajectory than the discretized exhaustive search. The table
in the right part of the figure states the absolute numbers. It lists duration of the
initial trajectory, the best one found by the discretized exhaustive search, and the one
the search method converges to.
44
4.2 Optimization
duration
ratio
1.6 Scene 1
Scene 2
1.5 Scene 3 durations [s]
Scene 4 Scene initial exh. search optimized
1.4 Scene 5 1 28.73 20.89 20.78
Scene 6 2 18.10 12.01 11.92
1.3 Scene 7
3 26.75 19.29 19.27
4 23.10 15.90 14.92
1.2
5 22.85 15.76 15.72
1.1 6 21.76 13.69 13.68
7 30.25 23.53 23.48
1
0.9
0 100 200 300 iter-
ations
Figure 4.10: Optimization process for Scenes 17. The plot shows the ratio of duration
and optimum duration found by the (discretized) exhaustive search against
the number of iterations. The table lists the absolute values.
Tangent rotation To conclude the examination of the search space we provide some
evidence for the suitability of the employed tangent heuristic. While one could include
tangent rotation as an additional parameter in the optimization, we chose to rely on
the heuristic for complexity reasons, as the use of the heuristic decreases the number
of optimization parameters.
To ensure that by not considering tangent orientation for parametric optimization
not too much potential is given away, an exhaustive search of the space including
tangent rotation is conducted. The now eight-dimensional space has to be heavily
discretized to keep the search tractable.
Tab. 4.1 shows the differences in optimal trajectory duration if considering tangent
rotation or not. Note that data was generated with a different discretization and
slightly different parameters for obstacle imposed velocity limits, therefore the optima
listed in Tab. 4.1 do not exactly match the ones in the right part of Fig. 4.10.
In Tab. 4.1 one observes that the durations for the optima of the exhaustive search
do not differ dramatically, including tangent rotation into the search space did not
yield optima with considerably better durations.
More evidence that tangent rotation is set to a sensible value by the heuristic is given
in Fig. 4.11. It shows the two-dimensional space spanned by tangent rotation at both
inner waypoints around the trajectory the optimization method converged to. Darker
values stand for less time of travel and contours have been added to the figure at levels
of 0.5 seconds. White areas correspond to values for rotation that yield trajectories
colliding with the environment. One observes that deviation from the rotation set by
the heuristic can hardly improve the duration of the trajectory. In fact, examination
of the space for Scenes 17 results in a maximum improvement of 0.09 seconds, i.e.,
45
4 Trajectory Generation
duration [s]
28
-30 22
-40
21
-40 -30 -20 -10 0 10 20 30 40
tangent rotation at p1 in degrees
(a) Scene 1
duration [s]
21
tangent rotation at p2 in degrees
40
20
30
19
20
18
10
heuristic 17
0
16
-10
15
-20
14
-30
13
-40
12
-40 -30 -20 -10 0 10 20 30 40
tangent rotation at p1 in degrees
(b) Scene 2
duration [s]
36
tangent rotation at p2 in degrees
40
30 34
20
32
10
heuristic 30
0
-10
28
-20
-30 26
-40
24
-40 -30 -20 -10 0 10 20 30 40
tangent rotation at p1 in degrees
(c) Scene 7
Figure 4.11: Tangent rotation for first and second inner waypoint for final optimized
trajectory and its effects on time of travel. Darker colors stand for shorter
durations. Contours have been plotted for levels of 0.5 seconds. The
tangent heuristic corresponds to values of 0 for both rotations. Figures
for scenes remaining look similar.
46
4.3 Updating Plans
0.5% of the total time of travel, if one considers tangent rotation only (numbers not
shown in the figure). For the evaluation, rotation up to 45 degrees in both directions
has been considered, values beyond that tend to yield unfavorably deformed splines as
tangents increasingly point against the general direction of travel.
4.2.4 Runtime
We briefly describe the runtime of the proposed method. The predominant part of
computational expense is consumed by the generation of the velocity profile. Herein,
the numerical integration of the 2D path of the trajectory constitutes constant costs
for each segment. Calculations at the planning points yield costs that are linear in
a segments arc length. Costs for calculating the spline from its parameters and for
collision checks are linearly depending on the number of spline segments. Consequently,
the runtime is linear in the trajectory length and in the number of waypoints provided
to the method.
In most cases around 500 RPROP steps can be executed within 0.4 seconds for paths
consisting of four waypoints. Significant improvements are in general achieved earlier
in the optimization process, as can be seen in Fig. 4.10 as well, the major improvements
take place within the first 100 RPROP steps, which corresponds to 0.1 seconds. Note
again the anytime capability of the proposed method, i.e., it provides the continuously
improving trajectory at any time during the optimization.
The runtimes correspond to execution on an Intel Pentium 2 GHz dual processor.
The optimization method used to gather this data can be further improved regarding
implementational and conceptual aspects (see also Section 6.2).
47
4 Trajectory Generation
3 4
5
2
Figure 4.12: Schematic visualization of the effects of accumulated odometry error and
a plan update as countermeasure. The reference frame is the ground
truth, localization errors are ignored. For details please refer to the text
(Section 4.3.1).
robot with respect to the planned trajectory in case that the employed controller uses
odometry as feedback exclusively.
This is the case for most controllers and is also due to the fact that in high precision
robots, odometry readings are available at a considerably higher frequency than high
level position estimates generated by the employed localization method. We now show
how updating the active plan can account for the accumulation of odometry errors and
for unmapped obstacles.
48
4.3 Updating Plans
plan (red solid line) is therefore computed to smoothly fit at this position and prevent
the impending collision.
The odometry error that accumulates during the planning phase for the updated
trajectory is assumed to be small compared to the one building up to the beginning of
the phase. It results in the robot actually being at position 5 at execution time of the
updated trajectory. As a consequence the actual execution of the updated trajectory
(depicted as dashed red line) slightly differs from the planned trajectory.
Note that Fig. 4.12 only constitutes a schematic visualization of the situation, i.e.,
it does not claim proportionality. For easier reference we restate the meaning of line
colors and numbers in the figure:
red dashed execution of updated plan (due to to a small odometry error during re-
planning phase)
5 robots real position at new plan execute time (due to small odometry error during
replanning phase)
49
4 Trajectory Generation
Q0 Q00 P 0 P 00
cQ = cP = .
|Q0 |3 |P 0 |3
50
4.3 Updating Plans
aP 0 bP 00 P 0 P 00
3
=
|aP | 0 |P 0 |3
ab(P P )
0 00
P 0 P 00
=
a3 |P 0 |3 |P 0 |3
b(P P )
0 00
P P 00
0
=
a2 |P 0 |3 |P 0 |3
Now the constraints for the first and second derivative are:
Q0 = aP 00 (4.1)
2
Q =a P .
00 00
(4.2)
If these constraints are met, the two curves P and Q fit smoothly with G2 and curvature
continuity.
Obstacle proximity Suppose the critical constraint of the active trajectorys velocity
at the join point was obstacle proximity. Furthermore, an error in trajectory execution
now leads to an anticipated join point that is closer to the obstacle. In this situation,
the velocity required at the join point would not be admissible due to obstacle proximity
restrictions.
We resolve this situation by allowing the required velocity to be set at the updated
trajectorys starting point but force the velocity profile to decelerate at maximum rate
until the limit imposed by nearby obstacles is obeyed.
Unfavorable path shape Depending on how sophisticated the method providing the
waypoints is, it might be the case that the waypoints for the new trajectory define
an initial trajectory that cannot be traversed starting with the required velocity. An
example for this situation is a sharp curve that cannot be slowed down for appropriately.
Velocity profile generation is therefore unable to maintain the initially set starting
velocity.
This issue can be treated by using the difference between the required velocity and
the maximum starting velocity as a cost function for the optimization method. The
method will then modify the trajectorys shape to allow a higher starting velocity.
Once it is possible to set the required velocity, the cost function can be switched back
to the normal one.
Note that when treating starting velocity discontinuities with the optimization me-
thod, the discontinuity is mostly resolved by elongating the tangent at the start point
using geometric continuity as presented above. For this specific case it therefore makes
51
4 Trajectory Generation
52
5 Experiments
The previous chapter has already presented a simulation based validation of the op-
timization method and its applicability to the search space. Having found that the
optimization method is suitable and the search space well behaved, in this chapter we
assess the performance of the overall system on real robots.
A number of experiments were conducted to evaluate the performance of our spline
based method including a comparison to a Dynamic Window-based approach.
Software The implementation of our approach is integrated into the CARMEN robo-
tics framework [22]. Waypoints for the initial trajectory are supplied by the frameworks
value iteration based path planner [35].
To execute the planned trajectories we rely on a dynamic feedback linearization con-
troller presented by Oriolo et al. [23]. Note that as this controller relies on odometry
readings as error feedback, its performance directly depends on the quality and fre-
quency of odometry readings. It is, like all controllers of its kind, intended for use with
robotic hardware that supplies frequent, reliable odometry readings with accurate time
stamps.
We compare our method to an implementation of the Dynamic Window Approach
(DWA) [8]. For the spline based system used for the experiments, only the first four
waypoints are used, longer paths are cut after the fourth waypoint. The time assigned
to planning and optimizing a trajectory is 0.4 seconds. Furthermore, updating of
trajectories is triggered approximately every second. As mentioned in Section 4.3.3 we
thereby account for goal locations that are beyond the sensors field of view by iterative
replanning.
53
5 Experiments
Figure 5.1: Robots used for experiments. Synchro drive robot Albert and differential
drive robot Friedrich.
54
5.2 Results
close normal
DWA Splines DWA Splines
avg. traveled distance [m] 6.83 6.62 7.05 6.43
standard deviation [m] 0.13 0.15 0.20 0.18
Table 5.1: Average traveled distance for Albert in situation with close and normal
obstacles. This is data for the runs depicted by Fig. 5.3
the closest obstacle is 5 cm for Albert and 12 cm for Friedrich when driving exactly in
the middle of the passage.
As the approach has been successfully applied to a wider range of situations in
simulations, we chose one of the hardest settings to be evaluated on real robots.
5.2 Results
In the situations introduced above, several runs were executed for the spline based
and the Dynamic Window based approach with both robots, Albert and Friedrich. A
general observation for the spline based approach is that the paths driven by the robots
were smooth and the updating of trajectories was not perceivable by a human observer,
i.e., updated trajectories did fit very smoothly.
More details on the runs will now be presented along with a comparison to the Dy-
namic Window-based approach that has been evaluated on exactly the same situations
as the one based on splines.
Albert With the synchro drive robot Albert, 11 runs were executed for both exper-
imental situations and approaches, each. Fig. 5.3 shows the recorded times of travel.
Each run is represented by a marker in the scatter plots. The left part of the figure
depicts the data for the situation with close obstacles, the right part for the one with
normal obstacles.
In general, time of travel is higher for the situation with close obstacles than for
the other situation, where obstacles are further apart. This is due to the fact that the
robot is required to drive slowly when in proximity of obstacles. In both situations the
median time of travel is lower for the spline based approach, the medians are connected
by a dashed line in both plots. Furthermore, the variance in time of travel is higher
for the Dynamic Window, especially for the situation with close obstacles.
The average distance traveled for the runs presented by Fig. 5.3 is given by Tab. 5.1.
In both situations the spline based approach travels a shorter path than the Dynamic
Window does. Note that this occurs although both approaches are granted the same
minimal distance to obstacles.
We could observe that the actions executed by the spline based method are smoother
than the ones by the Dynamic Window. Support for this observation is given in
Fig. 5.4a. It shows the translational velocity commands generated by both approaches
on the first particular run in the close obstacles situation with Albert. The commands
generated by the spline based method are clearly smoother and lack the heavy oscil-
lation found in the Dynamic Window. For the remaining runs, the plots show similar
55
5 Experiments
time [s]
33
32
time [s]
31 29
30 28
29 27
28 26
27 25
26 24
Figure 5.3: Results for Albert in two situations with differently spaced obstacles (see
Fig. 5.2). Depicted is the total time of travel for 11 runs each. The dashed
lines connect the medians of runs with the Dynamic Window approach and
the proposed spline based method, respectively. With the proposed method
the robot reaches the goal faster and the total time of travel shows lower
variance, especially in the situation with close obstacles (a). Note that the
time axes have been cropped.
56
5.2 Results
velocity
[m/s]
0.3
0.2
0.1
0
0 5 10 15 20 25 30 time [s]
(a) DWA
velocity
[m/s]
0.3
0.2
0.1
0
0 5 10 15 20 25 30 time [s]
(b) Splines
Figure 5.4: Translational velocity commands sent to Albert by (a) the Dynamic Win-
dow approach and (b) the proposed spline based method. The data is
taken from a run for the close obstacles situation (see Fig. 5.2b). Note that
the abrupt decelerations at the goal are caused by the global path planner
which stops the robot when in vicinity of the goal.
57
5 Experiments
time [s]
27
26
25
24
23
DWA Splines
Figure 5.5: Results for Friedrich in the close obstacles situation. The scatter plot shows
the total time of travel for every run (14 for each approach). The dashed
line connects the median of runs with the Dynamic Window approach and
the proposed spline based method, respectively. Note that the time axis
has been cropped.
differences. The abrupt deceleration at the end is due to the global path planner
which stops the robot when it is near the goal. Note that this suppresses the smooth
decelerations that the spline based approach originally plans (see for instance Fig. 3.8).
It has to be noted that the implementation of the Dynamic Window does not employ
any smoothing. Of course this can be done to receive smoother velocity commands.
However, by smoothing the commands one also smoothens the constraints that cause
the abrupt commands, i.e., one loosens the constraints as their fulfillment is delayed
by the command smoothing.
In the situation with close obstacles, the Dynamic Window-based approach using
Albert showed the following behavior: right before passing through the first two boxes
(most narrow part of the path) it stops and turns left and right on the spot before
entering the narrow passage between the two boxes. This can also be seen in Fig. 5.4a,
where translational velocities drop to 0 around the time of 10 seconds. The behavior
is caused by the fact that the Dynamic Window is not looking into the future and can
therefore not easily find and head towards the narrow corridor of admissible velocities
leading through the passage.
Friedrich For the differential drive robot Friedrich, experiments were only conducted
for the situation with close obstacles. The observations match those made for Albert,
the difficulties of the Dynamic Window however were less evident, yet still observable
to a certain degree. This is due to the lower diameter of Friedrich in comparison to
Albert which renders the narrow passage less constrained.
Fig. 5.5 shows the times of travel for the runs conducted in the close obstacles
situation, the corresponding average traveled distances are presented in Tab. 5.2. As
58
5.2 Results
DWA Splines
avg. traveled distance [m] 6.64 6.13
standard deviation [m] 0.07 0.06
Table 5.2: Average traveled distance for Friedrich in situation with close obstacles. This
is data for the runs depicted by Fig. 5.5
DWA
1m Splines
1m
Figure 5.6: CARMEN localization output for the first run of Friedrich in the close
obstacle situation (Fig. 5.2b) for the Dynamic Window (black) and the
spline based approach (red), respectively. Note that the actually driven
path is smoother than the localization output which is subject to errors.
mentioned above, the spline based approach yields lower times of travel together with
shorter overall pathlength. For the particular first runs, Fig. 5.6 shows the output
of the CARMEN localization for the Dynamic Window approach and the spline based
method, respectively. One can observe how the curves taken by the spline based method
are less sharp and the curves are in general less distinct, yielding the reported lower
traveled distance (compare Tab. 5.2). Note that the noise in the shown trajectories is
caused by the localization method, the actually driven paths are smooth.
59
5 Experiments
(a) (b)
(c) (d)
Figure 5.7: Reaction to an unmapped obstacle. The plots show new (red) and ac-
tive (green) trajectories above the current distance map from (a)(d) in
chronological order. The robot travels from right to left. In (b) it senses an
unmapped obstacle near the leftmost box and plans an evasive trajectory.
The current belief of the CARMEN localization about the robots position
is depicted with a blue circle. The underlying map is the close obstacles
situation (Fig. 5.2b), the data was recorded with Friedrich.
60
5.3 Summary
5.3 Summary
The experiments have shown that our spline based approach is applicable to real robots,
it yields smooth paths with respect to both, velocity and shape. The approach has
been successfully applied to a synchro drive and a differential drive robot. Updating
the trajectory while executing it is possible seamlessly, enabling the method to cope
with unmapped obstacles and accumulating odometry error.
Comparison to a Dynamic Window-based approach shows that paths generated by
the spline based method are shorter and can be traversed faster. At the same time
they respect the very same constraints in kinodynamics as well as regarding obstacle
distance and yet yield a smoother execution behavior of the robot. Furthermore, less
variance is observed in the spline based runs.
However, we belive that the full potential of the approach could not be displayed
by the experiments. As mentioned above, for any controller that relies on odometry
feedback it is crucial that these odometry readings are both frequent and accurate. The
robots at our disposal for the experiments lack this high quality odometry. First of all,
due to system architecture time stamps for the odometry readings do not correspond
to the measurement itself but to points in time that variably deviate up to one reading
cycle. In addition to that, readings are only available at fairly low frequencies (v 10 Hz
for Friedrich, v 20 Hz for Albert). As a last drawback, the quality of the odometry
readings is comparatively low for the used robots.
With improved odometry capabilities we expect our approach to perform even better,
especially with increasing velocities, as the odometry errors impact increases there.
Note that with higher frequency odometry the original Dynamic Window approach
is expected to perform worse as its search window shrinks with increasing execution
frequency.
61
6 Discussion
This chapter comments on how the proposed method can be customized and presents
possible improvements before it finally gives a conclusion.
6.1 Customization
The idea to optimize a parametric trajectory representation with respect to a cost
function is very generic and therefore highly customizable. All parts can be exchanged
and modified to suit a specific need or situation.
When starting from the method proposed here, three main parts emerge for cus-
tomization: cost function, waypoint input, and controller.
In case that travel time is not the only cost measure of interest for a specific applica-
tion, the cost function for the optimization method is easily changed to correspond to
different measures like anticipated energy consumption or overall steering effort. Costs
depending on the curvature integral of the spline are easily computed as curvatures are
already calculated for velocity profile generation in the current approach.
Also the method that computes the input waypoints for the approach is of course
easily exchanged. Instead of using the employed value iteration planner one can think
of using Voronoi graphs as a high level planner, as pursued by [29].
An advantage of the proposed method is that the controller used can be easily
exchanged. This way one can benefit from progress in control theory and adapt the
controller to specific needs. As long as the assumption of independent translational
and rotational velocities and accelerations is a valid approximation (see Section 3.2)
one can also easily port the method to different drive types this way without changing
velocity profile generation.
6.2 Improvements
The proposed method has a lot of potential for further improvement. Apart from im-
plementational issues there are a number of ideas that are able to extend the methods
functionality or considerably improve its performance, which we want to present here.
Spline subdivision Bezier Spline segments have the property that they can be effi-
ciently split into two Bezier segments of the same degree that yield the same curve. A
derivation and description of this subdivision property can be found in [25, Chapt. 3.3].
So far, our method does not take advantage of this property. However, there are two
potential applications for it.
Together with the convex hull property (c.f. Appendix A.3) one can implement col-
lision checking in a hierarchical fashion, applying polygon clipping algorithms to the
62
6.2 Improvements
respective convex hulls that can be iteratively refined to localize a collision. This hier-
archical collision checking entails a lot of speed up potential compared to the currently
employed system of pointwise collision checking along the trajectory.
The subdivision property can also be exploited for re-using previously planned tra-
jectories when planning a new trajectory. The current system always computes a com-
pletely new trajectory starting at the replanning point. Similar to seeding the queue
in A* based algorithms, one can re-use existing segments or with the help of the
subdivision property even parts of them and append new segments. This speeds up
the planning process if already existing trajectory parts are still valid and admissible.
Time dependent maps As the proposed method generates time parameterized tra-
jectories it can be extended to use a time dependent map to navigate among obstacles
for which movements can be anticipated.
Obstacle distance When computing the velocity limit that nearby obstacles impose
on the robot, the current method does not take into account the robots heading. This
way the robot is also forced to drive at a low speed when moving away from obstacles.
Accounting for the robots heading would remove this unnecessary constraint. Fur-
thermore, the system can be extended to account for the robots actual shape instead
of approximating it by a circle.
63
6 Discussion
6.3 Conclusion
We have proposed a method for wheeled mobile robot motion planning that features a
parametric representation of the planned actions and thereby overcomes the limitations
imposed by finite action sets, which a majority of the current work has to cope with.
The suggested approach plans curvature continuous paths in a time parametric fash-
ion that allows prediction of the robots position and kinematic state for any given
point in time along the trajectory. Therefore, a variety of controllers can be used to
execute the trajectory, which allows for precise navigation through a small odometry
feedback loop. Furthermore, optimization is employed to receive trajectories that are
near optimal with respect to a cost function such as the time of travel.
The input to the proposed method is constituted by a map and a set of sparse way-
points out of which an admissible trajectory is created instantly (anytime capability).
The initial trajectory is then subject to optimization in a continuous parameter space
for the remainder of the designated planning time. After optimization the time para-
metric trajectory together with its first two derivatives are forwarded to a controller
for execution.
In contrast to Cubic Bezier Splines the Quintic variant is able to provide the desired
properties for a trajectory representation, which are localism, curvature continuity,
and a strong correlation between control points and shape. The additional degrees of
freedom in form of second derivatives at start and end point are handled by a heuristic
that mimics the minimizing behavior of Cubic Bezier Splines. Furthermore, Bezier
Splines provide the subdivision property which is of use for future extensions of the
method.
We have shown how under certain assumptions the fastest constraint respecting
velocity profile can be computed for a trajectory without resorting to iteration to resolve
interdependencies between translational and rotational acceleration constraints.
The RPROP based optimization of trajectories worked well in both simulation and
experiments on real robots. It not only shortens the length of the planned trajectory
but also permits faster traversal of the latter by deforming it to reduce the constraints
impact as has been seen in Fig. 3.8. This has positive effects on the smoothness of
driving behavior.
Our experiments have shown the potential of the proposed method and its real
time applicability to robots: the approach works on both synchro and differential
drive robots and is able to smoothly update plans to avoid unmapped obstacles. In
comparison, the spline based method yields faster and smoother trajectories than a
Dynamic Window-based approach. Part of the advantage is due to the lookahead
our method performs, but even if a lookahead mechanism was added to the Dynamic
Window, it would still suffer from the negative effects of a finite action set.
As a first step to a more precise navigation in constrained spaces the majority of
current work has decoupled trajectory generation from execution. While we follow this
step, we also believe that a necessary next step is to abandon finite action sets.
Finite action sets and their optimal discretization receive substantial attention in
current state of the art work. A lot of effort is put into keeping the size of the action
set in bounds, i.e., keeping the resulting search tree tractable, and at the same time
spanning the relevant action space.
Our work is able to overcome the limitations of discretization by the choice of a
parametric trajectory representation instead of the predominant finite action sets.
64
6.3 Conclusion
65
List of Figures
66
Bibliography
[1] K. O. Arras, R. Philippsen, N. Tomatis, M. de Battista, M. Schilt, and R. Siegwart.
A navigation framework for multiple mobile robots and its application at the
Expo.02 exhibition. In Proc. IEEE International Conference on Robotics and
Automation (ICRA03), Taipei, Taiwan, 2003.
[3] J. Connors and G. Elkaim. Analysis of a spline based, obstacle avoiding path plan-
ning algorithm. In Proc. IEEE 65th Vehicular Technology Conference, VTC2007-
Spring, pages 25652569, 2225 April 2007.
[4] J. Connors and G. Elkaim. Manipulating B-Spline based paths for obstacle avoid-
ance in autonomous ground vehicles. In Proc. of the 2007 National Technical
Meeting of the Institute of Navigation, pages 10811088, San Diego, California,
2007.
[5] R. O. Duda and P. E. Hart. Pattern Classification and Scene Analysis. John
Wiley & Sons, New York, 1973.
[8] D. Fox, W. Burgard, and S. Thrun. The dynamic window approach to collision
avoidance. IEEE Robotics & Automation Magazine, 4(1):2333, March 1997.
[10] S. Gulati and B. Kuipers. High performance control for graceful motion of an
intelligent wheelchair. In Proc. IEEE International Conference on Robotics and
Automation ICRA 2008, pages 39323938, 1923 May 2008.
[11] J.-H. Hwang, R. C. Arkin, and D.-S. Kwon. Mobile robots at your fingertip:
Bezier curve on-line trajectory generation for supervisory control. In Proc. of
the IEEE/RSJ International Conference on Intelligent Robots and Systems, pages
14441449, 2003.
67
Bibliography
[12] O. Khatib. Real-time obstacle avoidance for manipulators and mobile robots.
International Journal of Robotics Research, 5(1):9098, 1986.
[14] Y. Koren and J. Borenstein. Potential field methods and their inherent limitations
for mobile robot navigation. In IEEE International Conference on Robotics and
Automation, pages 13981404, 1991.
[15] J.-C. Latombe. Robot Motion Planning. Kluwer Academic Publishers, Norwell,
MA, USA, 1991.
[17] J. Loustau and M. Dillon. Linear Geometry with Computer Graphics. CRC Press,
1992.
[18] A. Luca and G. Oriolo. Kinematics and Dynamics of Multi-Body Systems, chap-
ter Modelling and control of nonholonomic mechanical systems. Springer-Verlag,
Wien, 1995.
[21] C. Mandel and U. Frese. Comparison of wheelchair user interfaces for the paral-
ysed: Head-joystick vs. verbal path selection from an offered route-set. In Proc.
of the 3rd European Conference on Mobile Robotics (ECMR), 2007.
[23] G. Oriolo, A. De Luca, and M. Vendittelli. WMR control via dynamic feedback
linearization: design, implementation, and experimental validation. IEEE Trans-
actions on Control Systems Technology, 10(6):835852, Nov. 2002.
68
Bibliography
[26] S. Quinlan and O. Khatib. Elastic bands: Connecting path planning and control.
In Proc. of the International Conference on Robotics and Automation, pages 802
807, 1993.
[28] M. Riedmiller and H. Braun. A direct adaptive method for faster backpropagation
learning: The RPROP algorithm. In Proc. of the IEEE International Conference
on Neural Networks, pages 586591, San Francisco, CA, 1993.
[30] L. Sciavicco and B. Siciliano. Modelling and Control of Robot Manipulators. Ad-
vanced textbooks in control and signal processing. Springer, 2nd edition, January
2005.
[31] Z. Shiller and Y. Gwo. Dynamic motion planning of autonomous vehicles. IEEE
Transactions on Robotics and Automation, 7:241249.
[33] J. Stewart. Calculus: Early Transcendentals. Brooks Cole, Pacific Grove, 5th
edition, 2002.
[35] S. Thrun and A. Bucken. Learning maps for indoor mobile robot navigation.
Artificial Intelligence, 99:2171, 1998.
69
Bibliography
[38] A. H. Watt and M. Watt. Advanced Animation and Rendering Techniques: Theory
and Practice. Addison-Wesley Publishing Company, Inc., New York, 1992.
70
A Splines
This chapter introduces splines as used throughout this work and presents several cubic
spline families along with a discussion of their key properties.
A.1 Introduction
We introduce a spline as a piecewise polynomial parametric curve Q(t). In general
splines can exist in other spaces as well, for this application however, we restrict them
to live in a two-dimensional plane: Q(t) R2 . Note that nevertheless most of the
following is true in arbitrary spaces. Typically one considers splines whose segments
are polynomials of identical degree n.
There are three commonly used ways in the literature to define the polynomial
segments of a spline. We will briefly introduce them with the example of a cubic
segment with domain R2 .
dx dy
Eq. (A.1) defines the so called coefficient matrix C which serves as the characterization
of a specific cubic curve in this notation. Furthermore, it introduces the abbreviation
T for the vector containing the parameters powers. Note that in the literature also a
reversed variant of the parameter vector is used, e.g., [2]. We adopt the notation used
in [6, 7], and [38, Chapt. 3.5.2].
Weighted sum of control vertices S(t) can also be expressed as a weighted sum of
control vertices pi R2 , for cubic polynomials there are four of them:
3
X
S(t) = pi Bi (t) (A.2)
i=0
This notation allows the interpretation of the cubic polynomial as a linear combination
of the control vertices pi R2 , weighted by the so called basis splines Bi (t), which are
cubic polynomials. A particular segment is here characterized by its control vertices
71
A Splines
whereas the basis splines can be interpreted as defining the family of segments it belongs
to.
Product of matrices Combining the ideas of the precedent two notations one can
also express a segment through the product of three matrices and vectors, respectively:
S(t) = T M G (A.3)
T is the vector containing the parameters potencies as introduced in Eq. (A.1). Further
comparison with the definition in Eq. (A.1) shows that the coefficient matrix C has
been split into a basis matrix M and a geometry matrix G by C = M G. Defined as
m00 m01 m02 m03 G0
m10 m11 m12 m13
M = , G = G1 (A.4)
m20 m21 m22 m23 G2
m30 m31 m32 m33 G3
the geometry matrix characterizes the segment by four control vertices {Gi | i 0 . . . 3}
whereas the basis matrix can be regarded to define the family the curve belongs to.
Having a look at Eq. (A.2)
again, one realizes that the product of the parameter vector
T = t3 t2 t 1 with the basis matrix M is identical with a vector containing
the basis splines from Eq. (A.2)
t
m00 t3 + m10 t2 + m20 t + m30
m01 t3 + m11 t2 + m21 t + m31
T M =
m02 t3 + m12 t2 + m22 t + m32 ,
m03 t3 + m13 t2 + m23 t + m33
Definition The following definitions are derived in [6, Sect. 11.2.1]. Note that, de-
viating from conventions in mathematics, we use 0 as the first index to comply with
72
A.2 Cubic Hermite Spline
where P0 is the start point of a segment and P3 specifies its end point. R0 and R3 are the
tangent vectors at the start and the end point, respectively. We follow the somewhat
unintuitive notation of [6] for the same reason they introduced it: consistency with
notation that will be introduced later on. The Hermite basis matrix evaluates to
2 2 1 1
3 3 2 1
MH = 0
. (A.6)
0 1 0
1 0 0 0
Now, with Eq. (A.3), the Hermite form segment can be noted as
S(t) = T MH GH . (A.7)
This equation can easily be transformed into the corresponding instance of Eq. (A.2):
S(t) = (2t3 3t2 + 1)P0 + (2t3 + 3t2 )P3 + (t3 2t2 + t)R0 + (t3 t2 )R3 , (A.8)
To get the polynomial formulation of our segment, we compute the coefficient matrix
CH = MH GH and proceed according to Eq. (A.1). We get:
2P0 2P3 + R0 + R3
3P0 + 3P3 2R0 R3
CH =
(A.10)
R0
P0
and therefore
The drawback of the Hermite form for the splines segments is that the tangent
specification by vectors somewhat differs from the specification of the start and end
points by position vectors. Furthermore the relation of the tangents directions and
magnitudes to the segments shape is not very obvious. These considerations lead to
the definition of Cubic Bezier Splines.
73
A Splines
BB,0 BB,3
4 BB,1 BB,2
9
0 1 2
3 3 1
Figure A.1: The basis splines of a Cubic Bezier Splines segment, also known as the
Bernstein Polynomials of third degree. For a definition see Eq. (A.16).
A.3 Cubic B
ezier Splines
Intuition Cubic Bezier Splines also consist of cubic polynomials and therefore have the
same expressive power as the Cubic Hermite Splines. They differ from Hermite Splines
in the formulation of the segments. Instead of explicitly defining the tangent vectors
at start and end point, these vectors are extracted from two additional control vertices
in the case of Cubic Bezier Splines segments. C 1 continuity can be reached for Cubic
Bezier Splines by arranging the control vertices for the tangents in an appropriate way.
Definition The definitions stated here can be found in [6, Chapt. 11.2.2] together
with a derivation. Again we adapt indexing to Computer Sciences conventions. The
Bezier geometry matrix is
P0
P1
GB = P2
(A.12)
P3
and the Bezier basis matrix is
1 3 3 1
3 6 3 0
MB =
3
. (A.13)
3 0 0
1 0 0 0
Following Eq. (A.3) we get the Bezier segment defined by the four control vertices in
GB as
S(t) = T MB GB . (A.14)
Further transformation yields a formulation with the help of the Bezier basis splines
t t t
BB,0 t3 + 3t2 3t + 1 (1 t)3
BB,1 3t3 6t2 + 3t t)2
BB = = = 3t(1
BB,2 3t3 + 3t2 3t (1 t) ,
2 (A.15)
BB,3 t3 t3
74
A.3 Cubic Bezier Splines
P2 P3 P4
P9
S0 S1 P5
P1
S2
P6 P8
P0
P7
Figure A.2: Cubic Bezier Spline consisting of three segments S0 , S1 , and S2 . The
tangents at the join points are depicted in red with half their magnitude
and the control points have been arranged for C 1 continuity. The grey
areas show the convex hull of the respective segments control points and
thereby the convex hull property of a Cubic Bezier Spline.
They have the property to always sum up to 1 and to never leave the interval [0, 1]:
3
X
BB,i = 1, BB,i [0, 1], i = 0 . . . 3. (A.17)
i=0
S(t) = (P0 + 3P1 3P2 + P3 )t3 + (3P0 6P1 + 3P2 )t2 + (3P0 + 3P1 )t + P0 . (A.19)
Derivatives Eq. (A.19) makes it easy to state the first and second derivatives of a
Cubic Bezier Segment:
S 0 (t) = (3P0 + 9P1 9P2 + 3P3 )t2 + (6P0 12P1 + 6P2 )t 3P0 + 3P1 (A.20)
S (t) = (6P0 + 18P1 18P2 + 6P3 )t + 6P0 12P1 + 6P2
00
(A.21)
75
A Splines
A.4.0.1 Definition
The i-th segment (i [3, m]) of a Catmull-Rom Spline defined by control points
P0 , . . . , Pm is given by
Si (t) = T MCR GiCR
1 3 3 1 Pi3
1 2 5 4 1 Pi2 (A.24)
= t3 t2 t 1 .
2 1 0 1 0 Pi1
0 2 0 0 Pi
76
A.5 B-Splines
Derivatives Now, by inserting 0 for the start and 1 for the end point, respectively,
we obtain
Si (0) = Pi2 Si (1) = Pi1 (A.28)
1 1
Si0 (0) = (Pi1 Pi3 ) Si0 (1) = (Pi Pi2 ) (A.29)
2 2
and thereby confirm the C 1 continuity, as Si1 (1) = Si (0) and Si1
0
(1) = Si0 (0). Fur-
thermore, we see that the tangent at point Pi is parallel to the vector Pi1 Pi+1 . Cal-
culating the second derivative for a segment of a Catmull-Rom Spline will reveal that
they are generally not C 2 continuous.
Catmull-Rom Splines guarantee C 1 continuity at the cost of strictly prescribing
tangent direction and magnitude at every joint point.
A.5 B-Splines
For the above presented spline classes we were unable to reach our initial goal of C 2
continuity. B-Splines inherently possess this property. However, this comes at the
additional cost of not passing through any of their control points.
77
A Splines
P3
S1 S2
P4
P2
S3
S0 P5 P9
P1
S4
P6 P8
P0 S5
P7 S6
Definition The i-th segment (i [0, m 3]) of a B-Spline defined by control points
P0 , . . . , Pm is given by
P
3
where BBS,i = 1, BBS,i [0, 1], i = 0, . . . , 3, which is the sufficient condition
i=0
for the convex hull property that was introduced with the Cubic Bezier Splines in
Appendix A.3. Fig. A.3 shows an instance of a B-Spline with seven segments. The
convex hulls of the segments overlap, the one of segment S2 (corresponds to control
points P2 , . . . , P5 ) is highlighted in the figure.
We continue with the calculation of the coefficient matrix
Pi + 3Pi+1 3Pi+2 + Pi+3
3Pi 6Pi+1 + 3Pi+2
i
CBS = MBS GiBS =
,
(A.32)
3Pi + 3Pi+2
Pi + 4Pi+1 + Pi+2
78
A.6 Summary
A.6 Summary
The properties of the cubic spline families presented in this chapter and the ones of
Quintic Bezier Splines, which are introduced in Section 3.1.2.3, are summarized by the
following table:
Cubic Quintic
om
l-R
y
e
ite
rt
lin
ul
er
r
e
m
m
ie
p
op
at
ez
-S
ez
er
B
Pr
79
B Solving the Overlap Problem
During velocity profile generation, compliance of the planned velocities with translational and rotational
acceleration constraints has to be ensured. Due to a combination of curvature change and translational
velocity planned for an adjacent planning point, situations can arise where no velocity exists for a planning
point that respects both constraints (Section 3.2.7). Suppose for instance a car approaching a curve at a
high speed: As descibed in Section 3.2.7, even if skidding is not a problem, it would either have to decelerate
quickly or to abruptly change its steering angle in order to stay on the road. If neither is feasible according
to the limiting constraints of the car, it will not be able to follow the curve.
More formally, the intervals [vmin|at , vmax |at ] and Ia , defined by Eqs. (3.29), (3.30), and (3.39), do not
overlap in general. This chapter provides a solution to the problem: it derives the biggest upper bound for
vi1 that guarantees a non-empty intersection for all velocities smaller than this bound. To ensure that
admissible velocity intervals overlap for backward consistency, too, the same bound can be applied in a
reverse fashion, assuming motion from pi to pi1 .
The computation of the bound derived in the following section is summarized by a pseudo code algorithm
presented in Appendix B.2. Once the bound has been computed, it can be seamlessly integrated into velocity
profile generation as an additional isolated constraint.
80
B.1 Derivation of the Bound
The interval that remains to be intersected with [vmin|at , vmax |at ] is now [v1 , v1 ] in case v1 does exist and
[0, v1 ] in case it doesnt.
We show that v1 < vmax |at : since vmax |at > 0 (Eq. (3.30)), this is clear for v1 < 0. We can therefore
assume v1 0 and obtain:
v1 < vmax |at
q
1 2
p
(ci1 ci ) vi1 + (ci + ci1 ) vi1 8ci s amax < vi1 2 + 2atmax s .
2
2ci
As both sides are greater or equal zero due vmax |at > 0 and the assumption above, they can be squared:
(ci1 ci )2 vi1 2 + 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 8ci s amax < 4ci 2 vi1 2 + 8ci 2 atmax s
2 ci1 2 ci 2 vi1 2 8ci s (amax + ci atmax ) < 2 (ci1 ci ) vi1 . . ..
The inequality is always true, as the rhs is always positive whereas the lhs always yields a negative value.
Therefore v1 < vmax |at holds.
We have to distinguish two cases for vmin|at : For the case that vmin|at = 0 the intersection is always
nonempty, as v1 > 0:
1 p
v1 = (ci1 ci )vi1 + (ci + ci1 )2 vi1 2 + 8ci s amax
2ci
1 p
> (ci1 ci )vi1 + (ci + ci1 )2 vi1 2
2ci
1
= 2ci1 vi1
2ci
0.
The next case is vmin|at > 0. The intersection will be non-empty as soon as vmin|at v1 . We derive a
condition for this:
v1 vmin|at
1 p p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 + 8ci s amax vi1 2 2atmax s .
2ci
With both sides of the inequality greater than zero, squaring both sides is an equivalence transformation:
(ci1 ci )2 vi1 2 + 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 + 8ci amax s 4ci 2 vi1 2 8ci 2 atmax s
2 ci1 2 ci 2 vi1 2 + 8ci s (amax + ci atmax ) 2 (ci1 ci ) vi1 . . .
4ci s (amax + ci atmax )
(ci1 + ci ) vi1 + . . ..
(ci1 ci ) vi1
For this to have any chance to hold, the lhs has to be positive. This translates into a constraint for vi1 :
4ci s (amax + ci atmax )
(ci1 + ci ) vi1 + 0
(ci1 ci ) vi1
4ci s (amax + ci atmax )
(ci1 + ci ) vi1 2
ci1 ci
4ci s (amax + ci atmax )
vi1 2 .
(ci1 ci ) (ci1 + ci )
81
B Solving the Overlap Problem
We keep this constraint in mind and assume for now that vi1 fulfills it. Therefore both sides of the
original inequality are now positive and we can square them. Note that the term (ci1 + ci )2 vi1 2 cancels
out immediately:
4ci s (amax + ci atmax ) 16ci 2 2s (amax + ci atmax )2 )
2(ci1 + ci ) + +8ci amax s
ci1 ci (ci1 ci )2 vi1 2
8ci (ci1 + ci )s (amax + ci atmax ) 16ci 2 2s (amax + ci atmax )2
vi1 2 + 8ci amax s vi1 2
ci1 ci (ci1 ci )2
8ci s ((ci1 + ci )(amax + ci atmax ) (ci1 ci )amax ) 16ci 2 2s (amax + ci atmax )2
vi1 2
ci1 ci (ci1 ci )2
2ci s (amax + ci atmax )2
((ci1 + ci )(amax + ci atmax ) (ci1 ci )amax ) vi1 2
ci1 ci
2
2c (a
i s max + c a
i tmax )
(2ci amax + (ci1 + ci )ci atmax ) vi1 2
ci1 ci
2s (amax + ci atmax )2
vi1 2 .
(ci ci1 ) (2amax + (ci1 + ci )atmax )
We remember that there was an additional constraint on vi1 but it is weaker than the final constraint:
It is
4ci s (amax + ci atmax ) 2s (amax + ci atmax )2
>
(ci1 ci )(ci1 + ci ) (ci ci1 ) (2amax + (ci + ci1 )atmax )
2ci amax + ci atmax amax + ci atmax
> = .
ci1 + ci 2amax + (ci + ci1 )atmax a + ci atmax + amax + ci1 atmax
| {z } | max {z }
>1 <1
A last consideration for this case reassures that the computed bound fulfills the assumption of vmin|at > 0
(see the second case of Eq. (3.29)):
s
2s (amax + ci atmax )2 p
> 2s atmax
(ci ci1 ) ((2amax + (ci1 + ci )atmax ))
(amax + ci atmax )2 > atmax ((ci ci1 ) (2amax + (ci1 + ci )atmax ))
a2max + 2ci amax atmax + ci 2 a2tmax > a2tmax (ci 2 ci1 2 ) + atmax (ci ci1 )2amax
a2max + 2amax atmax ci1 + a2tmax ci1 2 > 0.
82
B.1 Derivation of the Bound
For v2 it holds
1 p
v2 = (ci1 ci )vi1 (ci + ci1 )2 vi1 2 + 8ci amax s
2ci
1 p
< (ci1 ci )vi1 (ci + ci1 )2 vi1 2
2ci
1 p
= (ci1 ci )vi1 (ci + ci1 )2 vi1 2
2ci
1
= 2ci vi1
2ci
0.
v1 vmin|at
1 p p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 + 8ci amax s vi1 2 2atmax s .
2ci
As both sides of the inequality are non-negative they can be squared without causing any harm:
(ci1 ci )2 vi1 2 + 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 + 8ci amax s 4ci 2 vi1 2 8ci 2 atmax s
2(ci1 2 ci 2 )vi1 2 + 2(ci1 ci )vi1 . . . + 8ci s (amax + ci atmax ) 0.
The lhs of the inequality is easily verified to be non-negative through the case assumptions.
As a first result we state that a non-empty intersection exists as soon as v1 , v2 do not exist and have
distinct values:
(exv1sv2s) Ia [vmin|at , vmax |at ] 6= , (B.2)
where s !
8ci amax s
exv1sv2s = vi1 > . (B.3)
(ci + ci1 )2
We assume that v1 , v2 do exist and are not equal (exv1sv2s). The first possibility for an intersection is
v1 vmax |at
1 p p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 8ci amax s vi1 2 + 2atmax s .
2ci
(ci1 ci )2 vi1 2 + 2(ci1 ci )vi1 . . . + (ci1 + ci )2 vi1 2 8ci amax s 4ci 2 vi1 2 + 8ci 2 atmax s
2(ci1 2 ci 2 ) 8ci s (ci atmax + amax ) 2(ci1 ci )vi1 . . .
4ci s (ci atmax + amax )
(ci1 + ci )vi1 + . . ..
(ci1 ci )vi1
83
B Solving the Overlap Problem
If the inequalitys lhs is negative there wont be an intersection. We assume to lhs to be non-negative. This
is the case if
4ci s (ci atmax + amax )
(ci1 + ci )vi1 + 0
(ci1 ci )vi1
4ci s (ci atmax + amax )
(ci1 + ci )vi1 2
ci1 ci
4c (c a
i s i tmax + a max )
vi1 2
(ci1 ci )(ci1 + ci )
s
4ci s (ci atmax + amax )
vi1 .
(ci1 ci )(ci1 + ci )
With the assumption of the lhs being non-negative we continue transforming the inequality by squaring
both sides, note that the term (ci1 + ci )2 vi1 2 immediately cancels out:
8(ci1 + ci )ci s (ci atmax + amax ) 16ci 2 2s (ci atmax + amax )2
+ 8ci amax s
ci1 ci (ci1 ci )2 vi1 2
8(ci1 + ci )ci s (ci atmax + amax ) + 8ci (ci1 ci )amax s 16ci 2 2s (ci atmax + amax )2
vi1 2
ci1 ci (ci1 ci )2
2s (ci atmax + amax )2
(2amax + (ci1 + ci )atmax )vi1 2
ci1 ci
s
2s (ci atmax + amax )2
vi1 .
(ci1 ci )(2amax + (ci1 + ci )atmax )
(exv1sv2s
s ! s !!!
4ci s (ci atmax + amax ) 2s (ci atmax + amax )2
vi1 vi1
(ci1 ci )(ci1 + ci ) (ci1 ci )(2amax + (ci1 + ci )atmax )
[v1 , v1 ] [vmin|at , vmax |at ] = . (B.5)
The second possibility for an intersection is that [0, v2 ][vmin|at , vmax |at ] 6= . This is true for v2 vmin|at .
Before examining this condition we first demand v2 to be positive:
v2 > 0
p
(ci1 ci )vi1 > (ci + ci1 )2 vi1 2 8ci amax s .
84
B.1 Derivation of the Bound
We define s !
2amax s
v2spos = vi1 < . (B.6)
ci1
We have to distinguish two cases for vmin|at : vmin|at = 0 and vmin|at > 0. A non-empty intersection
exists for the case vmin|at = 0 and v2 > 0 and of course for the case vmin|at , v2 > 0 and v2 vmin|at .
Assume vmin|at = 0. This means
p
vmatzero = vi1 2atmax s . (B.7)
v2 vmin|at
1 p p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci amax s vi1 2 2atmax s
2ci
(ci1 ci )2 vi1 2 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 8ci amax s 4ci 2 vi1 2 8ci 2 atmax s
2(ci1 2 ci 2 )vi1 2 + 8ci s (ci atmax amax ) 2(ci1 ci )vi1 . . .
4ci s (ci atmax amax ) p
(ci1 + ci )vi1 + (ci + ci1 )2 vi1 2 8ci amax s .
(ci1 ci )vi1
We call this
2 4ci s (ci atmax amax )
precond1 = vi1 . (B.9)
(ci1 ci )(ci1 + ci )
85
B Solving the Overlap Problem
Assuming precond1 to hold, we proceed with the original inequality by squaring both sides, note that
the term (ci1 ci )2 vi1 2 immediately cancels out:
8(ci1 + ci )ci s (ci atmax amax ) 16ci 2 2s (ci atmax amax )2
+ 8ci amax s
ci1 ci (ci1 ci )2 vi1 2
8(ci1 + ci )ci s (ci atmax amax ) + 8(ci1 ci )ci amax s 16ci 2 2s (ci atmax amax )2
vi1 2
ci1 ci (ci1 ci )2
2
2s (ci atmax amax )
((ci1 + ci )atmax 2amax ) vi1 2 .
ci1 ci
As the rhs is negative, this would be tautology for (ci1 + ci )atmax 2amax 0, for the complementary case
(ci1 + ci )atmax 2amax < 0 it translates to:
s
2s (ci atmax amax )2
vi1 .
(ci1 ci )(2amax (ci1 + ci )amax )
A short derivation shows that it is always (ci1 + ci )atmax 2amax < 0: So far, we assumed v2hpos and
vmatzero to hold. A consequence of this is:
s
2amax s p
> 2atmax s
ci1
amax
> atmax
ci1
ci1 atmax < amax
exv1sv2s vmatzero
s !! !
2s (ci atmax amax )2
v2spos precond1 vi1
(ci1 ci )(2amax (ci1 + ci )atmax )
[0, v2 ] [vmin|at , vmax |at ] = . (B.11)
We can now conclude for this case:
(ci > 0) (ci1 0) (ci < ci1 )
Ia [vmin|at , vmax |at ] 6= (exv1sv2s (exv1sv2s (isect1 isect2 isect3 ))) , (B.12)
86
B.1 Derivation of the Bound
where
s !
8ci amax s
exv1sv2s = vi1 >
(ci + ci1 )2
s ! s !!
4ci s (ci atmax + amax ) 2s (ci atmax + amax )2
isect1 = vi1 vi1
(ci1 ci )(ci1 + ci ) (ci1 ci )(2amax + (ci1 + ci )atmax )
isect2 = (vmatzero v2spos)
s !!
2s (ci atmax amax )2
isect3 = vmatzero v2spos precond1 vi1
(ci1 ci )(2amax (ci1 + ci )atmax )
p
vmatzero = vi1 2atmax s
s !
2amax s
v2spos = vi1 <
ci1
4ci s (ci atmax amax )
precond1 = vi1 2 .
(ci1 ci )(ci1 + ci )
4ci s (ci atmax amax ) 4ci s (amax ci atmax ) 4ci s (amax + ci atmax )
vi1 2 < = <
(ci1 ci )(ci1 + ci ) (ci1 ci )(ci1 + ci ) (ci1 ci )(ci1 + ci )
s
4ci s (amax + ci atmax )
vi1 .
(ci1 ci )(ci1 + ci )
This means that the first part of isect1 is fulfilled. For the truth of the second part we introduce a case
distinction:
2 (c a a )2 2 (c a +a )2
s i tmax
Subcase 1 (ci1 ci )(2a max
max (ci1 +ci )atmax )
s i tmax
(ci1 ci )(2a max
max +(ci1 +ci )atmax )
: For isect3 to have a possibility
to hold, the lower bound introduced by precond1 has to be lower than any upper bound, in particular it
87
B Solving the Overlap Problem
has to hold:
4ci s (ci atmax amax ) 2s (ci atmax amax )2
.
(ci1 ci )(ci1 + ci ) (ci1 ci )(2amax (ci1 + ci )atmax )
Together with the subcase assumption the truth of the second part of isect1 results.
2 (c a a )2 2 (c a +a )2
s i tmax
Subcase 2 (ci1 ci )(2a max
max (ci1 +ci )atmax )
> (ci1 ci )(2a
s i tmax max
max +(ci1 +ci )atmax )
: We will first transform the
subcase assumption to retrieve a statement that will be of use later on.
As indicated by the braces, the subcase assumption leads to the lhs always being negative, which means
that the second part of isect1 is fulfilled.
We have shown for this case that once a suitable vi1 has been found, decreasing it has no effect on the
non-emptiness of the intersection.
88
B.1 Derivation of the Bound
Conviction that the intersection of Ia and [vmin|at , vmax |at ] is never empty is now achieved through the
definitions in Eqs. (3.30) and (3.29): One interval is always contained in the other one.
Therefore, we conclude for this case
(ci > 0) (ci1 0) (ci = ci1 ) Ia [vmin|at , vmax |at ] 6= . (B.14)
v1 < 0
1 p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 8ci s amax < 0
2ci
p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 8ci s amax > 0.
Depending on the existence of v1 , v2 it is now Ia = [0, v2 ] or Ia = [0, v1 ] [v2 , v2 ]. For further discussion
of interval overlapping we first derive v2 vmin|at :
v2 vmin|at
1 p p
(ci1 ci )vi1 (ci1 + ci )2 vi1 2 8ci s amax vi1 2 2atmax s
2ci
(ci1 ci )2 vi1 2 2(ci1 ci )vi1 . . . + (ci1 + ci )2 vi1 2 8ci s amax 4ci 2 vi1 2 8ci 2 atmax s
2(ci1 2 ci 2 )vi1 2 + 8ci s (ci atmax amax ) 2(ci1 ci )vi1 . . .
8ci s (ci atmax amax )
(ci1 + ci )vi1 + . . ..
(ci1 ci )vi1
As the lhs is clearly negative due to case assumptions the last line always holds.
We state an intermediary result: the existence of a non-empty overlap as soon as v1 and v2 do not exist
with different values.
(exv1v2 ) Ia [vmin|at , vmax |at ] 6= , (B.15)
89
B Solving the Overlap Problem
where s !
8ci amax s
exv1v2 = vi1 > . (B.16)
(ci + ci1 )2
From now on exv1v2 and thereby the existence and non-equality of v1 and v2 is assumed. With Ia =
[0, v1 ] [v2 , v2 ] the first possibility for an overlap emerges for v2 vmax |at . Note that v2 > 0 is guaranteed
by case assumptions.
v2 vmax |at
1 p p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 + 8ci s amax vi1 2 + 2s atmax .
2ci
(ci1 ci )2 vi1 2 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 + 8ci s amax 4ci 2 vi1 2 + 8ci 2 s atmax
2(ci1 2 ci 2 )vi1 2 + 8ci s (amax ci atmax ) 2(ci1 ci )vi1 . . .
4ci s (amax ci atmax )
(ci1 + ci )vi1 + . . ..
(ci1 ci )vi1
For the inequality to be able to hold, its lhs must be non-negative. This is the case for:
Assuming the lhs to be non-negative, we proceed with the original inequality by squaring both sides,
again the term (ci1 + ci )2 vi1 2 appears on both sides and therefore cancels out:
90
B.1 Derivation of the Bound
91
B Solving the Overlap Problem
we have a non-empty intersection as soon as v1 exists with v1 0. We state this as an intermediary result:
v1 vmin|at
1 p p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 + 8ci s amax vi1 2 2s atmax
2ci
We want to assume the lhs to be positive and translate this into a condition for vi1 :
We call it
2 4ci s (amax + ci atmax )
precond1 = vi1 . (B.22)
(ci1 ci )(ci1 + ci )
Assuming precond1 to hold we continue to process the original inequality by squaring both sides, as they
now share signs. Note that the term (ci1 + ci )2 vi1 2 immediately cancels out.
This inequality is a tautology for the case (2amax + (ci1 + ci )atmax ) 0 as the rhs is always non-negative.
For the complementary case (2amax + (ci1 + ci )atmax ) > 0 it translates to:
s
2s (amax + ci atmax )2
vi1 .
(ci1 ci )(2amax + (ci1 + ci )atmax )
92
B.1 Derivation of the Bound
The case (2amax +(ci1 +ci )atmax ) 0 can never occur in this context: We assumed v1pos and vmatzero
to hold, which has as a consequence:
s
2amax s p
> 2atmax s
ci1
amax
> atmax
ci1
amax > ci1 atmax
amax + ci1 atmax > 0.
s !!
2s (amax + ci atmax )2
exv1v2 vmatzero v1pos precond1 vi1
(ci1 ci )(2amax + (ci1 + ci )atmax )
Ia [vmin|at , vmax |at ] 6= . (B.23)
Note, that analogously to the first intersection possibility also this holds:
exv1v2 vmatzero
s !! !
2s (amax + ci atmax )2
v1pos precond1 vi1
(ci1 ci )(2amax + (ci1 + ci )atmax )
[0, v1 ] [vmin|at , vmax |at ] = . (B.24)
(ci < 0) (ci1 0) (ci > ci1 )
Ia [vmin|at , vmax |at ] 6= (exv1v2 (exv1v2 (isect1 isect2 isect3 ))) , (B.25)
93
B Solving the Overlap Problem
where
s !
8ci amax s
exv1v2 = vi1 >
(ci + ci1 )2
s ! s !!
4ci s (amax ci atmax ) 2s (amax ci atmax )2
isect1 = vi1 vi1
(ci1 + ci )(ci1 ci ) (ci1 ci )(2amax (ci1 + ci )atmax )
isect2 = (vmatzero v1pos)
s !!
2s (amax + ci atmax )2
isect3 = vmatzero v1pos precond1 vi1
(ci1 ci )(2amax + (ci1 + ci )atmax )
p
vmatzero = vi1 2s atmax
s !
2s amax
v1pos = vi1
ci1
2 4ci s (amax + ci atmax )
precond1 = vi1 .
(ci1 ci )(ci1 + ci )
This guarantees the truth of the first part of isect1 . For the second part we will distinguish two cases:
2 (a +c a )2 2 (a c a )2
s
Subcase 1 (ci1 ci )(2a max i tmax
max +(ci1 +ci )atmax )
s
(ci1 ci )(2a max i tmax
max (ci1 +ci )atmax )
: For isect3 to be possible to
hold the lower bound imposed by precond1 has to be smaller than any active upper bound, in particular it
94
B.1 Derivation of the Bound
has to hold:
4ci s (amax + ci atmax ) 2s (amax + ci atmax )2
.
(ci1 ci )(ci1 + ci ) (ci1 ci )(2amax + (ci1 + ci )atmax )
Taking the subcase assumption into account, the fulfillment of the second part of isect1 is obvious.
2 (a +c a )2 2s (amax ci atmax )2
s
Subcase 2 (ci1 ci )(2a max i tmax
max +(ci1 +ci )atmax )
> (ci1 ci )(2amax (ci1 +ci )atmax ) : First, we will transform the
subcase assumption for later use:
As the braces indicate, application of the subcase assumption leads to the lhs being always positive. This
means that the second part of isect1 is true.
A short summary: It has been shown that once an admissible vi1 has been found for this case, it can
be decreased without any effect on the non-emptiness of the intersection.
95
B Solving the Overlap Problem
We derive that v2 vmax |at : since vmax |at > 0 by definition (Eq. (3.30)), this is clear for v2 < 0 and we
can therefore assume v2 0.
v2 vmax |at
1 p p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 + 8ci s amax vi1 2 + 2s atmax
2ci
both sides are non-negative due to the above assumption, therefore they can be squared:
(ci1 ci )2 vi1 2 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 + 8ci s amax 4ci 2 vi1 2 + 8ci 2 s atmax
2(ci1 2 ci 2 )vi1 2 + 8ci s (amax ci atmax ) 2(ci1 ci )vi1 . . .
4ci s (amax ci atmax )
(ci1 + ci )vi1 + . . ..
(ci1 ci )vi1
As the lhs is never positive according to case assumptions, the inequality can easily be identified as a
tautology. Therefore, v2 vmax |at holds.
Combining all information gained so far, we receive a non-empty intersection as soon as vmin|at v2
holds. We will now derive the condition for this:
For the case that vmin|at = 0 it is always vmin|at v2 as v2 > 0:
v2 > 0
1 p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax > 0
2ci
p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax < 0.
v2 vmin|at
1 p p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax vi1 2 2s atmax
2ci
96
B.1 Derivation of the Bound
For this inequality to hold, the positiveness of the lhs is a vital precondition:
Under the assumption of this condition to be fulfilled, we continue processing the original inequality by
squaring it. Note that the term (ci1 + ci )2 vi1 2 cancels out immediately.
We show that the precondition on vi1 can be safely dropped, as values that fulfill the last inequality
always fulfill that precondition:
As a last consideration for this case it will be shown that the computed bound for the case vmin|at > 0
97
B Solving the Overlap Problem
p
always respects this condition, namely vi1 > 2s atmax :
s
2s (ci atmax amax )2 p
> 2s atmax
(ci1 ci )((ci1 + ci )atmax 2amax )
(ci atmax amax )2
> atmax
(ci1 ci )((ci1 + ci )atmax 2amax )
(ci atmax amax )2 < atmax (ci1 ci )((ci1 + ci )atmax 2amax )
ci 2 a2tmax + 2ci atmax amax a2max < a2tmax (ci1 2 ci 2 ) 2(ci1 ci )atmax amax
ci1 2 a2tmax + 2ci1 atmax amax a2max < 0.
The lhs is negative through the case assumptions.
Combining all knowledge gained we conclude for this case:
(ci < 0) (ci1 0) (ci < ci1 )
s !
2s (ci atmax amax )2
Ia [vmin|at , vmax |at ] 6= vi1 . (B.27)
(ci1 ci ) ((ci1 + ci )atmax 2amax )
98
B.1 Derivation of the Bound
The interval to intersect with [vmin|at , vmax |at ] therefore reduces to [0, v2 ]. A first precondition for a
non-empty intersection will be v2 > 0:
v2 > 0
1 p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax > 0
2ci
p
(ci1 ci )vi1 < (ci + ci1 )2 vi1 2 8ci s amax
An intersection will occur as soon as v2 vmin|at . For the case vmin|at = 0 the intersection is non-empty
as soon as v2 is positive (v2spos):
(vmatzero v2spos) Ia [vmin|at , vmax |at ] 6= , (B.30)
where p
vmatzero = vi1 2s atmax . (B.31)
For the case vmin|at > 0 (vmatzero), the following has to hold:
v2 vmin|at
1 p p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 8ci s amax vi1 2 2s atmax
2ci
squaring an inequality which has sign-sharing sides is an equivalence operation
(ci1 ci )2 vi1 2 2(ci1 ci )vi1 . . . + (ci + ci1 )2 vi1 2 8ci s amax 4ci 2 vi1 2 8ci 2 s atmax
2(ci1 2 ci 2 )vi1 2 + 8ci s (ci atmax amax ) 2(ci1 ci )vi1 . . .
4ci s (ci atmax amax )
(ci1 + ci )vi1 + . . ..
(ci1 ci )vi1
For the inequality to hold the lhs has to be non-negative:
4ci s (ci atmax amax )
(ci1 + ci )vi1 + >0
(ci1 ci )vi1
4ci s (ci atmax amax )
(ci1 + ci )vi1 2 > .
ci1 ci
99
B Solving the Overlap Problem
We have to distinguish two cases here: ci1 + ci 0 and ci1 + ci < 0. For the former the inequality always
hold and for the latter it translates to:
Note that this could be simplified, but we resist to do that in order to explicitly state what is true for which
case. Assuming now that the condition precond1 is fulfilled and the lhs of the original inequality therefore
is non-negative, we proceed by squaring it. Note that the term (ci1 + ci )2 vi1 2 immediately cancels out.
We claimed ((ci1 +ci )atmax 2amax ) < 0, which is a consequence of our assumptions vmatzero v2spos.
For both assumptions to hold, it has to be:
2s amax
2s atmax <
ci1
ci1 atmax < amax
100
B.1 Derivation of the Bound
Combining the two possibilities for an intersection, we finally conclude for this case:
(ci < 0) (ci1 > 0) Ia [vmin|at , vmax |at ] 6=
where
s !
2s amax
v2spos = vi1 <
ci1
p
vmatzero = vi1 2s atmax
s !!!
4ci s (ci atmax amax )
precond1 = (ci1 + ci 0) (ci1 + ci < 0) vi1 < .
(ci1 ci )(ci1 + ci )
1 p
v1 = (ci1 ci )vi1 + (ci + ci1 )2 vi1 2 8ci s amax
2ci
1 p
< (ci1 ci )vi1 + (ci + ci1 )2 vi1 2
2ci
1
= ((|ci1 | |ci | + ||ci | |ci1 ||)vi1 )
2|ci |
1
= (((|ci1 | + |ci |) + ||ci | |ci1 ||)vi1 )
2|ci |
< 0.
The interval remaining for intersection with [vmin|at , vmax |at ] therefore reduces to [0, v1 ]. For a non-empty
intersection we demand v1 to be positive:
v1 0
1 p
(ci1 ci )vi1 + (ci + ci1 )2 vi1 2 + 8ci s amax 0
2ci
p
(ci1 ci )vi1 (ci + ci1 )2 vi1 2 + 8ci s amax .
101
B Solving the Overlap Problem
We now consider the case vmin|at > 0 (i.e., vmatzero), assuming v1pos to hold:
v1 vmin|at
1 p p
(ci1 ci )vi1 + (ci1 + ci )2 vi1 2 + 8ci s amax vi1 2 2s atmax .
2ci
102
B.1 Derivation of the Bound
Assuming precond1 to hold, we can now continue with the original inequality by squaring it. Note that
the term (ci + ci1 )2 vi1 2 cancels out immediately:
2s (amax + ci atmax )2
vi1 2
(ci1 ci )((ci1 + ci )atmax + 2amax )
s
2s (amax + ci atmax )2
vi1 .
(ci1 ci )((ci1 + ci )atmax + 2amax )
The claim (ci1 + ci )atmax + 2amax > 0 can be justified as a consequence of the previous assumptions
vmatzero v1pos. For both of them to hold, it has to be
2s amax
2s atmax <
ci1
ci1 atmax < amax
ci1 atmax + amax > 0
103
B Solving the Overlap Problem
where
s !
2s amax
v1pos = vi1
ci1
p
vmatzero = vi1 2s atmax
s !!!
4ci s (amax + ci atmax )
precond1 = (ci1 + ci 0) (ci1 + ci > 0) vi1 .
(ci1 ci )(ci1 + ci )
For this case the interval to be intersected with [vmin|at , vmax |at ] simplifies to [0, v2 ] as the lower interval
border v1 can be verified to be negative by the case assumptions.
For a non-empty intersection we demand the upper bound v2 to be non-negative:
v2 0
2s amax
vi1 0
ci1 vi1
2s amax ci1 vi1 2
s
2s amax
vi1 .
ci1
In order to retrieve a non-empty intersection v2 vmin|at has to hold. In case vmin|at = 0 this is guaranteed
by v2hpos:
(vmatzero v2hpos) Ia [vmin|at , vmax |at ] 6= , (B.40)
where
p
vmatzero = vi1 2s atmax . (B.41)
Assuming now vmin|at > 0 (i.e., vmatzero) we more closely examine the condition
v2 vmin|at
2s amax p
vi1 vi1 2 2s atmax .
ci1 vi1
104
B.1 Derivation of the Bound
Due to our assumptions both sides are non-negative, so they can be squared:
2s a2max
vi1 2
(ci1 atmax 2amax )ci1
s
2s a2max
vi1 .
(ci1 atmax 2amax )ci1
The derivation of ci1 atmax 2amax < 0 is obtained through the previous assumptions vmatzero v1hpos.
In case both are true, it holds
2s amax
2s atmax <
ci1
ci1 atmax < amax
ci1 atmax + amax > 0
ci1 atmax + 2amax > 0.
Combining all knowledge gained so far, we can conclude for this case:
(ci = 0) (ci1 > 0) Ia [vmin|at , vmax |at ] 6=
s !!! !!
2s a2max
v2hpos vmatzero vmatzero vi1 , (B.42)
(ci1 atmax 2amax )ci1
where
s !
2s amax
v2hpos = vi1
ci1
p
vmatzero = vi1 2s atmax .
105
B Solving the Overlap Problem
v1 0
2s amax
vi1 0
ci1 vi1
2s amax ci1 vi1 2
s
2s amax
vi1 .
ci1
For the intersection with [vmin|at , vmax |at ] to be non-empty, v1 vmin|at has to hold. For the case vmin|at = 0
this is true, as soon as v1hpos is fulfilled:
with p
vmatzero = vi1 2s atmax . (B.45)
For vmin|at > 0 (i.e., vmatzero) the condition for a non-empty intersection is derived as follows:
v1 vmin|at
2s amax p
vi1 vi1 2 2s atmax .
ci1 vi1
2s a2max
vi1 2
(2a + ci1 atmax )ci1
s max
2s a2max
vi1 .
ci1 (2amax + ci1 atmax )
106
B.1 Derivation of the Bound
The previously made assumptions vmatzero v1hpos lead to the above claimed 2amax + ci1 atmax > 0.
For the truth of both it is required:
2s amax
2s atmax <
ci1
ci1 atmax < amax
ci1 atmax + amax > 0
ci1 atmax + 2amax > 0.
Concluding for this case we summarize the conditions for a non-empty intersection:
(ci = 0) (ci1 < 0) Ia [vmin|at , vmax |at ] 6=
where
s !
2s amax
v1hpos = vi1
ci1
p
vmatzero = vi1 2s atmax .
We have now derived the biggest bound to vi1 that guarantees a non-empty intersection of [vmin|at ,
vmax |at ] and Ia for all smaller values. This constraint can be treated as an isolated constraint and is
accounted for in the first phase of velocity profile generation. Note that it is also crucial to ensure that
vi lies within the now guaranteed overlap. To do this, we apply the same method backwards, assuming
to move from pi to pi1 . This is possible due to our symmetry assumptions that imply identical absolute
values for accelerational and decelerational constraints.
107
B Solving the Overlap Problem
108
B.2 Pseudo Code
109
C Sobel Operator for Gradients
For waypoint translation we chose to use a coordinate system derived from the gradient
of the distance map. Thereby the axes of the coordinate system correspond to changing
the waypoints obstacle distance and its lateral displacement with respect to the closest
obstacle. To obtain the the distance maps gradient at a location on the map, we employ
the Sobel Operator.
The Sobel Operator is a well known and commonly used method for 2D gradient
computation on discrete data. It computes the gradient by averaging and differencing
in a window around the desired coordinate, estimating a separate value for the x- and
the y-component of the gradient. An introduction can be found in [5, Chapt. 7.3], the
original Sobel Operator is introduced in [5, pp. 271-2].
To increase robustness, we use a 5x5 window instead of the original 3x3 one. The
following equation displays the weights we use to compute the x-component Sx and
the y-component Sy of the gradient:
1 2 0 2 1 1 4 6 4 1
4 8 0 8 4 2 8 12 8 2
Sx = 6 12 0 12 6 , Sy = 0
0 0 0 0 . (C.1)
4 8 0 8 4 2 8 12 8 2
1 2 0 2 1 1 4 6 4 1
For our application the gradient magnitude is not important, so we can skip normal-
ization and directly compute the angle [0, 2) of the gradient as
arctan Sy Sy 0
= Sx (C.2)
arctan Sy + else.
Sx
110