#include <change_lane_task_planner.H>
Public Member Functions | |
| change_lane_task_planner_t () | |
| void | set_plan (unsigned seg_id_, unsigned start_lane_id_, unsigned end_lane_id_) |
| Set the plan for the change lane task planner (CL_TP), records start lane id and target lane id. | |
| void | get_plan (unsigned &seg_id_, unsigned &start_lane_id_, unsigned &end_lane_id_) |
| void | set_active () |
| Set the C_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 for changing lane from source to target lane. 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 | get_start_lid (unsigned &sid_, unsigned &lid_) |
| Returns sid and lid of the start lane. | |
| bool | is_task_complete (world_state_t *ws_, double x_, double y_, double heading_) |
| Returns true if task is done, i.e bot reached within 1/4 of target lane width from its center line. | |
| void | print_plan () |
| Prints the change lane task planner's (CL_TP) plan, id of start and target lanes. | |
Private Attributes | |
| const uc_planner_param_t * | m_uc_param |
| unsigned | m_seg_id |
| unsigned | m_start_lane_id |
| unsigned | m_end_lane_id |
| bool | m_left_turn |
| change_lane_task_planner_t::change_lane_task_planner_t | ( | ) |
| path_status_t change_lane_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 for changing lane from source to target lane. 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::add_path_to_switch_lane(), cajun::append_path(), cajun::LEFT, cajun::LEFT_TURN, cajun::task_planner_t::m_active, cajun::uc_planner_param_t::m_change_lane_max_speed, cajun::uc_planner_param_t::m_change_lane_min_speed, cajun::task_planner_t::m_complete, m_end_lane_id, cajun::uc_planner_param_t::m_look_ahead_ratio, m_seg_id, cajun::task_planner_t::m_status, cajun::task_planner_t::m_turn, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, message, msg_logger, cajun::PATH_ERROR, cajun::PATH_OVER, cajun::RIGHT_TURN, cajun::path_turn_info_t::turn, and cajun::task_planner_t::update_local_path().
| bool change_lane_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.
References m_end_lane_id, m_seg_id, and m_start_lane_id.
| void change_lane_task_planner_t::get_plan | ( | unsigned & | seg_id_, | |
| unsigned & | start_lane_id_, | |||
| unsigned & | end_lane_id_ | |||
| ) |
References m_end_lane_id, m_seg_id, and m_start_lane_id.
Referenced by cajun::traffic_verifier_t::change_lane_free_of_traffic().
| bool change_lane_task_planner_t::get_start_lid | ( | unsigned & | sid_, | |
| unsigned & | lid_ | |||
| ) | [virtual] |
Returns sid and lid of the start lane.
Reimplemented from cajun::task_planner_t.
References m_seg_id, and m_start_lane_id.
| bool change_lane_task_planner_t::is_task_complete | ( | world_state_t * | ws_, | |
| double | x_, | |||
| double | y_, | |||
| double | heading_ | |||
| ) | [virtual] |
Returns true if task is done, i.e bot reached within 1/4 of target lane width from its center line.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_complete, m_end_lane_id, cajun::task_planner_t::m_path, m_seg_id, message, msg_logger, and cajun::point_on_path().
| void change_lane_task_planner_t::print_plan | ( | ) | [virtual] |
Prints the change lane task planner's (CL_TP) plan, id of start and target lanes.
Implements cajun::task_planner_t.
References m_end_lane_id, m_seg_id, m_start_lane_id, message, and msg_logger.
| void change_lane_task_planner_t::set_active | ( | ) | [virtual] |
Set the C_TP as active TP.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, m_end_lane_id, cajun::task_planner_t::m_reset_base_path, m_seg_id, message, and msg_logger.
| void change_lane_task_planner_t::set_plan | ( | unsigned | seg_id_, | |
| unsigned | start_lane_id_, | |||
| unsigned | end_lane_id_ | |||
| ) |
Set the plan for the change lane task planner (CL_TP), records start lane id and target lane id.
References cajun::path_turn_info_t::distance, cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, m_end_lane_id, m_seg_id, m_start_lane_id, cajun::task_planner_t::m_turn, cajun::NO_TURN, and cajun::path_turn_info_t::turn.
Referenced by cajun::task_plan_handler_t::add_change_lane_tp(), and cajun::state_machine_t::change_lane().
unsigned cajun::change_lane_task_planner_t::m_end_lane_id [private] |
Referenced by generate_path(), get_path_lane_lids(), get_plan(), is_task_complete(), print_plan(), set_active(), and set_plan().
bool cajun::change_lane_task_planner_t::m_left_turn [private] |
unsigned cajun::change_lane_task_planner_t::m_seg_id [private] |
Referenced by generate_path(), get_path_lane_lids(), get_plan(), get_start_lid(), is_task_complete(), print_plan(), set_active(), and set_plan().
unsigned cajun::change_lane_task_planner_t::m_start_lane_id [private] |
Referenced by get_path_lane_lids(), get_plan(), get_start_lid(), print_plan(), and set_plan().
const uc_planner_param_t* cajun::change_lane_task_planner_t::m_uc_param [private] |
Referenced by change_lane_task_planner_t(), and generate_path().
1.6.1