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

added lane_waypoints when empty in planning.

上级 bc5fc141
......@@ -61,16 +61,22 @@ ReferencePoint ReferenceLine::get_reference_point(const double s) const {
AWARN << "The requested s is nearer than the start point of the reference "
"line; reference line starts at "
<< accumulated_s.back() << ", requested " << s << ".";
ReferencePoint ref_point(reference_map_line_.get_smooth_point(s),
0.0, 0.0, 0.0, 0.0);
ReferencePoint ref_point(reference_map_line_.get_smooth_point(s), 0.0, 0.0,
0.0, 0.0);
if (ref_point.lane_waypoints().empty()) {
ref_point.add_lane_waypoints(reference_points_.front().lane_waypoints());
}
return ref_point;
}
if (s > accumulated_s.back()) {
AWARN << "The requested s exceeds the reference line; reference line "
"ends at "
<< accumulated_s.back() << "requested " << s << " .";
ReferencePoint ref_point(reference_map_line_.get_smooth_point(s),
0.0, 0.0, 0.0, 0.0);
ReferencePoint ref_point(reference_map_line_.get_smooth_point(s), 0.0, 0.0,
0.0, 0.0);
if (ref_point.lane_waypoints().empty()) {
ref_point.add_lane_waypoints(reference_points_.back().lane_waypoints());
}
return ref_point;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册