apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Laplacian smoothing inside create_map.py smoothies out the actual curvature of the lane

Open jilinzhou opened this issue 8 years ago • 1 comments

This is more of a documentation issue. There is a smooth_center_width() function in the script as the following:

def smooth_dimension(data, dim):
    """
    smooth dimension 'dim' of 'data'
    """

    extracted_data = extract_data(data, dim)
    if dim == 'width':
        laplacian_smooth(extracted_data, 1.0, 1000)
    else:
        laplacian_smooth(extracted_data, 1.0, 1000)
    update_data(data, dim, extracted_data)

def smooth_center_width(data):
    """
    smooth centers and widths of data
    """

    smooth_dimension(data, 'center_x')
    smooth_dimension(data, 'center_y')
    smooth_dimension(data, 'width')

We noticed that it changes the center lane path quite bit when there are noticeable curvature changes. Therefore, the car tends to hit the right curb during playback in these lane segments. The following figure might help illustrate what I mean:

lane_smooth

jilinzhou avatar May 22 '18 15:05 jilinzhou

This approach of map creation has been upgraded to relative map in Apollo 2.5. Please refer to the documentation that is contributed by @davidhopper2003 here or the Chinese version. @Zhenni17 will update the old approach documentation to avoid confusion.

yifeijiang avatar May 24 '18 20:05 yifeijiang