00001
00002
00003
00004
00005 #ifndef CAJUN_UNPARKING_TASK_PLANNER_H
00006 #define CAJUN_UNPARKING_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 unparking_task_planner_t : public task_planner_t
00018 {
00019 public:
00020 unparking_task_planner_t ();
00021
00022 void set_plan (rndf_point_t *rp1_, rndf_point_t *rp2_);
00023 void get_plan (rndf_point_t* &rp1_,rndf_point_t* &rp2_);
00024 void modify_plan (rndf_point_t *end_wp_id_, rndf_point_t *rp2_);
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_parking_rp;
00043 rndf_point_t *m_post_parking_rp;
00044 double m_unpark_orient;
00045
00046 path_t m_pk_path;
00047
00048 bool m_first_iteration;
00049
00050 void set_paramters (rndf_point_t *rp1_, rndf_point_t *rp2_);
00051 void compute_unparking_path (path_t const &base_path_, path_t &path_);
00052
00053 };
00054
00055
00056 };
00057
00058
00059 #endif