| File (function) | Description | Calls | Called By | Globals Used |
|---|---|---|---|---|
| PointInQuad | *Description:* Is point of intersection inside the obstacle uses sameSide usually used for checking a point in a mesh (triangle) but here we do the same for a 4 point plannar object | sameSide | collisionCheck | |
| RRT | *Description:* MAIN FUCNTION: This function is a basic implementation of the multi-tree Rapidly-exploring Random Tree (RRT) search algorithm with the ability to place discretely possitioned seeds throughout the environment which may of may not take root as trees *Authors:* Gavin Paul & Matthew Clifton *Last Updated:* 16th September 2008 *Features:* - Multiple trees - Discrete seeding environmental coverage - 2D or 3D search space - Obstacle avoidance - Auto-connect to goal - Path smoothing *To do:* - Adaptive sampling - Approximate nearest neighbour search | connect initSearch nearestNeighbour newPoint obstacles_array smoothPath tracePath | obs; rrt; | |
| collisionCheck | *Description:* Returns whether a collision occurs between an edge and a set of obstacles. Also gives the point of intersection. (P1=node,P2=parent node) | PointInQuad | connect smoothPath | collcount; |
| connect | *Description:* This function attempts to connect new_pnt to the nearest node or edge of each tree. | collisionCheck displayTree | RRT | rrt; obs; |
| displayTree | *Description:* This function displays the results of the search. | connect | rrt; plothandles; | |
| dist2edges | *Description:* Given a starting point (P1) and an end point (P2) of a line, plus another point (P3), this function will find the closest point along the line (PInt) to P3 and also return the distance (Dist2PInt) between PInt and P3. | nearestNeighbour | ||
| initSearch | *Description:* This function plots and outputs some info | RRT | obs; | |
| nearestNeighbour | *Description:* This function finds the nearest node or edge. | dist2edges | RRT | rrt; nncount; |
| newPoint | *Description:* This function randomly samples the search space. and produces a new node | RRT | ||
| obstacles_array | *Description:* This either loads the use_objects_txt which is a setup as multiple sets of 4 3D point which define a planar obstacle. Or we use the default walls where nwalls decides how many walls there are to be | RRT | ||
| sameSide | *Description:* sameSide Technique for working out if points a and b are on the same side of the line p1->p2 fast matlab implementation of code initially from http://www.blackpawn.com/texts/pointinpoly/default.html | PointInQuad | ||
| smoothPath | *Description:* Shortens a path by repeatedly attempting to connect two randomly selected points along the path together. | collisionCheck | RRT | obs; |
| tracePath | *Description:* This function traces the path back through the tree. | RRT | rrt; |