Anytime RRT
Anytime RRT
Anytime RRTs
Dave Ferguson and Anthony Stentz
Robotics Institute
Carnegie Mellon University
Pittsburgh, Pennsylvania
{dif,tony}@cmu.edu
Abstract— We present an anytime algorithm for planning paths to this task are anytime planners, which quickly find an initial,
through high-dimensional, non-uniform cost search spaces. Our highly suboptimal plan, and then improve this plan until time
approach works by generating a series of Rapidly-exploring runs out.
Random Trees (RRTs), where each tree reuses information from
previous trees to improve its growth and the quality of its In this paper, we present a sampling-based anytime al-
resulting path. We also present a number of modifications to gorithm for generating solution paths through both uniform
the RRT algorithm that we use to bias the search in favor of and non-uniform cost search spaces. Our approach works
less costly solutions. The resulting approach is able to produce by generating a series of Rapidly-exploring Random Trees,
an initial solution very quickly, then improve the quality of this where each tree reuses information from previous trees to
solution while deliberation time allows. It is also able to guarantee
that subsequent solutions will be better than all previous ones improve its growth and the quality of its resulting path. The
by a user-defined improvement bound. We demonstrate the first tree is generated using an unmodified RRT algorithm
effectiveness of the algorithm on both single robot and multirobot to ensure that a valid solution is available in the minimum
planning domains. possible time. We also present a number of modifications to
the Rapidly-exploring Random Tree algorithm that we use to
I. I NTRODUCTION
bias the subsequent searches in favor of less costly solutions.
Rapidly-exploring Random Trees (RRTs) have been shown The resulting approach is able to produce an initial solution
to be very effective for solving robotic path planning problems very quickly, then improve the quality of this solution while
involving complex configuration spaces [1], [2], [3], [4], [5]. deliberation time allows. It is also able to guarantee that
By combining random sampling of the configuration space subsequent solutions will be better than all previous ones by
with biased sampling around a desired goal configuration, a user-defined improvement bound.
RRTs efficiently provide solutions to problems involving We begin by describing the basic RRT algorithm and ex-
vast, high-dimensional configuration spaces that would be tensions that have been made to this algorithm to improve the
intractable using discrete approaches. quality of the solutions produced. We then introduce Anytime
However, while RRTs have been found to be extremely Rapidly-exploring Random Trees and show how this approach
effective at generating feasible solutions, they provide no can be used to generate less costly solutions through both
control over the quality of the solutions produced. In many uniform and non-uniform cost search spaces. We go on to
situations, in particular when dealing with non-uniform cost present a number of results from a single robot navigation
search spaces, the difficulty of executing different solution domain and a multirobot constrained exploration domain, and
paths may vary substantially. It is thus important that solution conclude with discussions and extensions.
cost is taken into account during the search process.
Nevertheless, few efforts have been made to incorporate cost II. R APIDLY- EXPLORING R ANDOM T REES
considerations into sampling-based planning algorithms. One The standard RRT algorithm for planning a path from some
notable exception is work by Urmson and Simmons [6], who initial configuration qstart to a goal configuration qgoal is
developed a series of modified versions of the RRT algorithm presented in Fig. 1. This algorithm initializes a search tree
that select tree nodes for expansion based on the cost of their with the initial robot configuration as the root node, then
current path from the initial node. Their approaches were incrementally grows the tree until the goal configuration is
able to produce less costly solutions through both uniform reached. To grow the tree, first a target configuration qtarget
and non-uniform cost search spaces. However, as might be is randomly selected from the configuration space using the
imagined, this improvement in solution quality usually came function ChooseTarget. Then, a NearestNeighbor function
at a computational price: the approach that produced the best selects the node qnearest in the tree closest to qtarget . Finally, a
solutions required significantly more computation than the new node qnew is created in an Extend function by growing the
unmodified RRT algorithm. tree some distance from qnearest towards qtarget . If extending
For agents operating in the real world under time con- the tree towards qtarget requires growing through an obstacle,
straints, it is important both that high quality solutions are no extension occurs. This process is repeated until the tree
produced and that these solutions can be produced within the grows to within some user-defined threshold of the goal (line
time available for planning. One class of planners well-suited 3). A very nice property that follows from this method of
5370
(a) (b) (c) (d) (e)
Fig. 2. Anytime RRT Planning. Given a partial RRT (shown in (a)) being grown from an initial configuration (the bottom filled circle) to a goal configuration
(the top filled circle), this illustration shows how the Anytime RRT approach samples, selects, and extends the tree. To begin with, we assume some previous
solution has already been generated. (b) When using the Anytime RRT approach to sample the configuration space, only areas that could potentially lead to
an improved solution are considered (indicated by the shaded oval). Thus, the black nodes are rejected while the white node is accepted. (c) When selecting
the next node in the tree to extend, the k nodes closest to the sample point are found and ordered according to both their distance from the sample point
and the cost of their path from the start node. Here, k = 3 and the white node and two black nodes are the closest; the white node is selected first since
its path is less expensive than those of the two black nodes. (d) The tree node from (c) is then extended by generating a set of possible extensions and then
probabilistically choosing the one that is least expensive. The cost of the extension to the white node is cheaper than the extensions to the black nodes, so
the white node is chosen as the next element to be added to the tree. (e) After checking that the sum of the cost of the path from the start node through the
tree to the new element and the heuristic cost of a path from the new element to the goal is less than the solution bound, the element is added to the tree.
low-cost solution. We rely upon novel node sampling, node samples, the above approach could make it even more difficult
selection, and node extension operations that incorporate cost for the tree to grow down any narrow passages. Further, by
considerations and variable bias factors to efficiently produce reducing our consideration of sample points to only those
solutions satisfying a specified cost bound. We discuss each whose heuristic values are promising, we are in effect cutting
of these operations in turn. off large chunks of the configuration space. This is entirely
the point of restricting our sampling, but it can also introduce
A. Node Sampling
new narrow passages. For example, imagine an obstacle that
If we are only interested in generating a solution that is resides near the edge of the promising configurations, as
cheaper than some upper bound value Cs , then we can use determined by our heuristic values. It may be possible to plan
this upper bound to influence the sampling process used by a path around this obstacle, but finding such a path may be
the RRT algorithm. Rather than randomly sampling the entire difficult using our restricted sampling approach, as very few
configuration space, we restrict our sampling to just those samples exist that will pull the tree towards this edge. Thus,
areas of the configuration space that could possible provide it is important to use conservative heuristic estimates and not
a solution satisfying the upper bound. Given a node qtarget in disregard points that reside in configuration space obstacles.
the configuration space, we can check whether qtarget could One way of implementing this restricted sampling idea is to
be part of such a solution by calculating a heuristic cost continue generating random samples qtarget from the configu-
from the initial node qstart to qtarget , h(qstart , qtarget ), as ration space until we find one whose combined heuristic cost is
well as a heuristic cost from qtarget to the goal node qgoal , less than our upper bound. This approach is illustrated in Fig.
h(qtarget , qgoal ). If these heuristic values do not overestimate 2(b). Another method is to use the heuristic functions to do
the costs of optimal paths between these nodes then the the sampling itself, so that every node sampled will satisfy the
combination of these heuristic values gives us a lower bound upper bound. On the whole, this restricted sampling technique
on the cost of any path from qstart through qtarget to qgoal . If saves us a lot of unnecessary computation spent on irrelevant
this lower bound cost is greater than our upper bound Cs , then areas of the configuration space.
there is no way qtarget could be part of a solution satisfying
our upper bound and so qtarget can be ignored. B. Node Selection
However, depending on the complexity of the configuration Once a sample node qtarget has been generated using the
space and what heuristics are used, this approach could make above technique, we then select a node from the tree qtree
it very difficult for the RRT to find a solution. For example, if to extend out towards the sample node. In the original RRT
there are narrow passages in the configuration space between algorithm, the closest node in the tree to qtarget is selected to
large obstacles, then it may be very difficult to sample nodes be qtree . However, as Urmson and Simmons show [6], much
inside the passages. This is a well-known problem with cheaper solutions can be obtained if we modify this selection
the original RRT algorithm, but it could be exacerbated by process to incorporate cost considerations.
disregarding any samples that fall inside configuration space Our selection approach is based on their ideas but uses
obstacles. Depending on how the heuristic deals with such bias factors to vary over time the influence of cost, so that
5371
ReinitializeRRT(rrt T ) SelCost(rrt T, configuration q, configuration qtarget )
1 T .cleartree(); 1 return T.db · Distance(q, qtarget ) + T.cb · T.c(qstart , q);
2 T .add(qstart ); ExtendToTarget(rrt T, configuration qtarget )
GrowRRT(rrt T ) 2 Qnear = kNearestNeighbors(qtarget , k, T );
3 qnew = qstart ; time = 0; 3 while Qnear is not empty
4 while (Distance(qnew , qgoal ) > distance-threshold) 4 remove qtree with minimum SelCost(T, qtree , qtarget ) from Qnear ;
5 qtarget = ChooseTarget(T); 5 Qext = GenerateExtensions(qtree , qtarget );
6 if (qtarget = null) 6 qnew = argminq∈Qext c(qtree , q);
7 qnew = ExtendToTarget(qtarget , T ); 7 T.c(qstart , qnew ) = T.c(qstart , qtree ) + c(qtree , qnew );
8 if (qnew = null) 8 if (T.c(qstart , qnew ) + h(qnew , qgoal ) ≤ T.Cs )
9 T .add(qnew ); 9 return qnew ;
10 UpdateTime(time); 10 return null;
11 if (time > max-time-per-rrt) Main()
12 return null; 11 T.db = 1; T.cb = 0; T.Cs = ∞;
13 return T.c(qstart , qnew ); 12 forever
ChooseTarget(rrt T ) 13 ReinitializeRRT(T );
14 p = RandomReal([0.0, 1.0]); 14 T.Cn = GrowRRT(T );
15 if (p < goal-sampling-prob) 15 if (T.Cn = null)
16 return qgoal ; 16 PostCurrentSolution(T );
17 else 17 T.Cs = (1 − f ) · T.Cn ;
18 qnew = RandomConfiguration(); 18 T.db = T.db − δd ;
19 attempts = 0; 19 if (T.db < 0)
20 while (h(qstart , qnew ) + h(qnew , qgoal ) > T.Cs ) 20 T.db = 0;
21 qnew = RandomConfiguration(); 21 T.cb = T.cb + δc ;
22 attempts = attempts + 1; 22 if (T.cb > 1)
23 if (attempts > max-sample-attempts) 23 T.cb = 1;
24 return null;
25 return qnew ; Fig. 4. The Anytime RRT Algorithm: ExtendToTarget and Main Functions.
5372
(a) (b) (c) (d) (e)
Fig. 5. Anytime RRTs used for single robot path planning. The start node is the vehicle at the bottom of the environment, the goal is the square at the
top. Shaded regions represent higher-cost areas to traverse through; black regions represent obstacles. (a) Initial RRT generated without cost consideration.
(b) Fifth RRT generated, using costs of previous solutions and nodes of the current tree to bias the growth of the current tree. (c) Final RRT generated. (d)
Path corresponding to initial RRT from (a). (e) Path corresponding to final RRT from (c). These images correspond to the results presented in Fig. 7(a).
5373
Relative Cost
5374
of the maximum time allowed for planning were on average It is also worth further investigating how heuristics can be
3.6 and 2.8 times more expensive than the corresponding most effectively used to focus the growth of the trees. For
Anytime RRT solutions for the single agent and multi-agent example, over the course of our experiments we have found
cases, respectively. But the intermediate solutions produced by that when the heuristic is not very informed, inflating the
Anytime RRTs were also much better: Anytime RRTs were heuristic values of nodes close to the root can prevent the
able to quickly and continually reduce the solution cost so RRTs from growing into ‘dead ends’, where no new nodes can
that at any point in time they provided less costly solutions. be added because the early nodes were too expensive. Using
To provide a more detailed look at the behavior of each information from previous searches and the current search to
approach during a single run, Fig. 7(a) shows the results for improve the heuristic estimates may be an even more effective
a single environment in our single agent planning scenario. approach. Finally, we are implementing the approach on a
Here, we have plotted the most recent solution cost versus team of autonomous John Deere E-Gator vehicles for outdoor
time over the course of planning. This graph shows the costs of constrained exploration.
the solutions generated by the Anytime RRT approach strictly
decreasing over time, while the solutions produced by the VI. ACKNOWLEDGEMENTS
regular RRT approach vary widely in cost and do not exhibit This work was sponsored by the U.S. Army Research Lab-
any general improvement. The environment from which these oratory, under contract ”Robotics Collaborative Technology
results came, along with some of the trees and solutions Alliance” (contract number DAAD19-01-2-0012). The views
produced by the Anytime RRT approach, are illustrated in and conclusions contained in this document are those of the
Fig. 5. authors and should not be interpreted as representing the
official policies or endorsements of the U.S. Government.
V. D ISCUSSION
Dave Ferguson is supported in part by a National Science
One of the most significant limitations of sampling-based Foundation Graduate Research Fellowship.
planners to date has been their inability to provide high quality
solutions or even bounds on the suboptimality of the solutions R EFERENCES
generated. In this work, we have presented techniques that
[1] S. LaValle and J. Kuffner, “Randomized kinodynamic planning,” In-
are very effective at biasing sampling-based planners in favor ternational Journal of Robotics Research, vol. 20, no. 5, pp. 378–400,
of better solutions. These techniques are extremely useful 2001.
for producing low cost solutions in non-uniform cost search [2] ——, “Rapidly-exploring Random Trees: Progress and prospects,” Al-
gorithmic and Computational Robotics: New Directions, pp. 293–308,
spaces. Further, we have shown how these techniques can be 2001.
incorporated into an anytime sampling-based planner that not [3] M. Kobilarov and G. Sukhatme, “Time Optimal Path Planning on
only improves its solution over time, but can provide (and Outdoor Terrain for Mobile Robots under Dynamic Constraints,” in
Proceedings of the IEEE International Conference on Intelligent Robots
accept) bounds on the quality of this improvement. and Systems (IROS), 2004.
Our anytime approach generates a series of RRTs, each [4] J. Kim and J. Ostrowski, “Motion planning of aerial robots using
producing a new solution that is guaranteed to be less expen- Rapidly-exploring Random Trees with dynamic constraints,” in Proceed-
ings of the IEEE International Conference on Robotics and Automation
sive than the previous solution by a user-defined improvement (ICRA), 2003.
factor f . Thus, a valid solution is returned as quickly as by [5] J. Kuffner, K. Nishiwaki, S. Kagami, M. Inaba, and H. Inoue, “Motion
the standard RRT algorithm, but the quality of this solution planning for humanoid robots,” in Proceedings of the International
Symposium on Robotics Research (ISRR), 2003.
is then improved while deliberation time allows. The result- [6] C. Urmson and R. Simmons, “Approaches for heuristically biasing
ing algorithm provides similar benefits as recently-developed RRT growth,” in Proceedings of the IEEE International Conference on
discrete anytime algorithms, but is able to plan over much Intelligent Robots and Systems (IROS), 2003.
[7] M. Likhachev, G. Gordon, and S. Thrun, “ARA*: Anytime A* with
larger, higher-dimensional search spaces. We have provided provable bounds on sub-optimality,” in Advances in Neural Information
key properties of the algorithm including relative bounds on Processing Systems. MIT Press, 2003.
the quality of the solutions generated, and have demonstrated [8] R. Zhou and E. Hansen, “Multiple sequence alignment using A*,”
in Proceedings of the National Conference on Artificial Intelligence
its effectiveness for both single agent navigation and multi- (AAAI), 2002, Student abstract.
agent constrained exploration. [9] D. Ferguson and A. Stentz, “Anytime RRTs: The Proofs,” Carnegie
We are currently investigating a number of extensions to Mellon School of Computer Science, Tech. Rep. CMU-RI-TR-06-07,
2006.
this work. Firstly, it may be possible to exploit even more [10] N. Kalra, D. Ferguson, and A. Stentz, “Constrained Exploration for
information from previous solutions to aid in the generation Studies in Multirobot Coordination,” in Proceedings of the IEEE In-
of new ones, such as low cost branches of previous RRTs or ternational Conference on Robotics and Automation (ICRA), 2006.
[11] B. Burns and O. Brock, “Toward optimal configuration space sampling,”
extracted knowledge concerning the nature of the configuration in Proceedings of Robotics: Science and Systems (RSS), 2005.
space (e.g. as in [11] but with cost considerations).
5375