Robotic Motion Planning:
Cell Decompositions
(with some discussion on coverage and pursuer/evader)
Robotics Institute 16-735
http://voronoi.sbp.ri.cmu.edu/~motion
Howie Choset
http://voronoi.sbp.ri.cmu.edu/~choset
RI 16-735 Howie Choset
Exact Cell vs. Approximate Cell
• Cell: simple region
RI 16-735 Howie Choset
Adjacency Graph
– Node correspond to a cell
– Edge connects nodes of adjacent cells
• Two cells are adjacent if they share a common boundary
c14
c4 c7
c5
c2 c8 c14
c15 c7
c11
c1 c c4 c15
c5
10
c13 c2 c8 c11
c3
c9 c1
c6 c10
c12
c6 c13
c3 c9
c12
RI 16-735 Howie Choset
Path Planning
• Path Planning in two steps:
– Planner determines cells that contain the start
and goal
– Planner searches for a path within adjacency
graph
RI 16-735 Howie Choset
Types of Decompositions
• Trapezoidal Decomposition
• Morse Cell Decomposition
– Boustrophedon decomposition
– Morse decomposition definition
– Sensor-based coverage
– Examples of Morse decomposition
• Visibility-based Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition
RI 16-735 Howie Choset
Trapezoidal Decomposition Path
RI 16-735 Howie Choset
Implementation
• Input is vertices and edges
• Sort n vertices O(n logn)
• Determine vertical extensions
– For each vertex, intersect vertical line with
each edge – O(n) time
– Total O(n2) time
RI 16-735 Howie Choset
Sweep line approach
Sweep a line through the space stopping at vertices which are often
called events
Maintain a list L of the current edges the slice intersects
Determining the intersection of slice with L requires O(n) time but with
an efficient data structure like a balanced tree, perhaps O(log n)
Really, determine between which two edges the vertex or event lies
These edges are
So, really maintaining L takes O(n log n) – log n for insertions, n for vertices
RI 16-735 Howie Choset
Events
Out Middle
In
RI 16-735 Howie Choset
Example
RI 16-735 Howie Choset
Example
RI 16-735 Howie Choset
Example
RI 16-735 Howie Choset
Example
RI 16-735 Howie Choset
Coverage
Planner determines an exhaustive walk
through the adjacency graph
Planner computes explicit robot motions
within each cell
Problems
1. Polygonal representation
2. Quantization
3. Position uncertainty
4. Full information
5. What else?
RI 16-735 Howie Choset
Boustrophedon Decomposition
RI 16-735 Howie Choset
Complete Coverage
RI 16-735 Howie Choset
Morse Decomposition in Terms of Critical Points
∇h
∇m
• Slice function: h(x,y)= x
• At a critical point x of h |M , ∇h( x) = ∇m( x) where M = {x|m(x)=0}
RI 16-735 Howie Choset
1-connected
RI 16-735 Howie Choset
2-connected
RI 16-735 Howie Choset
1-connected
RI 16-735 Howie Choset
2-connected
RI 16-735 Howie Choset
• Connectivity of the slice in the free space
changes at the critical points
RI 16-735 Howie Choset
• Each cell can be covered by back and
forth motions
RI 16-735 Howie Choset
• Reeb graph represents the topology of
the cellular decomposition
RI 16-735 Howie Choset
Incremental construction
•While covering the space, look for critical points
Stage 1
RI 16-735 Howie Choset
Incremental construction (cont’d)
Stage 1 Stage 2
RI 16-735 Howie Choset
Incremental construction (cont’d)
Stage 1 Stage 2 Stage 3
RI 16-735 Howie Choset
Incremental construction (cont’d)
Stage 1 Stage 2 Stage 3 Stage 4
RI 16-735 Howie Choset
Algorithm
• Cover a cell until the closing critical point is
detected
• If the closing critical point has “uncleaned” cells
associated with it, chose one and cover, repeat
• If the closing critical point has no uncleaned
cells,
– search reeb graph for a critical point with an
uncleaned cell
– Plan a path (on average shorter than bug2) to critical
point
– Cover cell, repeat
• Else coverage is complete
RI 16-735 Howie Choset
Detect Critical Points
RI 16-735 Howie Choset
Encountering Critical Points:
Problem
RI 16-735 Howie Choset
Cycle Algorithm
RI 16-735 Howie Choset
Sensor-based Complete
Coverage
Goal: Complete coverage of an unknown environment
Time-exposure photo of a coverage experiment
RI 16-735 Howie Choset
Sensor-based Complete
Coverage
Goal: Complete coverage of an unknown environment
Time-exposure photo of a coverage experiment
RI 16-735 Howie Choset
Morse Decomposition h(x,y) = x
•Canny π1: Q → ℜ)
Boustrophedon decomposition
RI 16-735 Howie Choset
Morse Decomposition
h(x,y) = x2 + y2
RI 16-735 Howie Choset
Morse Decomposition
h(x,y) = |x| + |y|
squarels
RI 16-735 Howie Choset
Morse Decomposition
h(x,y) = tan(y/x)
RI 16-735 Howie Choset
Brushfire Decomposition
RI 16-735 Howie Choset
Brushfire Decomposition
h(x,y) = D(x,y)
RI 16-735 Howie Choset
Brushfire Decomposition
h(x,y) = D(x,y)
RI 16-735 Howie Choset
Brushfire Decomposition
h(x,y) = D(x,y)
RI 16-735 Howie Choset
Brushfire Decomposition
h(x,y) = D(x,y)
RI 16-735 Howie Choset
Brushfire Decomposition
Coverage Path
RI 16-735 Howie Choset
Wavefront Decomposition
RI 16-735 Howie Choset
Notation
• A slice is a codimension one manifold
(Qλ)
• Slices are parameterized by λ
– varying λ sweeps a slice through the
space
• The portion of the slice in the free
configuration space (Qfree) is Qfreeλ
• Qfreeλ = Qλ ∩ Qfree
RI 16-735 Howie Choset
Slice Definition
• Slice can be defined in terms of the
preimage of the projection operator
• h: Q → ℜ (Canny π1: Q → ℜ)
• Vertical slice are defined by
• Qλ = h−1(λ), with h(x,y) = x for the plane
• Increasing λ sweeps the slice to the right
through the plane
RI 16-735 Howie Choset
The Pursuer-Evader Problem
• Problem definition
How do you plan the motion of a pursuer(s) in a polygonal
environment so that it will eventually “see” an unpredictable
evader?
• Assumptions
-Polygonal environment, freespace denoted F
-If the evader is within line of sight of the pursuer, it has been
“captured”
-Evaders can move arbitrarily fast
-Pursuers have unlimited vision range
Free space F
Polygonal
obstacles
RI 16-735 Howie Choset
Terminology and Definitions
• γi(t) position of ith pursuer at time t
• V(q) set of points in F visible from q ∈ F
• Contaminated: region of F that might contain the evader
• Cleared: region that is not contaminated.
• Recontaminated: A region that was contaminated, then cleared, and then
contaminated
• Solution strategy: A strategy γ for any given evader path if there is at some time a
point where the pursuer sees the evader.
Visibility polygon V(q)
Pursuers path, γi
Contaminated
area
clear area
RI 16-735 Howie Choset
Information State and Space
• Let q ∈ F be the current pursuer position, let S ⊆ F be the set of
all contaminated points in F, then η = (q, S) is an information
state. In other words, it is a set of data that uniquely describes
state of the environment at a given point. Is η = (q, S) a function
of time?
• The set of all possible information states is the information
space.
RI different
Two 16-735 Howie Choset
information states
Information State
•How do we use the information state in our search for the evader?
At a point q, the edges of the visibility polygon V(q) alternate between being
on the boundary of F and the interior of F. We will call the edges of V(q) that
enter the free space gap edges.
1
Gap edges
0
0
The blue area is
V(q) for the Gap edge
point shown
•We can assign each gap edge a binary value– if the edge borders a contaminated region, it is
assigned a “1”, and “0” for all other edges.
•For each point q, we can assign a binary vector B(q) that contains all the gap edge labels
•The pair (q, B(q)) then uniquely describes the information state, for example (q, {010})
RI 16-735 Howie Choset
Recall a contaminated region might have an evader
Conservative Regions
• A connected set D ⊆ F is conservative if for all q ∈ F, and for all γ:[t0, t1]
→ D such that γ is continuous and γ(t0)= γ(t1)= q, then the same
information state is obtained.
Ok, but what does that mean?
As long as we stay in the same conservative region, the information state will not change. If we
break the free space F down into conservative regions, then if we visit one point in a region,
we will obtain the same information that we would have gotten from any other point in the
same region
Position q1 Position q2 (with path shown from q1) Position q3
Moving the robot from q1 to q2, the information state does not change.
But when we move from q1 to q3 the information state does change- the region in the lower center is cleared
Thus q1 and q2 are in the same conservative region
RI 16-735 Howie Choset
Constructing Conservative Regions
So how do we construct them?
Draw rays extending the edges of obstacles until they hit another obstacle. We also draw rays
extending away from any two vertices that don’t have an obstacle between them.
The three general cases are shown below.
vi
vj
Case 1 Case 2 Case 3
Extend edges in all possible directions Extend pairs of vertices outwards only if it is
(Note that we have not shown all the possible rays for the obstacles) free in both directions along a line through
the two vertices
For Case 3: Let vi ∈ Ci, vj ∈ Cj. Then if λvi + (1- λ) vj ∈F for all λ ∈ (-ε, 1+ε) then we draw a ray
extending from vi away from vj and vice versa until they hit an obstacle (except lamda = 0,1??)
RI 16-735 Howie Choset
Examples of Conservative Regions
• Because the information state is the same in a given conservative
region, all we really need to do is visit the center of each region to
obtain the state.
RI 16-735 Howie Choset
Conservative Regions to Graphs
• Now that we have the space decomposed into conservative regions, we can
represent each region as the node on a finite, planar graph G.
RI 16-735 Howie Choset
Directed Information Graph
• Given a graph G, we can derive the information graph GI that includes
the labels for the gap edges. For each node in G, we include a set of
vertices in GI, one for each possible gap edge label.
• For example, for a given point and region q ∈ D, there are two gap edges
in B(q). But we include all possible combinations of B(q) in GI: {00, 01,
10, 11}. Thus we can identify a vertex in GI with the pair (q, B(q))
0 1 1 0
10
1
0 01
1 11 0
00
Freespace with overlaid graph G Information Graph GI
RI 16-735 Howie Choset
Gap Edge transitions
• What happens to the gap edges when we move from region to region?
There are four cases:
1. A gap edge disappears ⇒Don’t worry about it, the area has been cleared
2. A gap edge appears ⇒ Assign it a “0” (clear) label
3. Two or more gap edges merge into one ⇒ If any of the original edges had a “1”
(contaminated) , then the new edge will be a “1”
4. One gap edge splits into two ⇒ Assign new edges the same value as the old
edge
q4
q1 q2 q3
•Moving from q1 to q2, the single gap edge • Moving from q3 to q4, two gap edges merge into one
disappears (Case 1) (Case 3)
• From q2 to q1, a gap edge reappears (Case 2) •From q4 to q3, a single edge splits into two (Case 4)
RI 16-735 Howie Choset
Graph search and solution
• The final step is to simply apply any graph searching algorithm to
the information graph GI and update the vector B(q) for each
region.
• Any node on GI of the form (q, B(q)) such that B(q) = “00…0” (all
gap edges are 0) or a node with no gap edges is a goal node.
• This algorithm is complete in the case of a single pursuer.
Start node
0 1 1 0
Goal node
10
1
0 01
1 11 0
00
RI 16-735 Howie Choset
Worst case bounds
How many pursuers do you need to have to find an evader in a given space?
That depends on the geometry of the space
• For a simply connected free space, F, with n edges, H(F) = Θ(log n), where H(F)
is the number of pursuers needed.
• For a free space F with h holes and n edges, H(F) =hΘ(
+ log n )
Simply connected Free space with hole
• Simply connected means all the edges can be connected into a single continuous path
Why does the hole matter? If there is a hole, the evader can always be on the side
opposite a single pursuer. Thus a space with one hole requires two pursuers.
Quick review: O(n) = “at most” Ω(n) = “at least” Θ(n) = asymptotically equal
RI 16-735 Howie Choset
Intuition on Bounds for H(F)
• For a simply connected environment, H(F)= Θ(log n). We can see this
by using a “Ω” shaped free space.
12 edges, one
pursuer 36 edges, two pursuers 108 edges, three pursuers
• For a space with h holes and n edges, H(F) = Θ( h + log n )
• The √h pursuers are used to divide the space into simply
connected components, while the log(n) pursuers search
the remaining space
4 holes, 111 edges, 4 pursuers
RI 16-735 Howie Choset
Multiple Pursuers Demo
RI 16-735 Howie Choset
Recontamination
• There are some simply connected free spaces with H(F)=1 where
recontamination will be required Ω(n) times
Here the peak will be
recontaminated 3 times,
requiring 2 extra visits to the
peak (see web animation)
RI 16-735 Howie Choset
Conclusions / Questions
• The algorithm presented is complete for a single
pursuer
• Any graph search algorithm will provide a solution
once a information graph is extracted from the
conservative region decomposition.
• Tight bounds exist for the number of pursuers
necessary for a given free space.
• A complete and correct algorithm does not exist yet for
H(F) > 1
Based on the paper
“A Visibility-Based Pursuit-Evasion Problem”, Guibas, Latombe, LaValle,
Lin, Motwani
Animations are on the web at:RI 16-735 Howie Choset
http://robotics.stanford.edu/groups/mobots/pe.html