#include <mission_planner.H>
Classes | |
| class | blocked_edge_t |
| class | wp_node_t |
Public Member Functions | |
| mission_planner_t (rndf_t const *rndf_, mdf_t const *mdf_, world_state_t *ws_) | |
| bool | update_plan (unsigned next_checkpoint_, mission_plan_t &detail_plan_, mission_plan_t &filter_plan_) |
| Finds a path on rndf network starting from the waypoint last in the plan_ deque and touching all checkpoints specified in the mdf file starting from 'next_checkpoint_'. | |
| graph_node_t * | graph_node_at_wp (rndf_t::waypoint_id_t const &wp_id_) |
| Returns the graph's rndf_ponit_t* corresponding the the waypoint. | |
| graph_node_t * | graph_node_at_wp (unsigned sid_, unsigned lid_, unsigned wid_) |
| graph_node_t * | active_graph_node_on_or_before (unsigned sid_, unsigned lid_, unsigned wid_) |
| Returns active graph node before the given waypoint id. | |
| graph_node_t * | active_graph_node_on_or_after (unsigned sid_, unsigned lid_, unsigned wid_) |
| graph_node_t * | active_graph_node_on_or_before (rndf_point_t *rp_) |
| graph_node_t * | active_graph_node_after (rndf_point_t *rp_) |
| graph_node_t * | active_graph_node_before (double x_, double y_, rndf_t::waypoint_id_t const &before_wp_id) |
| returns rndf_point_t following 'before_wp_id' which is just behind of (x_, y_). It could be even intermediate rndf_point | |
| graph_node_t * | graph_node_at_rp (rndf_point_t *rp_) |
| bool | comes_later_on_wp_seg (rndf_point_t *rp_, double x_, double y_) |
| Check is (x_, y_) comes before or after node_ rp_, with respect to the lane segment on which rp_ lies. | |
| rndf_point_t * | rndf_point_at_wp (rndf_t::waypoint_id_t const &wp_id_) |
| rndf_point_t * | rndf_point_at_wp (unsigned sid_, unsigned lid_, unsigned wid_) |
| rndf_point_t * | active_rndf_point_on_or_before (unsigned sid_, unsigned lid_, unsigned wid_) |
| rndf_point_t * | active_rndf_point_on_or_after (unsigned sid_, unsigned lid_, unsigned wid_) |
| rndf_point_t * | active_rndf_point_before (rndf_point_t *rp_) |
| rndf_point_t * | active_rndf_point_after (rndf_point_t *rp_) |
| rndf_point_t * | active_rndf_point_on_or_before (rndf_point_t *rp_) |
| rndf_point_t * | active_rndf_point_before (double x_, double y_, rndf_t::waypoint_id_t const &before_wp_id) |
| void | unset_all_blockages () |
| Unsets all blockages. | |
| void | set_unblocked_till (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_) |
| Find the edge in the graph which connect wp_id_1 to wp_id_2 and sets its cost to the value returned by compute_cost. | |
| bool | set_blocked (rndf_point_t *wp_id_1_, rndf_point_t *wp_id_2_) |
| Find the edge in the graph which connect wp_id_1 to wp_id_2 and sets its cost to FLT_MAX. | |
| bool | get_plan (rndf_point_t *start_, rndf_point_t *end_, mission_plan_t &path_) |
| Returns true if there exist a path from start_ to end_, and fills the path in 'path_'. Else returns false. | |
| void | print_graph () |
Private Member Functions | |
| double | distance_between_rps (rndf_point_t const *rp_1_, rndf_point_t const *rp_2_) |
| Computes distance between rp_1_ to rp_2__. | |
| double | compute_cost (rndf_point_t *id_1_, rndf_point_t *id_2_) |
| Returns cost between waypoints id_1, and id_2. | |
| void | get_lanes_to_merge_with (rndf_t::segment_t const &seg_, unsigned li_, std::vector< unsigned > &lanes_to_merge_) |
| bool | can_pass_between_lanes (rndf_t::segment_t const &seg_, unsigned li1_, unsigned li2_) |
| Returns true if can passing between lanes li1_, and li2_ because of direction or lane marking. | |
| void | merge_lanes (unsigned sid_, std::vector< unsigned > const &lane_to_merge, std::deque< wp_node_t > &seg_wps) |
| bool | should_be_graph_node (rndf_point_t const *wp_id_) |
| Returns true if given wp_id should be a node in graph. | |
| bool | is_mission_checkpoint (rndf_point_t const *rp_) |
| Returns true if given wp is one of the checkpoint for present mission. | |
| bool | create_graph () |
| creates graph for given rndf object. First adds all waypoints of rndf as nodes of the graph and then for each waypoint, its connecting paths are added as edges | |
| void | add_zone_to_graph (rndf_t::zone_t const &zone_) |
| Add zones to the graph which include adding nodes and edges. | |
| void | create_road_edges (std::deque< wp_node_t > &seg_wps) |
| Creates edges between nodes of a road. Assumes that wps are ordered along the ROAD. | |
| void | create_edges_from_wp (std::deque< wp_node_t > &seg_wps_, unsigned wp_i) |
| Create edges from given wp, to all entry pairs if its a exit wp along with edge to next wp on the ROAD if its not already part of exit-entry pair * else just an edge to next wp on the road. | |
| void | create_edge (rndf_t::waypoint_id_t wp_id_, rndf_t::waypoint_id_t neighbor_id_) |
| void | create_edge (rndf_point_t *rp, rndf_point_t *neigh_rp) |
| Create edge between rp and neigh_rp. Note: rp, neigh_rp should be pointing to the ENTRIES in the graph. | |
| bool | edge_exist (graph_node_t *v1, graph_node_t *v2) |
| bool | not_close (std::deque< wp_node_t > &seg_wps_, unsigned ind1_, unsigned ind2_) |
| void | print_wp_node (std::deque< wp_node_t > &seg_wps_, unsigned wp_i) |
| bool | mission_spot (rndf_t::spot_t const &spot_) |
| returns true if the spot is part of mission | |
| bool | lanes_in_same_direction (rndf_t::lane_t const &lane_, rndf_t::lane_t const &n_lane_) |
| Determines all lanes on segmeng 'seg_id_' that are in 'dir_' direction and returns this list in vector 'similar_lanes_'. | |
| bool | is_next_checkpoint (rndf_point_t *rp_, unsigned next_ckpt_) |
| bool | keep_as_individual_rp_in_plan (rndf_point_t *rp_, unsigned next_ckpt_) |
| returns true if this waypoint should not be filtered from top level plan. A waypoint is not filtered if its the immediate checkpoint, if its a entry_wp and previous wp in the path is its corresponding exit_wp or if present wp is exit_wp and next waypoint on the path is the corresponding entry_wp | |
| bool | is_entry_exit_pair (rndf_point_t *exit_rp_, rndf_point_t *entry_rp_) |
| Returns true if exit_rp_ and entry_rp are exit entry pairs. | |
| bool | is_entry_exit_pair_to_keep (rndf_point_t *exit_rp_, rndf_point_t *entry_rp_) |
| Returns true if this is a exit enty and should be keep this exit entry pair. | |
| void | filter_detail_plan (mission_plan_t const &input_plan_, mission_plan_t &ouput_plan_, unsigned next_checkpoint_) |
| Filters the top level mission plan to remove intermediate waypoints within a road, and keep entry, exit, checkpoints (that are listed in the mdf MISSION). | |
| bool | is_active_node (graph_node_t const *gn) |
| void | get_inter_rp_in_wp_seg (rndf_t::waypoint_id_t const &wp_id_, std::vector< rndf_point_t * > rp_list_) |
| unsigned | block_index (graph_node_t const *src_vertex_, graph_node_t const *des_vertex_) |
| bool | unset_first_blockage () |
| Finds the oldest blocked edge, sets it unblocked and removes it from m_blocked_edges list. | |
| rndf_point_t * | create_rndf_point (rndf_t const *rndf_, rndf_t::waypoint_id_t const &wp_id) |
| rndf_point_t * | create_rndf_point (rndf_t const *rndf_, unsigned sid_, unsigned lid_, unsigned wid_) |
| rndf_point_t * | insert_graph_node (unsigned sid_, unsigned lid_, unsigned wid_, double x_, double y_) |
| Sets a edge between. | |
| rndf_point_t * | terminate_road_at (unsigned sid_, unsigned lid_, unsigned wid_, double x_, double y_) |
| rndf_point_t * | start_road_at (unsigned sid_, unsigned lid_, unsigned wid_, double x_, double y_) |
| rndf_point_t * | already_added_inter_rp_for_blk (unsigned sid_, unsigned lid_, unsigned wid_, double x_, double y_) |
| Returns true if the road is already blocked for this blockage. | |
| void | move_existing_inter_rp (rndf_point_t *blk_rp, unsigned wid_, double x_, double y_) |
| bool | get_other_end_inter_rp (rndf_point_t *rp_, unsigned other_lid_, rndf_point_t *&neigh_rp_, rndf_point_t *&follow_rp_) |
| returns true if able to find the rp on neighboring lane connected from given rp_, and al rp following given rp_ on same lane | |
| void | print_mission (mission_plan_t const &plan_) |
Private Attributes | |
| const uc_planner_param_t * | m_uc_param |
| rndf_t const * | m_rndf |
| mdf_t const * | m_mdf |
| world_state_t * | m_ws |
| graph_t< rp_containter_t > | m_graph |
| graph_search_t< rp_containter_t > * | m_g_search |
| std::deque< rndf_point_t * > | m_intermediate_rps |
| std::deque< blocked_edge_t > | m_blocked_edges |
Friends | |
| class | mission_handler_t |
| mission_planner_t::mission_planner_t | ( | rndf_t const * | rndf_, | |
| mdf_t const * | mdf_, | |||
| world_state_t * | ws_ | |||
| ) |
brief Constructor: Creates graph for given rndf, and creates graph search object
References create_graph(), cajun::uc_planner_param_t::get_uc_planner_param(), m_g_search, m_graph, m_uc_param, and msg_logger.
| graph_node_t * mission_planner_t::active_graph_node_after | ( | rndf_point_t * | rp_ | ) |
References active_graph_node_on_or_after(), graph_node_at_rp(), is_active_node(), m_graph, m_uc_param, cajun::uc_planner_param_t::m_verbose_printing, cajun::rndf_point_t::print(), cajun::graph_t< ID_T >::print_graph(), and cajun::rp_containter_t::rp().
Referenced by active_graph_node_on_or_before(), and active_rndf_point_after().
| graph_node_t * mission_planner_t::active_graph_node_before | ( | double | x_, | |
| double | y_, | |||
| rndf_t::waypoint_id_t const & | before_wp_id | |||
| ) |
returns rndf_point_t following 'before_wp_id' which is just behind of (x_, y_). It could be even intermediate rndf_point
References comes_later_on_wp_seg(), get_inter_rp_in_wp_seg(), graph_node_at_rp(), graph_node_at_wp(), cajun::rndf_point_t::id(), is_active_node(), cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().
Referenced by active_rndf_point_before().
| graph_node_t * mission_planner_t::active_graph_node_on_or_after | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References cajun::graph_t< ID_T >::find_vertex(), m_graph, and m_rndf.
Referenced by active_graph_node_after(), and active_rndf_point_on_or_after().
| graph_node_t * mission_planner_t::active_graph_node_on_or_before | ( | rndf_point_t * | rp_ | ) |
| graph_node_t * mission_planner_t::active_graph_node_on_or_before | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
Returns active graph node before the given waypoint id.
References active_graph_node_after(), cajun::graph_t< ID_T >::find_vertex(), is_active_node(), m_graph, m_rndf, m_uc_param, and cajun::uc_planner_param_t::m_verbose_printing.
Referenced by active_graph_node_on_or_before(), and active_rndf_point_on_or_before().
| rndf_point_t * mission_planner_t::active_rndf_point_after | ( | rndf_point_t * | rp_ | ) |
References active_graph_node_after().
Referenced by insert_graph_node(), terminate_road_at(), and cajun::mission_handler_t::update_plan().
| rndf_point_t * mission_planner_t::active_rndf_point_before | ( | double | x_, | |
| double | y_, | |||
| rndf_t::waypoint_id_t const & | before_wp_id | |||
| ) |
References active_graph_node_before().
| rndf_point_t* cajun::mission_planner_t::active_rndf_point_before | ( | rndf_point_t * | rp_ | ) |
Referenced by cajun::mission_handler_t::active_rndf_point_before(), insert_graph_node(), and terminate_road_at().
| rndf_point_t * mission_planner_t::active_rndf_point_on_or_after | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References active_graph_node_on_or_after().
Referenced by start_road_at().
| rndf_point_t * mission_planner_t::active_rndf_point_on_or_before | ( | rndf_point_t * | rp_ | ) |
References active_graph_node_on_or_before().
| rndf_point_t * mission_planner_t::active_rndf_point_on_or_before | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References active_graph_node_on_or_before().
Referenced by cajun::mission_handler_t::active_rndf_point_on_or_before(), and cajun::mission_handler_t::update_plan().
| void mission_planner_t::add_zone_to_graph | ( | rndf_t::zone_t const & | zone_ | ) | [private] |
Add zones to the graph which include adding nodes and edges.
References cajun::graph_t< ID_T >::add_vertex(), create_edge(), create_rndf_point(), m_graph, m_rndf, m_uc_param, cajun::uc_planner_param_t::m_verbose_printing, and mission_spot().
Referenced by create_graph().
| rndf_point_t * mission_planner_t::already_added_inter_rp_for_blk | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [private] |
Returns true if the road is already blocked for this blockage.
References cajun::rndf_point_t::is_entry(), m_intermediate_rps, m_uc_param, cajun::uc_planner_param_t::m_verbose_printing, cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().
Referenced by cajun::mission_handler_t::set_blocked().
| unsigned mission_planner_t::block_index | ( | graph_node_t const * | src_vertex_, | |
| graph_node_t const * | des_vertex_ | |||
| ) | [private] |
References m_blocked_edges.
Referenced by set_unblocked_till().
| bool mission_planner_t::can_pass_between_lanes | ( | rndf_t::segment_t const & | seg_, | |
| unsigned | li1_, | |||
| unsigned | li2_ | |||
| ) | [private] |
Returns true if can passing between lanes li1_, and li2_ because of direction or lane marking.
References cajun::LEFT, and cajun::RIGHT.
| bool mission_planner_t::comes_later_on_wp_seg | ( | rndf_point_t * | rp_, | |
| double | x_, | |||
| double | y_ | |||
| ) |
Check is (x_, y_) comes before or after node_ rp_, with respect to the lane segment on which rp_ lies.
References cajun::rndf_point_t::id(), m_rndf, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, m_ws, cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().
Referenced by active_graph_node_before(), and start_road_at().
| double mission_planner_t::compute_cost | ( | rndf_point_t * | id_1_, | |
| rndf_point_t * | id_2_ | |||
| ) | [private] |
Returns cost between waypoints id_1, and id_2.
References cajun::CHANGE_LANE_TP, distance_between_rps(), cajun::INTERSECTION_TP, cajun::rndf_point_t::is_stop(), cajun::LANE_TP, cajun::uc_planner_param_t::m_change_lane_max_speed, cajun::uc_planner_param_t::m_change_lane_penalty, cajun::uc_planner_param_t::m_intersection_turning_penalty, cajun::uc_planner_param_t::m_max_intersection_speed, m_mdf, cajun::uc_planner_param_t::m_parking_penalty, m_rndf, cajun::uc_planner_param_t::m_stop_sign_penalty, cajun::uc_planner_param_t::m_time_for_uturn, m_uc_param, cajun::uc_planner_param_t::m_unparking_penalty, cajun::uc_planner_param_t::m_uturn_penalty, cajun::uc_planner_param_t::m_verbose_printing, cajun::uc_planner_param_t::m_zone_penalty, cajun::PARKING_TP, cajun::rndf_point_t::print(), cajun::tp_package_t::rp_1, cajun::tp_package_t::rp_2, cajun::task_planner_for_mission(), cajun::tp_package_t::tp_type, cajun::UNPARKING_TP, cajun::UTURN_TP, and cajun::ZONE_TP.
Referenced by create_edge(), and unset_first_blockage().
| void mission_planner_t::create_edge | ( | rndf_point_t * | rp, | |
| rndf_point_t * | neigh_rp | |||
| ) | [private] |
Create edge between rp and neigh_rp. Note: rp, neigh_rp should be pointing to the ENTRIES in the graph.
References compute_cost(), edge_exist(), and graph_node_at_rp().
| void mission_planner_t::create_edge | ( | rndf_t::waypoint_id_t | wp_id_, | |
| rndf_t::waypoint_id_t | neighbor_id_ | |||
| ) | [private] |
References rndf_point_at_wp().
Referenced by add_zone_to_graph(), insert_graph_node(), cajun::mission_handler_t::set_blocked(), start_road_at(), and terminate_road_at().
| void cajun::mission_planner_t::create_edges_from_wp | ( | std::deque< wp_node_t > & | seg_wps_, | |
| unsigned | wp_i | |||
| ) | [private] |
Create edges from given wp, to all entry pairs if its a exit wp along with edge to next wp on the ROAD if its not already part of exit-entry pair * else just an edge to next wp on the road.
| bool mission_planner_t::create_graph | ( | ) | [private] |
creates graph for given rndf object. First adds all waypoints of rndf as nodes of the graph and then for each waypoint, its connecting paths are added as edges
References cajun::graph_t< ID_T >::add_vertex(), add_zone_to_graph(), create_rndf_point(), create_road_edges(), cajun::graph_t< ID_T >::flush(), get_lanes_to_merge_with(), m_graph, m_intermediate_rps, m_rndf, m_uc_param, cajun::uc_planner_param_t::m_verbose_printing, merge_lanes(), and cajun::graph_t< ID_T >::print_graph().
Referenced by cajun::mission_handler_t::flush_blockages(), and mission_planner_t().
| rndf_point_t * mission_planner_t::create_rndf_point | ( | rndf_t const * | rndf_, | |
| unsigned | sid_, | |||
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) | [private] |
| rndf_point_t * mission_planner_t::create_rndf_point | ( | rndf_t const * | rndf_, | |
| rndf_t::waypoint_id_t const & | wp_id | |||
| ) | [private] |
Referenced by add_zone_to_graph(), and create_graph().
| void cajun::mission_planner_t::create_road_edges | ( | std::deque< wp_node_t > & | seg_wps | ) | [private] |
Creates edges between nodes of a road. Assumes that wps are ordered along the ROAD.
Referenced by create_graph().
| double mission_planner_t::distance_between_rps | ( | rndf_point_t const * | rp_1_, | |
| rndf_point_t const * | rp_2_ | |||
| ) | [private] |
Computes distance between rp_1_ to rp_2__.
References cajun::rndf_point_t::in_zone(), cajun::is_exit_entry_pair(), cajun::uc_planner_param_t::m_allowed_post_lane_dis, cajun::uc_planner_param_t::m_allowed_pre_lane_dis, m_rndf, m_uc_param, cajun::uc_planner_param_t::m_width_multiplier, m_ws, cajun::rndf_point_t::x(), and cajun::rndf_point_t::y().
Referenced by compute_cost().
| bool mission_planner_t::edge_exist | ( | graph_node_t * | v1, | |
| graph_node_t * | v2 | |||
| ) | [private] |
Referenced by create_edge().
| void mission_planner_t::filter_detail_plan | ( | mission_plan_t const & | input_plan_, | |
| mission_plan_t & | ouput_plan_, | |||
| unsigned | next_checkpoint_ | |||
| ) | [private] |
Filters the top level mission plan to remove intermediate waypoints within a road, and keep entry, exit, checkpoints (that are listed in the mdf MISSION).
References cajun::consecutive_rndf_points(), is_entry_exit_pair(), is_entry_exit_pair_to_keep(), is_next_checkpoint(), keep_as_individual_rp_in_plan(), m_uc_param, and cajun::uc_planner_param_t::m_verbose_printing.
Referenced by update_plan().
| void cajun::mission_planner_t::get_inter_rp_in_wp_seg | ( | rndf_t::waypoint_id_t const & | wp_id_, | |
| std::vector< rndf_point_t * > | rp_list_ | |||
| ) | [private] |
Referenced by active_graph_node_before().
| void cajun::mission_planner_t::get_lanes_to_merge_with | ( | rndf_t::segment_t const & | seg_, | |
| unsigned | li_, | |||
| std::vector< unsigned > & | lanes_to_merge_ | |||
| ) | [private] |
Referenced by create_graph().
| bool mission_planner_t::get_other_end_inter_rp | ( | rndf_point_t * | rp_, | |
| unsigned | other_lid_, | |||
| rndf_point_t *& | neigh_rp_, | |||
| rndf_point_t *& | follow_rp_ | |||
| ) | [private] |
returns true if able to find the rp on neighboring lane connected from given rp_, and al rp following given rp_ on same lane
References graph_node_at_rp(), and cajun::rndf_point_t::is_rndf_wp().
Referenced by cajun::mission_handler_t::set_blocked().
| bool cajun::mission_planner_t::get_plan | ( | rndf_point_t * | start_, | |
| rndf_point_t * | end_, | |||
| mission_plan_t & | path_ | |||
| ) |
Returns true if there exist a path from start_ to end_, and fills the path in 'path_'. Else returns false.
Referenced by cajun::mission_handler_t::plan_to_next_checkpoint(), and update_plan().
| graph_node_t * mission_planner_t::graph_node_at_rp | ( | rndf_point_t * | rp_ | ) |
References cajun::graph_t< ID_T >::find_vertex(), and m_graph.
Referenced by active_graph_node_after(), active_graph_node_before(), active_graph_node_on_or_before(), create_edge(), get_other_end_inter_rp(), set_blocked(), and set_unblocked_till().
| graph_node_t * mission_planner_t::graph_node_at_wp | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References cajun::graph_t< ID_T >::find_vertex(), m_graph, and m_rndf.
| graph_node_t * mission_planner_t::graph_node_at_wp | ( | rndf_t::waypoint_id_t const & | wp_id_ | ) |
Returns the graph's rndf_ponit_t* corresponding the the waypoint.
References cajun::graph_t< ID_T >::find_vertex(), m_graph, and m_rndf.
Referenced by active_graph_node_before(), and rndf_point_at_wp().
| rndf_point_t * mission_planner_t::insert_graph_node | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [private] |
Sets a edge between.
References active_rndf_point_after(), active_rndf_point_before(), cajun::graph_t< ID_T >::add_vertex(), create_edge(), m_graph, m_intermediate_rps, m_rndf, m_uc_param, cajun::uc_planner_param_t::m_verbose_printing, and set_blocked().
Referenced by cajun::mission_handler_t::set_blocked().
| bool mission_planner_t::is_active_node | ( | graph_node_t const * | gn | ) | [private] |
Referenced by active_graph_node_after(), active_graph_node_before(), and active_graph_node_on_or_before().
| bool mission_planner_t::is_entry_exit_pair | ( | rndf_point_t * | exit_rp_, | |
| rndf_point_t * | entry_rp_ | |||
| ) | [private] |
Returns true if exit_rp_ and entry_rp are exit entry pairs.
References cajun::rndf_point_t::id(), cajun::rndf_point_t::is_entry(), cajun::rndf_point_t::is_exit(), and m_rndf.
Referenced by filter_detail_plan(), and is_entry_exit_pair_to_keep().
| bool mission_planner_t::is_entry_exit_pair_to_keep | ( | rndf_point_t * | exit_rp_, | |
| rndf_point_t * | entry_rp_ | |||
| ) | [private] |
Returns true if this is a exit enty and should be keep this exit entry pair.
References is_entry_exit_pair(), and cajun::rndf_point_t::is_stop().
Referenced by filter_detail_plan().
| bool mission_planner_t::is_mission_checkpoint | ( | rndf_point_t const * | rp_ | ) | [private] |
Returns true if given wp is one of the checkpoint for present mission.
References cajun::rndf_point_t::checkpoint_id(), cajun::rndf_point_t::is_checkpoint(), and m_mdf.
Referenced by should_be_graph_node().
| bool mission_planner_t::is_next_checkpoint | ( | rndf_point_t * | rp_, | |
| unsigned | next_ckpt_ | |||
| ) | [private] |
References cajun::rndf_point_t::checkpoint_id(), cajun::rndf_point_t::is_checkpoint(), and m_mdf.
Referenced by filter_detail_plan().
| bool mission_planner_t::keep_as_individual_rp_in_plan | ( | rndf_point_t * | rp_, | |
| unsigned | next_ckpt_ | |||
| ) | [private] |
returns true if this waypoint should not be filtered from top level plan. A waypoint is not filtered if its the immediate checkpoint, if its a entry_wp and previous wp in the path is its corresponding exit_wp or if present wp is exit_wp and next waypoint on the path is the corresponding entry_wp
References cajun::rndf_point_t::in_zone(), and cajun::rndf_point_t::is_rndf_wp().
Referenced by filter_detail_plan().
| bool mission_planner_t::lanes_in_same_direction | ( | rndf_t::lane_t const & | lane_, | |
| rndf_t::lane_t const & | n_lane_ | |||
| ) | [private] |
Determines all lanes on segmeng 'seg_id_' that are in 'dir_' direction and returns this list in vector 'similar_lanes_'.
Returns true if given 2 lanes are in same direction.
Geneates a priority queue with all wps of the segment arranged by their distance from along the segment. The distance starts from 1st wp of 1st lane. Distance of wps on lane 1 is equal to distance along the lane, while distance of a wp on other adjacent lanes is equal to the sum of the distance of the closest wp on lane 1 + atrack distance of present wp to this closest wp on lane 1 along the orientation of the lane 1 at that waypoint
Returns true if given 2 lanes are in same direction. Determines this by comparing the orientations of the initial part of the lane segments and checking the xtrack distance between the lanes
| void cajun::mission_planner_t::merge_lanes | ( | unsigned | sid_, | |
| std::vector< unsigned > const & | lane_to_merge, | |||
| std::deque< wp_node_t > & | seg_wps | |||
| ) | [private] |
Referenced by create_graph().
| bool mission_planner_t::mission_spot | ( | rndf_t::spot_t const & | spot_ | ) | [private] |
returns true if the spot is part of mission
References m_mdf, m_uc_param, and cajun::uc_planner_param_t::m_verbose_printing.
Referenced by add_zone_to_graph().
| void mission_planner_t::move_existing_inter_rp | ( | rndf_point_t * | blk_rp, | |
| unsigned | wid_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [private] |
References cajun::rndf_point_t::set_id(), and cajun::rndf_point_t::set_xy().
Referenced by cajun::mission_handler_t::set_blocked().
| bool cajun::mission_planner_t::not_close | ( | std::deque< wp_node_t > & | seg_wps_, | |
| unsigned | ind1_, | |||
| unsigned | ind2_ | |||
| ) | [private] |
| void cajun::mission_planner_t::print_graph | ( | ) | [inline] |
References m_graph, and cajun::graph_t< ID_T >::print_graph().
Referenced by cajun::mission_handler_t::set_blocked().
| void mission_planner_t::print_mission | ( | mission_plan_t const & | plan_ | ) | [private] |
References m_uc_param, and cajun::uc_planner_param_t::m_verbose_printing.
| void cajun::mission_planner_t::print_wp_node | ( | std::deque< wp_node_t > & | seg_wps_, | |
| unsigned | wp_i | |||
| ) | [private] |
| rndf_point_t * mission_planner_t::rndf_point_at_wp | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_ | |||
| ) |
References graph_node_at_wp().
| rndf_point_t * mission_planner_t::rndf_point_at_wp | ( | rndf_t::waypoint_id_t const & | wp_id_ | ) |
References graph_node_at_wp().
Referenced by create_edge(), cajun::mission_handler_t::plan_to_next_checkpoint(), cajun::mission_handler_t::rndf_point_at_wp(), start_road_at(), and update_plan().
| bool mission_planner_t::set_blocked | ( | rndf_point_t * | wp_id_1_, | |
| rndf_point_t * | wp_id_2_ | |||
| ) |
Find the edge in the graph which connect wp_id_1 to wp_id_2 and sets its cost to FLT_MAX.
References graph_node_at_rp(), and m_blocked_edges.
Referenced by insert_graph_node(), cajun::mission_handler_t::set_blocked(), and terminate_road_at().
| void mission_planner_t::set_unblocked_till | ( | rndf_point_t * | wp_id_1_, | |
| rndf_point_t * | wp_id_2_ | |||
| ) |
Find the edge in the graph which connect wp_id_1 to wp_id_2 and sets its cost to the value returned by compute_cost.
References block_index(), graph_node_at_rp(), m_blocked_edges, and unset_first_blockage().
| bool mission_planner_t::should_be_graph_node | ( | rndf_point_t const * | wp_id_ | ) | [private] |
Returns true if given wp_id should be a node in graph.
References cajun::rndf_point_t::is_entry(), cajun::rndf_point_t::is_exit(), is_mission_checkpoint(), and cajun::rndf_point_t::is_rndf_wp().
| rndf_point_t * mission_planner_t::start_road_at | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [private] |
References active_rndf_point_on_or_after(), cajun::graph_t< ID_T >::add_vertex(), comes_later_on_wp_seg(), create_edge(), cajun::graph_t< ID_T >::find_vertex(), cajun::rndf_point_t::id(), m_graph, m_intermediate_rps, m_rndf, and rndf_point_at_wp().
Referenced by cajun::mission_handler_t::set_blocked().
| rndf_point_t * mission_planner_t::terminate_road_at | ( | unsigned | sid_, | |
| unsigned | lid_, | |||
| unsigned | wid_, | |||
| double | x_, | |||
| double | y_ | |||
| ) | [private] |
References active_rndf_point_after(), active_rndf_point_before(), cajun::graph_t< ID_T >::add_vertex(), create_edge(), m_graph, m_intermediate_rps, m_rndf, and set_blocked().
Referenced by cajun::mission_handler_t::set_blocked().
| void mission_planner_t::unset_all_blockages | ( | ) |
Unsets all blockages.
References m_blocked_edges, and unset_first_blockage().
Referenced by cajun::mission_handler_t::unset_all_blockages().
| bool mission_planner_t::unset_first_blockage | ( | ) | [private] |
Finds the oldest blocked edge, sets it unblocked and removes it from m_blocked_edges list.
References compute_cost(), and m_blocked_edges.
Referenced by set_unblocked_till(), and unset_all_blockages().
| bool mission_planner_t::update_plan | ( | unsigned | next_checkpoint_, | |
| mission_plan_t & | detail_plan_, | |||
| mission_plan_t & | filter_plan_ | |||
| ) |
Finds a path on rndf network starting from the waypoint last in the plan_ deque and touching all checkpoints specified in the mdf file starting from 'next_checkpoint_'.
Finds a path on rndf network starting from the waypoint last in the plan_ deque and touching all checkpoints specified in the mdf file starting from 'next_checkpoint_'. returns false if could not find a plan, else returns true. Size of filtered plan_ is < 2 if mission is done.
References filter_detail_plan(), get_plan(), m_mdf, m_rndf, message, msg_logger, and rndf_point_at_wp().
Referenced by cajun::mission_handler_t::update_plan().
friend class mission_handler_t [friend] |
std::deque<blocked_edge_t> cajun::mission_planner_t::m_blocked_edges [private] |
Referenced by block_index(), set_blocked(), set_unblocked_till(), unset_all_blockages(), and unset_first_blockage().
Referenced by mission_planner_t().
std::deque<rndf_point_t*> cajun::mission_planner_t::m_intermediate_rps [private] |
Referenced by already_added_inter_rp_for_blk(), create_graph(), insert_graph_node(), start_road_at(), and terminate_road_at().
mdf_t const* cajun::mission_planner_t::m_mdf [private] |
Referenced by compute_cost(), is_mission_checkpoint(), is_next_checkpoint(), mission_spot(), and update_plan().
rndf_t const* cajun::mission_planner_t::m_rndf [private] |
Referenced by active_graph_node_on_or_after(), active_graph_node_on_or_before(), add_zone_to_graph(), comes_later_on_wp_seg(), compute_cost(), create_graph(), distance_between_rps(), graph_node_at_wp(), insert_graph_node(), is_entry_exit_pair(), start_road_at(), terminate_road_at(), and update_plan().
const uc_planner_param_t* cajun::mission_planner_t::m_uc_param [private] |
Referenced by active_graph_node_after(), active_graph_node_on_or_before(), add_zone_to_graph(), already_added_inter_rp_for_blk(), comes_later_on_wp_seg(), compute_cost(), create_graph(), distance_between_rps(), filter_detail_plan(), insert_graph_node(), mission_planner_t(), mission_spot(), and print_mission().
world_state_t* cajun::mission_planner_t::m_ws [private] |
Referenced by comes_later_on_wp_seg(), and distance_between_rps().
1.6.1