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

Planning: speed up st mapping by ignoring obstacles not overlaped with reference line.

上级 cfa9e953
...@@ -158,11 +158,23 @@ bool PathObstacle::BuildTrajectoryStBoundary( ...@@ -158,11 +158,23 @@ bool PathObstacle::BuildTrajectoryStBoundary(
AERROR << "failed to calculate boundary"; AERROR << "failed to calculate boundary";
return false; return false;
} }
const double object_s_diff = // skip if object is entirely on one side of reference line.
object_boundary.end_s() - object_boundary.start_s(); constexpr double kSkipLDistanceFactor = 0.4;
const double skip_l_distance =
(object_boundary.end_s() - object_boundary.start_s()) *
kSkipLDistanceFactor;
if (std::fmin(object_boundary.start_l(), object_boundary.end_l()) >
skip_l_distance ||
std::fmax(object_boundary.start_l(), object_boundary.end_l()) <
-skip_l_distance) {
continue;
}
if (object_boundary.end_s() < 0) { // skip if behind reference line if (object_boundary.end_s() < 0) { // skip if behind reference line
continue; continue;
} }
const double object_s_diff =
object_boundary.end_s() - object_boundary.start_s();
if (object_s_diff < kStBoundaryDeltaS) { if (object_s_diff < kStBoundaryDeltaS) {
continue; continue;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册