CS 287 Advanced Robotics (Fall 2019) Lecture 9: Motion Planning - - PowerPoint PPT Presentation

cs 287 advanced robotics fall 2019 lecture 9 motion
SMART_READER_LITE
LIVE PREVIEW

CS 287 Advanced Robotics (Fall 2019) Lecture 9: Motion Planning - - PowerPoint PPT Presentation

CS 287 Advanced Robotics (Fall 2019) Lecture 9: Motion Planning Lecture by: Huazhe (Harry) Xu Slides by: Pieter Abbeel UC Berkeley EECS Many images from Lavalle, Planning Algorithms Motion Planning n Problem n Given start state x S , goal


slide-1
SLIDE 1

CS 287 Advanced Robotics (Fall 2019) Lecture 9: Motion Planning

Lecture by: Huazhe (Harry) Xu Slides by: Pieter Abbeel UC Berkeley EECS Many images from Lavalle, Planning Algorithms

slide-2
SLIDE 2

n Problem

n Given start state xS, goal state xG n Asked for: a sequence of control inputs that leads from start to goal

n Why tricky?

n Need to avoid obstacles n For systems with underactuated dynamics: can’t simply move along

any coordinate at will

n E.g., car, helicopter, airplane, but also robot manipulator hitting joint limits

Motion Planning

slide-3
SLIDE 3

Examples

Helicopter path planning Cartpole swing-up Acrobot

slide-4
SLIDE 4

Examples

slide-5
SLIDE 5

Examples

slide-6
SLIDE 6

Examples

slide-7
SLIDE 7

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-8
SLIDE 8

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-9
SLIDE 9

Motion planning

slide-10
SLIDE 10

= { x | x is a pose of the robot}

n obstacles à configuration space obstacles

Configuration Space (C-Space)

Workspace Configuration Space

(2 DOF: translation only, no rotation)

free space

  • bstacles
slide-11
SLIDE 11

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-12
SLIDE 12

n Reactive control

n Potential-based methods (Khatib ‘86)

n Optimize over entire trajectory

n Elastic bands (Quinlan and Khatib ‘93) n CHOMP (Ratliff et al. ‘09) and variants (STOMP, ITOMP) n Trajopt (Schulman, et al 2013)

Optimization-based Motion Planning

slide-13
SLIDE 13

n

Could try by, for example, following formulation:

n

Or, with constraints, (which would require using an infeasible method):

Solve by Nonlinear Optimization for Control?

can encode obstacles

slide-14
SLIDE 14
slide-15
SLIDE 15

= start state, in goal set joint limits for all robot parts, for all obstacles: no collision

Trajectory Optimization

non-convex Solution method: sequential convex optimization

min

θ1:T

X

t

kθt+1 θtk2 + other costs subject to

θ0 θT

slide-16
SLIDE 16

Collision Constraints

[SD from: Gilbert-Johnson-Keerthi (GJK) algorithm and Expanding Polytope Algorithm (EPA)]

A B A B T

pA pB

T

pA pB

sd > 0 sd < 0

sdAB(θ) ≈ ˆ n · (pB − pA(θ)) ≈ sdAB(θ0) − ˆ n>JPA(θ0)(θ − θ0)

slide-17
SLIDE 17

Penalty for Collision Constraints

sdAB(θ) ≈ ˆ n · (pB − pA(θ)) ≈ sdAB(θ0) − ˆ n>JPA(θ0)(θ − θ0)

penalty

dcheck dsafe sd

slide-18
SLIDE 18

Collision Constraint as L1 Penalty

slide-19
SLIDE 19

Collision Constraint as L1 Penalty

slide-20
SLIDE 20

Collision check against swept-out volume

n Allows coarsely sampling trajectory

n Overall faster

n Finds better local optima

Continuous-Time Safety

slide-21
SLIDE 21

Collision-free Path for Dubin’s Car

slide-22
SLIDE 22

Experiments: Industrial Box Picking

slide-23
SLIDE 23

Experiments: DRC Robot

slide-24
SLIDE 24

Benchmark

slide-25
SLIDE 25

Benchmark Results

[RSS 2013]

slide-26
SLIDE 26

Experiments: PR2

slide-27
SLIDE 27

Steerable Needle

slide-28
SLIDE 28

Steerable Needle

slide-29
SLIDE 29

Steerable Needle: Opt Formulation

slide-30
SLIDE 30

Steerable Needle: Plans

slide-31
SLIDE 31

Steerable Needle: Results

slide-32
SLIDE 32

Channel Layout (Brachytherapy Implants)

slide-33
SLIDE 33

Channel Layout: Opt Formulation

slide-34
SLIDE 34

Channel Layout: Results

slide-35
SLIDE 35

n Code and docs: rll.berkeley.edu/trajopt n Benchmark: github.com/joschu/planning_benchmark

Try It Yourself

slide-36
SLIDE 36

Experiments: PR2

slide-37
SLIDE 37

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-38
SLIDE 38

Probabilistic Roadmap (PRM)

Free/feasible space Space Ân forbidden space

slide-39
SLIDE 39

Configurations are sampled by picking coordinates at random

Probabilistic Roadmap (PRM)

slide-40
SLIDE 40

Probabilistic Roadmap (PRM)

Configurations are sampled by picking coordinates at random

slide-41
SLIDE 41

Sampled configurations are tested for collision

Probabilistic Roadmap (PRM)

slide-42
SLIDE 42

The collision-free configurations are retained as milestones

Probabilistic Roadmap (PRM)

slide-43
SLIDE 43

Each milestone is linked by straight paths to its nearest neighbors

Probabilistic Roadmap (PRM)

slide-44
SLIDE 44

Each milestone is linked by straight paths to its nearest neighbors

Probabilistic Roadmap (PRM)

slide-45
SLIDE 45

The collision-free links are retained as local paths to form the PRM

Probabilistic Roadmap (PRM)

slide-46
SLIDE 46

s g

The start and goal configurations are included as milestones

Probabilistic Roadmap (PRM)

slide-47
SLIDE 47

The PRM is searched for a path from s to g

s g

Probabilistic Roadmap (PRM)

slide-48
SLIDE 48

n Initialize set of points with xS and xG n Randomly sample points in configuration space n Connect nearby points if they can be reached from each other n Find path from xS to xG in the graph

n Alternatively: keep track of connected components incrementally, and

declare success when xS and xG are in same connected component

Probabilistic Roadmap

slide-49
SLIDE 49

PRM Example 1

slide-50
SLIDE 50

PRM Example 2

slide-51
SLIDE 51

n How to sample uniformly at random from [0,1]n ?

n Sample uniformly at random from [0,1] for each coordinate

n How to sample uniformly at random from the surface of the n-

D unit sphere?

n Sample from n-D Gaussian à isotropic; then just normalize

n How to sample uniformly at random for orientations in 3-D?

Sampling

slide-52
SLIDE 52
  • 1. Connecting neighboring points: Only easy for holonomic systems (i.e., for which

you can move each degree of freedom at will at any time). Generally requires solving a Boundary Value Problem

  • 2. Collision checking:

Often takes majority of time in applications (see Lavalle)

PRM: Challenges

Typically solved without collision checking; later verified if valid by collision checking

slide-53
SLIDE 53

n Pro:

n Probabilistically complete: i.e., with probability one, if run for long

enough the graph will contain a solution path if one exists.

n Cons:

n Required to solve 2-point boundary value problem n Build graph over entire state space, which might be unnecessarily

expensive when what’s needed is connecting specific start and goal

PRM’s Pros and Cons

slide-54
SLIDE 54

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-55
SLIDE 55

Rapidly exploring Random Tree (RRT)

Steve LaValle (98)

n Basic idea:

n Build up a tree through generating “next states” in the tree by

executing random controls

n However: not exactly above to ensure good coverage

slide-56
SLIDE 56
slide-57
SLIDE 57

RANDOM_STATE(): often uniformly at random over space with probability 99%, and the goal state with probability 1%, this ensures it attempts to connect to goal semi-regularly SELECT_INPUT(): often a few inputs are sampled, and one that results in x_new closest to x_rand is retained; sometimes optimization is run to find the best input

Rapidly exploring Random Tree (RRT)

slide-58
SLIDE 58

Rapidly exploring Random Tree (RRT)

n Select random point, and expand nearest vertex towards it

n Biases samples towards largest Voronoi region

slide-59
SLIDE 59

Rapidly exploring Random Tree (RRT)

Source: LaValle and Kuffner 01

slide-60
SLIDE 60

n NEAREST_NEIGHBOR(xrand, T): need to find (approximate)

nearest neighbor efficiently

n KD Trees data structure (upto 20-D) [e.g., FLANN] n Locality Sensitive Hashing

n SELECT_INPUT(xrand, xnear)

n Two point boundary value problem

n If too hard to solve, often just select best out of a set of control sequences.

This set could be random, or some well chosen set of primitives.

RRT Practicalities

slide-61
SLIDE 61

n

No obstacles, holonomic:

n

With obstacles, holonomic:

n

Non-holonomic: approximately solve two-point boundary value problem (often rough approximation: pick best of a few random control sequences)

RRT Extension

slide-62
SLIDE 62

Growing RRT

Demo: http://en.wikipedia.org/wiki/File:Rapidly-exploring_Random_Tree_(RRT)_500x373.gif

slide-63
SLIDE 63

n

Volume swept out by unidirectional RRT:

xS

Bi-directional RRT

xG xS xG

n

Volume swept out by bi-directional RRT:

n

Difference more and more pronounced as dimensionality increases

slide-64
SLIDE 64

n Planning around obstacles or through narrow passages can

  • ften be easier in one direction than the other

Multi-directional RRT

slide-65
SLIDE 65

n Issue: nearest points chosen for expansion are

(too) often the ones stuck behind an obstacle

Resolution-Complete RRT (RC-RRT)

RC-RRT solution:

n

Choose a maximum number of times, m, you are willing to try to expand each node

n

For each node in the tree, keep track of its Constraint Violation Frequency (CVF)

n

Initialize CVF to zero when node is added to tree

n

Whenever an expansion from the node is unsuccessful (e.g., per hitting an obstacle):

n

Increase CVF of that node by 1

n

Increase CVF of its parent node by 1/m, its grandparent 1/m2, …

n

When a node is selected for expansion, skip over it with probability CVF/m

slide-66
SLIDE 66
slide-67
SLIDE 67

RRT*

Source: Karaman and Frazzoli

slide-68
SLIDE 68

n Asymptotically optimal n Main idea:

n Swap new point in as parent for nearby vertices who can be reached

along shorter path through new point than through their original (current) parent

RRT*

slide-69
SLIDE 69

RRT*

Source: Karaman and Frazzoli

RRT RRT*

slide-70
SLIDE 70

RRT*

Source: Karaman and Frazzoli

RRT RRT*

slide-71
SLIDE 71

n Requires 2-point boundary value problem solution for

  • ptimality

n Li, Littlefield, Bekris 2014 proved that you can get asymptotic

  • ptimality from random sampling control trajectories in an

RRT like fashion (Naïve Random Tree), without solving a 2- point boundary value problem

n They also show that using pruning can make this efficient in an

algorithm called SST*

RRT* Kinodynamics

slide-72
SLIDE 72

n Dobson, Moustakides, Bekris 2014 n Gave finite time bounds for the current best path In being

within a certain threshold of the optimal cost length In* for a fixed delta of the form:

PRM* Probabilistic Bounds

slide-73
SLIDE 73

n Idea: grow a randomized tree of

stabilizing controllers to the goal

n Like RRT n Can discard sample points in already

stabilized region

LQR-trees (Tedrake, IJRR 2010)

slide-74
SLIDE 74

LQR-trees (Tedrake)

Ck: stabilized region after iteration k

slide-75
SLIDE 75

LQR-trees (Tedrake)

slide-76
SLIDE 76

n

Configuration Space

n

Optimization-based Motion Planning

n

Sampling-based Motion Planning

n

Probabilistic Roadmap

n

Rapidly-exploring Random Trees (RRTs)

n

Smoothing

Motion Planning: Outline

slide-77
SLIDE 77

Randomized motion planners tend to find not so great paths for execution: very jagged, often much longer than necessary. à In practice: do smoothing before using the path

n Shortcutting:

n along the found path, pick two vertices xt1, xt2 and try to connect them

directly (skipping over all intermediate vertices)

n Nonlinear optimization for optimal control (trajopt)

n Allows to specify an objective function that includes smoothness in

state, control, small control inputs, etc.

Smoothing