1
10/29/14 Robotics 1
CS 403 - Path Planning
Roderic A. Grupen
10/29/14 Robotics 2
Why Motion Planning?
Virtual Prototyping !Character Animation!Structural Molecular Biology!Autonomous Control!
GE!
10/29/14 Robotics 3
Origins of Motion Planning
• T. Lozano-Pérez and M.A. Wesley: “An Algorithm for Planning Collision-Free Paths Among Polyhedral Obstacles,” 1979.!
• introduced the notion of configuration space (c-space) to robotics!
• many approaches have been devised since then in configuration space!
10/29/14 Robotics 4
Completeness of Planning Algorithms
a complete planner finds a path if one exists!!
resolution complete – complete to the model resolution!!
probabilistically complete!
2
Representation
…given a moving object, A, initially in an unoccupied region of freespace, s, a set of stationary objects, Bi , at known
locations, and a goal position, g, …!!
10/29/14 Robotics 5
find a sequence of !collision-free motions!
that take A from s to g !
6
Computing C-Space: Growing Obstacles
7
Sliding Along the Boundary
Workspace!
Configuration!Space!
How about changing θ ? 8
Translational Case (fixed orientation)
Robot!
Obstacle!
Reference Point!C-Space!Obstacle!
3
10/29/14 Robotics 9
Obstacles in 3D (x,y,q)
Jean-Claude Latombe!
Representation – Configuration Space
10/29/14 Robotics 10
10/29/14 Robotics 11
Exact Cell Decomposition
Jean-Claude Latombe!
10/29/14 Robotics 12
Exact Cell Decomposition
Jean-Claude Latombe!
4
10/29/14 Robotics 13
Exact Cell Decomposition
Jean-Claude Latombe!
Representation – Simplicial Decomposition
10/29/14 Robotics 14
Schwartz and Sharir Lozano-Perez Canny
10/29/14 Robotics 15
Approximate Methods: 2n-Tree
10/29/14 Robotics 16
Approximate Cell Decomposition
Jean-Claude Latombe!
again…build a graph and search it to find a path!
5
Representation – Roadmaps
10/29/14 Robotics 17
Visibility diagrams:
unsmooth sensitive to error
10/29/14 Robotics 18
Roadmap Representations
Jean-Claude Latombe!
Voronoi diagrams
a “retraction”
…the continuous freespace is represented as
a network of curves…
10/29/14 Robotics 19
Summary
• Exact Cell Decomposition!• Approximate Cell Decomposition!
! graph search !! next: potential field methods!
• Roadmap Methods!• visibility graphs!• Voronoi diagrams!• next: probabilistic road maps (PRM)!
state of the art techniques
20
Attractive Potential Fields
+
-
6
21
Repulsive Potentials
+
-
-
22
Electrostatic (or Gravitational) Field
depends on!direction!
23
Attractive Potential
Fatt (q) = −∇φatt (q)= −k (q− qref )
φatt (q) =12k (q− qref )
T (q− qref )
24
A Repulsive Potential
Frep(q) =1x
Frep(q) =1x−1δ0
7
10/29/14 Robotics 25
Repulsive Potential
Frep (q) = −∇φ(q)
=−k 1
(q− qobs )−1δ0
#
$%%
&
'(( if ((q− qobs ) < δ0
0 otherwise
)
*+
,+
-
.+
/+
φrep (q) = k1
(q− qobst )−1δ0
!
"##
$
%&&
2
if ((q− qobs ) < δ0
= 0 otherwise
26
Sum Attractive and Repulsive Fields
27
Artificial Potential Function
+! =!
Ftotal (q) = −∇φtotal
φatt (q) + φrep(q) = φtotal (q)
10/29/14 Robotics 28
Potential Fields
● Goal: avoid local minima ● Problem: requires global information ● Solution: Navigation Function
Robot!
Obstacle!
Goal!
Fatt!
Frep!
Fatt!
Frep!
8
Navigation Functions
Analyticity – navigation functions are analytic because they are infinitely differentiable and their Taylor series converge to φ(q0) as q approaches q0!!Polar – gradients (streamlines) of navigation functions terminate at a unique minima!
10/29/14 Robotics 29
Navigation Functions
10/29/14 Robotics 30
Morse - navigation functions have no degenerate critical points where the robot can get stuck short of attaining the goal. Critical points are places where the gradient of φ vanishes, i.e. minima, saddle points, or maxima and their images under φ are called critical values. !
Admissibility - practical potential fields must always generate bounded torques !
The Hessian
multivariable control function, f(q0,q1,...,qn) !
10/29/14 Robotics 31
if the Hessian is positive semi-definite over! the domain Q, then the function f is convex over Q!
Harmonic Functions
10/30/14 Robotics 32
if the trace of the Hessian (the Laplacian) is 0!
then function f is a harmonic function !
laminar fluid flow, steady state temperature distribution, electromagnetic fields, current flow in conductive media !
9
Properties of Harmonic Functions
10/29/14 Robotics 33
Min-Max Property -!...in any compact neighborhood of freespace, the minimum and maximum of the function must occur on the boundary. !
!
Properties of Harmonic Functions
10/30/14 Robotics 34
Mean-Value - up to truncation error, the value of the harmonic potential at a point in a lattice is the average of the values of its 2n Manhattan neighbors.
¼ ¼ ¼
¼
analog & numerical methods!
Numerical Relaxation
10/29/14 Robotics 35
Jacobi iteration!
10/30/14 Robotics 36
Harmonic Relaxation: Numerical Methods
Gauss-Seidel
Successive Over Relaxation
10
Properties of Harmonic Functions
10/29/14 Robotics 37
Hitting Probabilities - if we denote p(x) at state x as!the probability that starting from x, a random walk process will reach an obstacle before it reaches a goal—p(x) is known as the hitting probability !!greedy descent on the harmonic function minimizes
the hitting probability. !
Minima in Harmonic Functions
10/29/14 Robotics 38
for some i, if ∂2φ/∂xi2 > 0 (concave upward), then
there must exist another dimension, j, where !∂2φ/∂xj
2 < 0 to satisfy Laplace’s constraint. !
therefore, if you’re not at a goal, there is always a way downhill... ...there are no local minima... !
Configuration Space
10/29/14 Robotics 39
Harmonic Functions for Path Planning
10/29/14 Robotics 40
11
Harmonic Functions for Path Planning
10/29/14 Robotics 41
Harmonic Functions for Path Planning
10/30/14 Robotics 42
Reactive Admittance Control
10/29/14 Robotics 43 10/30/14 Robotics 44
ok, back to graphical methods…
12
10/29/14 Robotics 45
Probabilistic Roadmaps (PRM)
● Construction!– Generate random configurations!– Eliminate if they are in collision!– Use local planner to connect configurations!
● Expansion!– Identify connected components!– Resample gaps!– Try to connect components!
● Query!– Connect initial and final configuration to roadmap!– Perform graph search!
10/29/14 Robotics 46
Probabilistic Roadmaps (PRM)
10/29/14 Robotics 47
Complexity of Collision Detection
• n objects have O(n2) interactions!• each object has perhaps thousands of features!• robot with l links and k obstacles has O(l k) !
very costly !
10/29/14 Robotics 48
Sampling Phase
● Construction!– R = (V,E)!– repeat n times:!
– generate random configuration!– add to V if collision free!– attempt to connect to neighbors using local planner,
unless in same connected component of R!
13
10/29/14 Robotics 49
Path Extraction
● Connect start and goal configuration to roadmap using local planner!
● Perform graph search on roadmap!● Computational cost of querying negligible
compared to construction of roadmap!
10/29/14 Robotics 50
Neighbors
● Use distance metric to determine neighbor!● Euclidean distance often used!● Others possible:!
– maximum Euclidean distance!– maximum joint difference!
!
10/29/14 Robotics 51
Local Planner
q1
q2
tests up to a specified resolution δ!
δ
10/29/14 Robotics 52
Another Local Planner
perform random walk of predetermined length; choose new direction randomly after hitting obstacle; attempt to connect to roadmap after random walk
14
10/29/14 Robotics 53
Another Look at the Sampling Phase
● Construction – R = (V,E) – repeat n times:
– generate random configuration – add to V if collision free – attempt to connect to neighbors using local planner,
unless in same connected component of R
● Expansion – repeat k times:
– select difficult node – attempt to connect to neighbors using another local
planner
10/29/14 Robotics 54
Difficult
● Possible measures for difficulty of a configuration (vertex in R): – 1/(# of nodes within given distance) – 1/distance to closest connected
components – # of failures of local planner to connect to
neighbors
10/29/14 Robotics 55
Summary: PRM
• Algorithmically very simple!• Surprisingly efficient even in high-dimensional C-
spaces!• Capable of addressing a wide variety of motion
planning problems!• One of the hottest areas of research!• Allows probabilistic performance guarantees!
10/29/14 Robotics 56
C-Space Construction for n DOF
!• 6 revolute degrees of freedom (e.g. Puma)!• 2p range of motion per joint!• 2 x 1015 configurations!• 1 million checks per second!• 69 years of computation!
naïve grid method is impossible!
15
10/29/14 Robotics 57
Summary
• Control!• Kinematics!• Dynamics!• Planning!
… but there is more …!
now you understand and can program any robot
10/29/14 Robotics 58
Variations of the PRM
• Lazy PRMs!
• Rapidly-exploring Random Trees!
10/29/14 Robotics 59
Lazy PRM
observation: pre-computation of roadmap takes a long time and does not respond well in dynamic
environments!
10/29/14 Robotics 60
Lazy PRM
16
10/29/14 Robotics 61
Lazy PRM
• Incremental roadmap computation!
• Individual query slower than query with PRM!
• pre-computation eliminated!
• minimize number of distance computations!
• controllable computational expense!
10/29/14 Robotics 62
Lazy PRM
• Average planning time of 289 seconds for previous example!
!• Expansion phase can be included in case of failure!• Resampling difficult areas!
10/29/14 Robotics 63
PRM Limits Local Planners
consider car-like robot:!• connecting configurations might be difficult!• Goal: provide probabilistic method for kinematic
and dynamic constraints!• Car-like!• Satellite!• Plane!
• Idea: Let local planner choose configurations!
10/29/14 Robotics 64
Rapidly-Exploring Random Trees (RRT)
17
10/29/14 Robotics 65
Rapidly-Exploring Random Trees (RRT)
Steven LaValle!
10/29/14 Robotics 66
Kinodynamic Planning with RRT
• integrate local planners for!• Kinematic constraints!• Dynamic constraints!
• phase-space representation (position and velocity) !
• known dynamic model!
10/29/14 Robotics 67
Motion Constraints
● So far: – Robot with 2/3 DOF – Translating freely – Rotation and translation independent
● But: – Oftentimes motion of robots has constraints – Kinematic: car – Dynamic: actuation limitations, traction
10/29/14 Robotics 68
Nonholonomic Motion: Car-like Robot
Jean-Claude Latombe!