diff --git a/modules/planning/common/planning_gflags.cc b/modules/planning/common/planning_gflags.cc index a5bf0d7c26a550ff7bdaeff5aa21ea32c2a29d3e..cbfa3ae5e4bf38bc224598f1662d6033b447c2e2 100644 --- a/modules/planning/common/planning_gflags.cc +++ b/modules/planning/common/planning_gflags.cc @@ -186,7 +186,7 @@ DEFINE_bool(enable_nudge_slowdown, true, DEFINE_bool(try_history_decision, false, "try history decision first"); -DEFINE_double(static_decision_nudge_l_buffer, 0.3, "l buffer for nudge"); +DEFINE_double(static_decision_nudge_l_buffer, 0.5, "l buffer for nudge"); DEFINE_double(lateral_ignore_buffer, 3.0, "If an obstacle's lateral distance is further away than this " "distance, ignore it"); @@ -201,7 +201,7 @@ DEFINE_double(stop_distance_traffic_light, 3.0, DEFINE_double(destination_check_distance, 5.0, "if the distance between destination and ADC is less than this," " it is considered to reach destination"); -DEFINE_double(nudge_distance_obstacle, 0.3, +DEFINE_double(nudge_distance_obstacle, 0.5, "minimum distance to nudge a obstacle (meters)"); DEFINE_double(follow_min_distance, 3.0, "min follow distance for vehicles/bicycles/moving objects"); diff --git a/modules/planning/tasks/dp_poly_path/trajectory_cost.cc b/modules/planning/tasks/dp_poly_path/trajectory_cost.cc index aa95280ef646ece76711af2468c7e25224f8943f..c0a194c58450eb567ceda453dc425db16cef8707 100644 --- a/modules/planning/tasks/dp_poly_path/trajectory_cost.cc +++ b/modules/planning/tasks/dp_poly_path/trajectory_cost.cc @@ -76,10 +76,17 @@ TrajectoryCost::TrajectoryCost( } const auto ptr_obstacle = ptr_path_obstacle->obstacle(); + bool is_bycycle_or_pedestrain = + (ptr_obstacle->Perception().type() == + perception::PerceptionObstacle::BICYCLE || + ptr_obstacle->Perception().type() == + perception::PerceptionObstacle::PEDESTRIAN); + if (Obstacle::IsVirtualObstacle(ptr_obstacle->Perception())) { // Virtual obstacle continue; - } else if (Obstacle::IsStaticObstacle(ptr_obstacle->Perception())) { + } else if (Obstacle::IsStaticObstacle(ptr_obstacle->Perception()) || + is_bycycle_or_pedestrain) { double left_width = 0.0; double right_width = 0.0; reference_line_->GetLaneWidth(sl_boundary.start_s(), &left_width, diff --git a/modules/planning/tasks/path_decider/path_decider.cc b/modules/planning/tasks/path_decider/path_decider.cc index 9442a08c8b551d5c8d7fe62f7db7cbc608987c0a..bfe402707690a4f69ac6314cff7f8001921dccf5 100644 --- a/modules/planning/tasks/path_decider/path_decider.cc +++ b/modules/planning/tasks/path_decider/path_decider.cc @@ -88,7 +88,13 @@ bool PathDecider::MakeStaticObstacleDecision( for (const auto *path_obstacle : path_decision->path_obstacles().Items()) { const auto &obstacle = *path_obstacle->obstacle(); - if (!obstacle.IsStatic()) { + bool is_bycycle_or_pedestrain = + (obstacle.Perception().type() == + perception::PerceptionObstacle::BICYCLE || + obstacle.Perception().type() == + perception::PerceptionObstacle::PEDESTRIAN); + + if (!is_bycycle_or_pedestrain && !obstacle.IsStatic()) { continue; } if (path_obstacle->HasLongitudinalDecision() && diff --git a/modules/planning/testdata/sunnyvale_loop_test/result_nudge_0.pb.txt b/modules/planning/testdata/sunnyvale_loop_test/result_nudge_0.pb.txt index 4d50ef589551c281a8d0be42016982282298958d..42a01a18b65e8cef06f6aa835974d9d958c0b3b0 100644 --- a/modules/planning/testdata/sunnyvale_loop_test/result_nudge_0.pb.txt +++ b/modules/planning/testdata/sunnyvale_loop_test/result_nudge_0.pb.txt @@ -1572,7 +1572,7 @@ decision { object_decision { nudge { type: RIGHT_NUDGE - distance_l: -0.3 + distance_l: -0.5 } } }