The cost evaluator class based on the trajectory execution time. More...
#include <time.h>
Public Member Functions | |
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. | |
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. |
The cost evaluator class based on the trajectory execution time.
This class computes the cost of a trajectory according to the time it takes to execute that particular trajectory.
int smp::cost_evaluator_time< typeparams >::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::cost_evaluator_time< typeparams >::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 >.
double smp::cost_evaluator_time< typeparams >::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 >.