src/smp/components/collision_checkers/mu_calculus.h

Go to the documentation of this file.
00001 
00008 #ifndef _SMP_COLLISION_CHECKER_MU_CALCULUS_H_
00009 #define _SMP_COLLISION_CHECKER_MU_CALCULUS_H_
00010 
00011 #include <smp/components/collision_checkers/base.h>
00012 #include <smp/common/region.h>
00013 
00014 #include <list>
00015 
00016 
00017 namespace smp {
00018 
00020 
00028     template< class typeparams, int NUM_DIMENSIONS >
00029     class collision_checker_mu_calculus : public collision_checker_base<typeparams> {
00030         
00031         
00032         typedef typename typeparams::state state_t;
00033         typedef typename typeparams::input input_t;
00034         typedef typename typeparams::vertex_data vertex_data_t;
00035         typedef typename typeparams::edge_data edge_data_t;
00036 
00037         typedef vertex<typeparams> vertex_t;
00038         typedef edge<typeparams> edge_t;    
00039         typedef trajectory<typeparams> trajectory_t;
00040 
00041         typedef region<NUM_DIMENSIONS> region_t;
00042 
00043         int num_discretization_steps;
00044         double discretization_length;
00045 
00046         // 0: no discretization
00047         // 1: use steps discretization
00048         // 2: use length discretization 
00049         int discretization_method;     
00050 
00051         list< region_t* > list_regions;
00052         
00053         // returns the index for the region that the given state lies in
00054         inline int get_region_index (double state_vars[NUM_DIMENSIONS]);
00055 
00056 
00057     public:
00058         collision_checker_mu_calculus ();
00059         ~collision_checker_mu_calculus ();
00060 
00061 
00062         int cc_update_insert_vertex (vertex_t *vertex_in);
00063     
00064 
00065         int cc_update_insert_edge (edge_t *edge_in);  
00066 
00067 
00068         int cc_update_delete_vertex (vertex_t *vertex_in);
00069     
00070     
00071         int cc_update_delete_edge (edge_t *edge_in);
00072 
00073 
00074         int check_collision_state (state_t *state_in);
00075 
00076 
00077         int check_collision_trajectory (trajectory_t *trajectory_in);
00078     
00079 
00093         int set_discretization_steps (int num_discretization_steps_in);
00094 
00095 
00108         int set_discretization_length (double discretization_length_in);
00109 
00110 
00122         int add_region (region_t &region_in);
00123 
00124     };
00125 
00126 
00127 }
00128 
00129 #endif