00001 // Copyright (C) 2005 University of Louisiana at Lafayette 00002 // Authors: Suresh Golconda 00003 00004 //TODO: Need to move it common place 00005 00006 00007 #ifndef CAJUN_BASE_INTERPOLATOR_H 00008 #define CAJUN_BASE_INTERPOLATOR_H 00009 00010 #include <vector> 00011 00012 namespace cajun 00013 { 00014 class base_interpolator_t 00015 { 00016 public: 00017 struct waypoint_t 00018 { 00019 double x; 00020 double y; 00021 double min_speed; 00022 double max_speed; 00023 double azimuth; 00024 }; 00025 typedef std::vector<waypoint_t> uniform_path_t; 00026 00027 double m_interp_dis; 00028 00029 base_interpolator_t () {} 00030 virtual ~base_interpolator_t () {} 00031 00032 virtual void interpolate (uniform_path_t const &input_path, 00033 uniform_path_t &output_path) = 0; 00034 virtual void interpolate_wp (const waypoint_t *start_wp, 00035 const waypoint_t *end_wp, 00036 uniform_path_t &output_path) = 0; 00037 double get_inter_dis () { return m_interp_dis; } 00038 }; 00039 }; 00040 00041 #endif