2015 Motion Planning Graph Search

19
6 Approximate Cell Decomposition

description

Motion Planning Graph Search

Transcript of 2015 Motion Planning Graph Search

Page 1: 2015 Motion Planning Graph Search

6

Approximate Cell Decomposition

Page 2: 2015 Motion Planning Graph Search

9

4-connected graph •  Each cell is connected to four neighbors (N, S, E, W)

discretize

planning map

Can we get “finer” paths with the same resolution?

90 deg paths

Page 3: 2015 Motion Planning Graph Search

10

4-connected versus 8-connected 8-connected graph - Each cell is connected to eight neighbors (N, S, E, W, NE, SE, NW, SW)

discretize

planning map S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

Eight-connected graph

45 deg paths

Page 4: 2015 Motion Planning Graph Search

11

•  Graph construction: - connect cells to neighbor of neighbors - path is restricted to 22.5º degrees

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph

16-connected grid

Planning via Approximate Cell Decomposition

Page 5: 2015 Motion Planning Graph Search

12

•  Approximate Cell Decomposition: - what to do with partially blocked cells?

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

Planning via Approximate Cell Decomposition

Page 6: 2015 Motion Planning Graph Search

13

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

•  Approximate Cell Decomposition: - what to do with partially blocked cells? - make it untraversable – incomplete (may not find a path that exists)

Planning via Approximate Cell Decomposition

Page 7: 2015 Motion Planning Graph Search

14

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

•  Approximate Cell Decomposition: - what to do with partially blocked cells? - make it traversable – incorrect (may return valid paths when none exist)

so, what’s the solution?

Planning via Approximate Cell Decomposition

Page 8: 2015 Motion Planning Graph Search

15

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

•  Approximate Cell Decomposition: - solution 1:

- make the discretization very fine - expensive, especially in high-D

Planning via Approximate Cell Decomposition

Page 9: 2015 Motion Planning Graph Search

16

S1 S2 S3

S4 S5

S6

S1 S2 S3

S4 S5

S6

convert into a graph search the graph for a least-cost path from sstart to sgoal

•  Approximate Cell Decomposition: - solution 2:

- make the discretization adaptive

Planning via Approximate Cell Decomposition

Page 10: 2015 Motion Planning Graph Search

17

Graph Search

Page 11: 2015 Motion Planning Graph Search

18

Background: Planning as Tree Search

Perform tree-based search (need cost function c)

●  Construct the root of the tree as the start state, and give it value 0

●  While there are unexpanded leaves in the tree ▼  Find the leaf s with the lowest value ▼  For each action, create a new child leaf of s ▼  Set the value of each child as:

g(s) = g(parent(s))+c(parent(s), s) where c(s, s’) is the cost of moving from s to s’

S0

S1

S2

S3

S4

S5

S6

g0=0

g1=g0+c(s0,s1)

Page 12: 2015 Motion Planning Graph Search

19

Background: What action to choose?

Depth-first search Breadth-first search Best-first search

● Djikstra (1959) Single-source shortest path problem for routing

● Hart (1968) A* algorithm

Ref: Wikipedia

Ref: Wikipedia

Ref: Wikipedia

Page 13: 2015 Motion Planning Graph Search

20

1 Shallowest next (breadth-first) ●  Guaranteed shortest ●  Storage intensive

Background: What action to choose?

2 Deepest next (depth-first) ●  No optimality ●  Potentially storage cheap

3 A* ●  Optimal ●  Complete ●  Efficient if good heuristics are used

How to determine the lowest-cost child to consider next?

Page 14: 2015 Motion Planning Graph Search

21

Searching Graphs for a Least-cost Path

Total_cost (sInit, s, sGoal) = running_cost (sInit, s) + cost_to_go(s, sGoal)

the cost c(s2,sGoal) of an edge from s2 to sGoal

SInit

S0

S1

S2

S3

S4

SGoal

1

3

2

7

3

2 4

6 2

Page 15: 2015 Motion Planning Graph Search

22

Searching Graphs for a Least-cost Path Estimate g(s), the running_cost(sInit, s), for each state s.

●  g(s) – an estimated cost of a least-cost path from sInit to s

●  optimal values satisfy: g(s) = minp∈ predecessor(s) g(p) + c(p,s)

the cost c(s2,sGoal) of an edge from s2 to sGoal

S0

S1

S2

S3

S4

1

3

2 7

3

2 4

6 2

SGoal SInit g = 0

g = 1

g = 3

g = 3

g = 4

g = 9

g = 8

Page 16: 2015 Motion Planning Graph Search

23

A* Search

The cost of each state s = g(s) + h(s) Where g(s) is an optimal running cost for state s and h(s) is an (under)estimated cost to reach the goal state from state s.

h(s) g(s)

SInit

S

SGoal

the cost of a shortest path from sInit to s found so far

an (under) estimate of the cost of a shortest path from s to sgoal

h(s) is called a heuristic

What is a good heuristic that under-estimates the cost to go?

S0

S1 …

Page 17: 2015 Motion Planning Graph Search

24

A* Search (Heuristic) Each state gets a value

f(s)=g(s)+h(s)

For example (4-connected) –  g(s) = 4 –  h(s) = ||s-g||

=sqrt(82+132) =15.3

–  f(s) =19.3

Cost incurred so far, from the start state

Estimated cost from here to the goal: “heuristic” cost

Actual (minimal) cost: c*(s,g) =25

S

Page 18: 2015 Motion Planning Graph Search

25

Heuristic function must be: ●  admissible: for every state s, h(s) ≤ c*(s,sGoal) ●  consistent (satisfy triangle inequality):

h(sGoal,sGoal) = 0 and for every s≠sgoal, h(s) ≤ c(s,succ(s)) + h(succ(s))

●  Consistency implies admissibility (not necessarily the other way around)

minimal cost from s to sGoal A* Search

Page 19: 2015 Motion Planning Graph Search

42

Dijkstra VS A*

Dijkstra A*

Ref: Wikipedia