#include <intersection_task_planner.H>
Public Types | |
| enum | internal_status_t { NOT_ACTIVE_YET, STOP_AT_INTERSECTION, READY_TO_GO } |
Public Member Functions | |
| intersection_task_planner_t (world_state_t *ws_) | |
| void | set_plan (rndf_point_t *exit_wp_, rndf_point_t *entry_wp_) |
| Set the plan for the intersection task planner (I_TP), record exit and entry waypoints. | |
| void | get_plan (rndf_point_t *&exit_wp_, rndf_point_t *&entry_wp_) |
| void | set_active () |
| Set the intersection task planner (TP) as active TP. | |
| path_status_t | generate_path (world_state_t *ws_, path_t &path_, double &p_length_, const path_t &base_path_) |
| Returns tha path for intersection region to touch the entry waypoints. 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 entry waypoint is reached. | |
| void | print_plan () |
| Displays the planned path, used only for debugging. | |
| void | set_path_blocked (unsigned p_id_) |
| Returns true if TP's path is in forward direction. | |
| internal_status_t | get_status () |
| bool | is_quick_acceleration_path () |
Protected Member Functions | |
| path_status_t | add_intersection_path (world_state_t *ws_, path_t &path_, double &p_length_, const path_t &base_path_, double x_, double y_) |
| bool | stop_at_intersection (world_state_t *ws_) |
| Returns true if have to wait at intersection. | |
| bool | inter_precedence (world_state_t *ws_) |
| Returns true if intersection is free to drive through. | |
| bool | stop_for_stop_sign (world_state_t *ws_) |
| Returns true if need to stop at intersection for either stop sign or for config entry to stop at every intersection. | |
| bool | intersection_region_free (world_state_t *ws_, unsigned inter_id_) |
| Returns true if all exit entry path at the intersection are free. | |
Protected Attributes | |
| const uc_planner_param_t * | m_uc_param |
| internal_status_t | m_internal_status |
| double | m_stopped |
| double | m_stop_time |
| double | m_have_precedence_since |
| double | m_inter_path_free_since |
| rndf_point_t * | m_exit_point |
| rndf_point_t * | m_entry_point |
| bool | m_left_turn |
| bool | m_wait_at_intersection |
| double | m_inter_tstamp |
| bool | m_is_stop_inter |
| unsigned | m_inter_id |
| double | m_lane_width |
| double | m_min_inter_speed |
| double | m_max_inter_speed |
| intersection_task_planner_t::intersection_task_planner_t | ( | world_state_t * | ws_ | ) |
| path_status_t intersection_task_planner_t::add_intersection_path | ( | world_state_t * | ws_, | |
| path_t & | path_, | |||
| double & | p_length_, | |||
| const path_t & | base_path_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [protected] |
References cajun::copy_path(), cajun::task_planner_t::m_active, cajun::uc_planner_param_t::m_allowed_post_lane_dis, cajun::uc_planner_param_t::m_allowed_pre_lane_dis, m_entry_point, m_exit_point, m_internal_status, m_max_inter_speed, m_min_inter_speed, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, message, msg_logger, cajun::PATH_ERROR, cajun::PATH_OKAY, cajun::PATH_TOO_LONG, READY_TO_GO, STOP_AT_INTERSECTION, and stop_at_intersection().
Referenced by generate_path().
| path_status_t intersection_task_planner_t::generate_path | ( | world_state_t * | ws_, | |
| path_t & | path_, | |||
| double & | p_length_, | |||
| const path_t & | base_path_ | |||
| ) | [virtual] |
Returns tha path for intersection region to touch the entry waypoints. 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_intersection_path(), cajun::append_path(), cajun::task_planner_t::m_active, cajun::task_planner_t::m_complete, cajun::task_planner_t::m_status, and cajun::task_planner_t::update_local_path().
| bool cajun::intersection_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 intersection_task_planner_t::get_plan | ( | rndf_point_t *& | exit_wp_, | |
| rndf_point_t *& | entry_wp_ | |||
| ) |
References m_entry_point, and m_exit_point.
Referenced by cajun::traffic_verifier_t::intersection_free_of_traffic().
| internal_status_t cajun::intersection_task_planner_t::get_status | ( | ) | [inline] |
References m_internal_status.
| bool intersection_task_planner_t::inter_precedence | ( | world_state_t * | ws_ | ) | [protected] |
Returns true if intersection is free to drive through.
References cajun::rndf_point_t::id(), cajun::rndf_point_t::is_stop(), m_exit_point, m_have_precedence_since, m_inter_path_free_since, m_inter_tstamp, m_uc_param, cajun::uc_planner_param_t::m_wait_after_inter_precedence, and cajun::uc_planner_param_t::m_wait_after_unblocked_inter_path.
Referenced by stop_at_intersection().
| bool intersection_task_planner_t::intersection_region_free | ( | world_state_t * | ws_, | |
| unsigned | inter_id_ | |||
| ) | [protected] |
Returns true if all exit entry path at the intersection are free.
References cajun::blk_on_lane_segment(), cajun::rndf_point_t::id(), cajun::intersecting_intersection_legs(), cajun::uc_planner_param_t::m_blocked_lane_timeout, m_entry_point, m_exit_point, cajun::task_planner_t::m_rndf, and m_uc_param.
Referenced by stop_at_intersection().
| bool cajun::intersection_task_planner_t::is_quick_acceleration_path | ( | ) | [inline, virtual] |
Reimplemented from cajun::task_planner_t.
| bool intersection_task_planner_t::is_task_complete | ( | world_state_t * | ws_, | |
| double | x_, | |||
| double | y_, | |||
| double | heading_ | |||
| ) | [virtual] |
Returns true if task is done, if entry waypoint is reached.
Implements cajun::task_planner_t.
References cajun::rndf_point_t::id(), 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_entry_point, m_lane_width, cajun::task_planner_t::m_path, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, message, msg_logger, and cajun::point_on_path().
| void intersection_task_planner_t::print_plan | ( | ) | [virtual] |
Displays the planned path, used only for debugging.
Implements cajun::task_planner_t.
References m_entry_point, m_exit_point, message, and msg_logger.
| void intersection_task_planner_t::set_active | ( | ) | [virtual] |
Set the intersection task planner (TP) as active TP.
Implements cajun::task_planner_t.
References cajun::task_planner_t::m_active, m_entry_point, m_exit_point, m_inter_tstamp, message, and msg_logger.
| void intersection_task_planner_t::set_path_blocked | ( | unsigned | p_id_ | ) | [virtual] |
Returns true if TP's path is in forward direction.
Informs the TP that its path is blocked at index p_id_
Reimplemented from cajun::task_planner_t.
References m_inter_path_free_since, cajun::task_planner_t::m_path, and m_stopped.
| void intersection_task_planner_t::set_plan | ( | rndf_point_t * | exit_wp_, | |
| rndf_point_t * | entry_wp_ | |||
| ) |
Set the plan for the intersection task planner (I_TP), record exit and entry waypoints.
References cajun::path_turn_info_t::distance, cajun::have_to_stop_at_intersection(), cajun::rndf_point_t::id(), cajun::rndf_point_t::in_segment(), cajun::rndf_point_t::in_zone(), cajun::intersection_turn_angle(), cajun::LEFT_TURN, cajun::task_planner_t::m_active, cajun::uc_planner_param_t::m_always_wait, cajun::task_planner_t::m_complete, m_entry_point, m_exit_point, m_inter_id, m_is_stop_inter, m_lane_width, m_max_inter_speed, cajun::uc_planner_param_t::m_max_intersection_speed, cajun::task_planner_t::m_mdf, cajun::uc_planner_param_t::m_min_angle_for_turn, m_min_inter_speed, cajun::uc_planner_param_t::m_min_intersection_speed, cajun::uc_planner_param_t::m_path_width, cajun::task_planner_t::m_reset_base_path, cajun::task_planner_t::m_rndf, m_stop_time, m_stopped, cajun::task_planner_t::m_turn, m_uc_param, m_wait_at_intersection, cajun::NO_TURN, cajun::RIGHT_TURN, and cajun::path_turn_info_t::turn.
| bool intersection_task_planner_t::stop_at_intersection | ( | world_state_t * | ws_ | ) | [protected] |
Returns true if have to wait at intersection.
References inter_precedence(), intersection_region_free(), m_inter_id, and stop_for_stop_sign().
Referenced by add_intersection_path().
| bool intersection_task_planner_t::stop_for_stop_sign | ( | world_state_t * | ws_ | ) | [protected] |
Returns true if need to stop at intersection for either stop sign or for config entry to stop at every intersection.
References cajun::task_planner_t::m_active, cajun::uc_planner_param_t::m_max_stop_speed, cajun::uc_planner_param_t::m_min_intersection_wait, m_stop_time, m_stopped, m_uc_param, and m_wait_at_intersection.
Referenced by stop_at_intersection().
Referenced by add_intersection_path(), get_plan(), intersection_region_free(), is_task_complete(), print_plan(), set_active(), and set_plan().
Referenced by add_intersection_path(), get_plan(), inter_precedence(), intersection_region_free(), print_plan(), set_active(), and set_plan().
double cajun::intersection_task_planner_t::m_have_precedence_since [protected] |
Referenced by inter_precedence(), and intersection_task_planner_t().
unsigned cajun::intersection_task_planner_t::m_inter_id [protected] |
Referenced by set_plan(), and stop_at_intersection().
double cajun::intersection_task_planner_t::m_inter_path_free_since [protected] |
Referenced by inter_precedence(), intersection_task_planner_t(), and set_path_blocked().
double cajun::intersection_task_planner_t::m_inter_tstamp [protected] |
Referenced by inter_precedence(), and set_active().
Referenced by add_intersection_path(), get_status(), and intersection_task_planner_t().
bool cajun::intersection_task_planner_t::m_is_stop_inter [protected] |
Referenced by set_plan().
double cajun::intersection_task_planner_t::m_lane_width [protected] |
Referenced by is_task_complete(), and set_plan().
bool cajun::intersection_task_planner_t::m_left_turn [protected] |
double cajun::intersection_task_planner_t::m_max_inter_speed [protected] |
Referenced by add_intersection_path(), and set_plan().
double cajun::intersection_task_planner_t::m_min_inter_speed [protected] |
Referenced by add_intersection_path(), and set_plan().
double cajun::intersection_task_planner_t::m_stop_time [protected] |
Referenced by set_plan(), and stop_for_stop_sign().
double cajun::intersection_task_planner_t::m_stopped [protected] |
Referenced by set_path_blocked(), set_plan(), and stop_for_stop_sign().
const uc_planner_param_t* cajun::intersection_task_planner_t::m_uc_param [protected] |
bool cajun::intersection_task_planner_t::m_wait_at_intersection [protected] |
Referenced by set_plan(), and stop_for_stop_sign().
1.6.1