smp::rrt< typeparams > Class Template Reference

RRT algorithm. More...

#include <rrt.h>

Inheritance diagram for smp::rrt< typeparams >:
smp::planner_incremental< typeparams > smp::planner< typeparams >

List of all members.

Public Member Functions

 rrt (sampler_t &sampler_in, distance_evaluator_t &distance_evaluator_in, extender_t &extender_in, collision_checker_t &collision_checker_in, model_checker_t &model_checker_in)
 A constructor that initializes all components.
int iteration ()
 A function call to initiate one iteration of the algorithm.

Detailed Description

template<class typeparams>
class smp::rrt< typeparams >

RRT algorithm.

Provides an implementation of the RRT algorithm. Inherits from the generic incremental sampling-based motion planner, overriding the iteration function.

Examples:

libbot_rrt_double_integrator.cpp, libbot_rrt_dubins_car.cpp, libbot_rrt_dubins_double_integrator_airplane.cpp, libbot_rrt_single_integrator.cpp, standalone_rrt_double_integrator.cpp, standalone_rrt_dubins_car.cpp, standalone_rrt_dubins_double_integrator_airplane.cpp, and standalone_rrt_single_integrator.cpp.


Constructor & Destructor Documentation

template<class typeparams >
smp::rrt< typeparams >::rrt ( sampler_t sampler_in,
distance_evaluator_t distance_evaluator_in,
extender_t extender_in,
collision_checker_t collision_checker_in,
model_checker_t model_checker_in 
)

A constructor that initializes all components.

This is the recommended constructor that initializes all components all at once. It calls the corresponding constructor of the base class planner_incremental<typeparams> with the same arguments.

Parameters:
sampler_inNew sampler component.
distance_evaluator_inNew distance evaluator component.
extender_inNew extension function component.
collision_checker_inNew collision checker component.
model_checker_inNew model checker component.

Member Function Documentation

template<class typeparams >
int smp::rrt< typeparams >::iteration ( ) [virtual]

A function call to initiate one iteration of the algorithm.

Runs one iteration of the RRT algorithm which includes the following steps:

  • get one sample state (using the sampler component)
  • find the vertex in the graph that is nearest to the sample state (using the distance evaluator component)
  • generate a trajectory that starts from the state stored in the nearest vertex and reaches exactly or approximately to the sample state (using the extension function component)
  • check whether the new trajectory satsifies the conditions for being collision free (using the collision checker component).
  • if the new trajectory is collision free, then add it into the graph and incrementally check whether the graph includes a trajectory that satisfies the termination requirement (using the model checker component).
Returns:
Returns 1 for success, and a non-positive number for failure.

Implements smp::planner_incremental< typeparams >.


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