Closed dongb5 closed 3 years ago
Hey, We don't have any utility function for that out of the box. However, what you did should give you the correct result. The lanes are cached in the mapAPI so that part should be cheap enough. I guess that computing all distances is probably more expensive though.
something that can also hep is using the bounds_info
of the mapAPI for a quick lookup (so you don't have to compute all distances every time)
Hi, I am just wondering is there any easy way to get the nearest lane given a position in l5kit? What I come up with is using MapAPI to get all lane [xyz_left, xyz_right], and using global coords of position to compute the verticle distance between them. Any help? Thanks