Motion Planning Higher Dimensions
Motion Planning Higher Dimensions
motion.cs.illinois.edu
MotionPlanningHigherDimensions
81–103 minutes
1 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
In fact, it has been proven that even feasible path planning is NP-
hard in the case of articulated 𝑛-joint robots. Surprisingly, optimal
path planning in the presence of 3D polygonal obstacles is also
NP-hard in the number of obstacle vertices! This dramatic increase
in the complexity of exact algorithms in dimensions 3 and higher
has led to the development of several approximate methods, which
are discussed in detail in this chapter.
2 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
⎧𝑇 if ¯𝑝𝑞
¯¯¯¯¯¯¯¯ is completely inside the free space
𝑉𝑖𝑠𝑖𝑏𝑙𝑒(𝑝, 𝑞) = ⎨
⎩𝐹 if ¯𝑝𝑞
¯¯¯¯¯¯¯¯ intersects the forbidden region
3 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Resolution ℎ # vertices
0.5 64
0.25 46,656
0.1 1,000,000
0.05 64,000,000
0.025 46,656,000,000
0.01 1,000,000,000,000
4 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Dimension 𝑑 # vertices
2 100
3 1,000
6 1,000,000
8 100,000,000
10 10,000,000,000
15 1,000,000,000,000,000
20 100,000,000,000,000,000,000
5 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
|𝐵| 𝑁
�𝐵 𝑓 (𝑥)𝑑𝑥 ≈ � 𝑓 (𝑥𝑖 )
𝑁 𝑖=1
𝑛
with |𝐵 | = ∏𝑖 = 1 (𝑏𝑖 − 𝑎𝑖 ) the volume of 𝐵 and 𝑥1 , …, 𝑥𝑛 is a
uniform sampling over 𝐵. Specifically, a uniform sampling random
variables 𝜖𝑖 ∈ [0, 1] uniformly at random, and sets
𝑥𝑖 = 𝑎𝑖 + 𝜖𝑖 (𝑏𝑖 − 𝑎𝑖 ) .
6 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
7 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
2. Add all feasible configurations and the start and goal to the
roadmap. These are known as milestones. (Figure 1.c)
3. Test pairs of nearby milestones for visibility, and add visible edges
to the roadmap. (Figure 1.d--e)
4. Search for a path from the start to the goal. (Figure 1.f)
8 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Algorithm Basic-PRM(s,g,N)
1. 𝑉 ← {𝑠, 𝑔}.
2. 𝐸 ← {}.
3. for 𝑖 = 1, …, 𝑁 do
4. 𝑞 ← 𝑆𝑎𝑚𝑝𝑙𝑒()
9 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
8. if Visible(𝑝, 𝑞) then
9. Add (𝑝, 𝑞) to 𝐸.
10. Search 𝐺 = (𝑉, 𝐸), with Cartesian distance as the edge cost, to
connect 𝑠 and 𝑔.
There are two key subroutines to tune, which greatly affect running
time and performance:
10 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
collide than short ones. Hence the idea of restricting visibility tests
only to "nearby" points is a fast way of determining a small set of
potential edges that have a better chance of being feasible. To do
this, we need first to determine a distance metric
𝑑(𝑝, 𝑞)
that measures some notion of path length. The simplest form might
measure Euclidean distance, but for configuration spaces that
blend translation and rotation it is often more suitable to use a
weighted geodesic metric.
11 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Algorithm Incremental-PRM(s,g,T)
1. 𝑉 ← {𝑠, 𝑔}.
2. 𝐸 ← {}.
3. 𝐶𝐶[𝑠] ← {𝑠}.
4. 𝐶𝐶[𝑔] ← {𝑔}.
12 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
6. 𝑞 ← 𝑆𝑎𝑚𝑝𝑙𝑒()
8. Add 𝑞 to 𝑉
13 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
14 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
15 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
The basic PRM and incremental PRM algorithms have been shown
to be probabilistically complete under relatively mild conditions.
This implies that the likelihood that the roadmap connects the start
and goal (assuming they are connected in ℱ) approaches 1 as
more milestones are added to the roadmap. But how quickly do
they converge? A key factor in the theoretical analysis (and
empirical performance) of a PRM are the visibility properties of the
free space. Using the language of unfavorable / favorable visibility
properties, we can mathematically formalize the intuitive notions of
a "narrow passage" and "wide passage". To do this, we will need to
introduce several definitions.
16 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
′
of points that are visible from 𝑞. Specifically, 𝒱 (𝑞) = {𝑞 ∈ ℱ |
′
IsVisible(𝑞, 𝑞 )}.
ϵ=1
ϵ=0
ϵ=0
17 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
What this also shows is that if visibility properties are not uniform
across the free space — that is, visibility sets are small in some
areas (narrow passages) and large in others (wide passages) —
PRMs will have a harder time connecting milestones in narrow
passages. This is because the speed at which 𝑃𝑟(𝑞 connected)
approaches 1 is dependent on 𝜇(𝒱 (𝑞)) / 𝜇(ℱ), with larger values
converging to 1 much faster than smaller values. (On average, 𝜇(ℱ
) / 𝜇(𝒱 (𝑞)) milestones will be needed in |𝑉| before 𝑞 lies in the
visibility set of 𝑉.)
Since the visibility bound 𝜖 holds across the space, we can see that
the probability that any 𝑞 is in the visibility set of 𝑉 is at least 1 − (1
𝑛
− 𝜖) . Keep in mind that we have not mentioned dimensionality 𝑑
in this discussion and only volumetric ratios, so the performance
here has no direct relation to 𝑑. However, note that with a fixed
connection radius 𝑅, the volume of any visible set cannot be
𝑑
greater than 𝑂(𝑅 ) (the volume of an 𝑅-ball), and hence there is
18 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
X F\X X F\X
β-lookout
19 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
It has been proven that for any 𝛽-expansive space, the probability
that a roadmap fails to connect the start and the goal with a
feasible path drops exponentially toward 0 (provided that they are
in the same connected component of ℱ). Specifically, a bound can
be formulated in the following form:
−𝑑(𝛽)𝑛
𝑃𝑟(failure | 𝑛 milestones) ≤ 𝑐(𝛽)𝑒 .
20 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
measure. The details of these proofs are out of the scope of this
book.
Algorithm RRT-Connect
1. 𝑇𝑠 ← {𝑠}.
• 𝑇𝑔 ← {𝑔}.
• for 𝑖 = 1, . . . , 𝑁 do
• 𝑞𝑟𝑎𝑛𝑑 ← 𝑆𝑎𝑚𝑝𝑙𝑒()
21 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
′ ′
• if 𝑑(𝑞𝑒 , 𝑞𝑒 ) ≤ 𝛿 and Visible(𝑞𝑒 , 𝑞𝑒 ) then (trees are close
enough)
′
• Add edge 𝑞𝑒 → 𝑞𝑒 to connect 𝑇𝑠 and 𝑇𝑔
3. if Visible(𝑞𝑛𝑒𝑎𝑟 , 𝑞) then
5. return 𝑞.
6. return 𝑞𝑛𝑒𝑎𝑟 .
22 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Unlike PRMs, RRTs do not use the configurations coming from the
𝑆𝑎𝑚𝑝𝑙𝑒() function directly, nor do they attempt more than one
edge connection per iteration. Hence, they sample points in a
different distribution than PRMs. But what is this distribution? We
first introduce the concept of a Voronoi diagram, which defined for
some set of points 𝑋 = {𝐱1 , …, 𝐱𝑛 }. The Voronoi diagram is a
partition of the space 𝒞 into Voronoi cells , one per point. The cell
𝐶𝑖 corresponding to a point 𝐱𝑖 is the subset of 𝒞 for which 𝐱𝑖 is the
closest point. In other words,
RRTs are appealing because tree data structures are a bit simpler
to implement than graphs. Also, the RRT explores locally first, so if
the start and goal are nearby, the RRT may do significantly less
work than a PRM. However, RRT performance is generally more
sensitive to the choice of a distance metric, and is generally better
at exploring than refining.
23 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
24 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
feasible path connecting the start and goal, and 𝑑 is the dimension
(Kleinbort et al, 2018). This bound is, however, extremely loose,
and RRT empirical performance is not directly correlated with
dimensionality, and like PRM typically enjoys better performance in
spaces with favorable visibility properties. One caveat is that the
expansion radius 𝛿 must be set larger in spaces of higher
dimension to avoid extremely slow convergence. In general it can
be challenging to say whether an RRT or PRM will work better for
a given problem without empirical testing.
25 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
RRTs benefit from a slight goal bias which drives the tree toward
the goal. In RRT-Connect, this could take the form of sampling
𝑞𝑟𝑎𝑛𝑑 from 𝑇𝑔 some fraction of the time, which would drive
extensions of 𝑇𝑠 toward the goal. Similarly, the reverse search
could sample 𝑞𝑟𝑎𝑛𝑑 from 𝑇𝑠 some fraction of the time, and drive
extensions from 𝑇𝑔 toward the start. This takes the form of
replacing Lines 4 – 6 in Algorithm RRT-Connect with the following
code:
1. if {𝑟𝑎𝑛𝑑() ≤ 𝑝𝑔𝑏 }
• if {𝑟𝑎𝑛𝑑() ≤ 0.5}
26 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
′
• 𝑞𝑒 ← 𝑅𝑎𝑛𝑑𝑜𝑚𝑉𝑒𝑟𝑡𝑒𝑥(𝑇𝑔 )
′
• 𝑞𝑒 ← Extend-Tree(𝑇𝑠 , 𝑞𝑒 , 𝛿)
• else
• 𝑞𝑒 ← 𝑅𝑎𝑛𝑑𝑜𝑚𝑉𝑒𝑟𝑡𝑒𝑥(𝑇𝑠 )
• 𝑞𝑒 ← Extend-Tree(𝑇𝑔 , 𝑞𝑒 , 𝛿)
Here the term 𝑝𝑔𝑏 in Line 1 is the probability of using goal biasing,
and Line 2 decides according to an unbiased coin flip whether to
extend toward the start or toward the goal. The function 𝑟𝑎𝑛𝑑()
samples from the uniform distribution on [0, 1].
27 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
all the edges connecting them are removed from the roadmap
before terminating the query.
28 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
2. In line 15, once a path is found to the goal, the shortest path
connecting 𝑠 and 𝑔 is checked for collision, as in steps 2 – 5 in the
lazy Basic PRM variant.
29 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
30 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Algorithm Visible-Recurse(𝑎, 𝑏, 𝜖)
1. If this is the first recursive call, check 𝑎 and 𝑏 for collision. Return
false if either ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑎) or ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑏).
3. 𝑚 ← (𝑎 + 𝑏) / 2
31 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
methods.
10.b). This is because the balls centered at 𝑎 and 𝑏 with radii 𝑐(𝑎)
and 𝑐(𝑏), overlap, are in free space, and contain ¯𝑎𝑏
¯¯¯¯¯¯¯¯ in their union.
Algorithm Visible-Exact1(𝑎, 𝑏)
1. If this is the first recursive call, check 𝑎 and 𝑏 for collision. Return
false if either ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑎) or ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑏).
3. 𝑚 ← (𝑎 + 𝑏) / 2
32 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
is an upper bound on how far the tip of link 2 moves. There are
general formulas like this for arbitrary articulated robots.
Specifically,
𝑘−1
′ ′ ′
𝜂𝑘 (𝑞, 𝑞 ) = (𝑅𝑘 + � 𝐿𝑖 ) ‖ (𝑞1 , …, 𝑞𝑘 ) − (𝑞1 , …, 𝑞𝑘 )‖1
𝑖
Algorithm Visible-Exact2(𝑎, 𝑏)
1. If this is the first recursive call, check 𝑎 and 𝑏 for collision. Return
false if either ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑎) or ¬ 𝐹𝑒𝑎𝑠𝑖𝑏𝑙𝑒(𝑏).
33 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
true.
3. 𝑚 ← (𝑎 + 𝑏) / 2
34 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
35 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
(a) k-d tree holding (b) First leaf (c) Second leaf
14 2-D points reached in NN reached in NN
query query
A
E
- +
B
B C
- + - +
C
D E
A - + - +
D
We will describe how to query for the closest point (NN), with the
kNN and near queries implemented similarly. We traverse the tree
in a branch-and-bound manner similar to the bounding volume
36 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
6. Let its splitting plane be on axis dim with value value. Let its
− +
children be 𝐶 and 𝐶 .
37 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
values dim and value, we first examine whether 𝑞𝑑𝑖𝑚 < 𝑣𝑎𝑙𝑢𝑒 or
𝑞𝑑𝑖𝑚 ≥ 𝑣𝑎𝑙𝑢𝑒. We first recurse on the corresponding child (Lines
7 – 11). This recursive call may update 𝑝𝑐𝑙𝑜𝑠𝑒 . Then, Lines 12 – 13
consider whether to check the opposite child. If |𝑞𝑑𝑖𝑚 − 𝑣𝑎𝑙𝑢𝑒 |
≥ 𝑑𝑐𝑙𝑜𝑠𝑒 , the distance |𝑞𝑑𝑖𝑚 − 𝑣𝑎𝑙𝑢𝑒| to the splitting hyperplane
is sufficiently large that there is no chance that the closest point
lies within the region defined by the opposite child. Hence,
recursion on the opposite child can be skipped. Regardless of the
outcome, we return 𝑝𝑐𝑙𝑜𝑠𝑒 .
Insertion. To insert points into a 𝑘-d tree, we can simply locate the
leaf node in which the point is located, and add it to the pts
structure. If the number of points in pts exceeds some threshold,
defined by a given parameter, then the node is converted into a
non-leaf node via splitting. Letting dim be the axis of the parent,
the chosen axis can either be (dim+1) mod d (round-robin
splitting) or the dimension with the largest variation in pts. In
either case, value is set to the median value of pts in that
dimension. A potential problem with incremental insertion is that
unless the points are distributed identically at random, the split
value of a leaf may not bisect the distribution of future points,
leading to an imbalanced tree. More advanced algorithms may
detect imbalanced trees during construction and rebalance them.
38 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
39 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
40 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
41 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
Algorithm RRT*
42 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
1. 𝑇 ← {𝑠}..
2. for 𝑖 = 1, . . . , 𝑁 do
3. 𝑞𝑟𝑎𝑛𝑑 ← 𝑆𝑎𝑚𝑝𝑙𝑒()
4. 𝑞𝑒 ← Extend-Tree(𝑇, 𝑞𝑟𝑎𝑛𝑑 , 𝛿)
7. Add edge 𝑞𝑒 → 𝑔 to 𝑇
43 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
First of all, PRM* and RRT* run slower than their normal
counterparts to find the first feasible path, because they do more
work per iteration. One way of mitigating this in RRT* is to disable
the rewiring step until a first feasible path is found, in which case
the algorithm begins identically to RRT.
44 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
and b) the planner has a path fairly close to the optimal path and
can just perform local sampling to improve the current best path. In
case a), it can be shown that for any planner that only performs
binary collision queries, the expected number of samples needed
−𝑑
to obtain a solution in the optimal homotopy class is Ω(𝛿 ) (that is,
−𝑑
at least a constant times 𝛿 ) where 𝛿 is the clearance of a path in
the optimal homotopy class. The counterexample is shown below:
the optimal path passes through the tiny block, and its visibility set
𝑑
volume is 𝑂(𝛿 ), and at least two samples need to be placed there.
2δ
2δ
To address case b), we can also show that for a sampling based
planner to locally reduce the cost of the current best path, it must
⋆ 𝑑−1
place samples in a region with volume 𝑂((𝑐(𝑛) − 𝑐 ) ).
TODO: elaborate
45 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
3.5.3 Shortcutting¶
As noted above, PRM and RRT are only concerned with finding a
feasible path, and often produce jerky, unnatural paths.
Shortcutting is a very useful postprocessing heuristic, illustrated in
Figure 9, in which portions of a path are repeatedly replaced with
shorter, feasible segments.
In order to do so, two random points are sampled along the path.
With the path being a curve 𝑦(𝑠): [0, 1] → 𝒞 parameterized over the
unit interval, we sample two parameters 𝑢, 𝑣 ∈ [0, 1]. If 𝑉𝑖𝑠𝑖𝑏𝑙𝑒(𝑦(
𝑢), 𝑦(𝑣)) is true, then we replace the portion of the path between 𝑢
and 𝑣 with the straight line path. Otherwise, the sampling process
begins again. This repeats for some number of iterations.
Algorithm Shortcutting(𝑦, 𝑁)
1. for 𝑛 iterations do
46 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
5. if 𝑉𝑖𝑠𝑖𝑏𝑙𝑒(𝑎, 𝑏) then
8. return 𝑦.
1. 𝑃 ← RRT-Init()
47 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
7. 𝑦 ← RRT-Plan(𝑃, 𝑇𝑝𝑙𝑎𝑛 )
• The best path will continue to be refined over time, so if it's already
close to optimal, then it will continue to be locally optimized.
• If the best path is only locally optimal, the RRT has some chance
of finding a better one. This chance gets slimmer and slimmer as
the best path approaches the optimal cost 𝐶 ∗ . So, the role of the
shortcutting step in step 10 is primarily to raise this chance.
In [25]:
48 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
articulated robot↔
49 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
50 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
51 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
52 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
space (that is, 𝜇(ℱ) / 𝜇(𝒞 ) > 0). This condition may be produced
when a constraint is introduced (like an IK constraint, or a
constraint that two objects must touch, or that a joint must take on
a particular value) that leaves all feasible configurations on a
manifold of lower-dimensionality of space. In these cases, the PRM
will not be able to generate samples with non-neglible probability.
One approach to handle this problem is to parameterize the
solution manifold explicitly. Extensions of PRMs are also available
to properly handle manifold constraints without a need for
parameterization; these techniques generate samples by projecting
them onto the feasible manifold, and also constructing paths that
move along the manifold. These will be discussed later in Chapter
12.3
4 Incomplete Methods¶
53 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
⎩0 If 𝜌(𝑞) > 𝜌0
and
⎧𝑘𝑟𝑒𝑝 ( 1 − 𝜌10 ) 1 2 ∂ 𝜌(𝑞) If 𝜌(𝑞) ≤ 𝜌0
𝜌(𝑞) ∂𝑞
𝑓𝑟𝑒𝑝 (𝑞) = ⎪
⎨ 𝜌(𝑞)
⎪
⎩0 If 𝜌(𝑞) > 𝜌0
54 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
In [44]:
This method works well when the robot simply needs to move
slightly away from a straight line path to avoid obstacles, provided
that obstacles are relatively convex and spatially distant. Its main
advantages are 1) speed of computation, and 2) only local
information about obstacles is needed. However, like other local
methods it is prone to local minima caused either by concave
obstacles, or narrow passages where the repulsive forces from
either side of the passage cancel out the attractive force.
55 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
q3
q2
q4
q6
q5
q0 q1
56 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
𝜃 = (𝑞1 , …, 𝑞𝑘 − 1 ) .
Any value of 𝜃 dictates the shape of some path, and any piecewise
linear path with 𝑘 segments corresponds to some value of 𝜃
(Figure 13.a). To make this dependence clear, we shall refer to the
path defined by a value 𝜃 as 𝑦𝜃 .
57 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
58 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
⎡ 𝑔(𝑞1 ) ⎤
ℎ(𝜃) = ⎢ ⋮ ⎥ ≤ 0.
⎢ ⎥
⎣𝑔(𝑞 𝑘−1 ⎦
)
𝑔(𝑞) + 𝛾 ≤ 0
59 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
60 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
𝑀
𝑓𝑝𝑒𝑛 (𝜃) = � max (𝑔(𝑦𝜃 (𝑠𝑗 )), 0) .
𝑗=1
61 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
5 Summary¶
Key takeaways:
62 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
6 Exercises¶
63 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
64 of 65 1/24/24, 17:41
MotionPlanningHigherDimensions about:reader?url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fmotion.cs.illinois....
65 of 65 1/24/24, 17:41