From 4d324b6ce16a2f2e7bca7c52837005b0c49ab7f3 Mon Sep 17 00:00:00 2001 From: JasonZhou404 Date: Wed, 18 Dec 2019 15:33:13 -0800 Subject: [PATCH] fix the difference following gap keeping in dp st and speed opt --- .../planning/tasks/deciders/speed_decider/speed_decider.cc | 2 +- .../tasks/optimizers/path_time_heuristic/dp_st_cost.cc | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/planning/tasks/deciders/speed_decider/speed_decider.cc b/modules/planning/tasks/deciders/speed_decider/speed_decider.cc index cc3edfe5cce..071e73f4f6c 100644 --- a/modules/planning/tasks/deciders/speed_decider/speed_decider.cc +++ b/modules/planning/tasks/deciders/speed_decider/speed_decider.cc @@ -185,7 +185,7 @@ bool SpeedDecider::IsFollowTooClose(const Obstacle& obstacle) const { } const double distance = obstacle.path_st_boundary().min_s() - FLAGS_min_stop_distance_obstacle; - static constexpr double lane_follow_max_decel = 1.0; + static constexpr double lane_follow_max_decel = 3.0; static constexpr double lane_change_max_decel = 3.0; auto* planning_status = PlanningContext::Instance() ->mutable_planning_status() diff --git a/modules/planning/tasks/optimizers/path_time_heuristic/dp_st_cost.cc b/modules/planning/tasks/optimizers/path_time_heuristic/dp_st_cost.cc index fec80fe0441..0cc5b586458 100644 --- a/modules/planning/tasks/optimizers/path_time_heuristic/dp_st_cost.cc +++ b/modules/planning/tasks/optimizers/path_time_heuristic/dp_st_cost.cc @@ -128,7 +128,6 @@ double DpStCost::GetObstacleCost(const StGraphPoint& st_graph_point) { if (s > upper_bound || s < lower_bound) { return kInf; } - return cost * unit_t_; } for (const auto* obstacle : obstacles_) { @@ -161,10 +160,7 @@ double DpStCost::GetObstacleCost(const StGraphPoint& st_graph_point) { s_lower = boundary_cost_[boundary_index][st_graph_point.index_t()].second; } if (s < s_lower) { - const double follow_distance_s = - config_.is_lane_changing() - ? config_.safe_distance() - : StGapEstimator::EstimateSafeFollowingGap(obstacle->speed()); + const double follow_distance_s = config_.safe_distance(); if (s + follow_distance_s < s_lower) { continue; } else {