00001
00002
00003
00004
00005 #ifndef CAJUN_FTC_GUIDE_H
00006 #define CAJUN_FTC_GUIDE_H
00007
00008 #include "guide_mode.H"
00009 #include "conf.H"
00010
00011 namespace cajun
00012 {
00018 class ftc_guide_t : public guide_mode_t
00019 {
00020 private:
00021 double m_look_ahead_time;
00022 double m_min_LH_distance;
00023 double m_max_LH_distance;
00024 bool m_selective_rounding;
00025
00026 bool read_conf (const conf_t &conf);
00027 void get_drive_point_position (waypoint_t &goal_wp);
00028 bool can_look_beyond_wp (const uniform_path_t &goal_data,
00029 unsigned goal_index);
00030 void track_with_drive_point (double look_ahead_distance,
00031 const uniform_path_t &goal_data,
00032 unsigned &goal_index,
00033 double x, double y,
00034 double &distance_from_next_wp,
00035 double heading);
00036 void get_drive_point (waypoint_t &goal_wp,
00037 waypoint_t next_path_wp,
00038 double distance_from_next_wp);
00039 public:
00040 ftc_guide_t (const conf_t &conf){read_conf (conf);}
00041 void guide (guide_data_t &gd, const uniform_path_t &goal_data,
00042 unsigned goal_index, double x, double y,
00043 double heading, double speed, bool valid_path,
00044 bool forward, bool tight_path, double tstamp);
00045
00046 };
00047 };
00048 #endif