smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS > Class Template Reference

A combination of the minimum-time cost evaluator and the reachability model checker. More...

#include <minimum_time_reachability.h>

Inheritance diagram for smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >:
smp::model_checker_base< typeparams > smp::cost_evaluator_base< typeparams >

List of all members.

Public Member Functions

 minimum_time_reachability (const region_t &region_goal)
 Constructor that initializes the goal region.
int set_goal_region (const region_t &region_goal)
 Modifies the goal region.
int ce_update_vertex_cost (vertex_t *vertex_in)
 Update function for vertex cost modification.
int ce_update_edge_cost (edge_t *edge_in)
 Update function for edge cost modification.
int mc_update_insert_vertex (vertex_t *vertex_in)
 Update function for vertex insertion.
int mc_update_insert_edge (edge_t *edge_in)
 Update function for edge insertion.
int mc_update_delete_vertex (vertex_t *vertex_in)
 Update function for vertex deletion.
int mc_update_delete_edge (edge_t *edge_in)
 Update function for edge insertion.
int get_solution (trajectory_t &trajectory_out)
 Returns a trajectory, if one exists, that solves the problem.
double evaluate_cost_trajectory (state_t *state_initial_in, trajectory_t *trajectory_in, state_t *state_final_in=0)
 Evaluates the cost of a trajectory.
double get_best_cost ()
 Returns the cost of the best trajectory.
int clear_update_function_list ()
 Clears the update function list for minimum cost update.
int register_new_update_function (update_func_t update_function)
 Clears the update function list for minimum cost update.

Detailed Description

template<class typeparams, int NUM_DIMENSIONS>
class smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >

A combination of the minimum-time cost evaluator and the reachability model checker.

Combining the minimum-time cost evaluator and the reachability model checker, this class is able to keep track of the minimum-time that reaches the goal region. The class constitutes a good example of multiple-purpose algorithm component made possible with mutliple inheritance.

Examples:

libbot_rrtstar_double_integrator.cpp, libbot_rrtstar_dubins_car.cpp, libbot_rrtstar_dubins_double_integrator_airplane.cpp, libbot_rrtstar_single_integrator.cpp, libbot_rrtstar_single_integrator_halton.cpp, libbot_rrtstar_single_integrator_trajectory_biasing.cpp, libbot_rrtstar_single_integrator_trajectory_biasing_and_bnb.cpp, standalone_rrtstar_double_integrator.cpp, standalone_rrtstar_dubins_car.cpp, standalone_rrtstar_dubins_double_integrator_airplane.cpp, standalone_rrtstar_single_integrator.cpp, standalone_rrtstar_single_integrator_halton.cpp, standalone_rrtstar_single_integrator_trajectory_biasing.cpp, and standalone_rrtstar_single_integrator_trajectory_biasing_and_bnb.cpp.


Constructor & Destructor Documentation

template<class typeparams , int NUM_DIMENSIONS>
smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::minimum_time_reachability ( const region_t region_goal)

Constructor that initializes the goal region.

This constructor initializes the goal region. Note that the there is a constructor with no arguments. If initiated that constructor will initialize the goal region to its default values derived from the region class, which amounts to a point in the origin.

Parameters:
region_goalNew goal region.

Member Function Documentation

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::ce_update_edge_cost ( edge_t edge_in) [virtual]

Update function for edge cost modification.

This function is called by the planner whenever the cost associated with an edge is changed by the optimizing (incremental) planning algorithm.

Parameters:
edge_inA pointer to the edge with modified cost.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::cost_evaluator_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::ce_update_vertex_cost ( vertex_t vertex_in) [virtual]

Update function for vertex cost modification.

This function is called by the planner whenever a the cost associated with a vertex is changed by the optimizing (incremental) planning algorithm.

Parameters:
vertex_inA pointer to the vertex with modified cost.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::cost_evaluator_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::clear_update_function_list ( )

Clears the update function list for minimum cost update.

Whenever an optimizing motion planning algorithm using this component finds a better trajectory, this component calls a list of functions that are registered for this call back. This method clears this list of functions.

Returns:
Returns 1 if succcess, and a non-positive value to indicate error.
template<class typeparams , int NUM_DIMENSIONS>
double smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::evaluate_cost_trajectory ( state_t *  state_initial_in,
trajectory_t trajectory_in,
state_t *  state_final_in = 0 
) [virtual]

Evaluates the cost of a trajectory.

This function returns the cost of a given trajectory that starts from state_initial_in and reaches state_final_in. Sometimes the final state is embedded in the trajectory itself, in which case state_final_in argument can be set to NULL.

Parameters:
state_initial_inInitial state that the trajectory starts from
trajectory_inTrajectory
state_final_inFinal state that the trajectory reaches
Returns:
Returns 1 for success, and a non-positive number to indicate error.

Implements smp::cost_evaluator_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
double smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::get_best_cost ( )

Returns the cost of the best trajectory.

This function returns the cost of the minimum cost trajectory that reaches the goal, if such a trajectory exists. Otherwise, it returns -1.0.

Returns:
Returns the cost of the minimum cost trajectory, or -1.0 to indicate no such trajectory exists.
template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::get_solution ( trajectory_t trajectory_out) [virtual]

Returns a trajectory, if one exists, that solves the problem.

This function can be called by the user to get a trajectory that solves the particular problem at hand. If the problem involves reaching a goal set, then this function will return a trajectory that does so, if such a trajectory currently exists in the graph.

Parameters:
trajectory_outThe trajectory output by the function. Set to an empty trajectory if no trajectory that solves the problem is present in the graph.
Returns:
Returns 1 for success, a non-positive value to indiacate error.

Implements smp::model_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::mc_update_delete_edge ( edge_t edge_in) [virtual]

Update function for edge insertion.

This function is called by the planner whenever an edge is delete from the graph. A pointer to the edge is given as an argument.

Parameters:
edge_inA pointer to deleted edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implements smp::model_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::mc_update_delete_vertex ( vertex_t vertex_in) [virtual]

Update function for vertex deletion.

This function is called by the planner whenever a vertex is deleted from the graph. A pointer to the vertex is given as an argument.

Parameters:
vertex_inA pointer to deleted vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::model_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::mc_update_insert_edge ( edge_t edge_in) [virtual]

Update function for edge insertion.

This function is called by the planner whenever a new edge is added to the graph. A pointer to the new edge is given as an argument.

Parameters:
edge_inA pointer to the new edge.
Returns:
Return 1 for success, a non-positive value to indiacate error.

Implements smp::model_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::mc_update_insert_vertex ( vertex_t vertex_in) [virtual]

Update function for vertex insertion.

This function is called by the planner whenever a new vertex is added to the graph. A pointer to the new vertex is given as an argument.

Parameters:
vertex_inA pointer to the new vertex.
Returns:
Return 1 if success, a non-positive value to indiacate error.

Implements smp::model_checker_base< typeparams >.

template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::register_new_update_function ( update_func_t  update_function)

Clears the update function list for minimum cost update.

Whenever an optimizing motion planning algorithm using this component finds a better trajectory, this component calls a list of functions that are registered for this call back. This method registers a new update function, i.e., adds the function given in the argument to the appropriate list.

Returns:
Returns 1 if succcess, and a non-positive value to indicate error.
template<class typeparams , int NUM_DIMENSIONS>
int smp::minimum_time_reachability< typeparams, NUM_DIMENSIONS >::set_goal_region ( const region_t region_goal)

Modifies the goal region.

This function sets the goal region to its new value given as an argument.

Parameters:
region_goalNew goal region.
Returns:
Returns 1 if succcess, and a non-positive value to indicate error.

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