提交 3fd5a554 编写于 作者: Z Zhang Liangliang 提交者: Jiangtao Hu

Planning: use configurable params for nudge speed.

上级 589c623a
......@@ -72,6 +72,8 @@ em_planner_config {
minimal_kappa: 0.00001
point_extension: 1.0
lowest_speed: 2.5
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
}
}
qp_spline_path_config {
......@@ -136,6 +138,8 @@ em_planner_config {
point_extension: 1.0
lowest_speed: 2.5
num_points_to_avg_kappa: 2
static_obs_nudge_speed_ratio: 0.6
dynamic_obs_nudge_speed_ratio: 0.8
}
}
}
......
......@@ -12,4 +12,6 @@ message StBoundaryConfig {
optional double point_extension = 7 [ default = 1.0 ];
optional double lowest_speed = 8 [ default = 2.5 ];
optional uint32 num_points_to_avg_kappa = 9 [ default = 4 ];
optional double static_obs_nudge_speed_ratio = 10;
optional double dynamic_obs_nudge_speed_ratio = 11;
}
......@@ -503,6 +503,9 @@ Status StBoundaryMapper::GetSpeedLimits(
// speed limit from nudge obstacles
double nudge_obstacle_speed_limit = std::numeric_limits<double>::max();
for (const auto* const_path_obstacle : path_obstacles.Items()) {
if (const_path_obstacle->obstacle()->IsVirtual()) {
continue;
}
if (!const_path_obstacle->LateralDecision().has_nudge()) {
continue;
}
......@@ -519,9 +522,16 @@ Status StBoundaryMapper::GetSpeedLimits(
(nudge.type() == ObjectNudge::RIGHT_NUDGE) &&
(const_path_obstacle->perception_sl_boundary().start_l() < kRange);
if (is_close_on_left || is_close_on_right) {
constexpr double kNudgeSpeedRatio = 0.6;
double nudge_speed_ratio = 1.0;
if (const_path_obstacle->obstacle()->IsStatic()) {
nudge_speed_ratio =
st_boundary_config_.static_obs_nudge_speed_ratio();
} else {
nudge_speed_ratio =
st_boundary_config_.dynamic_obs_nudge_speed_ratio();
}
nudge_obstacle_speed_limit =
kNudgeSpeedRatio * speed_limit_on_reference_line;
nudge_speed_ratio * speed_limit_on_reference_line;
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册