Top Banner
1 Motion Planning for a Point Robot (2/2)
46

Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

May 20, 2018

Download

Documents

ngotuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

1

Motion Planning for a Point Robot (2/2)

Page 2: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

• Class scribing• Position paper

2

Page 3: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

3

Planning requires models

The Bug algorithms are “reactive motion strategies”; they are not motion planners

To plan its actions, a robot needs a (possibly imperfect) predictive model of its actions, so that it can choose among several possible courses of action

Page 4: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

4

Point Robot on a Grid

Assumptions: - The robot perfectly controls its actions- It has an accurate geometric model of the environment

(i.e., the obstacles)

Page 5: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

5

Point Robot on a Grid

Assumptions: - The robot perfectly controls its actions- It has an accurate geometric model of the environment

(i.e., the obstacles)

How can the robot find a collision-free path to the goal?

Page 6: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

6

8-Puzzle Game

1

23 45 6

78 1 2 3

4 5 67 8

Initial state Goal state

State: Any arrangement of 8 numbered tiles and an empty tile on a 3x3 board

Page 7: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

7

8-Puzzle: Successor Function

1

23 45 6

78

1

23 45

678

1

23 45 6

78

1

23 45 6

78

Search is about the exploration of alternatives

SUCC(state) subset of states

The successor function is knowledgeabout the 8-puzzle game, but it does not tell us which outcome to use, nor towhich state of the board to apply it.

Page 8: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

8

State Graph and Search Tree

Search treeNote that some states

may be visited multiple times

State graph

Page 9: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

9

Search Nodes and States

1

23 45 6

78

1

23 45 6

78

1

23 45 6

78

135 6

8

13

4

5 67

824 7

2

1

23 45 6

78

If states are allowed to be duplicated,the search tree may be infinite even

when the state space is finite

Page 10: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

10

Node expansionThe expansion of a node N of the search tree consists of:1) Evaluating the successor

function on STATE(N)2) Generating a child of N for

each state returned by the function

1

23 45 6

78

N

135 6

8

13

4

5 67

824 7

2

1

23 45 6

78

Page 11: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

11

Fringe of Search Tree The fringe is the set of all search

nodes that haven’t been expanded yet

1

23 45 6

78

1

23 45 6

78

1

23 45 6

78

135 6

8

13

4

5 67

824 7

2

1

23 45 6

78

Page 12: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

12

Page 13: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

13

Search Strategy The fringe is the set of all search

nodes that haven’t been expanded yet

The fringe is implemented as a priority queue FRINGE• INSERT(node,FRINGE)• REMOVE(FRINGE)

The ordering of the nodes in FRINGE defines the search strategy

Page 14: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

14

Search AlgorithmSEARCH(Start, Finish)1. INSERT(Start,FRINGE)2. Repeat:

a. If FRINGE is empty then return failure

b. q REMOVE(FRINGE)c. If q = Finish then return a path from

Start to Finishd. For every new state q’ in

SUCCESSORS(q)i. Install q’ as a child of q in the

search treeii. INSERT(q’,FRINGE)

Search treeStart

FRINGE

Page 15: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

15

Blind Search Strategies Breadth-first

New positions are inserted at the end of FRINGE

Depth-firstNew positions are inserted at the beginning of FRINGE

What is the effect?

What is the effect?

Page 16: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

16

Point Robot on a Grid

Assumptions: - The robot perfectly controls its actions- It has an accurate geometric model of the environment

(i.e., the obstacles)

How can the robot find a collision-free path to the goal?

Page 17: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

17

Search tree

Now, the robot can search its model for a collision-free path to the goal

Page 18: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

18

10001000 grid 1,000,000 configurationsIn 3-D 109 configurationsIn 6-D 1018 configurations!!!

Need for smart search techniques or sparse discretization

Page 19: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

19

Smart Search

SEARCH(Startt,Finish)1. INSERT(qstart,FRINGE)2. Repeat:

a. If FRINGE is empty then return failureb. q REMOVE(FRINGE)c. If q = Finish then return a path from Start to

Finishd. For every new state q’ in SUCCESSORS(q)

i. Install q’ as a child of q in the search treeii. INSERT(q’,FRINGE)

Search tree

What can smart search be? How can it be done?

Page 20: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

20

Smart Search Search tree

Smart ordering of the configurations in FRINGE(best-first search)

SEARCH(Startt,Finish)1. INSERT(qstart,FRINGE)2. Repeat:

a. If FRINGE is empty then return failureb. q REMOVE(FRINGE)c. If q = Finish then return a path from Start to

Finishd. For every new state q’ in SUCCESSORS(q)

i. Install q’ as a child of q in the search treeii. INSERT(q’,FRINGE)

Page 21: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

21

Evaluation function f : node N real positive number f(N) For instance f(N) may be the Euclidean

distance (straight-line distance) to the goal

Sort the fringe by increasing value of f

Page 22: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

22

Applicationf(N) = Euclidean distance to the goal

Page 23: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

23

Applicationf(N) = Manhattan distance to the goal

Page 24: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

24

Another Example

Page 25: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

25

Another Example

0 211

58 7

7

34

7

676 3 2

86

4523 3

36 5 24 43 5

54 65

6

45

f(N) = h(N), with h(N) = Manhattan distance to the goal

Page 26: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

26

Another Example

0 211

58 7

7

34

7

676 3 2

86

4523 3

36 5 24 43 5

54 65

6

45

f(N) = Manhattan distance to the goal

70

Page 27: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

27

Another Example

f(N) = g(N)+h(N), with h(N) = Manhattan distance to goaland g(N) = distance traveled to reach N

0 211

58 7

7

34

7

676 3 2

86

4523 3

36 5 24 43 5

54 65

6

457+0

6+16+1

8+17+0

7+26+1

7+26+1

8+1

7+28+3

7+26+36+35+45+44+54+53+63+62+7

8+37+47+46+55+66+35+6

2+73+8

4+75+64+7

3+84+73+83+82+92+93+10

2+93+82+91+101+100+110+11

Page 28: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

28

A* Searchf(N) = g(N) + h(N) , where g(N) is the length of the path reaching N and 0 h(N) length

of the shortest path from N to goal [h is called the heuristic function]FRINGE is a priority queue sorted in increasing order of f

A*(Start,Finish)1. Insert the initial-node (state = Start) into FRINGE2. Repeat:

a. If FRINGE is empty then return failureb. Let N be the first node in FRINGE, remove N from FRINGEc. Let s be the state of N and mark s as closedd. If s = Finish then return the path found between Start and Finish and exit e. For every state s’ in SUCCESSORS(s)

i. If s’ is closed then do nothingii. Else

– Create a node N’ with state s’ as a successor of N– If there is a node N” in FRINGE with state s’ then

– If g(N”) < g(N’) then do nothing, else remove N” from FRINGE and insert N’ in FRINGE,

– Else insert N’ in FRINGE

Page 29: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

29

A* Searchf(N) = g(N) + h(N) , where g(N) is the length of the path reaching N and 0 h(N) length

of the shortest path from N to goal [h is called the heuristic function]FRINGE is a priority queue sorted in increasing order of f

A*(Start,Finish)1. Insert the initial-node (state = Start) into FRINGE2. Repeat:

a. If FRINGE is empty then return failureb. Let N be the first node in FRINGE, remove N from FRINGEc. Let s be the state of N and mark s as closedd. If s = Finish then return the path found between Start and Finish and exit e. For every state s’ in SUCCESSORS(s)

i. If s’ is closed then do nothingii. Else

– Create a node N’ as a successor of N, with state s’– If there is a node N” in FRINGE with state s’ then

– If g(N”) < g(N’) do nothing, else remove N” from FRINGE and insert N’ in FRINGE

– Else insert N’ in FRINGE

A* search is guaranteed to return a shortest path if a

path exists

Both h(N) = Euclidean distance from N to goaland h(N) = Manhattan distance from N to goalverify 0 h(N) length of the shortest path from N to the goal

Page 30: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

30

How to Choose h? f(N) = g(N) + h(N), where 0 h(N) length h*(N) of

the shortest path from N to goal Would h(N) 0 be a good choice? Would h(N) h*(N) be a good choice?

Which one is better:h(N) = Euclidean distance to goal?h(N) = Manhattan distance to goal?

Page 31: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

31

Attractive/Repulsive Potential Fields

2att goalU (q) = |q- q |

2

repminobst

1 1U (q) = -d (q) dEquipotentialcontours

Page 32: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

32

Attractive/Repulsive Potential Fields

2att goalU (q) = |q- q |

2

repminobst

1 1U (q) = -d (q) dEquipotentialcontours

Best-first search with potential fields:Sort positions in FRINGE in increasing order of potential

What could be a Bug motion strategy with potential fields?What would be its drawback?

Page 33: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

33

10001000 grid 1,000,000 configurationsIn 3-D 109 configurationsIn 6-D 1018 configurations!!!

Need for smart search techniques or sparse discretization

Page 34: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell Decomposition

Page 35: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell Decomposition

Page 36: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell Decomposition

Page 37: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell Decomposition

Page 38: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell Decomposition

critical events criticality-based decomposition

Page 39: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell DecompositionHow would you represent a bounded polygonal region?

Page 40: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Cell DecompositionPlanar sweep O(n log n) time, O(n) space

Page 41: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

41

Continuous space

Discretization

Search

Sampling-based Criticality-based

Page 42: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Tradeoffs

Cell decomposition: precomputation of data structure

Path planning: query processing for a given (Start, Finish) pair using this data structure

Can the precomputation cost be amortized over several queries?

What if the world changes frequently?42

Page 43: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

43

Visibility Graph

SHAKEY (SRI, 1969)

Finish

Start

Page 44: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

44

Visibility Graph

Computational complexity?

Page 45: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

How would you check whether two line segments

intersect?

45

(x1,y1)

(x’1,y’1)

(x2,y2)

(x’2,y’2)

Page 46: Motion Planning for a Point Robot - Stanford Artificial …ai.stanford.edu/~latombe/cs26n/2012/slide… · PPT file · Web view · 2012-01-19Cell Decomposition Planar sweep O ...

Voronoi Diagram

46

What is this?

Advantages/drawbacks relative to visibility graph method?