#include <zone_task_planner.H>
Public Member Functions | |
| zone_task_planner_t (world_state_t *ws_, rndf_t const *rndf_) | |
| ~zone_task_planner_t () | |
| void | set_plan (rndf_point_t *start_rp_, rndf_point_t *end_rp_) |
| Set the plan for the lane task planner. Teh plan is represented as end waypoint on the lane till which bot need to be driven. | |
| void | get_plan (rndf_point_t *&start_rp_, rndf_point_t *&end_rp_) |
| void | modify_plan (rndf_point_t *start_rp_, rndf_point_t *end_rp_) |
| void | set_active () |
| Set the Lane following task planner (TP) as active TP. | |
| path_status_t | generate_path (world_state_t *ws_, path_t &path_, double &p_len_left_, const path_t &base_path_) |
| Returns tha path on lane to reach m_end_wp. Returns false if path is full so that no following task planners need to be called else returns true. | |
| bool | get_path_lane_lids (unsigned &sid_, std::vector< unsigned > &lids_) |
| Fills in the list of lane of a segment across which TP's path extends on. Returns false if TP has to mention the list in different formate. | |
| bool | is_task_complete (world_state_t *ws_, double x_, double y_, double heading_) |
| Returns true if task is done, if end_wp is reached. | |
| void | print_plan () |
Protected Member Functions | |
| path_status_t | straight_path (world_state_t *ws_, path_t &path_, double &p_len_left_, const path_t &base_path_, double min_speed_, double max_speed_) |
| Does straight line path planning to parking spot. | |
| unsigned | find_point_on_path (base_interpolator_t::uniform_path_t &path_, double x_, double y_) |
| bool | is_path_good (path_t const &path_, unsigned zone_id_, unsigned &path_index_) |
| Returns true if the path is free of obstacles. | |
| void | update_start_point (path_t const &path_) |
| void | get_from_local_path (path_t const &base_path_, path_t &path_) |
| returns appends to 'path_' the path to drive | |
| bool | is_path_good () |
| void | generate_new_path (world_state_t *ws_, path_t &path_, double &p_len_left_, const path_t &base_path_) |
| Generates new path. | |
| void | cut_down_path (path_t const &base_path_, path_t &path_) |
| cuts the tail of the path_ so as to maintain drive to some distance away from parking spot | |
| double | start_orient (path_t const &path_) |
Protected Attributes | |
| const uc_planner_param_t * | m_uc_param |
| world_state_t * | m_ws |
| rndf_t const * | m_rndf |
| rndf_point_t * | m_start_rp |
| rndf_point_t * | m_end_rp |
| unsigned | m_zone_id |
| bool | m_first_iteration |
| double | m_start_x |
| double | m_start_y |
| bool | m_give_straigth_path |
| bool | m_generate_path |
| zone_planner_t * | m_zone_planner |
| base_interpolator_t * | m_interp |
| zone_task_planner_t::zone_task_planner_t | ( | world_state_t * | ws_, | |
| rndf_t const * | rndf_ | |||
| ) |
References cajun::FORWARD, cajun::uc_planner_param_t::get_uc_planner_param(), m_generate_path, m_give_straigth_path, m_interp, cajun::task_planner_t::m_path_dir, cajun::task_planner_t::m_status, cajun::task_planner_t::m_type, m_uc_param, m_zone_planner, msg_logger, cajun::PATH_OKAY, and cajun::ZONE_TP.
| zone_task_planner_t::~zone_task_planner_t | ( | ) |
References m_interp, and m_zone_planner.
cuts the tail of the path_ so as to maintain drive to some distance away from parking spot
References cajun::uc_planner_param_t::m_dis_from_parking_spot_for_PK_TP, m_end_rp, cajun::uc_planner_param_t::m_parking_path_width, m_rndf, m_uc_param, and cajun::point_on_path().
Referenced by generate_new_path().
| unsigned zone_task_planner_t::find_point_on_path | ( | base_interpolator_t::uniform_path_t & | path_, | |
| double | x_, | |||
| double | y_ | |||
| ) | [protected] |
Referenced by straight_path().
| void zone_task_planner_t::generate_new_path | ( | world_state_t * | ws_, | |
| path_t & | path_, | |||
| double & | p_len_left_, | |||
| const path_t & | base_path_ | |||
| ) | [protected] |
Generates new path.
fixme set status
References cut_down_path(), cajun::zone_planner_t::generate_path(), cajun::rndf_point_t::is_spot(), m_end_rp, m_generate_path, m_give_straigth_path, cajun::task_planner_t::m_mdf, cajun::task_planner_t::m_status, m_uc_param, cajun::uc_planner_param_t::m_use_parking_task_planner, cajun::uc_planner_param_t::m_zone_max_speed, cajun::uc_planner_param_t::m_zone_min_speed, m_zone_planner, cajun::PATH_OKAY, cajun::set_speed_limit(), start_orient(), straight_path(), and cajun::task_planner_t::update_local_path().
Referenced by generate_path().
| path_status_t zone_task_planner_t::generate_path | ( | world_state_t * | ws_, | |
| path_t & | path_, | |||
| double & | p_len_left_, | |||
| const path_t & | base_path_ | |||
| ) | [virtual] |
Returns tha path on lane to reach m_end_wp. Returns false if path is full so that no following task planners need to be called else returns true.
Implements cajun::task_planner_t.
References cajun::append_path(), cajun::path_turn_info_t::distance, generate_new_path(), get_from_local_path(), is_path_good(), cajun::rndf_point_t::is_spot(), cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, m_end_rp, m_generate_path, m_give_straigth_path, cajun::task_planner_t::m_path, cajun::task_planner_t::m_status, cajun::task_planner_t::m_turn, m_uc_param, cajun::uc_planner_param_t::m_use_parking_task_planner, m_zone_id, m_zone_planner, cajun::zone_planner_t::mark_obstacles(), cajun::PATH_END, and cajun::zone_planner_t::publish_grids().
| void zone_task_planner_t::get_from_local_path | ( | path_t const & | base_path_, | |
| path_t & | path_ | |||
| ) | [protected] |
returns appends to 'path_' the path to drive
References cajun::task_planner_t::m_path, cajun::task_planner_t::m_status, MAX_SEARCH, cajun::PATH_OVER, cajun::point_on_path(), and cajun::task_planner_t::update_local_path().
Referenced by generate_path().
| bool cajun::zone_task_planner_t::get_path_lane_lids | ( | unsigned & | sid_, | |
| std::vector< unsigned > & | lids_ | |||
| ) | [virtual] |
Fills in the list of lane of a segment across which TP's path extends on. Returns false if TP has to mention the list in different formate.
Reimplemented from cajun::task_planner_t.
| void zone_task_planner_t::get_plan | ( | rndf_point_t *& | start_rp_, | |
| rndf_point_t *& | end_rp_ | |||
| ) |
References m_end_rp, and m_start_rp.
| bool cajun::zone_task_planner_t::is_path_good | ( | ) | [protected] |
Referenced by generate_path().
| bool zone_task_planner_t::is_path_good | ( | path_t const & | path_, | |
| unsigned | zone_id_, | |||
| unsigned & | path_index_ | |||
| ) | [protected] |
Returns true if the path is free of obstacles.
References m_ws, cajun::point_on_path(), and cajun::STATIC.
| bool zone_task_planner_t::is_task_complete | ( | world_state_t * | ws_, | |
| double | x_, | |||
| double | y_, | |||
| double | heading_ | |||
| ) | [virtual] |
Returns true if task is done, if end_wp is reached.
Implements cajun::task_planner_t.
References cajun::uc_planner_param_t::m_allowed_post_lane_dis, cajun::uc_planner_param_t::m_allowed_pre_lane_dis, cajun::task_planner_t::m_complete, m_end_rp, cajun::task_planner_t::m_path, cajun::task_planner_t::m_planned_path, m_uc_param, message, msg_logger, and cajun::point_on_path().
| void zone_task_planner_t::modify_plan | ( | rndf_point_t * | start_rp_, | |
| rndf_point_t * | end_rp_ | |||
| ) |
References m_end_rp, m_generate_path, and m_start_rp.
| void zone_task_planner_t::print_plan | ( | ) | [virtual] |
|brief Display the plan of the lane task planner, most used for debugging
Implements cajun::task_planner_t.
References m_end_rp, m_start_rp, message, and msg_logger.
| void zone_task_planner_t::set_active | ( | ) | [virtual] |
Set the Lane following task planner (TP) as active TP.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_active, m_end_rp, m_start_rp, message, and msg_logger.
| void zone_task_planner_t::set_plan | ( | rndf_point_t * | start_rp_, | |
| rndf_point_t * | end_rp_ | |||
| ) |
Set the plan for the lane task planner. Teh plan is represented as end waypoint on the lane till which bot need to be driven.
References cajun::rndf_point_t::in_zone(), cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, m_end_rp, m_generate_path, m_give_straigth_path, cajun::task_planner_t::m_reset_base_path, m_rndf, m_start_rp, m_ws, m_zone_id, and m_zone_planner.
Referenced by cajun::task_plan_handler_t::add_zone_tp().
| double zone_task_planner_t::start_orient | ( | path_t const & | path_ | ) | [protected] |
References cajun::task_planner_t::m_active, m_ws, and cajun::path_end_orient().
Referenced by generate_new_path().
| path_status_t zone_task_planner_t::straight_path | ( | world_state_t * | ws_, | |
| path_t & | path_, | |||
| double & | p_len_left_, | |||
| const path_t & | base_path_, | |||
| double | min_speed_, | |||
| double | max_speed_ | |||
| ) | [protected] |
Does straight line path planning to parking spot.
References find_point_on_path(), m_end_rp, m_interp, m_start_x, m_start_y, cajun::task_planner_t::m_status, cajun::PATH_OVER, update_start_point(), cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().
Referenced by generate_new_path().
| void zone_task_planner_t::update_start_point | ( | path_t const & | path_ | ) | [protected] |
References m_generate_path, m_start_x, and m_start_y.
Referenced by straight_path().
rndf_point_t* cajun::zone_task_planner_t::m_end_rp [protected] |
Referenced by cut_down_path(), generate_new_path(), generate_path(), get_plan(), is_task_complete(), modify_plan(), print_plan(), set_active(), set_plan(), and straight_path().
bool cajun::zone_task_planner_t::m_first_iteration [protected] |
bool cajun::zone_task_planner_t::m_generate_path [protected] |
Referenced by generate_new_path(), generate_path(), modify_plan(), set_plan(), update_start_point(), and zone_task_planner_t().
bool cajun::zone_task_planner_t::m_give_straigth_path [protected] |
Referenced by generate_new_path(), generate_path(), set_plan(), and zone_task_planner_t().
base_interpolator_t* cajun::zone_task_planner_t::m_interp [protected] |
Referenced by straight_path(), zone_task_planner_t(), and ~zone_task_planner_t().
rndf_t const* cajun::zone_task_planner_t::m_rndf [protected] |
Reimplemented from cajun::task_planner_t.
Referenced by cut_down_path(), and set_plan().
rndf_point_t* cajun::zone_task_planner_t::m_start_rp [protected] |
Referenced by get_plan(), modify_plan(), print_plan(), set_active(), and set_plan().
double cajun::zone_task_planner_t::m_start_x [protected] |
Referenced by straight_path(), and update_start_point().
double cajun::zone_task_planner_t::m_start_y [protected] |
Referenced by straight_path(), and update_start_point().
const uc_planner_param_t* cajun::zone_task_planner_t::m_uc_param [protected] |
Referenced by cut_down_path(), generate_new_path(), generate_path(), is_task_complete(), and zone_task_planner_t().
world_state_t* cajun::zone_task_planner_t::m_ws [protected] |
Referenced by is_path_good(), set_plan(), and start_orient().
unsigned cajun::zone_task_planner_t::m_zone_id [protected] |
Referenced by generate_path(), and set_plan().
zone_planner_t* cajun::zone_task_planner_t::m_zone_planner [protected] |
Referenced by generate_new_path(), generate_path(), set_plan(), zone_task_planner_t(), and ~zone_task_planner_t().
1.6.1