Iros 2016 Replanning
Iros 2016 Replanning
Iros 2016 Replanning
net/publication/309291325
CITATIONS READS
289 1,035
6 authors, including:
All content following this page was uploaded by Helen Oleynikova on 20 March 2018.
I. I NTRODUCTION
Multirotor UAVs are gaining wide acceptance not only
as research platforms, but also for use in various real-
world applications. Despite recent progress in on-board state
estimation, planning, and control, many current UAV systems
still require either an empty environment or perfect knowl- Fig. 1: Results of an experiment showing our online local
edge of one a priori. This limits their safety and utility in replanning system. The UAV starts from behind the large
unstructured, unknown environments. mattress, which blocks its view of the iron obstacle (left)
In this paper, we focus on the problem of planning safe behind. The planning goal is set inside the iron obstacle, but
avoidance trajectories for a multirotor helicopter (multi- as soon as the UAV observes that it is occupied, it replans
copter) in partially known or unknown environments. For to stop in front (planned path seen in black). This shows the
example, use cases such as high-speed forest flight require ability of our system to avoid newly-detected obstacles and
low-latency motion planning, as these environments are find feasible goal positions online.
often densely populated and obstacles frequently occlude one
another [1].
Motion primitive methods have been a common choice for in discrete time, while dynamic constraints are more nat-
online replanning on fixed-wing and multirotor platforms, urally suited to continuous-time representations (and avoid
since they can be executed quickly and each “primitive” can unnecessary numerical differentiation errors).
be constructed to be dynamically feasible [2] [3]. However, For UAV flight, it is advantageous to use continuous-time
such methods require discretizing the state-space, which trajectory representations like polynomials [5]. These basis
requires a huge motion library or having the controller functions provide continuity up to a high derivative, fast
track from nearest start state, which [3] cites as being evaluation at any given time, and a very small number of
responsible for up to 20% of the failures of their fixed-wing parameters are needed to describe even long and complex
collision avoidance system. For our approach, we overcome trajectories. By varying only one parameter (segment time),
the need for state-space or time discretization by choosing it is possible to ensure that these trajectories are dynamically
a continuous-time basis function to express our trajectories, feasible given a simplified model of multicopter dynamics.
and plan from arbitrary points in the state space to allow We propose a method of continuous-time trajectory opti-
greater flexibility for online replanning. mization that allows the real-time generation of safe avoid-
We draw inspiration from trajectory optimization meth- ance trajectories. Our method uses a two-part objective
ods, such as CHOMP [4], which locally minimize collision function, minimizing both a derivative of position and cost
and smoothness costs on a discrete-time trajectory. These of collision with the environment. We also show this method
planners are most commonly used for solving manipulation as integrated into a local replanning system, where we use
problems, where most of the constraints are kinematic rather this local trajectory optimization to modify an initial plan in
than dynamic. Kinematic constraints can be simply expressed the presence of previously unknown obstacles.
Our approach runs in real-time (under 50 ms for a com-
The research leading to these results has received funding from the
European Communitys Seventh Framework Programme (FP7) under grant- plete planning cycle), produces continuous-time trajectories,
agreement n.608849 (EuRoC) and n.644128, (AEROWORKS). and is able to plan from and to arbitrary states without a
need for discretization in the workspace or state-space. candidates based on an objective function. This has been
The contributions of this work are as follows: done for finding good polynomial trajectories to enable
• A continuous-time polynomial formulation of a local quadrotor ball juggling [10], selecting locally lower-cost
trajectory optimization problem for collision avoid- trajectories to track a global plan in rough terrain [11], and
ance, capable of running in real-time on a real multi- choosing the safest trajectories for autonomous vehicles in
copter. traffic [12]. However, these approaches rely on randomly-
• A complete system with this as local replanning com- sampled trajectories finding collision-free paths, which is an
ponent, which continuously computes collision-free assumption that may not hold in very cluttered environments.
trajectories around any newly detected obstacles. An alternative is to solve the optimal control problem
using mixed-integer programming, where the workspace is
• Evaluation against existing trajectory optimization and again broken up into convex regions and a global optimum
planning algorithms, and experiments on a real world including some linearized or simplified version of the system
platform (Fig. 1). dynamics is found [13], [14]. These approaches generally
give dynamically-feasible and collision-free trajectories, and
II. R ELATED W ORK
it is even possible to make guarantees on their safety [15],
3D path planning approaches for UAVs can be broadly [16], however require a map representation which is very
classified into several categories, such as sampling-based costly to compute and generally have long runtimes (on the
methods (often followed by smoothing), trajectory optimiza- order of magnitude of minutes).
tion methods, and method based on motion primitives. Here A class of methods commonly used for replanning are
we discuss motion planning methods related to our work, those based on motion primitives. The state-space of the UAV
with emphasis in suitability for real-time replanning with a is discretized into a state lattice with motion primitives form-
dynamically updating map. ing edges in the graph, and standard graph search algorithms
Sampling-based planning followed by a smoothing step such as A* and AD* are used to find a feasible solution
which ensures dynamic constraints are met is commonly used through this graph. This has been shown in multicopters
for 3D global planning on UAVs [6]. Approaches such as for navigating through partially known environments [2],
running RRT-based methods to generate a visibility graph, [17] and on fixed-wing airplanes for navigating through
followed by fitting high-order polynomials through the way- a forest while always safely being able to perform an
points (graph vertices) are shown to outperform traditional emergency turn-around maneuver [18]. Another work shows
RRT methods in control space in terms of execution time [6]. flying high-speed through a forest using only on-board vision
Recent speed-ups to the polynomial optimization have also and planning, picking collision-free next maneuvers from a
allowed such combined planners to run in almost real-time, motion library [3], where they cite insufficient richness of
taking only a few seconds to generate long global plans [7]. the motion primitive library and discretization in the start
While these methods generally produce high-quality plans state as responsible for 50% of the experimental failures.
and are probabilistically complete, they are still too slow for A drawback of these approaches is the need to discretize
some online applications like real-time avoidance. both the workspace and state space (for example, motion
Closest to our proposed approach are discrete-time primitives can only be generated for a finite number of
trajectory optimization methods. CHOMP, a trajectory start velocities and end velocities), and the performance
optimization-based motion planner that revived interest in of the algorithm is tightly linked to how many motion
this class of planner in recent years, uses a two-part objective primitives are generated. Although we do use a discretized
function with a smoothness and collision cost, and performs workspace representation, our approach does not require
gradient descent with positions of discrete waypoints as such discretization, nor does it require discretization in time
parameters [4]. In order to speed up convergence time to or state-space, giving the possibility of a wider range of
a feasible plan, and ensure smoothness of the final solution, solutions to be found.
each gradient descent step is multiplied by a Riemennian
metric in order to ensure smooth, incremental updates. Also III. C ONTINUOUS -T IME T RAJECTORY O PTIMIZATION
based on trajectory optimization, STOMP is a gradient-free A LGORITHM
method that samples candidate trajectories and minimizes a Our approach focuses on optimizing high-degree poly-
cost function by creating linear combinations of the best- nomial trajectories made out of several segments, as in-
scoring candidates [8]. A more recent advent in trajec- spired by [6]. The trajectory is essentially a high-order
tory optimization for collision-free planning breaks up the polynomial spline, with C D continuity, where D is the
workspace into free convex regions and performs Sequential derivative we attempt to minimize. These high-order splines
Quadratic Programming (SQP) to converge to a solution are generally used for global trajectory generation, and have
faster than the previous two methods [9]. Unfortunately, this many advantages including the ability to specify velocities,
requires a pre-built map with pre-computed convex regions, accelerations, and lower derivatives at waypoints, very fast
which is difficult to achieve in real-time. evaluation times, and compact representation of long and
Another approach to finding a low-cost path is to cheaply complex trajectories. While a closed-form solution exists to
generate many path candidates, and choose the best of the minimizing the sum of squared derivatives of such a spline,
we expand the problem to also contain information about the The objective Jd can be calculated via the following:
environment to generate a locally optimal safe trajectory.
Jd = d> >
F RF F dF + dF RF P dP +
A. Problem Formulation d> >
P RP F dF + dP RP P dP (6)
Instead of considering the full dynamics of a multicopter, where R is the augmented cost matrix, and RXX denotes
we follow the work of Mellinger and Kumar [5] to plan in the appropriate blocks within this matrix.
a reduced space of differentially flat outputs. This allows us The Jacobian of Jd with respect to the parameter vector
to plan only in R3 and handle yaw separately. can be computed as follows:
Therefore, we will consider a polynomial trajectory in K
∂ Jd
dimensions, with S segments, and each segment of order N . = 2d> >
F RF P + 2dP RP P . (7)
Each segment has K dimensions, each of which is described ∂dP
by an N th order polynomial: The derivative costs are independent for each axis, and are
accumulated over all K dimensions of the problem.
fk (t) = a0 + a1 t + a2 t2 + a3 t3 . . . aN tN (1) To represent collision costs, we use a line integral of the
with the polynomial coefficients: potential function c(f (t)) over the arc length of the trajectory.
> Since our environment is represented as a discrete voxel
pk = a0 a1 a2 . . . aN . (2) grid (see Section III-C), we need to sample the trajectory and
test at least one point within each voxel along the trajectory.
Given this trajectory representation, we seek to find the set
To do so, we transform the trajectory from end-derivatives
of coefficients p∗ that minimize an objective function J. In
into workspace coordinates. For each axis k at a time t:
our case, similar to CHOMP [4], our objective function has
two components: a part that attempts to minimize a derivative T = [t0 , t1 , t2 , ..., tN ] (8)
D, Jd , and a part that attempts to minimize collisions with fk (t) = Tpk (9)
the environment, Jc .
f (t) = fx (t) fy (t) . . . (10)
p∗ = argmin wd Jd + wc Jc (3) We also compute the velocity at each time t, using a
p matrix V, which maps a vector of polynomial coefficients
The following sections will present our choices of ob- of a function to the polynomial coefficients of its derivative.
jective costs, Jd and Jc , optimization method, and map
vk (t) = f˙k (t) = TVpk (11)
representation to solve this problem in real-time.
v(t) = vx (t) vy (t) . . . (12)
B. Method
The collision cost is then the line integral below, integrated
As described in [6], we express the polynomial not in over each segment m (where tm is the end time of the
terms of its N + 1 coefficients, but in terms of its end- segment):
derivatives to allow us to pose the derivative minimization Z
problem as an unconstrained quadratic program (QP), which Jc = c(f (t))ds
is significantly faster to solve than the constrained dual of ZStm
this problem. = c(f (t)) ḟ (t) dt
We can map between polynomial coefficients and end- t=0
derivatives using the A matrix, and rearrange the end- tm
X
derivatives into a free (dP ) and fixed (dF ) blocks using a = c(f (t)) kv(t)k ∆t (13)
mapping matrix M: t=0
d where c(f (t)) is the potential cost described in [4].
p = A−1 M F . (4) Finally, using the product and chain rules, we obtain the
dP
Jacobian for each axis k:
The construction of matrices A, M (and R below) is tm
∂ Jc X
addressed in [6]. The fixed derivatives dF are given from = kv(t)k ∇k c TLP P ∆t +
the fixed end-constraints, like start and end velocities and ∂dP k t=0
accelerations, while the free derivatives dP are the parame- vk (t)
ters we optimize. c(f (t)) TVLP P ∆t. (14)
kv(t)k
In order to incorporate costs from collisions with the
Here L = A−1 M, or the complete mapping matrix
environment, we use a minimization problem with two costs:
between end-derivatives and polynomial coefficients. LP P
d∗P = argmin wd Jd + wc Jc (5) refers to the block of the right-side columns of the matrix,
dP
corresponding to the columns which operate on the free
where Jd is the cost due to integrated squared derivative parameters dP .
terms (if minimizing snap, integral of squared snap along We use a heuristic to estimate the segment times, tm ,
the trajectory), Jc is the cost due to collisions, and wd and to meet dynamic constraints and we hold these times fixed
wc are the weighing terms for each part of the cost. during the optimization.
C. Map Representation When first constructing the map, we fill in the occupancy
Map representation and choice of potential cost function of all cells and compute the distances for the complete map,
is central to the algorithm described above. Naturally, the which is computationally expensive. In order to allow our
potential cost function must be smooth, but its gradient must algorithm to run in real-time, we track changed nodes in
also be able to push trajectories out of collision. We use the our Octomap representation and invalidate all voxels in the
potential described in [4], which is a function of an Euclidean ESDF that have those nodes as parents (i.e., nearest neighbor
Signed Distance Field (ESDF) value, d(x), at a point in 3D of a different state). This allows us to recompute the distance
space, x, and is a constant value specifying the obstacle values of only a few tens to hundred voxels per map update,
clearance past which space is considered free. instead of having to recompute the full dense grid of millions
of voxels.
1 One important point about the map representation is that
−d(x) + 2
if d(x) < 0
although Octomap allows three states (free, unknown, and
1 2
c(x) = 2 (d(x) − ) if 0 ≤ d(x) ≤ (15)
occupied) with full probabilities, in order to construct a
0 otherwise
distance field, we must discretize to only two states —
free and occupied. How to deal with unknown voxels is a
We use a voxel-based map representation, as they can be
question of safety: we cannot safely plan through them unless
built and maintained quickly. To ensure that a trajectory does
the robot is able to stop in known free space. Therefore,
not collide with the environment, we must check each voxel
we choose to treat unknown as occupied, creating a very
along the trajectory. Note that our continuous-time approach
conservative planner. A more thorough discussion of this
still presents advantages over discrete-time methods, as we
choice is offered in Section VI.
are flexible in how often we sample the trajectory for
collisions, and can change this interval between iterations. B. Global Planning
We choose to evaluate the function along every arc length Next, we built a global plan to an end point in the original
point ∆s equal to the map voxel resolution. This significantly Octomap, while treating unknown space as free. This creates
speeds up computation without compromising safety. a high-level optimistic planner, while the local replanner is
conservative and therefore safer. This plan will then be used
D. Optimization as a prior for the replanner, and also allows us to use a
In any nontrivial environment, the optimization problem replanner that is not complete – in case no solution is found
in (5) is likely to be non-convex and highly nonlinear. For by the local trajectory optimization, we simply stop and wait
minimizing the function, we choose to use a quasi-Newton for the global planner to find a new path.
method like BFGS [19] (though other simpler methods like We use a 2-stage global planner: first, we find a topo-
gradient descent can also be used). logically feasible straight-line path using Informed RRT*
However, all solutions found with such methods are in- [21], and then we plan a dynamically feasible polynomial
herently local solutions – and they are prone of falling into trajectory through it [7].
local minima depending on the initialization. Therefore, in C. Local Replanning
order to increase the chances of finding a feasible (non-
To perform the local replanning, we start with the global
colliding) solution, we do several random restarts where
plan (if available) or a straight-line plan to the next waypoint
we perturb the initial state by a random quantity, and then
as prior, and incrementally update the ESDF.
select the lowest-cost trajectory as the final solution. A more
We then select appropriate start and end points for the
thorough discussion on the necessity of random restarts for
replanning algorithm. As start point, we choose the point
local trajectory optimization is offered in [9].
on the current trajectory tR seconds in the future, where
IV. R EPLANNING S YSTEM tR is the update rate of the replanner. Since our planner
allows continuity and smoothness even in low derivatives,
In this section, we introduce the complete system that we are able to use the full state of the UAV at the start point,
makes it possible to run our local replanning method online, including velocity and acceleration, guaranteeing a smooth
in real-time on dynamically updating map data. First, we path even with changing plans.
introduce how to build the map and its companion distance The goal point is chosen as a point on the global trajectory
field, then we discuss using a global plan as input into the that is h meters ahead of the start point, where h is a planning
local replanner, and finally, how to select start and end points horizon. If unoccupied, we accept that point as the goal,
for replanning. otherwise we attempt to find the nearest unoccupied neighbor
in the ESDF, and as a final fallback we shorten the planning
A. Incremental Mapping horizon until a free goal point is found.
As mentioned in Section III-C, we require an Euclidean We can then run the local optimization procedure between
Signed Distance Field (ESDF) to compute the collision these two points. Either the optimization succeeds in finding
potentials. Our map representation is an Octomap [20], which a collision-free path, or we attempt random restarts until
contains voxels in one of three states: free, unknown, or either a collision-free trajectory is found or the vehicle stops
occupied. and waits for the global planner to select a new path.
V. E XPERIMENTAL R ESULTS Mean Mean
Algorithm Success Norm. Path Compute
In this section we first evaluate the proposed continuous- Fraction Length Time [s]
time local planner and compare it to existing planning Inf. RRT* + Poly 0.9778 1.1946 2.2965
algorithms. Then, we validate our complete system in both a RRT Connect + Poly 0.9444 1.6043 0.5444
long, realistic simulation scenario where the robot only has CHOMP N = 10 0.3222 1.0162 0.0032
CHOMP N = 100 0.5000 1.0312 0.0312
local information about the environment, and then in a real- CHOMP N = 500 0.3333 1.0721 0.5153
world test on an UAV avoiding newly detected objects in a Ours S = 2 jerk 0.4889 1.1079 0.0310
room. Ours S = 3 vel 0.4778 1.1067 0.0793
Ours S = 3 jerk 0.5000 1.0996 0.0367
A. Evaluation Ours S = 3 jerk + Restart 0.6333 1.1398 0.1724
Ours S = 3 snap + Restart 0.6222 1.1230 0.1573
We validate our approach as a local start-to-goal point Ours S = 3 snap 0.5000 1.0733 0.0379
planner in simulation on 100 random 2D forest environments. Ours S = 4 jerk 0.5000 1.0917 0.0400
Ours S = 5 jerk 0.5000 1.0774 0.0745
To analyze how our algorithm behaves in different den-
sities of clutter, we generate 5 × 5 m Poisson forests [1] TABLE I: A table showing comparison of RRT variants
of densities between 0.2 trees/m2 to 0.8 trees/m2 . We then with polynomial smoothing, CHOMP, and our approach on
analyze the success fraction of our algorithm versus CHOMP a set of 90 forest planning problems, as shown in Fig. 3.
[4], a discrete-time local optimization method. We compare the success fraction, normalized path length
We initialize both algorithms with a straight-line path (solution path length divided by straight-line path length),
between opposite corners of the map. For our continuous- and computation time. As can be seen, adding random
time algorithm, we use between 1 and 5 segments of 11th restarts significantly improves success fraction but at the cost
order polynomials (N = 11) minimizing snap, and optionally of higher computation time. RRT* and RRT Connect are able
use 10 random restarts. For CHOMP, we use a fixed N of to solve a higher percentage of problems, but at the cost of
100 points and minimize velocity. slower performance.
Fig. 2a shows typical paths generated by the algorithms.
As can be seen, 1 segment does not have sufficient degrees
of freedom to solve this planning problem, but 5 segments number of problems, Informed RRT* takes too long to run in
are able to find a short, smooth, feasible solution. CHOMP real-time at a high rate, and RRTConnect, while significantly
is also able to find a solution for this problem, but falls into faster, is still exceeding the time budget and producing much
a different local minima from our approach. longer paths.
We can further analyze the behavior of the algorithms For N = 100 (where N is the number of discretized way-
at different forest densities (number of obstacles in the points) in the CHOMP algorithm, the results are comparable
environment), as seen in Fig. 2b. As the density of the both in run time, success rate, and path length. However,
environment increases, the chance of all methods finding a in order to fully safely verify the trajectory, there should
valid solution decreases. However, there is a large increase on be a waypoint for every voxel in the 3D occupancy grid.
success rate if random restarts are used, and a larger number Therefore, N = 500 is a more appropriate comparison from a
of segments is able to handle denser environments (as in the safety perspective (as the mean path length is approximately
case in Fig. 2a). Fig. 2c shows the effect of increasing the 5 meters), and since the execution time grows approximately
number of segments on success across all test cases. with O(N 2 ), this method performs much slower in such
For a more representative evaluation, we simulate arealis- cases. It also has a lower success rate, as it does not converge
tic 3D forest environment using real tree models, as shown in to a collision-free solution within the limited iteration steps.
Fig. 3. The environments are 10 × 10 × 10 m, populated with On the other hand, our method has a fixed number of
a density of 0.2 trees/m2 . The trees are of random scale parameters for a given number of segments, regardless of
and height, adding the additional complexity of navigating trajectory length or map resolution. Therefore, we are able
in 3D and avoiding the tree canopies. We generate 9 such to keep a low computation time, as long as the number
environments, and select 10 random start and goal points at of segments chosen is appropriate for the density of the
least 4 meters apart, for a total of 90 test cases. environment, and our results show that 3 segments is enough
We evaluate several parameter settings of our algorithm for the realistic forest scenario tested. As a result, our
and compare to CHOMP (which minimizes velocity), and approach has only 10 free parameters where CHOMP has
sampling-based visibility graph search (RRT-based methods) 500 per axis.
with polynomial smoothing using 9th order minimum snap We chose to use 3 segments and minimize jerk in our final
polynomials. For CHOMP and our method, since both fea- real-world experiments, as this has the smallest number of
ture a derivative cost term and a collision cost term, we use free parameters for the highest success rate in our compari-
the same weights (wd = 0.1, wc = 10) to make as fair of a son.
comparison as possible. Both algorithms are allowed to run
for up to 50 iterations. B. System Simulation
The results are shown in Table I. Though RRT-based Next, we validate our local replanning in the context of a
algorithms with smoothing are clearly able to solve a larger complete system and only a partially known map.
Typical Solution Paths
5 1 Planning Success vs. Tree Density in Poisson Forest Fraction of Successful Plans by Number of Segments
1
4.5 0.9
1
0.9
4 0.8
0.8 0.8
Success [fraction]
3.5 0.7
y position [meters]
0.7
Success [fraction]
Collision Cost
3 0.6
0.6 0.6
2.5 0.5 0.5
2 0.4 0.4 0.4
1.5 0.3 0.3
1 0.2 0.2
CHOMP 0.2
1 segment Without Random Restarts
CHOMP 5 segments
0.5 Our method - 1 segment 0.1 0.1 1 segments + restarts
With Random Restarts
5 segments + restarts
Our method - 5 segments 0
0 0 0 1 2 3 4 5
0 1 2 3 4 5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
x position [meters] Tree Density [trees/m2 ] Number of Segments