27 #include <unordered_map> 34 #include "modules/common/configs/proto/vehicle_config.pb.h" 42 #include "modules/planning/proto/planner_open_space_config.pb.h" 48 std::vector<double>
x;
49 std::vector<double>
y;
50 std::vector<double>
phi;
51 std::vector<double>
v;
52 std::vector<double>
a;
59 explicit HybridAStar(
const PlannerOpenSpaceConfig& open_space_conf);
61 bool Plan(
double sx,
double sy,
double sphi,
double ex,
double ey,
62 double ephi,
const std::vector<double>& XYbounds,
63 const std::vector<std::vector<common::math::Vec2d>>&
64 obstacles_vertices_vec,
67 std::vector<HybridAStartResult>* partitioned_result);
70 bool AnalyticExpansion(std::shared_ptr<Node3d> current_node);
72 bool ValidityCheck(std::shared_ptr<Node3d> node);
74 bool RSPCheck(
const std::shared_ptr<ReedSheppPath> reeds_shepp_to_end);
76 std::shared_ptr<Node3d> LoadRSPinCS(
77 const std::shared_ptr<ReedSheppPath> reeds_shepp_to_end,
78 std::shared_ptr<Node3d> current_node);
79 std::shared_ptr<Node3d> Next_node_generator(
80 std::shared_ptr<Node3d> current_node,
size_t next_node_index);
81 void CalculateNodeCost(std::shared_ptr<Node3d> current_node,
82 std::shared_ptr<Node3d> next_node);
83 double TrajCost(std::shared_ptr<Node3d> current_node,
84 std::shared_ptr<Node3d> next_node);
85 double HoloObstacleHeuristic(std::shared_ptr<Node3d> next_node);
92 PlannerOpenSpaceConfig planner_open_space_config_;
93 common::VehicleParam vehicle_param_ =
95 size_t next_node_num_ = 0;
96 double max_steer_angle_ = 0.0;
97 double step_size_ = 0.0;
98 double xy_grid_resolution_ = 0.0;
99 double delta_t_ = 0.0;
100 double traj_forward_penalty_ = 0.0;
101 double traj_back_penalty_ = 0.0;
102 double traj_gear_switch_penalty_ = 0.0;
103 double traj_steer_penalty_ = 0.0;
104 double traj_steer_change_penalty_ = 0.0;
105 double heu_rs_forward_penalty_ = 0.0;
106 double heu_rs_back_penalty_ = 0.0;
107 double heu_rs_gear_switch_penalty_ = 0.0;
108 double heu_rs_steer_penalty_ = 0.0;
109 double heu_rs_steer_change_penalty_ = 0.0;
110 std::vector<double> XYbounds_;
111 std::shared_ptr<Node3d> start_node_;
112 std::shared_ptr<Node3d> end_node_;
113 std::shared_ptr<Node3d> final_node_;
114 std::vector<std::vector<common::math::LineSegment2d>>
115 obstacles_linesegments_vec_;
118 bool operator()(
const std::pair<std::string, double>& left,
119 const std::pair<std::string, double>& right)
const {
120 return left.second >= right.second;
123 std::priority_queue<std::pair<std::string, double>,
124 std::vector<std::pair<std::string, double>>, cmp>
126 std::unordered_map<std::string, std::shared_ptr<Node3d>> open_set_;
127 std::unordered_map<std::string, std::shared_ptr<Node3d>> close_set_;
128 std::unique_ptr<ReedShepp> reed_shepp_generator_;
129 std::unique_ptr<GridSearch> grid_a_star_heuristic_generator_;
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
std::vector< double > phi
Definition: hybrid_a_star.h:50
std::vector< double > v
Definition: hybrid_a_star.h:51
Planning module main class. It processes GPS and IMU as input, to generate planning info...
Definition: hybrid_a_star.h:57
std::vector< double > accumulated_s
Definition: hybrid_a_star.h:54
static const VehicleConfig & GetConfig()
Get the current vehicle configuration.
Math-related util functions.
std::vector< double > y
Definition: hybrid_a_star.h:49
Definition: hybrid_a_star.h:47
std::vector< double > steer
Definition: hybrid_a_star.h:53
std::vector< double > a
Definition: hybrid_a_star.h:52
std::vector< double > x
Definition: hybrid_a_star.h:48