66 bool AnalyticExpansion(std::shared_ptr<Node3d> current_node, std::shared_ptr<Node3d>* candidate_final_node);
68 bool ValidityCheck(std::shared_ptr<Node3d> node);
70 bool RSPCheck(
const std::shared_ptr<ReedSheppPath> reeds_shepp_to_end);
72 std::shared_ptr<Node3d> LoadRSPinCS(
73 const std::shared_ptr<ReedSheppPath> reeds_shepp_to_end,
74 std::shared_ptr<Node3d> current_node);
75 std::shared_ptr<Node3d> Next_node_generator(std::shared_ptr<Node3d> current_node,
size_t next_node_index);
76 void CalculateNodeCost(std::shared_ptr<Node3d> current_node, std::shared_ptr<Node3d> next_node);
77 double TrajCost(std::shared_ptr<Node3d> current_node, std::shared_ptr<Node3d> next_node);
78 double HoloObstacleHeuristic(std::shared_ptr<Node3d> next_node);
87 size_t next_node_num_ = 0;
88 double max_steer_angle_ = 0.0;
89 double max_kappa_ = 0.0;
90 double step_size_ = 0.0;
91 double xy_grid_resolution_ = 0.0;
92 double delta_t_ = 0.0;
93 double traj_forward_penalty_ = 0.0;
94 double traj_back_penalty_ = 0.0;
95 double traj_gear_switch_penalty_ = 0.0;
96 double traj_steer_penalty_ = 0.0;
97 double traj_steer_change_penalty_ = 0.0;
98 double soft_boundary_penalty_ = 0.0;
99 double heu_rs_forward_penalty_ = 0.0;
100 double heu_rs_back_penalty_ = 0.0;
101 double heu_rs_gear_switch_penalty_ = 0.0;
102 double heu_rs_steer_penalty_ = 0.0;
103 double heu_rs_steer_change_penalty_ = 0.0;
104 double acc_weight_ = 0.0;
105 double jerk_weight_ = 0.0;
106 double kappa_penalty_weight_ = 0.0;
107 double ref_s_weight_ = 0.0;
108 double ref_v_weight_ = 0.0;
109 double max_forward_v_ = 0.0;
110 double max_reverse_v_ = 0.0;
111 double max_forward_acc_ = 0.0;
112 double max_reverse_acc_ = 0.0;
113 double max_acc_jerk_ = 0.0;
114 double arc_length_ = 0.0;
115 std::vector<double> XYbounds_;
116 std::shared_ptr<Node3d> start_node_;
117 std::shared_ptr<Node3d> end_node_;
118 std::shared_ptr<Node3d> final_node_;
119 std::vector<std::vector<common::math::LineSegment2d>> obstacles_linesegments_vec_;
123 const std::pair<std::shared_ptr<Node3d>,
double>& left,
124 const std::pair<std::shared_ptr<Node3d>,
double>& right)
const {
125 return left.second >= right.second;
129 std::pair<std::shared_ptr<Node3d>,
double>,
130 std::vector<std::pair<std::shared_ptr<Node3d>,
double>>,
133 std::unordered_set<std::string> open_set_;
134 std::unordered_set<std::string> close_set_;
135 std::unique_ptr<ReedShepp> reed_shepp_generator_;
136 std::unique_ptr<GridSearch> grid_a_star_heuristic_generator_;
140 explicit HybridAStar(
const WarmStartConfig& open_space_conf);
149 const std::vector<double>& XYbounds,
150 const std::vector<std::vector<common::math::Vec2d>>& obstacles_vertices_vec,
151 HybridAStartResult* result,
152 const std::vector<std::vector<common::math::Vec2d>>& soft_boundary_vertices_vec = {},
153 bool reeds_sheep_last_straight =
false);
156 double GetSoftBoundaryCost(
const std::shared_ptr<ReedSheppPath>& reeds_shepp_to_end);
157 bool RSPLengthCheck(
const std::shared_ptr<ReedSheppPath> reeds_shepp_path);
159 WarmStartConfig planner_warm_start_config_;
160 std::vector<std::vector<common::math::LineSegment2d>> soft_boundary_linesegments_vec_;
161 double traj_expected_shortest_length_ = 0.0;
162 double traj_short_length_penalty_ = 0.0;
bool Plan(double sx, double sy, double sphi, double ex, double ey, double ephi, const std::vector< double > &XYbounds, const std::vector< std::vector< common::math::Vec2d > > &obstacles_vertices_vec, HybridAStartResult *result, const std::vector< std::vector< common::math::Vec2d > > &soft_boundary_vertices_vec={}, bool reeds_sheep_last_straight=false)