Robot Planning and its Applications Project
Public Member Functions | Public Attributes | List of all members
RRTSTAR Class Reference

RRTStar Class. More...

#include <rrtstar.h>

Collaboration diagram for RRTSTAR:
Collaboration graph
[legend]

Public Member Functions

 RRTSTAR ()
 Constructor. More...
 
void initialize ()
 Initialize root node of RRTSTAR. More...
 
NodegetRandomNode ()
 Generate a random node in the field. More...
 
Nodenearest (Vector2f point)
 Get nearest node from a given configuration/position. More...
 
void near (Vector2f point, float radius, vector< Node * > &out_nodes)
 Get neighborhood nodes of a given configuration/position. More...
 
double distance (Vector2f &p, Vector2f &q)
 Helper method to find distance between two positions. More...
 
double Cost (Node *q)
 Return trajectory cost. More...
 
double PathCost (Node *qFrom, Node *qTo)
 Compute path cost. More...
 
Vector3f newConfig (Node *q, Node *qNearest)
 Find a configuration at a distance step_size from nearest node to random node. More...
 
void add (Node *qNearest, Node *qNew)
 Add a node to the tree. More...
 
bool reached ()
 Check if the last node is close to the end position. More...
 
void setStepSize (double step)
 
void setMaxIterations (int iter)
 
void deleteNodes (Node *root)
 Delete all nodes using DFS technique. More...
 
void setStartPose (double x, double y, double theta)
 Set the Start position of robot. More...
 
void setGoalPose (double x, double y)
 Set the Destination position. More...
 
void setWorldInfo (double width, double height)
 Set the World information. More...
 
void set_max_iter (int x)
 
void set_step_size (double x)
 
void set_bot_radius (double x)
 
void set_goalBias (double x)
 
void set_turn_radius (double x)
 
void set_rrt_star_neighbour_factor (double x)
 
void set_bot_follow_dubin (bool x)
 

Public Attributes

RRTObstaclesobstacles
 
vector< Node * > nodes
 
vector< Node * > path
 
Noderoot
 
NodelastNode
 
Vector2f startPos
 
Vector2f endPos
 
double start_orient
 
int max_iter
 
double step_size
 
double world_width
 
double world_height
 
double bot_radius
 
double goalBias
 
double turn_radius
 
bool bot_follow_dubin
 
double rrt_star_neighbour_factor
 

Detailed Description

RRTStar Class.

Constructor & Destructor Documentation

RRTSTAR::RRTSTAR ( )

Constructor.

Member Function Documentation

void RRTSTAR::add ( Node qNearest,
Node qNew 
)

Add a node to the tree.

Parameters
qNearest
qNew
double RRTSTAR::Cost ( Node q)

Return trajectory cost.

Parameters
qcost of node be computed
Returns
Cost of the node
void RRTSTAR::deleteNodes ( Node root)

Delete all nodes using DFS technique.

Parameters
rootroot node or the first node
double RRTSTAR::distance ( Vector2f &  p,
Vector2f &  q 
)

Helper method to find distance between two positions.

Parameters
pPoint p
qPoint q
Returns
Euclidean distance between Point P and Q
Node * RRTSTAR::getRandomNode ( )

Generate a random node in the field.

Returns
Random Node
void RRTSTAR::initialize ( )

Initialize root node of RRTSTAR.

void RRTSTAR::near ( Vector2f  point,
float  radius,
vector< Node * > &  out_nodes 
)

Get neighborhood nodes of a given configuration/position.

Parameters
pointpoint in the world
radiusradius to check for neighbors
out_nodeslist of nodes in that radius
Node * RRTSTAR::nearest ( Vector2f  point)

Get nearest node from a given configuration/position.

Parameters
pointgiven point in world
Returns
Nearest Node in the node list
Vector3f RRTSTAR::newConfig ( Node q,
Node qNearest 
)

Find a configuration at a distance step_size from nearest node to random node.

Parameters
qgiven node
qNearestnearest node in list
Returns
New config with (x,y,theta)
double RRTSTAR::PathCost ( Node qFrom,
Node qTo 
)

Compute path cost.

Parameters
qFromfrom node
qToto node
Returns
The path cost from Node a to Node b
bool RRTSTAR::reached ( )

Check if the last node is close to the end position.

Returns
true/false - reached destination/not reached
void RRTSTAR::set_bot_follow_dubin ( bool  x)
void RRTSTAR::set_bot_radius ( double  x)
void RRTSTAR::set_goalBias ( double  x)
void RRTSTAR::set_max_iter ( int  x)
void RRTSTAR::set_rrt_star_neighbour_factor ( double  x)
void RRTSTAR::set_step_size ( double  x)
void RRTSTAR::set_turn_radius ( double  x)
void RRTSTAR::setGoalPose ( double  x,
double  y 
)

Set the Destination position.

Parameters
x
y
Returns
void RRTSTAR::setMaxIterations ( int  iter)
void RRTSTAR::setStartPose ( double  x,
double  y,
double  theta 
)

Set the Start position of robot.

Parameters
x
y
theta
Returns
void RRTSTAR::setStepSize ( double  step)
void RRTSTAR::setWorldInfo ( double  width,
double  height 
)

Set the World information.

Parameters
x
y
Returns

Member Data Documentation

bool RRTSTAR::bot_follow_dubin

Robot turn radius

double RRTSTAR::bot_radius

World height

Vector2f RRTSTAR::endPos

Start pose

double RRTSTAR::goalBias

bot radius

Node* RRTSTAR::lastNode

root node (initial pose)

int RRTSTAR::max_iter

Start orientation

vector<Node *> RRTSTAR::nodes

obstacle information

RRTObstacles* RRTSTAR::obstacles
vector<Node *> RRTSTAR::path

List of nodes in explored database

Node* RRTSTAR::root

path with tracing the nodes

double RRTSTAR::rrt_star_neighbour_factor
double RRTSTAR::start_orient

end pose

Vector2f RRTSTAR::startPos

last Node of the rrt* exploration

double RRTSTAR::step_size

maximum iterations

double RRTSTAR::turn_radius

goal Bias

double RRTSTAR::world_height

World width

double RRTSTAR::world_width

Step size(distance between points)


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