cajun::planner_t Class Reference

#include <planner.H>

List of all members.

Public Member Functions

 planner_t (mdf_t const *mdf_, rndf_t const *rndf_, world_state_t *ws_)
 ~planner_t ()
void init ()
void get_steering_path (path_data_t &d_, path_data_t &base_path_)
 Compute path by calling task planners from m_plan.
path_turn_info_t get_path_turn_info ()
 Returns the status of up-coming or present turn.
bool is_finished ()
void get_mission_status (mission_status_data_t &ms_)
 Returns present mission status, which includes next checkpoint id, num checkpoints left and num task planners left.
void get_pres_lid (unsigned &sid_, unsigned &lid_)
 Returns lane id on which bot is on.

Protected Member Functions

void get_path (std::deque< task_planner_t * > &task_plan_, path_t &path, const path_t &b_path)
bool get_path_direction (std::deque< task_planner_t * > &task_plan_)
void update_path_flags (path_data_t &path_data_, path_data_t &b_path_data_)
 Updates the path's flag like, direction (forward, reverse), tight_path (true, false).
bool update_waypoints_reached (double x_, double y_)
bool ready_to_handle_blocked_lane (const path_t &b_path, unsigned blk_tp_ind_)
 Returns true if given blockage is on a active task planner's path and bot crossed the point on the path with zero speed.
void update_task_planner_status (double x_, double y_, double heading_)
 Check if a task planner is done and if so removes the task planner from m_plan list.
void update_planner_state ()
 Check if the mission if complete, else if mission is not done but m_plan with task planners is done then call update_plan to compute new plan. Returns false if mission is completed, else returns true.
void set_final_speed_limit (path_t &path_)
 Set the speed of final point in the path to zero.
void get_base_path (path_t &path_)
void reset_path_speed (path_t &path_)
 Reset the speed of the path, this function is not being use. This functions walks from end of the path to the beginning of the path check for first non zero speed and set the speed of the path following from that poitn to this speed. Was called to unset the zero speed path segment.
void adjust_path_speeds (path_t &path, const path_t &b_path)
 Goes through the path to find a point with zero speed limits, if found, sets speed of following points to zero.
void limit_path_speed (std::deque< task_planner_t * > &task_plan_, unsigned tp_ind_, unsigned path_ind_, double speed_)
bool analyze_path (path_t &b_path_)
 Goes through the path and check if its blocked by static obstacles and then by dynamic obstacles. Also handles the situation if blocked. Returns true = path is okay, false = path is not okay and re-generate the path.
void convoy_dynamic_object (blocked_lane_data_t &blk_data, unsigned blk_tp_ind, unsigned path_blk_index, double blk_speed)
 Handles if the path is blocked by a dynamic object. Presently it sets the speed so as maintain safe distance from front vehicle.
double dis_along_path (double x1_, double y1_, unsigned tp_ind_, unsigned path_ind_)
 Computes the distance along the global path, from (x1_, y1_) to bot's bumper.
void print_plan (std::deque< rndf_t::waypoint_id_t > const &detail_plan_, std::deque< rndf_t::waypoint_id_t > const &filtered_plan_)
 Prints the detail and filter plans.
void update_plan (bool could_be_at_start_shoot_=false)
 Update the mission plan and task planners.
double distance_from_static_blk (std::deque< task_planner_t * > const &plan_, blocked_lane_data_t const &blk_, unsigned tp_ind_, unsigned path_ind_)
 Returns true if its confirmed sitting before blocked lane with low speed for some fixed amount of time. This is added to compensate lack of determining static and dynamic objects.
double compute_convoy_dis (double speed_)
bool convoy_for_dyn_blk (unsigned blk_tp_ind, blocked_lane_data_t const &blk)

Protected Attributes

const uc_planner_param_tm_uc_param
double m_passing_lane_confirm_tstamp
mdf_t const * m_mdf
rndf_t const * m_rndf
path_generator_tm_path_generator
path_verifier_tm_path_verifier
traffic_verifier_tm_traffic_verifier
base_path_provider_tm_base_path_provider
task_plan_handler_tm_tp_handler
mission_handler_tm_mission_handler
std::deque< task_planner_t * > m_plan
mission_plan_t m_mission_plan
world_state_t * m_world_state
state_machine_tm_sm
bool m_first_iteration

Constructor & Destructor Documentation

planner_t::planner_t ( mdf_t const *  mdf_,
rndf_t const *  rndf_,
world_state_t *  ws_ 
)
planner_t::~planner_t (  ) 

Member Function Documentation

void planner_t::adjust_path_speeds ( path_t path,
const path_t b_path 
) [protected]

Goes through the path to find a point with zero speed limits, if found, sets speed of following points to zero.

bool planner_t::analyze_path ( path_t b_path_  )  [protected]

Goes through the path and check if its blocked by static obstacles and then by dynamic obstacles. Also handles the situation if blocked. Returns true = path is okay, false = path is not okay and re-generate the path.

m_uc_param->m_treat_dynamic_as_static &&

References convoy_dynamic_object(), convoy_for_dyn_blk(), distance_from_static_blk(), cajun::DYNAMIC, cajun::path_verifier_t::is_task_path_good(), m_path_verifier, m_plan, m_sm, m_traffic_verifier, cajun::uc_planner_param_t::m_treat_dynamic_as_static, m_uc_param, cajun::state_machine_t::nudge_path(), cajun::traffic_verifier_t::path_free_of_traffic(), cajun::STATIC, cajun::state_machine_t::tp_blocked(), cajun::trace_back_global_path(), and cajun::state_machine_t::update_state().

Referenced by get_steering_path().

double planner_t::compute_convoy_dis ( double  speed_  )  [protected]
void planner_t::convoy_dynamic_object ( blocked_lane_data_t &  blk_data,
unsigned  blk_tp_ind,
unsigned  path_blk_index,
double  blk_speed 
) [protected]

Handles if the path is blocked by a dynamic object. Presently it sets the speed so as maintain safe distance from front vehicle.

References compute_convoy_dis(), dis_along_path(), limit_path_speed(), m_plan, cajun::uc_planner_param_t::m_suggested_acceleration, m_uc_param, m_world_state, and cajun::trace_back_global_path().

Referenced by analyze_path().

bool planner_t::convoy_for_dyn_blk ( unsigned  blk_tp_ind,
blocked_lane_data_t const &  blk 
) [protected]

References cajun::CHANGE_LANE_TP, cajun::LANE_TP, and m_plan.

Referenced by analyze_path().

double planner_t::dis_along_path ( double  x1_,
double  y1_,
unsigned  tp_ind_,
unsigned  path_ind_ 
) [protected]

Computes the distance along the global path, from (x1_, y1_) to bot's bumper.

References m_plan, and m_world_state.

Referenced by convoy_dynamic_object().

double planner_t::distance_from_static_blk ( std::deque< task_planner_t * > const &  plan_,
blocked_lane_data_t const &  blk_,
unsigned  tp_ind_,
unsigned  path_ind_ 
) [protected]
void cajun::planner_t::get_base_path ( path_t path_  )  [protected]
void planner_t::get_mission_status ( mission_status_data_t &  ms_  ) 

Returns present mission status, which includes next checkpoint id, num checkpoints left and num task planners left.

References cajun::mission_handler_t::get_next_checkpoint_id(), cajun::mission_handler_t::get_num_checkpoints_left(), m_mission_handler, and m_plan.

Referenced by publish_mission_status().

void cajun::planner_t::get_path ( std::deque< task_planner_t * > &  task_plan_,
path_t path,
const path_t b_path 
) [protected]
bool cajun::planner_t::get_path_direction ( std::deque< task_planner_t * > &  task_plan_  )  [protected]

Referenced by update_path_flags().

path_turn_info_t planner_t::get_path_turn_info (  ) 
void planner_t::get_pres_lid ( unsigned &  sid_,
unsigned &  lid_ 
)

Returns lane id on which bot is on.

References m_plan.

Referenced by publish_mission_status().

void planner_t::get_steering_path ( path_data_t &  d_,
path_data_t &  base_path_ 
)
void planner_t::init (  ) 

References update_plan().

Referenced by main().

bool cajun::planner_t::is_finished (  )  [inline]
void cajun::planner_t::limit_path_speed ( std::deque< task_planner_t * > &  task_plan_,
unsigned  tp_ind_,
unsigned  path_ind_,
double  speed_ 
) [protected]

Referenced by convoy_dynamic_object().

void planner_t::print_plan ( std::deque< rndf_t::waypoint_id_t > const &  detail_plan_,
std::deque< rndf_t::waypoint_id_t > const &  filtered_plan_ 
) [protected]

Prints the detail and filter plans.

References cajun::uc_planner_param_t::m_print_plan, m_uc_param, message, and msg_logger.

bool planner_t::ready_to_handle_blocked_lane ( const path_t b_path,
unsigned  blk_tp_ind_ 
) [protected]

Returns true if given blockage is on a active task planner's path and bot crossed the point on the path with zero speed.

References get_path(), m_plan, m_world_state, and cajun::point_on_path().

void planner_t::reset_path_speed ( path_t path_  )  [protected]

Reset the speed of the path, this function is not being use. This functions walks from end of the path to the beginning of the path check for first non zero speed and set the speed of the path following from that poitn to this speed. Was called to unset the zero speed path segment.

void planner_t::set_final_speed_limit ( path_t path_  )  [protected]

Set the speed of final point in the path to zero.

Referenced by get_steering_path().

void planner_t::update_path_flags ( path_data_t &  path_data_,
path_data_t &  b_path_data_ 
) [protected]

Updates the path's flag like, direction (forward, reverse), tight_path (true, false).

References get_path_direction(), and m_plan.

Referenced by get_steering_path().

void planner_t::update_plan ( bool  could_be_at_start_shoot_ = false  )  [protected]
void planner_t::update_planner_state (  )  [protected]

Check if the mission if complete, else if mission is not done but m_plan with task planners is done then call update_plan to compute new plan. Returns false if mission is completed, else returns true.

References cajun::mission_handler_t::is_finished(), m_mission_handler, m_world_state, msg_logger, update_task_planner_status(), and cajun::mission_handler_t::update_waypoints_reached().

Referenced by get_steering_path().

void planner_t::update_task_planner_status ( double  x_,
double  y_,
double  heading_ 
) [protected]

Check if a task planner is done and if so removes the task planner from m_plan list.

References cajun::mission_handler_t::flush_blockages(), m_mission_handler, m_plan, m_world_state, message, msg_logger, and update_plan().

Referenced by update_planner_state().

bool cajun::planner_t::update_waypoints_reached ( double  x_,
double  y_ 
) [protected]

Member Data Documentation

Referenced by get_steering_path(), and planner_t().

Referenced by planner_t().

mdf_t const* cajun::planner_t::m_mdf [protected]

Referenced by planner_t().

Referenced by planner_t(), and update_plan().

Referenced by planner_t().

Referenced by get_steering_path(), and planner_t().

Referenced by analyze_path(), and planner_t().

std::deque<task_planner_t *> cajun::planner_t::m_plan [protected]
rndf_t const* cajun::planner_t::m_rndf [protected]

Referenced by planner_t(), and update_plan().

Referenced by analyze_path(), and planner_t().

world_state_t* cajun::planner_t::m_world_state [protected]

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