In one embodiment, a system receives an initial reference line representing a route from a first location to a second location associated with an autonomous driving vehicle (ADV), where the initial reference line includes a number of reference line segments. The system smooths the line segments by applying a quadratic programming (QP) spline smoothing algorithm to the line segments. The system determines that the QP spline smoothing algorithm for the line segments fails to converge. The system adjusts (or enumerates) a location of an end point of a line segment. The system smooths the line segments by applying a QP spline smoothing algorithm to the adjusted (or enumerated) line segments. The system generates a smoothed reference line based on the smoothed line segments to be used as a reference line of the route to control the ADV.
展开▼