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

Planning: return error when path points is too few in st_boundary_mapper.

上级 fd07488c
......@@ -182,8 +182,7 @@ bool StBoundaryMapper::MapObstacleWithStopDecision(
const double st_stop_s = path_point.s() + stop_decision.stop().distance_s() -
FLAGS_decision_valid_stop_range;
if (st_stop_s < 0.0) {
AERROR << "obstacle st stop_s " << st_stop_s
<< " is less than adc_front_s: " << adc_front_s_;
AERROR << "obstacle st stop_s " << st_stop_s << " is less than 0.";
return false;
}
......@@ -224,6 +223,13 @@ Status StBoundaryMapper::MapObstacleWithPredictionTrajectory(
bool skip = true;
std::vector<STPoint> boundary_points;
const auto& adc_path_points = path_data_.discretized_path().points();
if (adc_path_points.size() == 0) {
std::string msg = common::util::StrCat(
"Too few points in path_data_.discretized_path(); size = ",
adc_path_points.size());
AERROR << msg;
return Status(ErrorCode::PLANNING_ERROR, msg);
}
const auto& trajectory = obstacle->Trajectory();
if (trajectory.trajectory_point_size() == 0) {
AWARN << "Obstacle (id = " << obstacle->Id()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册