#include <mission_handler.H>
Public Member Functions | |
| mission_handler_t (mission_plan_t *mission_plan_, world_state_t *ws_, rndf_t const *rndf_, mdf_t const *mdf_) | |
| void | flush_blockages () |
| bool | update_plan (double x_, double y_, double heading_, bool could_be_at_start_shoot_=false) |
| Determines the plan for covering all checkpoints. Also updates m_plan with list of task planner required to touch all checkpoints. | |
| bool | update_plan (mission_plan_t &detail_mission_) |
| bool | update_waypoints_reached (double x_, double y_) |
| returns false if all checkpoints reached, else returns true | |
| bool | is_finished () |
| mission_plan_t * | get_mission_plan () |
| void | print_plan () |
| Prints the detail and filter plans. | |
| void | print_mission (mission_plan_t const *mission_plan_) |
| rndf_point_t * | active_rndf_point_on_or_before (rndf_point_t *rp) const |
| rndf_point_t * | rndf_point_at_wp (unsigned sid_, unsigned lid_, unsigned wid_) |
| rndf_point_t * | active_rndf_point_before (double x_, double y_, rndf_t::waypoint_id_t const &before_wp_id) |
| void | unset_all_blockages () |
| void | set_blocked (unsigned sid_, unsigned blk_lid_, unsigned blk_wid_, double blk_x_, double blk_y_, unsigned aft_blk_wid_, double aft_blk_x_, double aft_blk_y_, unsigned neigh_lid_, unsigned neigh_wid_, double neigh_x_, double neigh_y_, unsigned aft_blk_neigh_wid_, double aft_blk_neigh_x_, double aft_blk_neigh_y_) |
| block the graph edge at (blk_x, blk_y) on blk_lid, and create a bridge edge from this point to neigh_lane at (neigh_x, neigh_y) | |
| bool | plan_to_next_checkpoint (rndf_point_t *rp_start_, mission_plan_t &path_) |
| Returns true if there exist a path from start_ point to next checkpoint, and fills the path in 'path_'. Else returns false. | |
| unsigned | get_next_checkpoint_id () |
| unsigned | get_num_checkpoints_left () |
Private Member Functions | |
| bool | approaching_checkpt () |
| Returns true if next waypoint in the mission plan is a checkpoint. | |
| void | alert_incomplete_path (mission_plan_t const &detail_mission_) |
| Prints alert message about not able to find a path to all checkpoints. | |
Private Attributes | |
| mission_plan_t * | m_mission_plan |
| world_state_t * | m_ws |
| rndf_t const * | m_rndf |
| mdf_t const * | m_mdf |
| uc_planner_param_t const * | m_uc_param |
| unsigned | m_next_checkpoint |
| Next desired checkpoint (. | |
| mission_planner_t * | m_mission_planner |
| bool | m_finished |
| cajun::mission_handler_t::mission_handler_t | ( | mission_plan_t * | mission_plan_, | |
| world_state_t * | ws_, | |||
| rndf_t const * | rndf_, | |||
| mdf_t const * | mdf_ | |||
| ) | [inline] |
References cajun::uc_planner_param_t::get_uc_planner_param(), m_mdf, m_mission_planner, m_rndf, m_uc_param, and m_ws.
| rndf_point_t* cajun::mission_handler_t::active_rndf_point_before | ( | double | x_, | |
| double | y_, | |||
| rndf_t::waypoint_id_t const & | before_wp_id | |||
| ) | [inline] |
| rndf_point_t * mission_handler_t::active_rndf_point_on_or_before | ( | rndf_point_t * | rp | ) | const |
| void mission_handler_t::alert_incomplete_path | ( | mission_plan_t const & | detail_mission_ | ) | [private] |
Prints alert message about not able to find a path to all checkpoints.
References message, and msg_logger.
Referenced by update_plan().
| bool mission_handler_t::approaching_checkpt | ( | ) | [private] |
Returns true if next waypoint in the mission plan is a checkpoint.
References m_mdf, m_mission_plan, m_next_checkpoint, and m_rndf.
Referenced by update_waypoints_reached().
| void cajun::mission_handler_t::flush_blockages | ( | ) | [inline] |
References cajun::mission_planner_t::create_graph(), and m_mission_planner.
Referenced by cajun::planner_t::update_task_planner_status().
| mission_plan_t* cajun::mission_handler_t::get_mission_plan | ( | ) | [inline] |
References m_mission_plan.
Referenced by cajun::state_machine_t::start_new_mission_from().
| unsigned mission_handler_t::get_next_checkpoint_id | ( | ) |
References m_next_checkpoint.
Referenced by cajun::planner_t::get_mission_status().
| unsigned mission_handler_t::get_num_checkpoints_left | ( | ) |
References m_mdf, and m_next_checkpoint.
Referenced by cajun::planner_t::get_mission_status().
| bool cajun::mission_handler_t::is_finished | ( | ) | [inline] |
References m_finished.
Referenced by cajun::planner_t::is_finished(), and cajun::planner_t::update_planner_state().
| bool mission_handler_t::plan_to_next_checkpoint | ( | rndf_point_t * | rp_start_, | |
| mission_plan_t & | path_ | |||
| ) |
Returns true if there exist a path from start_ point to next checkpoint, and fills the path in 'path_'. Else returns false.
References cajun::mission_planner_t::get_plan(), m_mdf, m_mission_planner, m_next_checkpoint, m_rndf, and cajun::mission_planner_t::rndf_point_at_wp().
Referenced by cajun::state_machine_t::uturn_takes_to_next_checkpoint().
| void mission_handler_t::print_mission | ( | mission_plan_t const * | mission_plan_ | ) |
References cajun::uc_planner_param_t::m_print_plan, m_uc_param, message, and msg_logger.
Referenced by print_plan(), and update_plan().
| void mission_handler_t::print_plan | ( | ) |
Prints the detail and filter plans.
References m_mission_plan, and print_mission().
Referenced by cajun::planner_t::update_plan(), and update_plan().
| rndf_point_t * mission_handler_t::rndf_point_at_wp | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References m_mission_planner, and cajun::mission_planner_t::rndf_point_at_wp().
Referenced by cajun::task_plan_handler_t::add_initial_lf(), and cajun::state_machine_t::change_lane().
| void mission_handler_t::set_blocked | ( | unsigned | sid_, | |
| unsigned | blk_lid_, | |||
| unsigned | blk_wid_, | |||
| double | blk_x_, | |||
| double | blk_y_, | |||
| unsigned | aft_blk_wid_, | |||
| double | aft_blk_x_, | |||
| double | aft_blk_y_, | |||
| unsigned | neigh_lid_, | |||
| unsigned | neigh_wid_, | |||
| double | neigh_x_, | |||
| double | neigh_y_, | |||
| unsigned | aft_blk_neigh_wid_, | |||
| double | aft_blk_neigh_x_, | |||
| double | aft_blk_neigh_y_ | |||
| ) |
block the graph edge at (blk_x, blk_y) on blk_lid, and create a bridge edge from this point to neigh_lane at (neigh_x, neigh_y)
References cajun::mission_planner_t::already_added_inter_rp_for_blk(), cajun::mission_planner_t::create_edge(), cajun::mission_planner_t::get_other_end_inter_rp(), cajun::mission_planner_t::insert_graph_node(), m_mission_planner, cajun::mission_planner_t::move_existing_inter_rp(), cajun::rndf_point_t::print(), cajun::mission_planner_t::print_graph(), cajun::mission_planner_t::set_blocked(), cajun::rndf_point_t::set_entry(), cajun::rndf_point_t::set_exit(), cajun::mission_planner_t::start_road_at(), and cajun::mission_planner_t::terminate_road_at().
Referenced by cajun::state_machine_t::set_road_blocked().
| void mission_handler_t::unset_all_blockages | ( | ) |
References m_mission_planner, and cajun::mission_planner_t::unset_all_blockages().
| bool mission_handler_t::update_plan | ( | mission_plan_t & | detail_mission_ | ) |
| bool mission_handler_t::update_plan | ( | double | x_, | |
| double | y_, | |||
| double | heading_, | |||
| bool | could_be_at_start_shoot_ = false | |||
| ) |
Determines the plan for covering all checkpoints. Also updates m_plan with list of task planner required to touch all checkpoints.
Return true if mission is done, else return false
References cajun::mission_planner_t::active_rndf_point_after(), cajun::mission_planner_t::active_rndf_point_on_or_before(), cajun::find_a_entry_to_zone(), cajun::uc_planner_param_t::m_allowed_post_lane_dis, cajun::uc_planner_param_t::m_bubble_rad, m_mission_planner, m_rndf, cajun::uc_planner_param_t::m_start_dis_before_start_chute, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, and m_ws.
Referenced by cajun::state_machine_t::start_new_mission_from(), and cajun::planner_t::update_plan().
| bool mission_handler_t::update_waypoints_reached | ( | double | x_, | |
| double | y_ | |||
| ) |
returns false if all checkpoints reached, else returns true
References approaching_checkpt(), m_finished, m_mdf, cajun::uc_planner_param_t::m_min_atrack_for_wp_reach, m_mission_plan, m_next_checkpoint, cajun::uc_planner_param_t::m_parking_wp_radius, m_rndf, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, message, msg_logger, and cajun::waypt_reached().
Referenced by cajun::planner_t::update_planner_state().
bool cajun::mission_handler_t::m_finished [private] |
Referenced by is_finished(), and update_waypoints_reached().
mdf_t const* cajun::mission_handler_t::m_mdf [private] |
Referenced by approaching_checkpt(), get_mission_plan(), print_plan(), update_plan(), and update_waypoints_reached().
unsigned cajun::mission_handler_t::m_next_checkpoint [private] |
Next desired checkpoint (.
Referenced by approaching_checkpt(), get_next_checkpoint_id(), get_num_checkpoints_left(), plan_to_next_checkpoint(), update_plan(), and update_waypoints_reached().
rndf_t const* cajun::mission_handler_t::m_rndf [private] |
Referenced by approaching_checkpt(), mission_handler_t(), plan_to_next_checkpoint(), update_plan(), and update_waypoints_reached().
uc_planner_param_t const* cajun::mission_handler_t::m_uc_param [private] |
Referenced by mission_handler_t(), print_mission(), update_plan(), and update_waypoints_reached().
world_state_t* cajun::mission_handler_t::m_ws [private] |
Referenced by mission_handler_t(), and update_plan().
1.6.1