Search-based Planning with Motion Primitives Maxim Likhachev - - PowerPoint PPT Presentation

search based planning with motion primitives
SMART_READER_LITE
LIVE PREVIEW

Search-based Planning with Motion Primitives Maxim Likhachev - - PowerPoint PPT Presentation

Search-based Planning with Motion Primitives Maxim Likhachev Carnegie Mellon University What is Search-based Planning generate a graph representation of the planning problem search the graph for a solution can interleave the


slide-1
SLIDE 1

Search-based Planning with Motion Primitives

Maxim Likhachev Carnegie Mellon University

slide-2
SLIDE 2

Maxim Likhachev 2

  • generate a graph representation of the planning problem
  • search the graph for a solution
  • can interleave the construction of the representation with the search (i.e., construct only

what is necessary)

What is Search-based Planning

Carnegie Mellon University

motion primitives construct the graph: search the graph for solution:

lattice-based graph representation for 3D (x,y,θ) planning:

discretize: construct the graph: search the graph for solution:

2D grid-based graph representation for 2D (x,y) search-based planning:

slide-3
SLIDE 3

Maxim Likhachev 3

  • http://www.ros.org/wiki/sbpl
  • SBPL is:
  • a library of domain-independent graph searches
  • a library of environments (planning problems) that represent the problems as graph search

problems

  • designed to be so that the same graph searches can be used to solve a variety of

environments (graph searches and environments are independent of each other)

  • a standalone library that can be used with or without ROS and under linux or windows

Search-based Planning Library (SBPL)

Carnegie Mellon University

Domain-independent graph search Environment defining the planning problem as a graph

slide-4
SLIDE 4

Maxim Likhachev 4

  • http://www.ros.org/wiki/sbpl
  • SBPL can be used to:
  • implement particular planning modules such as x,y,θ planning and arm motion planning

modules within ROS

  • design and drop-in new environments (planning problems) that represent the problem as a

graph search and can therefore use existing graph searches to solve them

  • design and drop-in new graph searches and test their performance on existing

environments

Search-based Planning Library (SBPL)

Carnegie Mellon University

Domain-independent graph search Environment defining the planning problem as a graph

Planning module

  • receives map, pose and goal updates
  • updates environment (graph)
  • calls graph search to re-plan
slide-5
SLIDE 5

Maxim Likhachev 5

  • Currently implemented graph searches within SBPL:
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (hybrid between deterministic searches and sampling-

based planning)

  • Currently implemented environments (planning problems) within SBPL:
  • 2D (x,y) grid-based planning problem
  • 3D (x,y,θ) lattice-based planning problem
  • 3D (x,y,θ) lattice-based planning problem with 3D (x,y,z) collision checking
  • N-DOF planar robot arm planning problem
  • ROS packages that use SBPL:
  • SBPL lattice global planner for (x,y,θ) planning for navigation
  • SBPL cart planner for PR2 navigating with a cart
  • SBPL motion planner for PR2 arm motions
  • default move_base invokes SBPL lattice global planner as part of escape behavior
  • Unreleased ROS packages and other planning modules that use SBPL:
  • SBPL door planning module for PR2 opening and moving through doors
  • SBPL planning module for navigating in dynamic environments
  • 4D planning module for aerial vehicles (x,y,z,θ)

Search-based Planning Library (SBPL)

Carnegie Mellon University

slide-6
SLIDE 6

Maxim Likhachev 6

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-7
SLIDE 7

Maxim Likhachev 7

  • Problems with (very popular) pure grid-based planning

Lattice-based Graphs for Navigation

Carnegie Mellon University

discretize: construct the graph: search the graph for solution:

2D grid-based graph representation for 2D (x,y) search-based planning:

sharp turns do not incorporate the kinodynamics constraints of the robot

slide-8
SLIDE 8

Maxim Likhachev 8

  • Problems with (very popular) pure grid-based planning

Lattice-based Graphs for Navigation

Carnegie Mellon University

discretize: construct the graph: search the graph for solution:

2D grid-based graph representation for 2D (x,y) search-based planning:

3D-grid (x,y,θ) would help a bit but won’t resolve the issue

slide-9
SLIDE 9

Maxim Likhachev Carnegie Mellon University 9

Lattice-based Graphs for Navigation

  • Graphs constructed using motion primitives [Pivtoraiko & Kelly, ‘05]

set of motion primitives pre-computed for each robot orientation (action template) replicate it

  • nline

by translating it each transition is feasible (constructed beforehand)

  • utcome state is the center of the corresponding cell in the underlying (x,y,θ,…) cell
slide-10
SLIDE 10

Maxim Likhachev Carnegie Mellon University 10

Lattice-based Graphs for Navigation

  • Graphs constructed using motion primitives [Pivtoraiko & Kelly, ‘05]
  • pros: sparse graph, feasible paths, can incorporate a variety of constraints
  • cons: possible incompleteness

set of motion primitives pre-computed for each robot orientation (action template) replicate it

  • nline

by translating it

slide-11
SLIDE 11

Maxim Likhachev Carnegie Mellon University 11

Lattice-based Graphs for Navigation

  • Graphs constructed using motion primitives [Pivtoraiko & Kelly, ‘05]
  • pros: sparse graph, feasible paths, can incorporate a variety of constraints
  • cons: possible incompleteness

planning on 4D (<x,y,orientation,velocity>) multi-resolution lattice using Anytime D* [Likhachev & Ferguson, ‘09] part of efforts by Tartanracing team from CMU for the Urban Challenge 2007 race

slide-12
SLIDE 12

Maxim Likhachev Carnegie Mellon University 12

Lattice-based Graphs for Navigation

  • Graphs constructed using motion primitives [Pivtoraiko & Kelly, ‘05]
  • pros: sparse graph, feasible paths, can incorporate a variety of constraints
  • cons: possible incompleteness

planning in 8D (foothold planning) lattice-based graph for quadrupeds [Vernaza et al.,’09] using R* search [Likhachev & Stentz, ‘08]

slide-13
SLIDE 13

Maxim Likhachev Carnegie Mellon University 13

Lattice-based Graphs for Navigation

  • 3D (x,y,θ) lattice-based graph representation (environment_navxythetalat.h/cpp in SBPL)
  • takes set of motion primitives as input (.mprim files generated within matlab/mprim directory

using corresponding matlab scripts):

  • takes the footprint of the robot defined as a polygon as input

unicycle model or unicycle with sideways motions or …

slide-14
SLIDE 14

Maxim Likhachev Carnegie Mellon University 14

Lattice-based Graphs for Navigation

  • 3D (x,y,θ) lattice-based graph representation for 3D (x,y,z) spaces

(environment_navxythetamlevlat.h/cpp in SBPL)

  • takes set of motion primitives as input
  • takes N footprints of the robot defined as polygons as input.
  • each footprint corresponds to the projection of a part of the body onto x,y plane.
  • collision checking/cost computation is done for each footprint at the corresponding projection of

the 3D map

slide-15
SLIDE 15

Maxim Likhachev Carnegie Mellon University 15

Graph Representation for Cart Planning

[Scholz, Marthi, Chitta & Likhachev, in submission]

  • 3D (x,y,θ,θcart) lattice-based graph representation (in a separate Cart Planner package)
  • takes set of motion primitives feasible for the coupled robot-cart system as input (arm motions

generated via IK)

  • takes footprints of the robot and the cart defined as polygons as input
slide-16
SLIDE 16

Maxim Likhachev Carnegie Mellon University 16

Graph Representation for Arm Planning

[Cohen, Chitta & Likhachev, ICRA’10; Cohen et al., in submission]

  • 7D (joint angles) lattice-based graph representation (in a separate SBPL Arm Planner package)
  • takes set of motion primitives defining joint angle changes as input
  • takes joint angle limits and link widths
  • goal is a 6 DoF pose for the end-effector
slide-17
SLIDE 17

Maxim Likhachev Carnegie Mellon University 17

Graph Representation for Door Opening Planning

[Chitta, Cohen & Likhachev, ICRA’10]

  • 4D (x,y,θ,door interval) graph representation (in a separate SBPL Door Planner package)
  • takes set of motion primitives defining feasible x,y, θ,door angles in the door frame as input
  • goal is for the door to be fully open
  • suitable for pushing/pulling doors
slide-18
SLIDE 18

Maxim Likhachev 18

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-19
SLIDE 19

Maxim Likhachev 19

S2 S1 Sgoal 2 2 S4 S3 3 1 Sstart 1 1

Searching Graphs

  • Once a graph is given (defined by environment file in SBPL), we

need to search it for a path that minimizes cost as much as possible

Carnegie Mellon University

slide-20
SLIDE 20

Maxim Likhachev 20

  • Many searches work by computing optimal g-values for

relevant states

– g(s) – an estimate of the cost of a least-cost path from sstart to s – optimal values satisfy: g(s) = mins’’ pred(s) g(s’’) + c(s’’,s)

S2 S1 Sgoal 2 g=1 g=3 g=5 2 S4 S3 3 g=2 g=5 1 Sstart 1 1 g=0 the cost c(s1,sgoal) of an edge from s1 to sgoal

Searching Graphs

Carnegie Mellon University

slide-21
SLIDE 21

Maxim Likhachev 21

  • Many searches work by computing optimal g-values for

relevant states

– g(s) – an estimate of the cost of a least-cost path from sstart to s – optimal values satisfy: g(s) = mins’’ pred(s) g(s’’) + c(s’’,s)

S2 S1 Sgoal 2 g=1 g=3 g=5 2 S4 S3 3 g=2 g=5 1 Sstart 1 1 g=0 the cost c(s1,sgoal) of an edge from s1 to sgoal

Searching Graphs

Carnegie Mellon University

slide-22
SLIDE 22

Maxim Likhachev 22

  • Least-cost path is a greedy path computed by backtracking:

– start with sgoal and from any state s move to the predecessor state s’ such that

)) , ' ' ( ) ' ' ( ( min arg '

) ( ' '

s s c s g s

s pred s

 

S2 S1 Sgoal 2 g=1 g=3 g=5 2 S4 S3 3 g=2 g=5 1 Sstart 1 1 g=0

Searching Graphs

Carnegie Mellon University

slide-23
SLIDE 23

Maxim Likhachev 23

  • Computes optimal g-values for relevant states

h(s) g(s)

Sstart S S2 S1 Sgoal

the cost of a shortest path from sstart to s found so far an (under) estimate of the cost

  • f a shortest path from s to sgoal

at any point of time:

A* Search

Carnegie Mellon University

slide-24
SLIDE 24

Maxim Likhachev 24

  • Computes optimal g-values for relevant states

h(s) g(s)

Sstart S S2 S1 Sgoal

at any point of time:

A* Search

heuristic function

  • ne popular heuristic function – Euclidean distance

Carnegie Mellon University

slide-25
SLIDE 25

Maxim Likhachev 25

  • Heuristic function must be:

– admissible: for every state s, h(s) ≤ c*(s,sgoal) – consistent (satisfy triangle inequality):

h(sgoal,sgoal) = 0 and for every s≠sgoal, h(s) ≤ c(s,succ(s)) + h(succ(s))

– admissibility follows from consistency and often consistency follows from admissibility

A* Search

minimal cost from s to sgoal

Carnegie Mellon University

slide-26
SLIDE 26

Maxim Likhachev 26

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; expand s; Main function g(sstart) = 0; all other g-values are infinite; OPEN = {sstart}; ComputePath(); publish solution;

S2 S1 Sgoal 2 g= h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

set of candidates for expansion for every expanded state g(s) is optimal

(if heuristics are consistent)

A* Search

Carnegie Mellon University

slide-27
SLIDE 27

Maxim Likhachev 27

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; expand s;

S2 S1 Sgoal 2 g= h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

A* Search

Carnegie Mellon University

slide-28
SLIDE 28

Maxim Likhachev 28

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

S2 S1 Sgoal 2 g= h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

set of states that have already been expanded tries to decrease g(s’) using the found path from sstart to s

A* Search

Carnegie Mellon University

slide-29
SLIDE 29

Maxim Likhachev 29

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {} OPEN = {sstart} next state to expand: sstart

S2 S1 Sgoal 2 g= h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

A* Search

Carnegie Mellon University

slide-30
SLIDE 30

Maxim Likhachev 30

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {} OPEN = {sstart} next state to expand: sstart

g(s2) > g(sstart) + c(sstart,s2)

S2 S1 Sgoal 2 g= h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

A* Search

Carnegie Mellon University

slide-31
SLIDE 31

Maxim Likhachev 31

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

A* Search

Carnegie Mellon University

slide-32
SLIDE 32

Maxim Likhachev 32

  • Computes optimal g-values for relevant states

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {sstart} OPEN = {s2} next state to expand: s2

S2 S1 Sgoal 2 g=1 h=2 g=  h=1 g=  h=0 2 S4 S3 3 g=  h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

A* Search

Carnegie Mellon University

slide-33
SLIDE 33

Maxim Likhachev 33

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g=  h=0 2 S4 S3 3 g= 2 h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {sstart,s2} OPEN = {s1,s4} next state to expand: s1

A* Search

Carnegie Mellon University

slide-34
SLIDE 34

Maxim Likhachev 34

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g=  h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {sstart,s2,s1} OPEN = {s4,sgoal} next state to expand: s4

A* Search

Carnegie Mellon University

slide-35
SLIDE 35

Maxim Likhachev 35

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {sstart,s2,s1,s4} OPEN = {s3,sgoal} next state to expand: sgoal

A* Search

Carnegie Mellon University

slide-36
SLIDE 36

Maxim Likhachev 36

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

CLOSED = {sstart,s2,s1,s4,sgoal} OPEN = {s3} done

A* Search

Carnegie Mellon University

slide-37
SLIDE 37

Maxim Likhachev 37

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

for every expanded state g(s) is optimal for every other state g(s) is an upper bound we can now compute a least-cost path

A* Search

Carnegie Mellon University

slide-38
SLIDE 38

Maxim Likhachev 38

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

for every expanded state g(s) is optimal for every other state g(s) is an upper bound we can now compute a least-cost path

A* Search

Carnegie Mellon University

slide-39
SLIDE 39

Maxim Likhachev 39

  • Computes optimal g-values for relevant states

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

ComputePath function while(sgoal is not expanded) remove s with the smallest [f(s) = g(s)+h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s such that s’ not in CLOSED if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN;

for every expanded state g(s) is optimal for every other state g(s) is an upper bound we can now compute a least-cost path

A* Search

Carnegie Mellon University

slide-40
SLIDE 40

Maxim Likhachev 40

  • Is guaranteed to return an optimal path (in fact, for every

expanded state) – optimal in terms of the solution

  • Performs provably minimal number of state expansions

required to guarantee optimality – optimal in terms of the computations

S2 S1 Sgoal 2 g=1 h=2 g= 3 h=1 g= 5 h=0 2 S4 S3 3 g= 2 h=2 g= 5 h=1 1 Sstart 1 1 g=0 h=3

A* Search

Carnegie Mellon University

slide-41
SLIDE 41

Maxim Likhachev 41

  • A* Search: expands states in the order of f = g+h values
  • Dijkstra’s: expands states in the order of f = g values (pretty

much)

  • Intuitively: f(s) – estimate of the cost of a least cost path

from start to goal via s

Effect of the Heuristic Function

h(s) g(s)

Sstart S S2 S1 Sgoal

the cost of a shortest path from sstart to s found so far an (under) estimate of the cost

  • f a shortest path from s to sgoal

Carnegie Mellon University

slide-42
SLIDE 42

Maxim Likhachev 42

  • A* Search: expands states in the order of f = g+h values
  • Dijkstra’s: expands states in the order of f = g values (pretty

much)

  • Weighted A*: expands states in the order of f = g+εh

values, ε > 1 = bias towards states that are closer to goal

Effect of the Heuristic Function

h(s) g(s)

Sstart S S2 S1 Sgoal

the cost of a shortest path from sstart to s found so far an (under) estimate of the cost

  • f a shortest path from s to sgoal

Carnegie Mellon University

slide-43
SLIDE 43

Maxim Likhachev Carnegie Mellon University 43

Effect of the Heuristic Function

sgoal sstart

  • Dijkstra’s: expands states in the order of f = g values
slide-44
SLIDE 44

Maxim Likhachev University of Pennsylvania 44

Effect of the Heuristic Function

sgoal sstart

  • A* Search: expands states in the order of f = g+h values
slide-45
SLIDE 45

Maxim Likhachev University of Pennsylvania 45

Effect of the Heuristic Function

sgoal sstart

  • A* Search: expands states in the order of f = g+h values

for large problems this results in A* quickly running out of memory (memory: O(n))

slide-46
SLIDE 46

Maxim Likhachev 46

Effect of the Heuristic Function

  • Weighted A* Search: expands states in the order of f =

g+εh values, ε > 1 = bias towards states that are closer to goal sstart sgoal

key to finding solution fast: shallow minima for h(s)-h*(s) function

Carnegie Mellon University

slide-47
SLIDE 47

Maxim Likhachev 47

Effect of the Heuristic Function

  • Weighted A* Search:

– trades off optimality for speed – ε-suboptimal: cost(solution) ≤ ε·cost(optimal solution) – in many domains, it has been shown to be orders of magnitude faster than A* – research becomes to develop a heuristic function that has shallow local minima

Carnegie Mellon University

slide-48
SLIDE 48

Maxim Likhachev 48

Effect of the Heuristic Function

  • Weighted A* Search:

– trades off optimality for speed – ε-suboptimal: cost(solution) ≤ ε·cost(optimal solution) – in many domains, it has been shown to be orders of magnitude faster than A* – research becomes to develop a heuristic function that has shallow local minima

Carnegie Mellon University

slide-49
SLIDE 49

Maxim Likhachev 49

Effect of the Heuristic Function

  • Constructing anytime search based on weighted A*:
  • find the best path possible given some amount of time for planning
  • do it by running a series of weighted A* searches with decreasing ε:

ε =2.5

13 expansions solution=11 moves

ε =1.5

15 expansions solution=11 moves

ε =1.0

20 expansions solution=10 moves

Carnegie Mellon University

slide-50
SLIDE 50

Maxim Likhachev 50

Effect of the Heuristic Function

  • Constructing anytime search based on weighted A*:
  • find the best path possible given some amount of time for planning
  • do it by running a series of weighted A* searches with decreasing ε:

ε =2.5

13 expansions solution=11 moves

ε =1.5

15 expansions solution=11 moves

ε =1.0

20 expansions solution=10 moves

  • Inefficient because

–many state values remain the same between search iterations –we should be able to reuse the results of previous searches

Carnegie Mellon University

slide-51
SLIDE 51

Maxim Likhachev 51

Effect of the Heuristic Function

  • Constructing anytime search based on weighted A*:
  • find the best path possible given some amount of time for planning
  • do it by running a series of weighted A* searches with decreasing ε:

ε =2.5

13 expansions solution=11 moves

ε =1.5

15 expansions solution=11 moves

ε =1.0

20 expansions solution=10 moves

  • ARA* [Likhachev, Gordon & Thrun, ‘04]
  • an efficient version of the above that reuses state values within any search iteration
  • uses incremental version of A*

Carnegie Mellon University

slide-52
SLIDE 52

Maxim Likhachev Carnegie Mellon University 52

Other Motivation for Incremental A*

  • Reuse state values from previous searches

cost of least-cost paths to sgoal initially cost of least-cost paths to sgoal after the door turns out to be closed

slide-53
SLIDE 53

Maxim Likhachev Carnegie Mellon University 53

Other Motivation for Incremental A*

  • Reuse state values from previous searches

cost of least-cost paths to sgoal initially cost of least-cost paths to sgoal after the door turns out to be closed

These costs are optimal g-values if search is done backwards

slide-54
SLIDE 54

Maxim Likhachev Carnegie Mellon University 54

Other Motivation for Incremental A*

  • Reuse state values from previous searches

cost of least-cost paths to sgoal initially cost of least-cost paths to sgoal after the door turns out to be closed

These costs are optimal g-values if search is done backwards Can we reuse these g-values from one search to another? – incremental A*

slide-55
SLIDE 55

Maxim Likhachev Carnegie Mellon University 55

Use of Incremental A* in D* Lite [Koenig & Likhachev, ‘02]

  • Reuse state values from previous searches

initial search by backwards A* second search by backwards A* initial search by D* Lite second search by D* Lite

slide-56
SLIDE 56

Maxim Likhachev Carnegie Mellon University 56

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED; for every successor s’ of s if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); all v-values initially are infinite;

A* with Reuse of State Values

  • Alternative view of A*
slide-57
SLIDE 57

Maxim Likhachev Carnegie Mellon University 57

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED; all v-values initially are infinite; for every successor s’ of s if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); insert s’ into OPEN; v(s)=g(s);

v-value – the value of a state during its expansion (infinite if state was never expanded)

A* with Reuse of State Values

  • Alternative view of A*
slide-58
SLIDE 58

Maxim Likhachev Carnegie Mellon University 58

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)

all v-values initially are infinite; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

A* with Reuse of State Values

  • Alternative view of A*
slide-59
SLIDE 59

Maxim Likhachev Carnegie Mellon University 59

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)

all v-values initially are infinite; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

A* with Reuse of State Values

  • Alternative view of A*
slide-60
SLIDE 60

Maxim Likhachev Carnegie Mellon University 60

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)
  • OPEN: a set of states with v(s) > g(s)

all other states have v(s) = g(s)

all v-values initially are infinite; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

  • verconsistent state

consistent state

A* with Reuse of State Values

  • Alternative view of A*
slide-61
SLIDE 61

Maxim Likhachev Carnegie Mellon University 61

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)
  • OPEN: a set of states with v(s) > g(s)

all other states have v(s) = g(s)

all v-values initially are infinite; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

  • verconsistent state

consistent state

A* with Reuse of State Values

  • Alternative view of A*
slide-62
SLIDE 62

Maxim Likhachev Carnegie Mellon University 62

ComputePath function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)
  • OPEN: a set of states with v(s) > g(s)

all other states have v(s) = g(s)

  • this A* expands overconsistent states in the order of their f-values

all v-values initially are infinite; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

A* with Reuse of State Values

  • Alternative view of A*
slide-63
SLIDE 63

Maxim Likhachev Carnegie Mellon University 63

ComputePathwithReuse function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ h(s)] from OPEN; insert s into CLOSED;

  • g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’)
  • OPEN: a set of states with v(s) > g(s)

all other states have v(s) = g(s)

  • this A* expands overconsistent states in the order of their f-values

initialize OPEN with all overconsistent states; for every successor s’ of s if g(s’) > (s) + c(s,s’) g(s’) = (s) + c(s,s’); insert s’ into OPEN; v(s)=g(s); g g

all you need to do to make it reuse old values!

  • Making A* reuse old values:

A* with Reuse of State Values

slide-64
SLIDE 64

Maxim Likhachev Carnegie Mellon University 64

S2 S1 Sgoal 2 g=1 v= 1 h=2 g= 3 v= 3 h=1 g= 5 v=  h=0 2 S4 S3 3 g= 2 v=  h=2 g=  v=  h=1 1 Sstart 1 1 g=0 v=0 h=3

g(s’) = mins’’ pred(s’) v(s’’) + c(s’’,s’) initially OPEN contains all overconsistent states

CLOSED = {} OPEN = {s4,sgoal} next state to expand: s4

A* with Reuse of State Values

slide-65
SLIDE 65

Maxim Likhachev Carnegie Mellon University 65

S2 S1 Sgoal 2 g=1 v= 1 h=2 g= 3 v= 3 h=1 g= 5 v=  h=0 2 S4 S3 3 g= 2 v= 2 h=2 g= 5 v=  h=1 1 Sstart 1 1 g=0 v=0 h=3

CLOSED = {s4} OPEN = {s3,sgoal} next state to expand: sgoal

A* with Reuse of State Values

slide-66
SLIDE 66

Maxim Likhachev Carnegie Mellon University 66

S2 S1 Sgoal 2 g=1 v= 1 h=2 g= 3 v= 3 h=1 g= 5 v= 5 h=0 2 S4 S3 3 g= 2 v= 2 h=2 g= 5 v=  h=1 1 Sstart 1 1 g=0 v=0 h=3

after ComputePathwithReuse terminates: all g-values of states are equal to final A* g-values

CLOSED = {s4,sgoal} OPEN = {s3} done

A* with Reuse of State Values

slide-67
SLIDE 67

Maxim Likhachev Carnegie Mellon University 67

S2 S1 Sgoal 2 g=1 v= 1 h=2 g= 3 v= 3 h=1 g= 5 v= 5 h=0 2 S4 S3 3 g= 2 v= 2 h=2 g= 5 v=  h=1 1 Sstart 1 1 g=0 v=0 h=3

we can now compute a least-cost path

A* with Reuse of State Values

slide-68
SLIDE 68

Maxim Likhachev Carnegie Mellon University 68

ComputePathwithReuse function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ εh(s)] from OPEN; insert s into CLOSED; initialize OPEN with all overconsistent states; for every successor s’ of s if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); if s’ not in CLOSED then insert s’ into OPEN; v(s)=g(s);

  • Making weighted A* reuse old values:

A* with Reuse of State Values

just make sure no state is expanded multiple times

slide-69
SLIDE 69

Maxim Likhachev Carnegie Mellon University 69

  • Efficient series of weighted A* searches with decreasing ε:

Anytime Repairing A* (ARA*)

set  to large value; g(sstart) = 0; v-values of all states are set to infinity; OPEN = {sstart}; while  ≥ 1 CLOSED = {}; ComputePathwithReuse(); publish current  suboptimal solution; decrease ; initialize OPEN with all overconsistent states;

slide-70
SLIDE 70

Maxim Likhachev Carnegie Mellon University 70

  • Efficient series of weighted A* searches with decreasing ε:

ARA*

set  to large value; g(sstart) = 0; v-values of all states are set to infinity; OPEN = {sstart}; while  ≥ 1 CLOSED = {}; ComputePathwithReuse(); publish current  suboptimal solution; decrease ; initialize OPEN with all overconsistent states;

need to keep track of those

slide-71
SLIDE 71

Maxim Likhachev Carnegie Mellon University 71

  • Efficient series of weighted A* searches with decreasing ε:

ARA*

ComputePathwithReuse function while(f(sgoal) > minimum f-value in OPEN ) remove s with the smallest [g(s)+ εh(s)] from OPEN; insert s into CLOSED; initialize OPEN with all overconsistent states; for every successor s’ of s if g(s’) > g(s) + c(s,s’) g(s’) = g(s) + c(s,s’); if s’ not in CLOSED then insert s’ into OPEN;

  • therwise insert s’ into INCONS

v(s)=g(s);

  • OPEN U INCONS = all overconsistent states
slide-72
SLIDE 72

Maxim Likhachev Carnegie Mellon University 72

  • Efficient series of weighted A* searches with decreasing ε:

ARA*

set  to large value; g(sstart) = 0; v-values of all states are set to infinity; OPEN = {sstart}; while  ≥ 1 CLOSED = {}; INCONS = {}; ComputePathwithReuse(); publish current  suboptimal solution; decrease ; initialize OPEN = OPEN U INCONS;

all overconsistent states (exactly what we need!)

slide-73
SLIDE 73

Maxim Likhachev Carnegie Mellon University 73

  • A series of weighted A* searches
  • ARA*

ε =2.5

13 expansions solution=11 moves

ε =1.5

15 expansions solution=11 moves

ε =1.0

20 expansions solution=10 moves

ε =2.5

13 expansions solution=11 moves

ε =1.5

1 expansion solution=11 moves

ε =1.0

9 expansions solution=10 moves

ARA*

slide-74
SLIDE 74

Maxim Likhachev 74

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-75
SLIDE 75

Maxim Likhachev Carnegie Mellon University 75

Anytime and Incremental Planning

  • Anytime D* [Likhachev et al., ‘2008]:

– decrease  and update edge costs at the same time – re-compute a path by reusing previous state-values

set  to large value; until goal is reached ComputePathwithReuse(); publish  -suboptimal path; follow the path until map is updated with new sensor information; update the corresponding edge costs; set sstart to the current state of the agent; if significant changes were observed increase  or replan from scratch; else decrease ; //modified to handle cost increases

slide-76
SLIDE 76

Maxim Likhachev Carnegie Mellon University 76

Anytime and Incremental Planning

  • Anytime D* in Urban Challenge

planning on 4D (<x,y,orientation,velocity>) multi-resolution lattice using Anytime D* [Likhachev & Ferguson, ‘09] part of efforts by Tartanracing team from CMU for the Urban Challenge 2007 race

slide-77
SLIDE 77

Maxim Likhachev Carnegie Mellon University 77

Other Uses of Incremental A*

  • Whenever planning is a repeated process:

– improving a solution (e.g., in anytime planning) – re-planning in dynamic and previously unknown environments – adaptive discretization – many other planning problems can be solved via iterative planning

slide-78
SLIDE 78

Maxim Likhachev 78

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-79
SLIDE 79

Maxim Likhachev

Heuristic Functions

Carnegie Mellon University

  • 2D (x,y) Dijkstra’s taking into account all obstacles for:
  • 3D (x,y,θ) lattice-based graph
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces
  • cart planning
  • Angle distance to the fully open door for:
  • door opening planning
  • 3D (x,y,z) Dijkstra’s for the end-effector taking into account all obstacles for:
  • lattice-based arm motion graph (separate SBPL-based motion planning module)
slide-80
SLIDE 80

Maxim Likhachev 80

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-81
SLIDE 81

Maxim Likhachev 81

Structure of SBPL

Carnegie Mellon University

Example configuration files to run main.cpp on. These can be used to test planners outside of ROS, just running compiled test program in bin directory from the command line Motion primitives used as input for 3D (x,y,θ) lattice-based planning and matlab files to generate new motion primitives Few matlab scripts to visualize 3D paths and motion primitives Environments (.cpp and .h files defining planning problems as graphs) Domain-independent graph searches For compiling under Windows using Visual Studio For compiling under Linux/Windows using CMake

slide-82
SLIDE 82

Maxim Likhachev 82

Structure of SBPL

Carnegie Mellon University

Graph search (ARA*, Anytime D*, etc.) memory allocated dynamically Environment represented as a graph (<x,y,θ> planning, arm planning, etc.) graph constructed on the fly

request for ID’s of successors states and transition costs during graph search requests for heuristics plan as a sequence of state ID’s ID’s of start and goal states ID’s of successor states, transition costs,… heuristics

slide-83
SLIDE 83

Maxim Likhachev 83

Structure of SBPL

Carnegie Mellon University

  • Look at Main.cpp for examples for how to use SBPL:

EnvironmentNAVXYTHETALAT environment_navxythetalat; if(!environment_navxythetalat.InitializeEnv(argv[1], perimeterptsV, NULL)) { SBPL_ERROR("ERROR: InitializeEnv failed\n"); throw new SBPL_Exception(); } if(!environment_navxythetalat.InitializeMDPCfg(&MDPCfg)) { SBPL_ERROR("ERROR: InitializeMDPCfg failed\n"); throw new SBPL_Exception(); } //plan a path vector<int> solution_stateIDs_V; bool bforwardsearch = false; ADPlanner planner(&environment_navxythetalat, bforwardsearch); if(planner.set_start(MDPCfg.startstateid) == 0) { SBPL_ERROR("ERROR: failed to set start state\n"); throw new SBPL_Exception(); } if(planner.set_goal(MDPCfg.goalstateid) == 0) { SBPL_ERROR("ERROR: failed to set goal state\n"); throw new SBPL_Exception(); } planner.set_initialsolution_eps(3.0); bRet = planner.replan(allocated_time_secs, &solution_stateIDs_V); SBPL_PRINTF("size of solution=%d\n",(unsigned int)solution_stateIDs_V.size());

slide-84
SLIDE 84

Maxim Likhachev 84

  • Graph representations (implemented as environments for SBPL)
  • 3D (x,y,θ) lattice-based graph (within SBPL)
  • 3D (x,y,θ) lattice-based graph for 3D (x,y,z) spaces (within SBPL)
  • Cart planning (separate SBPL-based package)
  • Lattice-based arm motion graph (separate SBPL-based motion planning module)
  • Door opening planning (separate SBPL-based package)
  • Graph searches (implemented within SBPL)
  • ARA* - anytime version of A*
  • Anytime D* - anytime incremental version of A*
  • R* - a randomized version of A* (will not talk about)
  • Heuristic functions (implemented as part of environments)
  • Overview of how SBPL code is structured
  • What’s coming

What I will talk about

Carnegie Mellon University

slide-85
SLIDE 85

Maxim Likhachev 85

  • Planning in Dynamic Environments
  • Planning for Spring-loaded Doors
  • ROS package for (x,y,θ) planning while accounting for the whole body of

PR2 in 3D (x,y,z)

What’s coming

Carnegie Mellon University

slide-86
SLIDE 86

Maxim Likhachev 86

Thanks to Willow Garage for the support of SBPL!

Carnegie Mellon University

http://www.ros.org/wiki/sbpl