105
1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics (Thrun et. Al.)

E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

1

E190Q – Lecture 16 Autonomous Robot Navigation

Instructor: Chris Clark Semester: Spring 2013

Figures courtesy of Probabilistic Robotics (Thrun et. Al.)

Page 2: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

2

Control Structures Planning Based Control

Perception

Localization Cognition

Motion Control

Prior Knowledge Operator Commands

!

Page 3: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

3

MP Overview

§  Example:

Start Configuration

Goal Configuration

Trajectory

Page 4: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

4

Motion Planning

1. Graph Search 2. Artificial Potential Fields

Page 5: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

5

Graph Search

§  Cell decomposition §  Decompose the free space into simple cells and

represent the connectivity of the free space by the adjacency graph of these cells

Page 6: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

6

Graph Search

§  Given a discretization of C, a search can be carried out using a Graph Search or gradient descent, etc. §  Example: Find a path from D to G

D G

A

C

B

E

F

D

B E

A C F G

Page 7: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

7

Tree Search

§  Tree nomenclature:

§  Algorithms differ in the order in which they search the branches (edges) of the tree

Parent Node

Child Node

Page 8: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

8

Data Structures

§  The Fringe or Frontier is the collection of nodes waiting to be expanded.

Fringe

Page 9: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

9

Tree Search

§  Types of search strategies:

1.  Uninformed Search (Blind Search) §  No information on how to guide search

2.  Informed Search (Heuristic Search) §  Use information to guide search §  Can often find solutions more quickly

Page 10: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

10

Tree Search

§  Search Algorithms 1.  Breadth First Search 2.  Depth First Search 3.  Depth-Limited Search 4.  Iterative Deepening Search 5.  A*

Page 11: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

11

§  All the nodes at depth d in the search tree are expanded before nodes at depth d+1

Breadth-First

Page 12: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

12

Breadth-First Snapshot 1 Initial Visited Fringe Current Visible Goal

1

2 3

Fringe: [] + [2,3]

Page 13: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

13

Breadth-First Snapshot 2 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

Fringe: [3] + [4,5]

Page 14: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

14

Breadth-First Snapshot 3 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

Fringe: [4,5] + [6,7]

Page 15: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

15

Breadth-First Snapshot 4 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9

Fringe: [5,6,7] + [8,9]

Page 16: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

16

Breadth-First Snapshot 5 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11

Fringe: [6,7,8,9] + [10,11]

Page 17: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

17

Breadth-First Snapshot 6 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13

Fringe: [7,8,9,10,11] + [12,13]

Page 18: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

18

Breadth-First Snapshot 7 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

Fringe: [8,9.10,11,12,13] + [14,15]

Page 19: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

19

Breadth-First Snapshot 8 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 Fringe: [9,10,11,12,13,14,15] + [16,17]

Page 20: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

20

Breadth-First Snapshot 9 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 Fringe: [10,11,12,13,14,15,16,17] + [18,19]

Page 21: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

21

Breadth-First Snapshot 10 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21

Fringe: [11,12,13,14,15,16,17,18,19] + [20,21]

Page 22: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

22

Breadth-First Snapshot 11 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23

Fringe: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21] + [22,23]

Page 23: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

23

Breadth-First Snapshot 12 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25

Fringe: [13,14,15,16,17,18,19,20,21] + [22,23]

Note: The goal node is “visible” here, but we can not perform the goal test yet.

Page 24: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

24

Breadth-First Snapshot 13 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27

Fringe: [14,15,16,17,18,19,20,21,22,23,24,25] + [26,27]

Page 25: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

25

Breadth-First Snapshot 14 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29

Fringe: [15,16,17,18,19,20,21,22,23,24,25,26,27] + [28,29]

Page 26: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

26

Breadth-First Snapshot 15 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [15,16,17,18,19,20,21,22,23,24,25,26,27,28,29] + [30,31]

Page 27: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

27

Breadth-First Snapshot 16 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]

Page 28: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

28

Breadth-First Snapshot 17 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [18,19,20,21,22,23,24,25,26,27,28,29,30,31]

Page 29: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

29

Breadth-First Snapshot 18 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [19,20,21,22,23,24,25,26,27,28,29,30,31]

Page 30: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

30

Breadth-First Snapshot 19 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [20,21,22,23,24,25,26,27,28,29,30,31]

Page 31: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

31

Breadth-First Snapshot 20 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [21,22,23,24,25,26,27,28,29,30,31]

Page 32: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

32

Breadth-First Snapshot 21 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [22,23,24,25,26,27,28,29,30,31]

Page 33: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

33

Breadth-First Snapshot 22 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [23,24,25,26,27,28,29,30,31]

Page 34: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

34

Breadth-First Snapshot 23 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [24,25,26,27,28,29,30,31]

Page 35: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

35

Breadth-First Snapshot 24 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Fringe: [25,26,27,28,29,30,31]

Note: The goal test is positive for this node, and a solution is found in 24 steps.

Page 36: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

36

Breadth First Search

§  Complete §  Optimal if cost is increasing with path depth. §  Computational complexity O(bd), where b is

the branching factor and d is the depth §  Space (memory) complexity O(bd)

Page 37: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

37

Tree Search

§  Search Algorithms 1.  Breadth First Search 2.  Depth First Search 3.  Depth-Limited Search 4.  Iterative Deepening Search 5.  A*

Page 38: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

38

§  Expands one of the nodes at the deepest level of the tree

Depth-First

Page 39: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

39

Depth-First Snapshot 1 Initial Visited Fringe Current Visible Goal

1

2 3

Page 40: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

40

Depth-First Snapshot 2 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

Page 41: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

41

Depth-First Snapshot 3 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

Page 42: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

42

Depth-First Snapshot 4 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

16 17

Page 43: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

43

Depth-First Snapshot 5 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

16 17

Page 44: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

44

Depth-First Snapshot 6 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

16 17

Page 45: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

45

Depth-First Snapshot 7 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

16 17 18 19

Page 46: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

46

Depth-First Snapshot 8 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

16 17 18 19

Page 47: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

47

Depth-First Snapshot … Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13

16 17 18 19 20 21 22 23 24 25

Page 48: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

48

Depth First Search

§  NOT Complete if infinite depth §  NOT Optimal if we take first goal found §  Computational complexity O(bm), where b is

the branching factor and m is the depth §  Space (memory) complexity O(bm) §  Good if there are many GOOD solutions

Page 49: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

49

Tree Search

§  Search Algorithms 1.  Breadth First Search 2.  Depth First Search 3.  Depth-Limited Search 4.  Iterative Deepening Search 5.  A*

Page 50: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

50

Depth-Limited Search

§  Similar to depth-first, but with a limit to how deep search should be. §  Overcomes problems with infinite paths §  Sometimes a depth limit can be inferred or

estimated from the problem description §  in other cases, a good depth limit is only known when the

problem is solved §  Must keep track of the depth

Page 51: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

51

Depth-Limited Snapshot 1 Initial Visited Fringe Current Visible Goal

1

2 3

Note: The depth limit is 2

Page 52: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

52

Depth-Limited Snapshot 2 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 Note: The depth limit is 2

Page 53: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

53

Depth-Limited Snapshot 3 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9

Note: The depth limit is 2

Page 54: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

54

Depth-Limited Snapshot 4 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

8 9 10 11 12

Note: The depth limit is 2

Page 55: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

55

Depth-Limited Snapshot 5 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11

Note: The depth limit is 2

Page 56: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

56

Depth-Limited Snapshot 5 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13

Note: The depth limit is 2

Page 57: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

57

Depth-Limited Snapshot 6 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

Note: The depth limit is 2

Page 58: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

58

Depth-Limited Snapshot 7 Initial Visited Fringe Current Visible Goal

1

2 3

4 5 6 7

8 9 10 11 12 13 14 15

Note: The depth limit is 2

Page 59: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

59

Depth-Limited Search

§  In this example the solution was never found since depth limit was set too low.

§  Hence not complete!

§  Also, not optimal!

Page 60: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

60

Tree Search

§  Search Algorithms 1.  Breadth First Search 2.  Depth First Search 3.  Depth-Limited Search 4.  Iterative Deepening Search 5.  A*

Page 61: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

61

§  Approach: §  Apply LIMITED-DEPTH with increasing depth limit

Iterative Deepening

Page 62: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

62

Iterative Depth Snapshot 1 Initial Visited Fringe Current Visible Goal

1

2 3

DEPTH LIMIT OF 1

Page 63: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

63

Iterative Depth Snapshot 2 Initial Visited Fringe Current Visible Goal

1

2 3

DEPTH LIMIT OF 1

Page 64: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

64

Iterative Depth Snapshot 3 Initial Visited Fringe Current Visible Goal

1

2 3

DEPTH LIMIT OF 1

Page 65: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

65

Iterative Depth Snapshot 4 Initial Visited Fringe Current Visible Goal

1

2 3

DEPTH LIMIT OF 2

Page 66: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

66

Iterative Depth Snapshot 5 Initial Visited Fringe Current Visible Goal

1

2 3

DEPTH LIMIT OF 2

Page 67: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

67

Iterative Depth Snapshot 6 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

DEPTH LIMIT OF 2

Page 68: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

68

Iterative Depth Snapshot 7 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

DEPTH LIMIT OF 2

Page 69: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

69

Iterative Depth Snapshot 8 Initial Visited Fringe Current Visible Goal

1

2 3

4 5

DEPTH LIMIT OF 2

Page 70: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

70

§  This would finish a depth first search of max depth 2, then start a depth first search of max depth 3 and so on… (until goal found).

§ Many states are expanded multiple times §  E.g. nodes 2 and 3 are expanded twice already! §  Is this wasteful?

Iterative Deepening

Page 71: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

71

§ Consider the complexity of a depth first search of depth d bd

§  For depth limit 1 we have time complexity b1 §  For depth limit 2 we have time complexity b2

… §  For depth limit e we have time complexity be

§  If the solution is at depth e, then we will have total complexity

eb1 + (e-1) b2 + (e-2) b3 + … + be

Iterative Deepening

Page 72: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

72

§  If the solution is at depth e, then we will have total complexity

eb1 + (e -1) b2 + (e - 2) b3 + … + be

§  Because of the exponents, the last term is always much larger than all other terms, and therefore has reduced effects on the complexity.

Iterative Deepening

Page 73: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

73

§  Properties §  Complete §  O(be) run time complexity §  O(be) space complexity

Iterative Deepening

Page 74: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

74

Graph Search: Outline

§  Search Algorithms 1.  Breadth First Search 2.  Depth First Search 3.  Depth-Limited Search 4.  Iterative Deepening Search 5.  A*

Page 75: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

75

Motion Planning: A* Search

§  There are a set of algorithms called “Best-First Search”

§  They try to search the children of the “best” node to expand.

§  A* has become incredibly popular because it attempts to make the best node the one that will find the optimal solution and do so in less time.

Page 76: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

76

Motion Planning: A* Search

§  A* is optimal and complete, but can take time…

§  Its complexity depends on the heuristic, but is exponential with the size of the graph.

Page 77: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

77

Motion Planning: A* Search

§  We evaluate a node n for expansion based on the function:

f(n) = g(n) + h(n) §  Where g(n) = path cost from the start node to n h(n) = estimated cost of the cheapest path from node n to the goal

Page 78: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

78

Motion Planning: A* Search

§  Example: Cost for one particular node f(n) = g(n) + h(n)

g(n) = 1 h(n) = 2 nstart n

ngoal

Page 79: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

79

Motion Planning: A* Search

§  Example: Cost for each node f(n) = g(n) + h(n)

nstart

g=1

h=√2

ngoal

g=2

h=1

g=1

h=2

g=2

h=√3

g=3

h=√2

g=4

h=1

Page 80: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

80

Motion Planning: A* Search

§  The strategy is to expand the node with the cheapest path (lowest f ).

§  This is proven to be complete and optimal, if h(n) is an admissible heuristic.

§  Here, an admissible heuristic is one that never overestimates the cost to the goal §  Example: the Euclidean distance.

Page 81: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

81

Motion Planning: A* Search

§  Search example: Iteration 1 Fringe set = { f1 = 2.4, f2 = 3}

nstart f=2.4

ngoal f=3

Page 82: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

82

Motion Planning: A* Search

§  Search example: Iteration 2 Fringe set = {f2 = 3, f3 = 3}

nstart f=2.4

ngoal

f=3

f=3

Page 83: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

83

Motion Planning: A* Search

§  Search example: Iteration 3 Fringe set = {f3 = 3, f4 = 3.8}

nstart f=2.4

ngoal

f=3

f=3

f=3.8

Page 84: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

84

Motion Planning: A* Search

§  Search example: Iteration 4

nstart f=2.4

ngoal

f=3

f=3

f=3.8

Page 85: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

85

Motion Planning: Final Note

§  A robot is often implemented with two planners: §  Global Planner: A planner that plans an optimal plan

with respect to some course discretization of a map. §  Local Planner: A reactive planner for obstacle

avoidance and kinematic consideratations.

Page 86: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

86

Motion Planning: Final Note

§  A * is often used as a global planner §  Planner that considers kinematic/dynamic

constraints is used for local planning.

Page 87: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

87

Introduction to Motion Planning

1. Graph Search 2. Artificial Potential Fields

Page 88: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

88

2. Discretize C

§  Potential field §  Define a function over the free space that has a

global minimum at the goal configuration and follow its steepest descent

Page 89: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

89

Artificial Potential Fields

§  Electric Potentials §  The electric potential VE (J

C-1) created by a point charge Q, at a distance r from the charge (relative to the potential at infinity), can be shown to be

VE = 1 Q 4πε0 r

Page 90: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

90

Artificial Potential Fields

§  Electric Fields §  The electric field intensity E

is defined as the force per unit positive charge that would be experienced by a point charge

§  It is obtained by taking the negative gradient of the electric potential E = - VE

Page 91: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

91

Artificial Potential Fields

§  Electric Potential Fields §  Different arrangements of charges can lead

to various fields

Page 92: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

92

Artificial Potential Fields

§  In APFs, the robot is treated as a point under the influence of an artificial potential field. §  Electrical analogy: The generated robot movement

is similar to an electric charge under the force of an electric field

§  Mechanical analogy: The generated robot movement is similar to a ball rolling down the hill

§  Goal generates attractive force §  Obstacles generate repulsive forces

Page 93: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

93

Artificial Potential Fields

§  For a given configuration space and desired goal, place potentials on obstacles and goals

qgoal

q

Page 94: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

94

Artificial Potential Fields

§  For a given configuration space and desired goal, place potentials on obstacles and goals

qgoal

q

Page 95: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

95

Artificial Potential Fields

qgoal

q

§  For any robot configuration q, the forces felt by the robot can be calculated to steer the robot towards the goal.

Fattraction

Page 96: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

96

Artificial Potential Fields

Page 97: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

97

Potential Field Generation

§  Given potential functions U, Generate artificial force field F(q)

§  Sum all potentials (repulsive and attractive). §  Differentiate to determine forces §  Note: functions must be differentiable

F(q) = - U(q) = - Uatt(q) - Urep(q) = - δU/ δx - δU/ δy

Page 98: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

98

Attractive Potential Fields

§  Parabolic function representing the Euclidean distance ρgoal (q) = || q - qgoal || to the goal. Uatt(q) = 1 katt ρ2

goal (q) 2

§  Attracting force converges linearly towards 0 (goal) Fatt (q) = - Uatt(q) = - katt (q - qgoal )

Page 99: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

99

Repulsive Potential Fields

§  Should generate a barrier around all the obstacle

§  Does not influence robot if far from the obstacle Urep(q) = 1 krep 1 - 1 2 if ρ(q) ≤ ρ0 2 ρ(q) ρ0 0 if ρ(q) > ρ0

§  Where ρ(q) = || q - qobst || is the minimum distance to the object

Page 100: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

100

Repulsive Potential Fields

§  Field is positive or zero and tends to infinity as q gets closer to the object

Frep(q) = - Urep(q) = krep 1 - 1 q - qobj if ρ(q) ≤ ρ0 ρ(q) ρ0 ρ3(q) 0 if ρ(q) > ρ0

Page 101: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

101

Artificial Potential Fields

§  Given current configuration of the robot q 1.  Sum total force vectors F(q) generated by the

potential fields. 2.  Set desired robot velocity (v, w) proportional to the

force F(q)

Frepulsion

Fattraction

qgoal

q

Ftotal

Page 102: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

102

Artificial Potential Fields

§  Local minimums

§  If objects are not convex (i.e. concave), there exist situations where several minimal distances exist and can result in oscillations

§  Not complete

qgoal

Page 103: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

103

Artificial Potential Fields

§  Extended Potential Fields §  Many modifications to potential fields have been

done in order to improve completeness, optimality. §  Example: Orientation based potentials

§  Can increase potential depending on orientation of robot

Robot

Repulsion force

Object

Page 104: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

104

Artificial Potential Fields

§  Extended Potential Fields §  Also, can use rotational fields in one direction

Linear source Rotational source

Page 105: E190Q – Lecture 16 Autonomous Robot Navigation1 E190Q – Lecture 16 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2013 Figures courtesy of Probabilistic Robotics

105

Artificial Potential Fields

§  Example: http://www.youtube.com/watch?v=r9FD7P76zJs