提交 78b109d3 编写于 作者: J JasonZhou404 提交者: PAN Jiacheng

Planning: ignore UNKNOWN and KEEPCLEAR obstacle in GetUnblockSRange()

上级 1710f822
......@@ -179,10 +179,9 @@ bool STBoundary::GetUnblockSRange(const double curr_time, double* s_upper,
}
const double r =
(left == right
? 0.0
: (curr_time - upper_points_[left].t()) /
(upper_points_[right].t() - upper_points_[left].t()));
(left == right ? 0.0 : (curr_time - upper_points_[left].t()) /
(upper_points_[right].t() -
upper_points_[left].t()));
double upper_cross_s =
upper_points_[left].s() +
......@@ -198,9 +197,8 @@ bool STBoundary::GetUnblockSRange(const double curr_time, double* s_upper,
} else if (boundary_type_ == BoundaryType::OVERTAKE) {
*s_lower = std::fmax(*s_lower, upper_cross_s);
} else {
AERROR << "boundary_type is not supported. boundary_type: "
ADEBUG << "boundary_type is not supported. boundary_type: "
<< static_cast<int>(boundary_type_);
return false;
}
return true;
}
......@@ -220,10 +218,9 @@ bool STBoundary::GetBoundarySRange(const double curr_time, double* s_upper,
return false;
}
const double r =
(left == right
? 0.0
: (curr_time - upper_points_[left].t()) /
(upper_points_[right].t() - upper_points_[left].t()));
(left == right ? 0.0 : (curr_time - upper_points_[left].t()) /
(upper_points_[right].t() -
upper_points_[left].t()));
*s_upper = upper_points_[left].s() +
r * (upper_points_[right].s() - upper_points_[left].s());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册