src/smp/components/extenders/double_integrator.h

Go to the documentation of this file.
00001 
00010 #ifndef _SMP_SYSTEM_DOUBLE_INTEGRATOR_H_
00011 #define _SMP_SYSTEM_DOUBLE_INTEGRATOR_H_
00012 
00013 
00014 #include <smp/components/extenders/state_array_double.h>
00015 #include <smp/components/extenders/input_array_double.h>
00016 #include <smp/components/extenders/base.h>
00017 
00018 
00019 #include <list>
00020 
00021 using namespace std;
00022 
00023 namespace smp {
00024 
00025 
00027 
00033     template< int NUM_DIMENSIONS > 
00034     class state_double_integrator : public state_array_double<NUM_DIMENSIONS*2> {
00035 
00036     };
00037 
00038 
00039 
00041 
00047     template< int NUM_DIMENSIONS >
00048     class input_double_integrator : public input_array_double<NUM_DIMENSIONS+1> {
00049     
00050     };
00051 
00052 
00053 
00055 
00064     template < class typeparams, int NUM_DIMENSIONS >
00065     class extender_double_integrator : public extender_base<typeparams> {
00066 
00067 
00068         typedef typename typeparams::state state_t;
00069         typedef typename typeparams::input input_t;
00070         typedef typename typeparams::vertex_data vertex_data_t;
00071         typedef typename typeparams::edge_data edge_data_t;
00072 
00073         typedef vertex<typeparams> vertex_t;
00074         typedef edge<typeparams> edge_t;
00075 
00076         typedef trajectory< typeparams > trajectory_t;
00077 
00078     
00079 
00080         // // TODO: get back to appropriate velocity constraints.
00081         // double velocity_constraint_min[NUM_DIMENSIONS];
00082         // double velocity_constraint_max[NUM_DIMENSIONS];
00083 
00084        
00085     
00086         int extend_with_optimal_control (state_t *state_ini, state_t *state_fin, 
00087                                          list<state_t*> *list_states_out, list<input_t*> *list_inputs_out);
00088 
00089 
00090     public :
00091 
00092         extender_double_integrator ();
00093         ~extender_double_integrator ();
00094 
00095     
00096         int ex_update_insert_vertex (vertex_t *vertex_in) {return 1;}
00097     
00098 
00099         int ex_update_insert_edge (edge_t *edge_in)  {return 1;}
00100 
00101 
00102         int ex_update_delete_vertex (vertex_t *vertex_in) {return 1;}
00103     
00104     
00105         int ex_update_delete_edge (edge_t *edge_in) {return 1;}
00106 
00107 
00108     
00109         int extend (state_t *state_from_in, state_t *state_towards_in,
00110                     int *exact_connection_out, trajectory_t *trajectory_out,
00111                     list<state_t*> *intermediate_vertices_out);
00112     
00113     };
00114 
00115 
00116 }
00117 
00118 #endif