24#include <unordered_map>
28#include "modules/common_msgs/basic_msgs/pnc_point.pb.h"
29#include "modules/planning/planning_base/proto/st_drivable_boundary.pb.h"
30#include "modules/planning/tasks/path_time_heuristic/proto/path_time_heuristic.pb.h"
42 const double total_s,
const std::vector<const Obstacle*>& obstacles,
51 const STPoint& reference_point)
const;
54 const double speed_limit,
55 const double cruise_speed)
const;
74 double GetAccelCost(
const double accel);
75 double JerkCost(
const double jerk);
77 void AddToKeepClearRange(
const std::vector<const Obstacle*>& obstacles);
78 static void SortAndMergeRange(
79 std::vector<std::pair<double, double>>* keep_clear_range_);
80 bool InKeepClearRange(
double s)
const;
83 const std::vector<const Obstacle*>& obstacles_;
90 double total_s_ = 0.0;
92 std::unordered_map<std::string, int> boundary_map_;
93 std::vector<std::vector<std::pair<double, double>>> boundary_cost_;
95 std::vector<std::pair<double, double>> keep_clear_range_;
97 std::array<double, 200> accel_cost_;
98 std::array<double, 400> jerk_cost_;
double GetSpatialPotentialCost(const StGraphPoint &point)
double GetAccelCostByTwoPoints(const double pre_speed, const STPoint &first, const STPoint &second)
double GetJerkCostByThreePoints(const double first_speed, const STPoint &first_point, const STPoint &second_point, const STPoint &third_point)
double GetJerkCostByTwoPoints(const double pre_speed, const double pre_acc, const STPoint &pre_point, const STPoint &curr_point)
double GetReferenceCost(const STPoint &point, const STPoint &reference_point) const
double GetSpeedCost(const STPoint &first, const STPoint &second, const double speed_limit, const double cruise_speed) const
double GetJerkCostByFourPoints(const STPoint &first, const STPoint &second, const STPoint &third, const STPoint &fourth)
double GetAccelCostByThreePoints(const STPoint &first, const STPoint &second, const STPoint &third)
double GetObstacleCost(const StGraphPoint &point)
Planning module main class.