提交 8812c295 编写于 作者: J Jiaming Tao 提交者: Jiangtao Hu

planning: side_pass scenario add a flag in conf to work around large vehicle...

planning: side_pass scenario add a flag in conf to work around large vehicle splitting issue in perception
上级 2c4f6f19
......@@ -10,6 +10,7 @@ side_pass_config: {
approach_obstacle_max_stop_speed: 1.0e-5
approach_obstacle_min_stop_distance: 4.0
block_obstacle_min_speed: 0.1
enable_obstacle_blocked_check: true
}
stage_config: {
stage_type: SIDE_PASS_APPROACH_OBSTACLE
......
......@@ -72,6 +72,8 @@ message ScenarioSidePassConfig {
optional double approach_obstacle_max_stop_speed = 2 [default = 1.0e-5];
optional double approach_obstacle_min_stop_distance = 3 [default = 4.0];
optional double block_obstacle_min_speed = 4 [default = 0.1]; // m/s
// set to false to work around large vehicle splitting issue in perception
optional bool enable_obstacle_blocked_check = 5 [default = true];
}
message ScenarioStopSignUnprotectedConfig {
......
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
......@@ -211,27 +212,29 @@ bool SidePassScenario::HasBlockingObstacle(const Frame& frame) {
}
bool is_blocked_by_others = false;
for (const auto* other_obstacle : path_decision.obstacles().Items()) {
if (other_obstacle->Id() == obstacle->Id()) {
continue;
}
if (other_obstacle->PerceptionSLBoundary().start_l() >
obstacle->PerceptionSLBoundary().end_l() ||
other_obstacle->PerceptionSLBoundary().end_l() <
obstacle->PerceptionSLBoundary().start_l()) {
// not blocking the backside vehicle
continue;
}
double delta_s = other_obstacle->PerceptionSLBoundary().start_s() -
obstacle->PerceptionSLBoundary().end_s();
if (delta_s < 0.0 || delta_s > kAdcDistanceThreshold) {
continue;
} else {
// TODO(All): fixed the segmentation bug for large vehicles, otherwise
// the follow line will be problematic.
is_blocked_by_others = true;
break;
if (side_pass_context_.scenario_config_.enable_obstacle_blocked_check()) {
for (const auto* other_obstacle : path_decision.obstacles().Items()) {
if (other_obstacle->Id() == obstacle->Id()) {
continue;
}
if (other_obstacle->PerceptionSLBoundary().start_l() >
obstacle->PerceptionSLBoundary().end_l() ||
other_obstacle->PerceptionSLBoundary().end_l() <
obstacle->PerceptionSLBoundary().start_l()) {
// not blocking the backside vehicle
continue;
}
double delta_s = other_obstacle->PerceptionSLBoundary().start_s() -
obstacle->PerceptionSLBoundary().end_s();
if (delta_s < 0.0 || delta_s > kAdcDistanceThreshold) {
continue;
} else {
// TODO(All): fixed the segmentation bug for large vehicles, otherwise
// the follow line will be problematic.
is_blocked_by_others = true;
break;
}
}
}
......
......@@ -10,6 +10,7 @@ side_pass_config: {
approach_obstacle_max_stop_speed: 1.0e-5
approach_obstacle_min_stop_distance: 4.0
block_obstacle_min_speed: 0.1
enable_obstacle_blocked_check: true
}
stage_config: {
stage_type: SIDE_PASS_APPROACH_OBSTACLE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册