Autonomous Mobile Manipulation
Planning: Graph-based, Dijkstra, A*
C. Papachristos
Robotic Workers (RoboWork) Lab
University of Nevada, Reno
CS-791
Graph-based Planning
Planning with Graphs !
CS791 C. Papachristos
Graph-based Planning
CS791 C. Papachristos
Graph-based Planning
Graph Search
CS791 C. Papachristos
Graph-based Planning
Search Trees
Notes:
CS791 C. Papachristos
Graph-based Planning
Forward Search
CS791 C. Papachristos
Graph-based Planning
Forward Search – Seminal Algorithm Structure
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ B }
{ B }
Q.Insert ( B ) R.Insert( B )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ A, C, G }
{ B, A, C, G }
Q.Pop ( B )
Q.Insert ( A ) R.Insert( A )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( G ) R.Insert( G )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ C, G, D }
{ B, A, C, G, D }
Q.Pop ( A )
Q.Insert ( B ) R.Insert( B )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( D ) R.Insert( D )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ G, D, I }
{ B, A, C, G, D, I}
Q.Pop ( C )
Q.Insert ( A ) R.Insert( A )
Q.Insert ( B ) R.Insert( B )
Q.Insert ( G ) R.Insert( G )
Q.Insert ( D ) R.Insert( D )
Q.Insert ( I ) R.Insert( I )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ D, I }
{ B, A, C, G, D, I}
Q.Pop ( G )
Q.Insert ( B ) R.Insert( B )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( I ) R.Insert( I )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ I, J }
{ B, A, C, G, D, I, J}
Q.Pop ( D )
Q.Insert ( A ) R.Insert( A )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( I ) R.Insert( I )
Q.Insert ( J ) R.Insert( J )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ J }
{ B, A, C, G, D, I, J}
Q.Pop ( I )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( D ) R.Insert( D )
Q.Insert ( G ) R.Insert( G )
Q.Insert ( J ) R.Insert( J )
front … end
CS791 C. Papachristos
Graph-based Planning
Breadth-First Search
Open (Q )
Visited ( R )
{ }
{ B, A, C, G, D, I, J}
Q.Pop ( J )
front … end
CS791 C. Papachristos
Graph-based Planning
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ B }
{ B }
Q.Insert ( B ) R.Insert( B )
top
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ A, C, G }
{ B, A, C, G }
Q.Pop ( B )
Q.Insert ( G ) R.Insert( G )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( A ) R.Insert( A )
top
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ D, C, G }
{ B, A, C, G, D }
Q.Pop ( A )
Q.Insert ( D ) R.Insert( D )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( B ) R.Insert( B )
top
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ I, J, C, G }
{ B, A, C, G, D, I, J }
Q.Pop ( D )
Q.Insert ( J ) R.Insert( J )
Q.Insert ( I ) R.Insert( I )
Q.Insert ( C ) R.Insert( C )
Q.Insert ( A ) R.Insert( A )
top
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ J, C, G }
{ B, A, C, G, D, I, J }
Q.Pop ( I )
Q.Insert ( J ) R.Insert( J )
Q.Insert ( G ) R.Insert( G )
Q.Insert ( D ) R.Insert( D )
Q.Insert ( C ) R.Insert( C )
top
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
Open (Q )
Visited ( R )
{ C, G }
{ B, A, C, G, D, I, J }
Q.Pop ( J )
top
CS791 C. Papachristos
Graph-based Planning
Search Trees
CS791 C. Papachristos
Graph-based Planning
Depth-First Search
CS791 C. Papachristos
Graph-based Planning
Non-uniform edge weights
But:
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ B(0) }
{ B(0) }
Q.Insert ( B(0) ) R.Insert( B(0) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ C(2) ,
G(3) ,
A(5) }
{ B(0) ,
C(2) ,
G(3) ,
A(5) }
Q.Pop ( B(0) )
Q.Insert ( C(2) ) R.Insert( C(2) )
Q.Insert ( G(3) ) R.Insert( G(3) )
Q.Insert ( A(5) ) R.Insert( A(5) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3) ,
A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(5) ,
D(4) ,
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( G(7) )
A(4)
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3) ,
A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(5) ,
D(4) ,
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( G(7) )
s
u
v
u.d
v.d
w(u, v)
A(4)
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3) ,
A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( G(7) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3),
A(4),
D(4),
A(5),
I(7) }
{ B(0),
C(2),
G(3),
A(4),
D(4),
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( I(7) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3) ,
A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( I(7) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ G(3) ,
A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) }
Q.Pop ( C(2) )
Q.Insert ( A(4) ) R.Insert( A(4) )
Q.Insert ( D(4) ) R.Insert( D(4) )
Q.Insert ( G(4) ) R.Insert( G(4) )
Q.Insert ( I(7) ) R.Insert( I(7) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ A(4) ,
D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) }
Q.Pop ( G(3) )
Q.Insert ( B(6) ) R.Insert( B(6) )
Q.Insert ( C(5) ) R.Insert( C(5) )
Q.Insert ( I(8) ) R.Insert( I(8) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ D(4) ,
A(5) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) }
Q.Pop ( A(4) )
Q.Insert ( B(5) ) R.Insert( B(5) )
Q.Insert ( C(7) ) R.Insert( C(7) )
Q.Insert ( D(8) ) R.Insert( D(8) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ A(5) ,
I(5) ,
J(6) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(7) ,
J(6) }
Q.Pop ( D(4) )
Q.Insert ( A(7) ) R.Insert( A(7) )
Q.Insert ( C(6) ) R.Insert( C(6) )
Q.Insert ( I(5) ) R.Insert( I(5) )
Q.Insert ( J(6) ) R.Insert( J(6) )
I(5)
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ I(5) ,
J(6) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(5) ,
J(6) }
Q.Pop ( A(5) )
Continue
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ J(6) ,
I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(5) ,
J(6) }
Q.Pop ( I(5) )
Q.Insert ( C(10) ) R.Insert( C(10) )
Q.Insert ( D(6) ) R.Insert( D(6) )
Q.Insert ( G(10) ) R.Insert( G(10) )
Q.Insert ( J(8) ) R.Insert( J(8) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
Open (Q )
Closed (R )
{ I(7) }
{ B(0) ,
C(2) ,
G(3) ,
A(4) ,
D(4) ,
I(5) ,
J(6) }
Path B-C-D-J with cost 6
Q.Pop ( J(6) )
CS791 C. Papachristos
Graph-based Planning
Dijkstra’s Algorithm
But
CS791 C. Papachristos
Graph-based Planning
Cost-to-arrive
Heuristic Cost-to-goal
CS791 C. Papachristos
Graph-based Planning
CS791 C. Papachristos
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ B(0) }
{ B(0) }
1
CS791 C. Papachristos
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ C(2+3=5),
G(3+5=8),
A(5+5=10) }
{ B(0),
C(5),
G(8),
A(10) }
1
A(10)
C(8)
G(8)
CS791 C. Papachristos
5
3
5
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ G(8),
A(4+5=9),
A(10) }
{ B(0),
C(5),
G(8),
A(10) }
1
A(9)
A(9)
CS791 C. Papachristos
5
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ D(4+2=6),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6) }
1
D(6)
CS791 C. Papachristos
2
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ D(6),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6) }
1
G(9)
CS791 C. Papachristos
5
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ D(6),
I(8),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6),
I(8) }
1
I(7)
CS791 C. Papachristos
1
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ I(8),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6),
I(8) }
1
A(12)
CS791 C. Papachristos
5
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ I(6),
I(8),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6),
I(6) }
1
I(6)
CS791 C. Papachristos
1
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ J(6),
I(6),
I(8),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6),
I(6),
J(6) }
1
J(6)
CS791 C. Papachristos
Graph-based Planning
A* Algorithm
Open (Q )
Closed (R )
{ I(6),
I(8),
G(8),
A(9),
A(10) }
{ B(0),
C(5),
G(8),
A(9),
D(6),
I(6),
J(6) }
Path B-C-D-J with cost 6
1
CS791 C. Papachristos
Graph-based Planning
A* Algorithm
Best-First Search:
CS791 C. Papachristos
Graph-based Planning
In Motion Planning:
Limitations:
CS791 C. Papachristos
Dynamic Environment Planning
Dynamic Environments
CS791 C. Papachristos
Dynamic Environment Planning
Potential Fields
CS791 C. Papachristos
Dynamic Environment Planning
Global Potential Function
Conic potential farther (slower growth)
CS791 C. Papachristos
Dynamic Environment Planning
Global Potential Function
Grad: Vector field whose value at a point x is the vector whose components are the partial derivatives of U
CS791 C. Papachristos
Dynamic Environment Planning
Obstacle Potential
CS791 C. Papachristos
Dynamic Environment Planning
Obstacle Potential
CS791 C. Papachristos
Dynamic Environment Planning
Potential Fields
CS791 C. Papachristos
Dynamic Environment Planning
Potential Fields
But
CS791 C. Papachristos
Time for Questions !
CS-791
CS791 C. Papachristos