#include <uturn_task_planner.H>
Public Member Functions | |
| uturn_task_planner_t () | |
| void | set_plan (unsigned sid_, unsigned start_lid_, unsigned end_lid_) |
| Set the plan for the task planner. The plan is represented as segment on which U-turn is made, and start and end lane's ids. | |
| void | get_plan (unsigned &sid_, unsigned &start_lid_, unsigned &end_lid_) |
| void | set_active () |
| Set the this 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 to make a Uturn. 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, ie if entered end_lid along its orientation. | |
| bool | is_path_tight () |
| void | print_plan () |
Protected Member Functions | |
| void | print_task_completion () |
| path_status_t | add_3_point_turn (path_t &path_, double &p_len_left_, unsigned sid_, unsigned start_lid_, unsigned end_lid_, double min_speed_, double max_speed_) |
| void | limit_turn_speed_limits (path_t &path_, double min_speed_, double max_speed_) |
| Limit's min/max speeds of all the points of the path by m_speed_limit_forword/ m_speed_limit_reverse based on if the path is forward/reverse respectively. And sets the speed of last m_pre_path_index points to zero speed. | |
| void | set_speed_limits (path_t &path_, double min_speed_, double max_speed_) |
| void | turn_path (path_t &path_, double sx_, double sy_, double p_orient_, double del_angle, double t_rad, relative_side_t turn, double min_speed_, double max_speed_) |
| Generates curved path starting from (sx, sy), along orientation (start_orient_), for del_orient with t_rad turning radius in 'turn' direction. | |
| bool | record_conditions (world_state_t *ws_, path_t &path_) |
| Returns false if failed to record start and end points and start orient. | |
| bool | copy_path_after_point (double ref_x, double ref_y, path_t &des_path_, const path_t &src_path_) |
Protected Attributes | |
| const uc_planner_param_t * | m_uc_param |
| unsigned | m_sid |
| unsigned | m_start_lid |
| unsigned | m_end_lid |
| bool | m_active_generate |
| double | m_before_turn_x |
| double | m_before_turn_y |
| double | m_after_turn_x |
| double | m_after_turn_y |
| double | m_start_orient |
| unsigned | m_turn_phase |
| unsigned | m_last_turn_phase |
| unsigned | m_pre_path_copy |
| unsigned | m_pre_path_index |
| double | m_turn_radius [MAX_ACCESS_PHASE] |
| double | m_extend_path_length [MAX_ACCESS_PHASE] |
| double | m_turn_angle [MAX_ACCESS_PHASE] |
| double | m_speed_limit_reverse |
| double | m_speed_limit_forward |
| double | m_interp_dis |
| path_t | m_pre_path |
| uturn_task_planner_t::uturn_task_planner_t | ( | ) |
References cajun::FORWARD, cajun::uc_planner_param_t::get_uc_planner_param(), m_active_generate, m_extend_path_length, m_interp_dis, m_last_turn_phase, cajun::task_planner_t::m_path_dir, m_pre_path, m_pre_path_copy, m_pre_path_index, m_speed_limit_forward, m_speed_limit_reverse, cajun::task_planner_t::m_status, m_turn_angle, m_turn_phase, m_turn_radius, cajun::task_planner_t::m_type, m_uc_param, cajun::uc_planner_param_t::m_uturn_extended_front_path_length, cajun::uc_planner_param_t::m_uturn_extended_reverse_path_length, cajun::uc_planner_param_t::m_uturn_forward_path_copy_dist, cajun::uc_planner_param_t::m_uturn_forward_path_pre_dist, cajun::uc_planner_param_t::m_uturn_forward_speed_limit, cajun::uc_planner_param_t::m_uturn_front_radius, cajun::uc_planner_param_t::m_uturn_front_turn_angle, cajun::uc_planner_param_t::m_uturn_path_interp_dist, cajun::uc_planner_param_t::m_uturn_reverse_path_copy_dist, cajun::uc_planner_param_t::m_uturn_reverse_path_pre_dist, cajun::uc_planner_param_t::m_uturn_reverse_radius, cajun::uc_planner_param_t::m_uturn_reverse_speed_limit, cajun::uc_planner_param_t::m_uturn_reverse_turn_angle, msg_logger, cajun::PATH_OKAY, and cajun::UTURN_TP.
| path_status_t uturn_task_planner_t::add_3_point_turn | ( | path_t & | path_, | |
| double & | p_len_left_, | |||
| unsigned | sid_, | |||
| unsigned | start_lid_, | |||
| unsigned | end_lid_, | |||
| double | min_speed_, | |||
| double | max_speed_ | |||
| ) | [protected] |
References cajun::extend_path(), cajun::LEFT, limit_turn_speed_limits(), m_active_generate, m_after_turn_x, m_after_turn_y, m_before_turn_x, m_before_turn_y, m_extend_path_length, m_interp_dis, m_start_orient, m_turn_angle, m_turn_phase, m_turn_radius, cajun::PATH_OKAY, set_speed_limits(), and turn_path().
Referenced by generate_path().
| bool uturn_task_planner_t::copy_path_after_point | ( | double | ref_x, | |
| double | ref_y, | |||
| path_t & | des_path_, | |||
| const path_t & | src_path_ | |||
| ) | [protected] |
References m_pre_path_index.
Referenced by generate_path().
| path_status_t uturn_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 to make a Uturn. 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 add_3_point_turn(), cajun::append_path(), copy_path_after_point(), cajun::FORWARD, cajun::task_planner_t::m_active, m_active_generate, m_before_turn_x, m_before_turn_y, cajun::task_planner_t::m_complete, m_end_lid, m_interp_dis, m_last_turn_phase, cajun::task_planner_t::m_mdf, cajun::task_planner_t::m_path, cajun::task_planner_t::m_path_dir, m_pre_path, m_pre_path_copy, m_pre_path_index, cajun::task_planner_t::m_reset_base_path, m_sid, m_start_lid, m_start_orient, cajun::task_planner_t::m_status, m_turn_phase, m_uc_param, cajun::uc_planner_param_t::m_uturn_forward_path_copy_dist, cajun::uc_planner_param_t::m_uturn_forward_path_pre_dist, cajun::uc_planner_param_t::m_uturn_reverse_path_copy_dist, cajun::uc_planner_param_t::m_uturn_reverse_path_pre_dist, cajun::PATH_END, cajun::PATH_ERROR, cajun::PATH_OKAY, cajun::PATH_OVER, print_task_completion(), record_conditions(), cajun::REVERSE, and cajun::task_planner_t::update_local_path().
| bool uturn_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_lid, m_sid, and m_start_lid.
| void uturn_task_planner_t::get_plan | ( | unsigned & | sid_, | |
| unsigned & | start_lid_, | |||
| unsigned & | end_lid_ | |||
| ) |
References m_end_lid, m_sid, and m_start_lid.
Referenced by cajun::traffic_verifier_t::uturn_free_of_traffic().
| bool cajun::uturn_task_planner_t::is_path_tight | ( | ) | [inline, virtual] |
Reimplemented from cajun::task_planner_t.
| bool uturn_task_planner_t::is_task_complete | ( | world_state_t * | ws_, | |
| double | x_, | |||
| double | y_, | |||
| double | heading_ | |||
| ) | [virtual] |
Returns true if task is done, ie if entered end_lid along its orientation.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_complete, m_last_turn_phase, m_turn_phase, and print_task_completion().
| void uturn_task_planner_t::limit_turn_speed_limits | ( | path_t & | path_, | |
| double | min_speed_, | |||
| double | max_speed_ | |||
| ) | [protected] |
Limit's min/max speeds of all the points of the path by m_speed_limit_forword/ m_speed_limit_reverse based on if the path is forward/reverse respectively. And sets the speed of last m_pre_path_index points to zero speed.
References cajun::FORWARD, cajun::task_planner_t::m_path_dir, m_pre_path_index, m_speed_limit_forward, and m_speed_limit_reverse.
Referenced by add_3_point_turn().
| void uturn_task_planner_t::print_plan | ( | ) | [virtual] |
|brief Display the plan of the task planner, most used for debugging
Implements cajun::task_planner_t.
References m_end_lid, m_sid, m_start_lid, message, and msg_logger.
| void uturn_task_planner_t::print_task_completion | ( | ) | [protected] |
References m_end_lid, m_sid, m_start_lid, message, and msg_logger.
Referenced by generate_path(), and is_task_complete().
| bool uturn_task_planner_t::record_conditions | ( | world_state_t * | ws_, | |
| path_t & | path_ | |||
| ) | [protected] |
Returns false if failed to record start and end points and start orient.
References m_after_turn_x, m_after_turn_y, cajun::uc_planner_param_t::m_allowed_post_lane_dis, cajun::uc_planner_param_t::m_allowed_pre_lane_dis, m_before_turn_x, m_before_turn_y, m_end_lid, m_sid, m_start_orient, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, message, and msg_logger.
Referenced by generate_path().
| void uturn_task_planner_t::set_active | ( | ) | [virtual] |
Set the this task planner (TP) as active TP.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_active, m_end_lid, m_sid, m_start_lid, message, and msg_logger.
| void uturn_task_planner_t::set_plan | ( | unsigned | sid_, | |
| unsigned | start_lid_, | |||
| unsigned | end_lid_ | |||
| ) |
Set the plan for the task planner. The plan is represented as segment on which U-turn is made, and start and end lane's ids.
References cajun::path_turn_info_t::distance, cajun::LEFT_TURN, cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, m_end_lid, cajun::task_planner_t::m_reset_base_path, m_sid, m_start_lid, cajun::task_planner_t::m_turn, and cajun::path_turn_info_t::turn.
Referenced by cajun::task_plan_handler_t::add_uturn_tp(), and cajun::task_plan_handler_t::insert_UT_TP().
| void uturn_task_planner_t::set_speed_limits | ( | path_t & | path_, | |
| double | min_speed_, | |||
| double | max_speed_ | |||
| ) | [protected] |
Referenced by add_3_point_turn().
| void uturn_task_planner_t::turn_path | ( | path_t & | path_, | |
| double | sx_, | |||
| double | sy_, | |||
| double | p_orient_, | |||
| double | del_angle, | |||
| double | t_rad, | |||
| relative_side_t | turn, | |||
| double | min_speed_, | |||
| double | max_speed_ | |||
| ) | [protected] |
Generates curved path starting from (sx, sy), along orientation (start_orient_), for del_orient with t_rad turning radius in 'turn' direction.
References cajun::LEFT.
Referenced by add_3_point_turn().
bool cajun::uturn_task_planner_t::m_active_generate [protected] |
Referenced by add_3_point_turn(), generate_path(), and uturn_task_planner_t().
double cajun::uturn_task_planner_t::m_after_turn_x [protected] |
Referenced by add_3_point_turn(), and record_conditions().
double cajun::uturn_task_planner_t::m_after_turn_y [protected] |
Referenced by add_3_point_turn(), and record_conditions().
double cajun::uturn_task_planner_t::m_before_turn_x [protected] |
Referenced by add_3_point_turn(), generate_path(), and record_conditions().
double cajun::uturn_task_planner_t::m_before_turn_y [protected] |
Referenced by add_3_point_turn(), generate_path(), and record_conditions().
unsigned cajun::uturn_task_planner_t::m_end_lid [protected] |
Referenced by generate_path(), get_path_lane_lids(), get_plan(), print_plan(), print_task_completion(), record_conditions(), set_active(), and set_plan().
double cajun::uturn_task_planner_t::m_extend_path_length[MAX_ACCESS_PHASE] [protected] |
Referenced by add_3_point_turn(), and uturn_task_planner_t().
double cajun::uturn_task_planner_t::m_interp_dis [protected] |
Referenced by add_3_point_turn(), generate_path(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_last_turn_phase [protected] |
Referenced by generate_path(), is_task_complete(), and uturn_task_planner_t().
path_t cajun::uturn_task_planner_t::m_pre_path [protected] |
Referenced by generate_path(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_pre_path_copy [protected] |
Referenced by generate_path(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_pre_path_index [protected] |
Referenced by copy_path_after_point(), generate_path(), limit_turn_speed_limits(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_sid [protected] |
Referenced by generate_path(), get_path_lane_lids(), get_plan(), print_plan(), print_task_completion(), record_conditions(), set_active(), and set_plan().
double cajun::uturn_task_planner_t::m_speed_limit_forward [protected] |
Referenced by limit_turn_speed_limits(), and uturn_task_planner_t().
double cajun::uturn_task_planner_t::m_speed_limit_reverse [protected] |
Referenced by limit_turn_speed_limits(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_start_lid [protected] |
Referenced by generate_path(), get_path_lane_lids(), get_plan(), print_plan(), print_task_completion(), set_active(), and set_plan().
double cajun::uturn_task_planner_t::m_start_orient [protected] |
Referenced by add_3_point_turn(), generate_path(), and record_conditions().
double cajun::uturn_task_planner_t::m_turn_angle[MAX_ACCESS_PHASE] [protected] |
Referenced by add_3_point_turn(), and uturn_task_planner_t().
unsigned cajun::uturn_task_planner_t::m_turn_phase [protected] |
Referenced by add_3_point_turn(), generate_path(), is_task_complete(), and uturn_task_planner_t().
double cajun::uturn_task_planner_t::m_turn_radius[MAX_ACCESS_PHASE] [protected] |
Referenced by add_3_point_turn(), and uturn_task_planner_t().
const uc_planner_param_t* cajun::uturn_task_planner_t::m_uc_param [protected] |
Referenced by generate_path(), record_conditions(), and uturn_task_planner_t().
1.6.1