Standard collision checker. More...
#include <standard.h>
Public Member Functions | |
int | cc_update_insert_vertex (vertex_t *vertex_in) |
Update function for vertex insertion. | |
int | cc_update_insert_edge (edge_t *edge_in) |
Update function for edge insertion. | |
int | cc_update_delete_vertex (vertex_t *vertex_in) |
Update function for vertex deletion. | |
int | cc_update_delete_edge (edge_t *edge_in) |
Update function for edge insertion. | |
int | check_collision_state (state_t *state_in) |
Checks whether a given state is collision free. | |
int | check_collision_trajectory (trajectory_t *trajectory_in) |
Checks whether a given trajectory is collision free. | |
int | set_discretization_steps (int num_discretization_steps_in) |
Sets the number of discretization steps. | |
int | set_discretization_length (double discretization_length_in) |
Sets the length for the discretization. | |
int | add_obstacle (region_t &obstacle_in) |
Adds a new obstacle to the list of obstacles. |
Standard collision checker.
This class implements the standard collision checker. Standard collision checking procedure discretizes the trajectories connecting consecutive states. The said trajectory is obtained by a linear interpolation between the said states. Each interpolated state is, then, checked for collisioon with all the obstacles. This procedure is continued for all the states in the trajectory. A single states is checked for collision by merely going through the list of obstacles to check whether the query state resides inside any of the obstacles.
libbot_rrg_double_integrator.cpp, libbot_rrg_dubins_car.cpp, libbot_rrg_dubins_double_integrator_airplane.cpp, libbot_rrg_single_integrator.cpp, libbot_rrt_double_integrator.cpp, libbot_rrt_dubins_car.cpp, libbot_rrt_dubins_double_integrator_airplane.cpp, libbot_rrt_single_integrator.cpp, 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_rrg_double_integrator.cpp, standalone_rrg_dubins_car.cpp, standalone_rrg_dubins_double_integrator_airplane.cpp, standalone_rrg_single_integrator.cpp, standalone_rrt_double_integrator.cpp, standalone_rrt_dubins_car.cpp, standalone_rrt_dubins_double_integrator_airplane.cpp, standalone_rrt_single_integrator.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.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::add_obstacle | ( | region_t & | obstacle_in | ) |
Adds a new obstacle to the list of obstacles.
This function adds a new obstacle to the list of obstacle, which must be a type of region<NUM_DIMENSIONS>. Note that the NUM_DIMENSIONS template argument of the region and this class must match. Otherwise, compuilation errors will occur.
obstacle_in | The pointer to the new obstacle |
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::cc_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::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::cc_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::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::cc_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::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::cc_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::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::check_collision_state | ( | state_t * | state_in | ) | [virtual] |
Checks whether a given state is collision free.
state_in | The state that will be checked for collision. |
Implements smp::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::check_collision_trajectory | ( | trajectory_t * | trajectory_in | ) | [virtual] |
Checks whether a given trajectory is collision free.
trajectory_in | The trajectory that will be checked for collision. |
Implements smp::collision_checker_base< typeparams >.
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::set_discretization_length | ( | double | discretization_length_in | ) |
Sets the length for the discretization.
This function can be used to set the length of the discretization. In this case, the trajectory between two states is approximated by a line connecting them, and discretized in such a way that the maximum length of any segment is at most the parameter provided to this function.
discretization_length_in | Length of the discretization. |
int smp::collision_checker_standard< typeparams, NUM_DIMENSIONS >::set_discretization_steps | ( | int | num_discretization_steps_in | ) |
Sets the number of discretization steps.
This function can be used to set the number of intermediate states in the discretization process. In this case, the trajectory between two consecutive states is approximated by a straight line. And this line is discretized in such a way that the line includes number of states exactly equal to that provided to this function.
num_discretization_steps_in | Number of discretization steps. |