24 #include <unordered_map> 28 #include "modules/common/proto/pnc_point.pb.h" 32 #include "modules/planning/proto/st_drivable_boundary.pb.h" 33 #include "modules/planning/proto/task_config.pb.h" 41 DpStCost(
const DpStSpeedOptimizerConfig& config,
const double total_t,
42 const double total_s,
const std::vector<const Obstacle*>& obstacles,
43 const STDrivableBoundary& st_drivable_boundary,
44 const common::TrajectoryPoint& init_point);
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;
82 const DpStSpeedOptimizerConfig& config_;
83 const std::vector<const Obstacle*>& obstacles_;
85 STDrivableBoundary st_drivable_boundary_;
87 const common::TrajectoryPoint& init_point_;
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_;
DpStCost(const DpStSpeedOptimizerConfig &config, const double total_t, const double total_s, const std::vector< const Obstacle *> &obstacles, const STDrivableBoundary &st_drivable_boundary, const common::TrajectoryPoint &init_point)
double GetJerkCostByFourPoints(const STPoint &first, const STPoint &second, const STPoint &third, const STPoint &fourth)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Planning module main class. It processes GPS and IMU as input, to generate planning info...
double GetSpatialPotentialCost(const StGraphPoint &point)
Definition: st_graph_point.h:30
double GetAccelCostByTwoPoints(const double pre_speed, const STPoint &first, const STPoint &second)
double GetObstacleCost(const StGraphPoint &point)
double GetJerkCostByTwoPoints(const double pre_speed, const double pre_acc, const STPoint &pre_point, const STPoint &curr_point)
Definition: st_point.h:30
double GetReferenceCost(const STPoint &point, const STPoint &reference_point) const
double GetJerkCostByThreePoints(const double first_speed, const STPoint &first_point, const STPoint &second_point, const STPoint &third_point)
double GetSpeedCost(const STPoint &first, const STPoint &second, const double speed_limit, const double cruise_speed) const
Definition: dp_st_cost.h:39
double GetAccelCostByThreePoints(const STPoint &first, const STPoint &second, const STPoint &third)