提交 ba66d959 编写于 作者: J Jiangtao Hu 提交者: Aaron Xiao

planning: fix invalid lane width in the middle problem and caused QP path has no solution.

上级 0532a657
......@@ -197,6 +197,7 @@ void Path::init_width() {
if (point.lane_waypoints().empty()) {
_left_width.push_back(0.0);
_right_width.push_back(0.0);
AERROR << "path point:" << point.DebugString() << " has invalid width.";
} else {
const LaneWaypoint waypoint = point.lane_waypoints()[0];
CHECK_NOTNULL(waypoint.lane);
......@@ -322,6 +323,9 @@ MapPathPoint Path::get_smooth_point(const InterpolatedIndex& index) const {
lane_segment.lane, lane_segment.start_s + index.offset));
}
}
if (point.lane_waypoints().empty() && !ref_point.lane_waypoints().empty()) {
point.add_lane_waypoint(ref_point.lane_waypoints()[0]);
}
return point;
} else {
return ref_point;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册