提交 2c11c0cf 编写于 作者: L Liangliang Zhang 提交者: Jiangtao Hu

Planning: updated nudge for pedestrian and bicycles. (#2352)

上级 1cc92556
......@@ -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");
......
......@@ -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,
......
......@@ -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() &&
......
......@@ -1572,7 +1572,7 @@ decision {
object_decision {
nudge {
type: RIGHT_NUDGE
distance_l: -0.3
distance_l: -0.5
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册