Tree growing motion planners + optimizing planners

Slides:



Advertisements
Similar presentations
Rapidly Exploring Random Trees Data structure/algorithm to facilitate path planning Developed by Steven M. La Valle (1998) Originally designed to handle.
Advertisements

Complete Motion Planning
Probabilistic Roadmaps. The complexity of the robot’s free space is overwhelming.
Motion Planning for Point Robots CS 659 Kris Hauser.
PRM and Multi-Space Planning Problems : How to handle many motion planning queries? Jean-Claude Latombe Computer Science Department Stanford University.
NUS CS5247 Motion Planning for Camera Movements in Virtual Environments By Dennis Nieuwenhuisen and Mark H. Overmars In Proc. IEEE Int. Conf. on Robotics.
By Lydia E. Kavraki, Petr Svestka, Jean-Claude Latombe, Mark H. Overmars Emre Dirican
Presented By: Aninoy Mahapatra
Probabilistic Roadmap
DESIGN OF A GENERIC PATH PATH PLANNING SYSTEM AILAB Path Planning Workgroup.
Randomized Kinodynamics Motion Planning with Moving Obstacles David Hsu, Robert Kindel, Jean-Claude Latombe, Stephen Rock.
Randomized Motion Planning for Car-like Robots with C-PRM Guang Song and Nancy M. Amato Department of Computer Science Texas A&M University College Station,
Sampling and Connection Strategies for PRM Planners Jean-Claude Latombe Computer Science Department Stanford University.
1 Last lecture  Configuration Space Free-Space and C-Space Obstacles Minkowski Sums.
David Hsu, Robert Kindel, Jean- Claude Latombe, Stephen Rock Presented by: Haomiao Huang Vijay Pradeep Randomized Kinodynamic Motion Planning with Moving.
CS 326 A: Motion Planning Probabilistic Roadmaps Basic Techniques.
1 Single Robot Motion Planning - II Liang-Jun Zhang COMP Sep 24, 2008.
Rapidly Expanding Random Trees
Adaptive Dynamic Collision Checking for Many Moving Bodies Mitul Saha Department of Computer Science, Stanford University. NSF-ITR Workshop Collaborators:
1 On the Probabilistic Foundations of Probabilistic Roadmaps D. Hsu, J.C. Latombe, H. Kurniawati. On the Probabilistic Foundations of Probabilistic Roadmap.
Exact Collision Checking of Robot Paths Fabian Schwarzer Mitul Saha Jean-Claude Latombe Computer Science Department Stanford University.
Randomized Planning for Short Inspection Paths Tim Danner Lydia E. Kavraki Department of Computer Science Rice University.
1 Path Planning in Expansive C-Spaces D. HsuJ. –C. LatombeR. Motwani Prepared for CS326A, Spring 2003 By Xiaoshan (Shan) Pan.
NUS CS 5247 David Hsu1 Last lecture  Multiple-query PRM  Lazy PRM (single-query PRM)
Randomized Motion Planning for Car-like Robots with C-PRM Guang Song, Nancy M. Amato Department of Computer Science Texas A&M University College Station,
CS 326 A: Motion Planning robotics.stanford.edu/~latombe/cs326/2003/index.htm Configuration Space – Basic Path-Planning Methods.
Robot Motion Planning Bug 2 Probabilistic Roadmaps Bug 2 Probabilistic Roadmaps.
CS 326A: Motion Planning Basic Motion Planning for a Point Robot.
Chapter 5: Path Planning Hadi Moradi. Motivation Need to choose a path for the end effector that avoids collisions and singularities Collisions are easy.
Collision Detection and Distance Computation CS 326A: Motion Planning.
CS 326A: Motion Planning Probabilistic Roadmaps: Sampling and Connection Strategies.
CS 326 A: Motion Planning Probabilistic Roadmaps Basic Techniques.
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces Kavraki, Svestka, Latombe, Overmars 1996 Presented by Chris Allocco.
CS 326A: Motion Planning ai.stanford.edu/~latombe/cs326/2007/index.htm Collision Detection and Distance Computation.
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces Lydia E. Kavraki Petr Švetka Jean-Claude Latombe Mark H. Overmars Presented.
CS B659: Principles of Intelligent Robot Motion Collision Detection.
A Randomized Approach to Robot Path Planning Based on Lazy Evaluation Robert Bohlin, Lydia E. Kavraki (2001) Presented by: Robbie Paolini.
World space = physical space, contains robots and obstacles Configuration = set of independent parameters that characterizes the position of every point.
© Manfred Huber Autonomous Robots Robot Path Planning.
Robotics Chapter 5 – Path and Trajectory Planning
Path Planning for a Point Robot
Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces (1996) L. Kavraki, P. Švestka, J.-C. Latombe, M. Overmars.
CS B659: Principles of Intelligent Robot Motion Configuration Space.
On Delaying Collision Checking in PRM Planning – Application to Multi-Robot Coordination By: Gildardo Sanchez and Jean-Claude Latombe Presented by: Michael.
Introduction to Motion Planning
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Administration Feedback on assignment Late Policy
Tree-Growing Sample-Based Motion Planning
Randomized Kinodynamics Planning Steven M. LaVelle and James J
Planning Tracking Motions for an Intelligent Virtual Camera Tsai-Yen Li & Tzong-Hann Yu Presented by Chris Varma May 22, 2002.
Department of Computer Science Columbia University rax Dynamically-Stable Motion Planning for Humanoid Robots Paper Presentation James J. Kuffner,
Randomized KinoDynamic Planning Steven LaValle James Kuffner.
Lecture 4: Improving the Quality of Motion Paths Software Workshop: High-Quality Motion Paths for Robots (and Other Creatures) TAs: Barak Raveh,
9/30/20161 Path Planning Cognitive Robotics David S. Touretzky & Ethan Tira-Thompson Carnegie Mellon Spring 2012.
Optimal Acceleration and Braking Sequences for Vehicles in the Presence of Moving Obstacles Jeff Johnson, Kris Hauser School of Informatics and Computing.
Rapidly-Exploring Random Trees
Instructor Prof. Shih-Chung Kang 2008 Spring
CS 326A: Motion Planning Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces (1996) L. Kavraki, P. Švestka, J.-C. Latombe,
Last lecture Configuration Space Free-Space and C-Space Obstacles
Probabilistic Roadmap Motion Planners
Presented By: Aninoy Mahapatra
Sampling and Connection Strategies for Probabilistic Roadmaps
Path Planning using Ant Colony Optimisation
Kinetic Collision Detection for Convex Fat Objects
Collision Detection.
Dimitris Valeris Thijs Ratsma
Configuration Space of an Articulated Robot
Humanoid Motion Planning for Dual-Arm Manipulation and Re-Grasping Tasks Nikolaus Vahrenkamp, Dmitry Berenson, Tamim Asfour, James Kuffner, Rudiger Dillmann.
Robotics meet Computer Science
Classic Motion Planning Methods
Presentation transcript:

Tree growing motion planners + optimizing planners

Probabilistic Roadmaps What if only a small portion of the space needs to be explored?

Tree-growing planners Idea: grow a tree of feasible paths from the start until it reaches a neighborhood of the goal Sampling bias toward “boundary” of currently explored region, helps especially if the start is in a region with poor visibility Many variants: Rapidly-exploring Random Trees (RRTs) are popular, easy to implement (LaValle and Kuffner 2001) Expansive space trees (ESTs) use a different sampling strategy (Hsu et al 2001) SBL (Single-query, Bidirectional, Lazy planner) often efficient in practice (Sanchez-Ante and Latombe, 2005)

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand T

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand xnear xrand

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand xnear xrand

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand xnear xrand

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand xrand xnear

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand

RRT Build a tree T of configurations, starting at xstart Extend: Sample a configuration xrand from C at random Find the node xnear in T that is closest to xrand Extend a short path from xnear toward xrand Governed by a step size parameter d

What is the sampling strategy? Probability that a node gets selected for expansion is proportional to the volume of its Voronoi cell

Implementation Details Bottleneck: finding nearest neighbor each step O(n) with naïve implementation => O(n2) overall KD tree data structure O(n1-1/d) Approximate nearest neighbors often very effective Terminate when extension reaches a goal set Usually visibility set of goal configuration Bidirectional strategy Grow a tree from goal as well as start, connect when closest nodes in either tree can “see” each other

Optimizing planners Feasible planners: only care about first feasible solution Optimizing planners: attempt to produce a feasible path that optimizes some objective function Does the shortest path in a PRM approach the shortest path in the underlying space as more milestones are added?

Theoretical results [Karaman and Frazzoli 2010] PRM: Yes, if all neighbors within radius R are connected… but O(N2) running time No, if k-nearest neighbors are connected Yes, if neighbors within radius R(N)=C (log N / N)1/d are connected with C a volumetric constant and dim(C-space)=d Yes, if (c ln N)-nearest neighbors are connected, where N is the number of milestones and c=e*(1+1/d) RRT: No. The tree is history dependent Variant RRT*: performs tree rewiring among R(N) radius or (c ln N)-neighbors

RRT RRT*

Is this the most efficient method? No! an excessive number of samples is typically needed to improve an existing path

Some Theory Assume there is an 𝜖-optimal shortest path with clearance 𝛿/2 from obstacles Binary collision checks are the only information available to planner about shape of obstacles

Some Theory Assume there is an 𝜖-optimal shortest path with clearance 𝛿/2 from obstacles Binary collision checks are the only information available to planner about shape of obstacles Filled? Or free?

Dimensionality matters! Conclude For this 2D example, there exists a set of volume 𝛿 2 that the planner must check to find a path within 𝜖 of optimal In 𝑑-dimensions, the set has volume 𝛿 𝑑 With uniform sampling, the number of checks needed to find this set is O( 𝜖 −d ) Worst case: no better than grid search! Dimensionality matters! Visibility doesn’t Sampling strategy: check configurations where they help find a better path

Optimization heuristics Local postprocessing: plan a path using some PRM method, then improve it in postprocessing “Shortcutting” Pick two random points, test visibility. If visible, replace intervening section of path. Repeat Trajectory optimization Global strategies: Random restarts Using a fast feasible method (e.g., RRT), repeat many times with new random seed each time. Return best path found “Lazy” collision checking Avoid visibility checking except for edges that could improve current best path. Reduce per-sample overhead of collision checking

Motion Planning in Klamp’t Kris Hauser ECE 383 / ME 442 22

Agenda Motion planning in Klamp’t Key concepts Klamp’t Python API CSpace Feasibility checker (static collision checking) Visibility checker (dynamic collision checking) MotionPlan Klamp’t Python API

Toolkit Components (today) Modeling Planning 3D math & geometry Paths & trajectories Inverse Kinematics Motion planning Dynamics Forward Kinematics Path smoothing Trajectory optimization Contact mechanics Physics simulation Design tools Visualization System integration Robot posing Motion design ROS interface JSON / Sockets Physics simulation Path planning Disk I/O

Context Two possible motion planning abstraction levels: C-space level (more control and generality) Input: C-obstacles and endpoints Output: a path Robot level (more convenience) Input: robot, workspace obstacles, endpoints or high-level tasks Comparison to other packages: Open Motion Planning Library (OMPL): implements many PRM-style planning algorithms at C-space level MoveIt! and OpenRAVE: work at robot level (robot obstacle avoidance and manipulation problems, respectively) and set up C-space constraints for other planners Klamp’t Implements many PRM-style planners at C-space level (& interface to OMPL) Supports some common problem setups at robot level (e.g., robot avoiding obstacles, with/without IK constraints)

Kinematic planning pipeline Construct a planning problem C-space Terminal conditions (start and goal configurations, or in general, sets) Instantiate a planning algorithm Take care: some algorithms work with some problems and not others Call the planner Sampling-based planners are set up for use in any-time fashion Plan as long as you want in a while loop, OR Set up a termination criterion Likelihood of success increases as more time spent For optimizing planners, quality of path improves too Retrieve the path (sequence of milestones)

Setting up a kinematic C-space C-Space-level interface: you must manually implement the callbacks used by the planning algorithm Feasibility tester IsFeasible?(q) Visibility tester IsVisible?(a,b) Sampling strategy q <- SampleConfig() *Perturbation sampling strategy q <- SampleNeighborhood(c,r) *Distance metric d <- Distance(a,b) *Interpolation function q <- Interpolate(a,b,u) *: default implementation assumes Cartesian space Robot-level interface: you provide a world containing a robot Standard Robot C-Space: avoids collisions Contact C-space: avoids collisions, maintains IK constraints Stance C-space: same as Contact C-space, but also enforces balance under gravity

Python API (CSpace) To set up your own problem, construct a subclass of the CSpace class whose methods will be called by the planner class MyCSpace(CSpace): def __init__(self): CSpace.__init__(self) … At minimum, set up the following: bound: a list of pairs [(a1,b1),…,(an,bn)] giving an n-dimensional bounding box containing the free space eps: a visibility collision checking tolerance (more later) feasible(q): the feasibility test. Returns True if feasible, False if infeasible

Python API (CSpace)… more functionality visible(a,b): used for custom visibility tests sample(): returns a random configuration. Used for custom sampling distributions. Default implementation uses uniform distribution over self.bound. distance(a,b): returns a distance value between configurations a and b. Default uses Euclidean distance interpolate(a,b,u): returns a configuration u fraction of the way toward b from a. Default uses linear interpolation. sampleneighborhood(c,r): used by some planners to sample a random configuration within a neighborhood r of the configuration c. Default samples over box of width 2r intersected with self.bound

Static vs. Dynamic Collision Detection Static checks Dynamic checks

Static Feasibility Checking Override it to test whether a configuration is feasible CSpace.IsFeasible(q) (C++ API) CSpace.feasible(q) (Python API) An authoritative representation of C-obstacles Will be called thousands of times during planning. For sampling-based planners to work well, this must be fast (ideally, microseconds) Geometric primitives, or bounding-volume hierarchies BVHs automatically set up in Klamp’t on robot or geometry load

Dynamic Feasibility Checking Callback that tests whether a simple path between two configurations is feasible (local planning) CSpace.LocalPlanner(a,b)->EdgePlanner* (C++ API) CSpace.visible(a,b) (Python API) C++ API allows non-straight line paths, Python assumes straight-line paths Will be called thousands of times during planning (hopefully far less, in lazy planners). For sampling-based planners to work well, this must be fast (ideally, milliseconds) Default implementations use discretize-and-check approach

Usual Approach to Dynamic Checking (in PRM Planning) Discretize path at some fine resolution e Test statically each intermediate configuration < e 3 2 3 1 3 2 3 e too large  collisions are missed e too small  slow test of local paths

Testing Path Segment vs. Finding First Collision PRM planning Detect collision as quickly as possible  Bisection strategy Physical simulation, haptic interaction Find first collision  Sequential strategy

e too large  collisions are missed e too small  slow test of local paths

e too large  collisions are missed e too small  slow test of local paths

Distance metrics Most PRM-style planners rely heavily on the notion of a distance metric PRM (and similar planners): determines set of “nearby” neighbors for connection. Either k-nearest neighbors, OR All neighbors within radius R RRT (and similar planners): determines how far to extend tree on each iteration Max distance d This choice is often nontrivial due to axes with different units Example: how to weight the angular component in SE(2)? & Tradeoff between fast exploration vs finding intricate movements in narrow passages Large jumps more effective Small jumps more effective

Interpolation Interpolate(a,b,u) traces out a simple path (e.g., straight line or geodesic) from a->b as u goes from 0->1 C++: CSpace.Interpolate(a,b,u,Config& q) with q used as output Python: q<-CSpace.interpolate(a,b,u) Output of planner: sequence of milestones m0,…,mn such subsequent application the C-space’s interpolation function traces out path q(t) = Interpolate(mi,mi+1, t*n-i) with i=floor(tn) Straight line is most appropriate for Euclidean spaces (default) Geodesic is most appropriate choice for non-Euclidean spaces

Klamp’t planning problems Motion planning problem types Constraints: Kinematic constraints Manifold constraints (must be handled in C-space) Dynamic constraints partially supported Objectives: Minimum path length well supported Minimum execution time under dynamics partially supported Arbitrary cost functions partially supported Minimum constraint removal Minimum constraint displacement Terminal conditions: point-to-point, point-to-set (not thoroughly tested), multi-query (some planners) Implementation: C++: fullest support. Not every combination of constraints + objectives + terminal constraints is supported Python: point-to-point kinematic planning, manifold constraints can be handled, only path-length supported as optimization function

Klamp’t planning algorithms Feasible planners: only care about the first feasible solution Probabilistic Roadmap (PRM) [Kavraki et al 1996] Rapidly-Exploring Random Tree (RRT) [LaValle and Kuffner 2001] Expansive Space Trees (EST ) [Hsu et al 1999] Single-Query Bidirectional Lazy Planner (SBL) [Sanchez-Ante and Latombe 2004] Probabilistic Roadmap of Trees [Akinc et al 2005] w/ SBL (SBL-PRT) Multi-Modal PRM (MMPRM), Incremental-MMPRM [Hauser and Latombe 2009] Optimizing planners: incrementally improve the solution quality over time (path length) RRT* [Karaman and Frazzoli 2009] PRM* [Karaman and Frazzoli 2009] Lazy-PRM*, Lazy-RRG* [Hauser 2015] Lower-Bound RRT* (LB-RRT*) [Salzman and Halperin 2014] Fast Marching Method (FMM) [Sethian 1996] Asymptotically optimal FMM (FMM*) [Luo and Hauser 2014] Minimum Constraint Removal (MCR) and Minimum Constraint Displacement (MCD) [Hauser 2013] Randomized path shortcutting Random restarts Implementation: C++: fullest support. Automatic configuration interface for PRM, RRT, EST, SBL, SBL-PRT, RRT*, PRM*, Lazy-PRM*, Lazy-RRG*, LB-RRT*, FMM, FMM*, shortcutting, restarts Python: Only supports automatic configuration interface

Python API (MotionPlan) Sets up a motion planner for a given CSpace First call global configuration MotionPlan.setOptions(option1=value1,…,optionk=valuek) Then create the planner, set up the endpoints, and call in a loop planner = MotionPlan(cspace) planner.setEndpoints(qstart,qgoal) increment = 100 while [TIME LEFT]: planner.planMore(increment) path = planner.getPath if len(path) > 0: print “Solved”; break Note: if you are creating lots of MotionPlans you will want to call planner.close() to free memory after using it Note: many planners require start and goal to be feasible… or throw an exception

Python API (MotionPlan) Planner options MotionPlan.setOptions(option1=value1,…,optionk=valuek) Common options: type: identifies the planning algorithm. Can be “prm”, “rrt”, “est”, “sbl”, “sblprt”, “rrt*”, “prm*”, “lazyprm*”, “lazyrrg*”, “fmm”, “fmm*” connectionThreshold: used in prm, rrt perturbationRadius: used in rrt, est, sbl, sblprt bidirectional: if true, performs bidirectional planning. Used in rrt, rrt*, lazyrrg* pointLocation: point location method. [empty]: naïve, “kdtree”: KD-Tree, “randombest [k]”: best of k random samples shortcut: 0 or 1, indicates whether to perform shortcutting after planning restart: 0 or 1, indicates whether to perform random restarts (used with restartTermCond) restartTermCond: a JSON string indicating the termination criterion for each random restart. Options can also be loaded from a JSON string (see Examples/PlanDemo/*.settings) via motionplanning.setPlanJSONString(string)

Next time Robot physics and dynamic systems

Other Approaches to Dynamic Collision Detection Bounding-volume (BV) hierarchies  Discretization issue Feature-tracking methods [Lin, Canny, 91] [Mirtich, 98] V-Clip [Cohen, Lin, Manocha, Ponamgi, 95] I-Collide [Basch, Guibas, Hershberger, 97] KDS  Geometric complexity issue with highly non-convex objects  Sequential strategy (first collision) that is not efficient for PRM path segments Swept-volume intersection [Cameron, 85] [Foisy, Hayward, 93]  Swept-volumes are expensive to compute. Too much data.  No pre-computed BV hierarchies Algebraic trajectory parameterization [Canny, 86] [Schweikard, 91] [Redon, Kheddar, Coquillard, 00]  High-degree polynomials, expensive  Floating-point arithmetics difficulties  Sequential strategy Combination [Redon, Kheddar, Coquillard, 00] BVH + algebraic parameterization [Ehmann, Lin, 01] BVH + feature tracking  Sequential strategy

Exact Collision Detection with Adaptive Bisection Idea: Cover line segment with collision free C-space neighborhoods Use distance computation instead of collision checking

How do you show a C-space neighborhood is collision free? Relate changes in C-space to changes in workspace When moving from (x,y,q) to (x’,y’,q’), no point traces out more than distance |x-x’| + |y-y’| + R|q-q’| Distance R

For any q and q’ no robot point traces a path longer than: How do you show a C-space neighborhood is collision free? Relate changes in C-space to changes in workspace q = (q1,q2,q3) q’ = (q’1,q’2,q’3) dqi = q’i-qi q1 q2 q3 For any q and q’ no robot point traces a path longer than: l(q,q’) = 3|dq1|+2|dq2|+|dq3|

d(q) = Euclidean distance between robot and obstacles (or lower bound) How do you show a C-space neighborhood is collision free? Relate changes in C-space to changes in workspace d(q) = Euclidean distance between robot and obstacles (or lower bound) q1 q2 q3 d(q) If l(q,q’) < d(q) + d(q’) then the straight path between q and q’ is collision-free

l(q,q’) < d(q) + d(q’) {q” | l(q,q”) < d(q)} {q” | l(q’,q”) < d(q’)}

l(q,q’) = l(q,qint) + l(qint,q’) < d(q) + d(q’) l(q,q’) < d(q) + d(q’) q q’ {q” | l(q,q”) < d(q)} {q” | l(q’,q”) < d(q’)} qint

l(q,q’) > d(q) + d(q’) Bisection q’ q {q” | l(q’,q”) < d(q’)} {q” | l(q,q”) < d(q)}