CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  ·...

44
Ioannis Rekleitis Motion Planning

Transcript of CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  ·...

Page 1: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Ioannis Rekleitis

Motion Planning

Page 2: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Outline

• Path Planning

– Visibility Graph

– Bug Algorithms

– Potential Fields

– Skeletons/Voronoi Graphs

– C-Space

2CS-417 Introduction to Robotics and Intelligent Systems

Page 3: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Motion Planning

• The ability to go from A to B

– Known map – Off-line planning

– Unknown Environment –Online planning

– Static/Dynamic Environment

CS-417 Introduction to Robotics and Intelligent Systems 3

qgoalqinit

qgoal

qgoalqinit

qinit

Page 4: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning

Robot Map

World

4CS-417 Introduction to Robotics and Intelligent Systems

Page 5: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning

Robot Map

World

•Indoor/Outdoor•2D/2.5D/3D•Static/Dynamic•Known/Unknown•Abstract (web)

5CS-417 Introduction to Robotics and Intelligent Systems

Page 6: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning

Robot Map

World

•MobileIndoor/OutdoorWalking/Flying/Swimming

•Manipulator•Humanoid•Abstract

6CS-417 Introduction to Robotics and Intelligent Systems

Page 7: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning

Robot Map

World

•Topological•Metric•Feature Based•1D,2D,2.5D,3D

7CS-417 Introduction to Robotics and Intelligent Systems

Page 8: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning

Robot Map

World

•Topological•Metric•Feature Based•1D,2D,2.5D,3D

•MobileIndoor/OutdoorWalking/Flying/Swimming

•Manipulator•Humanoid•Abstract

•Indoor/Outdoor•2D/2.5D/3D•Static/Dynamic•Known/Unknown•Abstract (web)

8CS-417 Introduction to Robotics and Intelligent Systems

Page 9: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Path Planning: Assumptions

• Known Map

• Roadmaps (Graph representations)

• Polygonal Representation

qgoal

qinit

9CS-417 Introduction to Robotics and Intelligent Systems

Page 10: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Visibility Graph

• Connect Initial and goal locations with all the visible vertices

qgoal

qinit

10CS-417 Introduction to Robotics and Intelligent Systems

Page 11: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Visibility Graph

• Connect initial and goal locations with all the visible vertices

• Connect each obstacle vertex to every visible obstacle vertex

qgoal

qinit

11CS-417 Introduction to Robotics and Intelligent Systems

Page 12: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Visibility Graph

• Connect initial and goal locations with all the visible vertices

• Connect each obstacle vertex to every visible obstacle vertex

• Remove edges that intersect the interior of an obstacle

qgoal

qinit

12CS-417 Introduction to Robotics and Intelligent Systems

Page 13: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Visibility Graph• Connect initial and goal locations with all the visible vertices

• Connect each obstacle vertex to every visible obstacle vertex

• Remove edges that intersect the interior of an obstacle

• Plan on the resulting graph

qgoal

qinit

13CS-417 Introduction to Robotics and Intelligent Systems

Page 14: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Visibility Graph• An alternative path

• Alternative name: “Rubber band algorithm”

qgoal

qinit

14CS-417 Introduction to Robotics and Intelligent Systems

Page 15: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Major Fault• Point robot

• Path planning like that guarantees to hit the obstacles

15CS-417 Introduction to Robotics and Intelligent Systems

Page 16: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Limited-knowledge path planning

• known direction to goal

• otherwise local sensing

walls/obstacles encoders

•“reasonable” world

1. finitely many obstacles in any finite disc

2. a line will intersect an obstacle finitely many times

Goal

Start

• Path planning with limited knowledge

– Insect-inspired “bug” algorithms

16CS-417 Introduction to Robotics and Intelligent Systems

Page 17: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Not truly modeling bugs...

Insects do use several cues for navigation:

neither are the current bug-sized robots

visual landmarks

polarized light

chemical sensing

Other animals use information from

magnetic fields

electric currents

temperature

they’re not ears...

migrating bobolinkbacteria 17CS-417 Introduction to Robotics and Intelligent Systems

Page 18: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Bug Strategy

“Bug 0” algorithm

• known direction to goal

• otherwise only local sensing

walls/obstacles encoders

1) head toward goal

2) follow obstacles until you can

head toward the goal again

3) continue

Insect-inspired “bug” algorithms

CS-417 Introduction to Robotics and Intelligent Systems 18

assume a

left-turn robot

Page 19: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Does It Work?

19CS-417 Introduction to Robotics and Intelligent Systems

Page 20: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 1” algorithm

• known direction to goal

• otherwise only local sensing

walls/obstacles encoders

1) head toward goal

Insect-inspired “bug” algorithms

Bug 1

CS-417 Introduction to Robotics and Intelligent Systems 20

Page 21: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 1” algorithm

• known direction to goal

• otherwise only local sensing

walls/obstacles encoders

1) head toward goal

2) if an obstacle is encountered,

circumnavigate it and remember

how close you get to the goal

Insect-inspired “bug” algorithms

Bug 1

CS-417 Introduction to Robotics and Intelligent Systems 21

Page 22: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 1” algorithm

• known direction to goal

• otherwise only local sensing

walls/obstacles encoders

1) head toward goal

2) if an obstacle is encountered,

circumnavigate it and remember

how close you get to the goal

3) return to that closest point (by

wall-following) and continue

Insect-inspired “bug” algorithms

Vladimir Lumelsky & Alexander Stepanov Algorithmica 1987

Bug 1

CS-417 Introduction to Robotics and Intelligent Systems 22

Page 23: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound:

Upper bound:

Bug 1 analysis

CS-417 Introduction to Robotics and Intelligent Systems 23

D

P1

P2

Page 24: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound: D

Upper bound:

Bug 1 analysis

CS-417 Introduction to Robotics and Intelligent Systems 24

D

P1

P2

Page 25: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound: D

Upper bound: D + 1.5 Pii

How good a bound?

How good an algorithm?

Bug 1 analysis

CS-417 Introduction to Robotics and Intelligent Systems 25

D

P1

P2

Page 26: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Bug Mapping

26CS-417 Introduction to Robotics and Intelligent Systems

Page 27: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 2” algorithmCall the line from the starting

point to the goal the s-line

A better bug?

CS-417 Introduction to Robotics and Intelligent Systems 27

Page 28: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 2” algorithmCall the line from the starting

point to the goal the s-line

1) head toward goal on the s-line

A better bug?

CS-417 Introduction to Robotics and Intelligent Systems 28

Page 29: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 2” algorithmCall the line from the starting

point to the goal the s-line

1) head toward goal on the s-line

2) if an obstacle is in the way,

follow it until encountering the s-

line again.

A better bug?

CS-417 Introduction to Robotics and Intelligent Systems 29

Page 30: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 2” algorithm

1) head toward goal on the s-line

2) if an obstacle is in the way,

follow it until encountering the s-

line again.

3) Leave the obstacle and continue

toward the goal

OK ?

s-line

A better bug?

CS-417 Introduction to Robotics and Intelligent Systems 30

Page 31: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

“Bug 2” algorithm

1) head toward goal on the s-line

2) if an obstacle is in the way,

follow it until encountering the s-

line again closer to the goal.

3) Leave the obstacle and continue

toward the goal

OK ?

A better bug?

CS-417 Introduction to Robotics and Intelligent Systems 31

Goal

Start

Page 32: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound:

Upper bound:

Bug 2 analysis

CS-417 Introduction to Robotics and Intelligent Systems 32

Goal

Start

Page 33: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound:

Upper bound:

Ni = number of s-line intersections

with the i th obstacle

Bug 2 analysis

CS-417 Introduction to Robotics and Intelligent Systems 33

Goal

Start

Page 34: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound: D

Upper bound:

Ni = number of s-line intersections

with the i th obstacle

Bug 2 analysis

CS-417 Introduction to Robotics and Intelligent Systems 34

Goal

Start

Page 35: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Distance Traveled What are bounds on the path

length that the robot takes?

Lower and upper bounds?

Available Information:

D = straight-line distance from start to goal

Pi = perimeter of the i th obstacle

Lower bound: D

Upper bound: D + 0.5 Ni Pi

Ni = number of s-line intersections

with the i th obstacle

i

Bug 2 analysis

CS-417 Introduction to Robotics and Intelligent Systems 35

Goal

Start

Page 36: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

head-to-head comparison

What are worlds in which Bug 2 does

better than Bug 1 (and vice versa) ?

Bug 2 beats Bug 1

or thorax-to-thorax, perhaps

Bug 1 beats Bug 2

CS-417 Introduction to Robotics and Intelligent Systems 36

Page 37: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

head-to-head comparison

What are worlds in which Bug 2 does

better than Bug 1 (and vice versa) ?

Bug 2 beats Bug 1

or thorax-to-thorax, perhaps

Bug 1 beats Bug 2

CS-417 Introduction to Robotics and Intelligent Systems 37

“zipper world”

Page 38: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Other bug-like algorithms

The Pledge maze-solving algorithm 1. Go to a wall

2. Keep the wall on your right

3. Continue until out of the maze

38CS-417 Introduction to Robotics and Intelligent Systems

Page 39: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Other bug-like algorithms

The Pledge maze-solving algorithm 1) Go to a wall

2) Keep the wall on your right

3) Continue until out of the maze

mazes of unusual origin

int a[1817];main(z,p,q,r){for(p=80;q+p-80;p=2*a[p])

for(z=9;z--;)q=3&(r=time(0)+r*57)/7,q=q?q-1?q-2?1-p%79?-

1:0:p%79-77?1:0:p<1659?79:0:p>158?-

79:0,q?!a[p+q*2]?a[p+=a[p+=q]=q]=q:0:0;for(;q++-

1817;)printf(q%79?"%c":"%c\n"," #"[!a[q-1]]);}

###############################################################################

# # ### # # # # # # # # # # # # # #

# # ####### ##### ##### # ####### # # ### ### # ##### ##### # ### ##### # ### #

# # # # # # # # # # # # # # # # # # # #

# ##### # # # # # # ##### ##### # ### ### # # # ### ### ### ##### # ### ##### #

# # # # # # # # # # # # # # # #

# # ### ##### ### ##### ##### ### # ### # # # # ### ##### ### ##### # ##### ###

# # # # # # # # # # # # # # # # # # # # # #

######### ##### # # # ########### ### ########### ### ##### ##### # # # ### # #

# # # # # # # # # # # # # # # # # # # # # #

### ### ##### ####### ### # # ### # # # # ##### # # ##### # # # ### # # ##### #

# # # # # # # # # # ### # # # # # # # # #

### # ### # ##### ### # ##### # # # ##### ##### ### ### ####### # ##### # ### #

# # # # # # # # # # # # # # # # # # # # # # #

# # # ########### ### ### ### ####### # # ### # ####### ### ##### ### ### #####

# # # # # # # # # # # # # # # #

# # # ### ##### ##### # ####### # ### ####### ### # ### ####### ### ##### ### #

# # # # # # # # # # # # # # # # # # # # #

# # # ### ### ### # # # # ### # # # ### # ####### # # ####### # # # # # # ### #

# # # # # # # # # # # # # # # # # #

# # # # # ### ##### ####### # ##### # ##### ### ### # # # ### ##### ### # ### #

# # # # # # # ### # # # # # # # # # # # # #

###############################################################################

IOCCC random maze generator

discretized RRT39CS-417 Introduction to Robotics and Intelligent Systems

Page 40: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Tangent Bug

• Limited Range Sensor

• Tangent Bug relies on finding endpoints of finite, continues segments of the obstacles

40CS-417 Introduction to Robotics and Intelligent Systems

Page 41: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Tangent Bug

41CS-417 Introduction to Robotics and Intelligent Systems

Page 42: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Contact Sensor Tangent Bug

1. Robot moves toward goal until it hits obstacle 1 at H12. Pretend there is an infinitely small sensor range and the direction which

minimizes the heuristic is to the right3. Keep following obstacle until robot can go toward obstacle again4. Same situation with second obstacle5. At third obstacle, the robot turned left until it could not increase heuristic6. D_followed is distance between M3 and goal, d_reach is distance between

robot and goal because sensing distance is zero

42CS-417 Introduction to Robotics and Intelligent Systems

Page 43: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Limited Sensor Range Tangent-Bug

43CS-417 Introduction to Robotics and Intelligent Systems

Page 44: CS-417 Introduction to Robotics and Intelligent Systemsyiannis/417/2013/LectureSlides/09... ·  · 2013-10-23Path Planning Robot Map World CS-417 Introduction to Robotics and Intelligent

Infinite Sensor Range Tangent Bug

44CS-417 Introduction to Robotics and Intelligent Systems