cajun::task_plan_handler_t Class Reference

#include <task_plan_handler.H>

List of all members.

Public Member Functions

 task_plan_handler_t (tp_plan_t *tp_plan_, world_state_t *ws_, mission_handler_t *mh, rndf_t const *rndf_, mdf_t const *mdf_)
void pass_lane (blocked_lane_data_t &blk_data, unsigned path_blk_ind_)
 Handles blocked LF_TP by modifying its goal to before block point, and adding PL_TP to avoid the blockage and a LF_TP to complete the original LF_TP's goal.
void insert_UT_TP (unsigned tp_index_, unsigned sid_, unsigned lid_1_, unsigned lid_2_)
 Creates and inserts a 'Lane following TP' to the m_plan at specified index.
void plan_task_planner (mission_plan_t &mission_plan_)
 Creates list of task planners to achieve the mission plan, which is a list of waypoints. m_plan is updated with this list of task planners.
void flush_tps ()
 Removes all task planners.
void print ()

Private Member Functions

bool insert_PL_TP (unsigned tp_index_, blocked_lane_data_t &blk_data, unsigned sid, unsigned org_lid, unsigned passing_lid, double blk_x, double blk_y, double orig_end_x, double orig_end_y)
 Creates and Inserts 'passing lane TP' to the plan_ at specified index.
void insert_LF_TP (unsigned tp_index_, rndf_point_t *lane_end_wp_id, double l_end_x, double l_end_y)
 Creates and inserts a 'Lane following TP' to the m_plan at specified index.
void insert_to_task_plan (task_planner_t *tp_, unsigned pos_)
 Inserts given TP at specified index in plan_ task planner list.
double dis_before_LC (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_)
 returns -1 if lane is not long enough to drive for a while before LC. Else if lane length left apart from that being used for changing lane is greater than dis_before_LC, than retuns dis_before_LC. Else if half of the distance left apart from that being used for changing lane
void add_lane_tp (rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
 creates and adds a LF_TP to tp_plan_
void add_intersection_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
 creates and adds a IT_TP to tp_plan_
void add_initial_lf (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
void add_change_lane_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
 creates and adds a CL_TP to tp_plan_
void add_uturn_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
 creates and adds a UT_TP to tp_plan_
void add_zone_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
void add_parking_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)
void add_unparking_tp (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_, tp_plan_t *tp_plan_)

Private Attributes

tp_plan_tm_tp_plan
world_state_t * m_ws
mission_handler_tm_mh
rndf_t const * m_rndf
mdf_t const * m_mdf
uc_planner_param_t const * m_uc_param

Constructor & Destructor Documentation

cajun::task_plan_handler_t::task_plan_handler_t ( tp_plan_t tp_plan_,
world_state_t *  ws_,
mission_handler_t mh,
rndf_t const *  rndf_,
mdf_t const *  mdf_ 
) [inline]

Member Function Documentation

void task_plan_handler_t::add_change_lane_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_initial_lf ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_intersection_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_lane_tp ( rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_parking_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_unparking_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
void task_plan_handler_t::add_uturn_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]

creates and adds a UT_TP to tp_plan_

References cajun::task_planner_t::init(), m_mdf, m_rndf, and cajun::uturn_task_planner_t::set_plan().

Referenced by plan_task_planner().

void task_plan_handler_t::add_zone_tp ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_,
tp_plan_t tp_plan_ 
) [private]
double task_plan_handler_t::dis_before_LC ( rndf_point_t wp_id_1_,
rndf_point_t wp_id_2_ 
) [private]

returns -1 if lane is not long enough to drive for a while before LC. Else if lane length left apart from that being used for changing lane is greater than dis_before_LC, than retuns dis_before_LC. Else if half of the distance left apart from that being used for changing lane

References cajun::uc_planner_param_t::dis_before_LC, cajun::uc_planner_param_t::m_look_ahead_ratio, m_rndf, m_uc_param, cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().

Referenced by add_initial_lf().

void cajun::task_plan_handler_t::flush_tps (  )  [inline]

Removes all task planners.

References m_tp_plan.

Referenced by cajun::state_machine_t::start_new_mission_from().

void task_plan_handler_t::insert_LF_TP ( unsigned  tp_index_,
rndf_point_t lane_end_wp_id,
double  l_end_x,
double  l_end_y 
) [private]

Creates and inserts a 'Lane following TP' to the m_plan at specified index.

References cajun::task_planner_t::init(), insert_to_task_plan(), m_mdf, m_rndf, and cajun::lane_task_planner_t::set_plan().

Referenced by pass_lane().

bool task_plan_handler_t::insert_PL_TP ( unsigned  tp_index_,
blocked_lane_data_t &  blk_data,
unsigned  sid,
unsigned  org_lid,
unsigned  passing_lid,
double  blk_x,
double  blk_y,
double  orig_end_x,
double  orig_end_y 
) [private]
void task_plan_handler_t::insert_to_task_plan ( task_planner_t tp_,
unsigned  pos_ 
) [private]

Inserts given TP at specified index in plan_ task planner list.

References m_tp_plan.

Referenced by insert_LF_TP(), insert_PL_TP(), and insert_UT_TP().

void task_plan_handler_t::insert_UT_TP ( unsigned  tp_index_,
unsigned  sid_,
unsigned  lid_1_,
unsigned  lid_2_ 
)

Creates and inserts a 'Lane following TP' to the m_plan at specified index.

References cajun::task_planner_t::init(), insert_to_task_plan(), m_mdf, m_rndf, and cajun::uturn_task_planner_t::set_plan().

void task_plan_handler_t::pass_lane ( blocked_lane_data_t &  blk_data,
unsigned  path_blk_ind_ 
)

Handles blocked LF_TP by modifying its goal to before block point, and adding PL_TP to avoid the blockage and a LF_TP to complete the original LF_TP's goal.

References cajun::task_planner_t::get_path(), cajun::lane_task_planner_t::get_plan(), insert_LF_TP(), insert_PL_TP(), cajun::LANE_TP, m_rndf, m_tp_plan, and cajun::passing_lane_id().

Referenced by cajun::state_machine_t::pass_lane().

void task_plan_handler_t::plan_task_planner ( mission_plan_t mission_plan_  ) 
void task_plan_handler_t::print (  ) 

References m_tp_plan.


Member Data Documentation

mdf_t const* cajun::task_plan_handler_t::m_mdf [private]

Referenced by add_initial_lf().

rndf_t const* cajun::task_plan_handler_t::m_rndf [private]
world_state_t* cajun::task_plan_handler_t::m_ws [private]

The documentation for this class was generated from the following files:

Generated on Fri Apr 9 10:45:15 2010 for UCPlanner by  doxygen 1.6.1