Drake
 All Classes Files Functions Variables
MotionPlanningTree Class Reference
Inheritance diagram for MotionPlanningTree:
Collaboration diagram for MotionPlanningTree:

Public Member Functions

virtual function randomSample (obj)
 
virtual function distanceMetric (obj, q1, q_array)
 
virtual function isValid (obj, q)
 
virtual function getVertex (obj, id)
 
virtual function interpolate (obj, q1, q2, interpolation_factors)
 
virtual function getParentId (obj, id)
 
virtual function indexIntoArrayOfPoints (obj, q_array, index)
 
function init (obj, q_init)
 
function rrt (obj, x_start, x_goal, options)
 [obj, path_ids, info] = rrt(obj, x_start, x_goal, options) plans a path between x_start and x_goal using the RRT algorithm [1]. More...
 
function rrtConnect (TA, x_start, x_goal, TB, options)
 [TA, path_ids_A, info, TB, path_ids_B] = rrtConnect(TA, x_start, x_goal, TB, options) implements the RRT-Connect algorithm based on the work of Kuffner and LaValle [1]. More...
 
function rrtConnectIteration (TA, TB, goal_bias)
 
function newPoint (obj, q)
 
function extend (obj, q)
 
function connect (obj, q)
 
function attemptToMakeValid (obj, q, valid)
 This default implementation does nothing. More...
 
function extractPath (TA, path_ids_A, TB, path_ids_B)
 
function recursiveConnectSmoothing (obj, path_ids, n_iterations, visualize)
 
function setLCMGL (obj, name, color)
 
function nearestNeighbor (obj, q)
 
function addVertex (obj, q, parent_id)
 
function getPathToVertex (obj, leaf_id)
 
function addPath (obj, T_other, path_ids, id_parent)
 
function drawTree (obj, varargin)
 
function drawPath (obj, varargin)
 

Public Attributes

Constant Property TRAPPED
 
Constant Property REACHED
 
Constant Property ADVANCED
 
Property N
 Number of nodes for which memory should be pre-allocated. More...
 
Property n
 Number of nodes in the tree. More...
 
Property max_edge_length
 
Property max_length_between_constraint_checks
 
Property line_color
 
Property lcmgl_name
 
Property lcmgl
 

Member Function Documentation

function addPath ( obj  ,
T_other  ,
path_ids  ,
id_parent   
)
Return values
obj
id_last
function addVertex ( obj  ,
,
parent_id   
)
Return values
obj
id
function attemptToMakeValid ( obj  ,
,
valid   
)

This default implementation does nothing.

Child classes can coerce samples in an overloaded version of this method. See JointSpaceMotionPlanningTree for an example.

Return values
q
valid
function connect ( obj  ,
 
)
Return values
obj
status
id_last
virtual function distanceMetric ( obj  ,
q1  ,
q_array   
)
virtual
function drawPath ( obj  ,
varargin   
)
Return values
obj
function drawTree ( obj  ,
varargin   
)
Return values
obj
function extend ( obj  ,
 
)
Return values
obj
status
id_new
function extractPath ( TA  ,
path_ids_A  ,
TB  ,
path_ids_B   
)
Return values
q_path
virtual function getParentId ( obj  ,
id   
)
virtual

Reimplemented in VertexArrayMotionPlanningTree.

function getPathToVertex ( obj  ,
leaf_id   
)
Return values
path_ids
virtual function getVertex ( obj  ,
id   
)
virtual

Reimplemented in VertexArrayMotionPlanningTree.

virtual function indexIntoArrayOfPoints ( obj  ,
q_array  ,
index   
)
virtual

Reimplemented in VertexArrayMotionPlanningTree.

function init ( obj  ,
q_init   
)
Return values
obj
virtual function interpolate ( obj  ,
q1  ,
q2  ,
interpolation_factors   
)
virtual
virtual function isValid ( obj  ,
 
)
virtual
function nearestNeighbor ( obj  ,
 
)
Return values
d
id_near
function newPoint ( obj  ,
 
)
Return values
obj
q_new
id_near
virtual function randomSample ( obj  )
virtual
function recursiveConnectSmoothing ( obj  ,
path_ids  ,
n_iterations  ,
visualize   
)
Return values
obj_new
id_last
function rrt ( obj  ,
x_start  ,
x_goal  ,
options   
)

[obj, path_ids, info] = rrt(obj, x_start, x_goal, options) plans a path between x_start and x_goal using the RRT algorithm [1].

Parameters
x_startInitial state
x_goalFinal state
optionsStructure that may containthe following fields:
  • N - Maximum size of the tree [1e4]
  • goal_bias - Fraction of the time which x_goal will be chosen as the target for extension. [0.05]
  • visualize - Logical scalar indicating whether or not the tree should be drawn [false]
  • display_after_every - If visualize is true, this determines the number of vertices that are added to the tree between drawing calls
Return values
objThe MotionPlanningTree object with all the vertices added during the execution of this method
path_idsVector of path ids such that obj.extractPath(path_ids) returns the path from x_start to x_goal.
infoExitflag indicating success (1) or failure (2) of the algorithm.

[1] S. M. LaValle. Rapidly-exploring random trees: A new tool for path planning. TR 98-11, Computer Science Dept., Iowa State Univ., Oct. 1998.

function rrtConnect ( TA  ,
x_start  ,
x_goal  ,
TB  ,
options   
)

[TA, path_ids_A, info, TB, path_ids_B] = rrtConnect(TA, x_start, x_goal, TB, options) implements the RRT-Connect algorithm based on the work of Kuffner and LaValle [1].

This is a bi-directional search with a greedy connection heuristic. A balanced or un-balanced form can be used.

Parameters
TAMotionPlanningTree object - the forward tree
x_startThe starting point in the search space
x_goalThe goal point in the search space
TBMotionPlanningTree object - the backward tree
Default: Copy of TA
optionsStructure that may contain the following fields:
  • N - Number of iterations [1e4]
  • goal_bias - Fraction of the iterations in which a connection attempt is made.
  • balanced - True if the trees should kept roughly the same size. [true]
  • visualize - True if the trees should be drawn during planning. [true]
Return values
TAThe forward tree after completion of the algorithm. Contains the full path from x_start to x_goal
path_ids_AVector of path ids such that TA.extractPath(path_ids_A) returns the path from x_start to x_goal.
infoExitflag indicating success (1) or failure (2) of the algorithm.
TBThe backwards tree after completion of the algorithm.
path_ids_BVector of path ids such that TB.extractPath(path_ids_B) returns the path from x_goal to the connection with TA.
function rrtConnectIteration ( TA  ,
TB  ,
goal_bias   
)
Return values
TA
TB
path_ids_A
path_ids_B
function setLCMGL ( obj  ,
name  ,
color   
)
Return values
obj

Member Data Documentation

Constant Property ADVANCED
Property lcmgl
Property lcmgl_name
Property line_color
Property max_edge_length
Property max_length_between_constraint_checks
Property N

Number of nodes for which memory should be pre-allocated.

Property n

Number of nodes in the tree.

Constant Property REACHED
Constant Property TRAPPED

The documentation for this class was generated from the following file: