00001
00002
00003
00004
00005 #ifndef CAJUN_PARKING_TASK_PLANNER_H
00006 #define CAJUN_PARKING_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 parking_task_planner_t : public task_planner_t
00018 {
00019 public:
00020 parking_task_planner_t ();
00021
00022 void set_plan (rndf_point_t *end_wp_id_);
00023 void get_plan (rndf_point_t* &end_wp_id_);
00024 void modify_plan (rndf_point_t *end_wp_id_);
00025
00026 void set_active ();
00027
00028 path_status_t generate_path (
00029 world_state_t *ws_, path_t &path_, double &p_len_left_,
00030 const path_t &base_path_);
00031 bool get_path_lane_lids (unsigned &sid_,
00032 std::vector<unsigned> &lids_);
00033 bool is_task_complete (world_state_t *ws_, double x_, double y_,
00034 double heading_);
00035 bool is_path_tight () { return true; }
00036 void print_plan ();
00037
00038 protected:
00039 const uc_planner_param_t *m_uc_param;
00040
00041
00042 rndf_point_t *m_end_rp;
00043
00044
00045 double m_parking_spot_length;
00046
00047 double m_park_x;
00048 double m_park_y;
00049
00050 double m_pre_path_orient;
00051
00052 double m_start_x;
00053 double m_start_y;
00054 double m_start_orient;
00055
00056 double m_park_orient;
00057 path_t m_pk_path;
00058
00059 bool m_first_iteration;
00060
00061 void compute_parking_path (path_t &path_, double start_orient_,
00062 double start_x_, double start_y_,
00063 double end_orient_, double end_x_,
00064 double end_y_);
00065 void note_pk_start (path_t &path_);
00066 };
00067
00068
00069 };
00070
00071
00072 #endif