A combination of the minimum-time cost evaluator and the reachability model checker. More...
#include <minimum_time_reachability.h>
Public Member Functions | |
minimum_time_reachability (const region_t ®ion_goal) | |
Constructor that initializes the goal region. | |
int | set_goal_region (const region_t ®ion_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. |
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.
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.
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.
region_goal | New goal region. |
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.
edge_in | A pointer to the edge with modified cost. |
Implements smp::cost_evaluator_base< typeparams >.
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.
vertex_in | A pointer to the vertex with modified cost. |
Implements smp::cost_evaluator_base< typeparams >.
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.
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.
state_initial_in | Initial state that the trajectory starts from |
trajectory_in | Trajectory |
state_final_in | Final state that the trajectory reaches |
Implements smp::cost_evaluator_base< typeparams >.
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.
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.
trajectory_out | The trajectory output by the function. Set to an empty trajectory if no trajectory that solves the problem is present in the graph. |
Implements smp::model_checker_base< typeparams >.
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.
edge_in | A pointer to deleted edge. |
Implements smp::model_checker_base< typeparams >.
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.
vertex_in | A pointer to deleted vertex. |
Implements smp::model_checker_base< typeparams >.
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.
edge_in | A pointer to the new edge. |
Implements smp::model_checker_base< typeparams >.
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.
vertex_in | A pointer to the new vertex. |
Implements smp::model_checker_base< typeparams >.
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.
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.
region_goal | New goal region. |