00001
00002
00003
00004
00005 #ifndef CAJUN_LANE_TASK_PLANNER_H
00006 #define CAJUN_LANE_TASK_PLANNER_H
00007
00008
00009 #include "task_planner.H"
00010 #include "uc_planner_param.H"
00011 #include "rndf_point.H"
00012
00013 namespace cajun
00014 {
00015
00016
00017 class lane_task_planner_t : public task_planner_t
00018 {
00019 public:
00020 lane_task_planner_t ();
00021
00022 void set_plan (rndf_point_t *end_wp_id_, double x_, double y_);
00023
00024 void set_plan (rndf_point_t *end_wp_id_, double dis_);
00025
00026 void get_plan (rndf_point_t* &end_wp_id_, double &x_,
00027 double &y_, double &dis_);
00028
00029 void modify_plan (rndf_point_t *end_wp_id_, double x_, double y_);
00030
00031 void set_active ();
00032
00033 path_status_t generate_path (
00034 world_state_t *ws_, path_t &path_, double &p_len_left_,
00035 const path_t &base_path_);
00036
00037 bool get_path_lane_lids (unsigned &sid_,
00038 std::vector<unsigned> &lids_);
00039
00040 bool get_start_lid (unsigned &sid_, unsigned &lid_);
00041
00042 bool is_task_complete (world_state_t *ws_, double x_, double y_,
00043 double heading_);
00044
00045 void print_plan ();
00046
00047 protected:
00048 const uc_planner_param_t *m_uc_param;
00049
00050
00051 rndf_point_t *m_end_wp_id;
00052 double m_end_x;
00053 double m_end_y;
00054 double m_drive_dis;
00055 bool m_drive_by_distance;
00056
00057 bool m_recorded_start;
00058
00059 double m_start_x;
00060 double m_start_y;
00061
00062 double m_lane_width;
00063
00064 void compute_end_xy (rndf_lane_data_t const &lb_,
00065 path_t const &path);
00066
00067 };
00068
00069
00070 };
00071
00072
00073 #endif