Getting distance to curb for pedestrians

Hi,

I am working on pedestrian trajectory prediction problem and I chose to use NuScenes dataset. I would like to know how can I extract the shortest distance between the pedestrian position and road curb at any given time. The shortest distance to a point and a line could be inferred using formulas. I would like to know how to determine the closest geometric line (curb) to a pedestrian position in the map so that I can infer this distance.

Thank you!

Hi,
please take a look at the map tutorial: https://www.nuscenes.org/map-tutorial. You can retrieve all sidewalks within 150m from the pedestrian (using get_records_in_patch()) and compute the distance between the point and the polygons using shapely. Good luck!

1 Like

Hi,

Thank you for the hint.

I wanted to work on that hint before I can write a reply here. It was a bit unclear how to extract polygons from record tokens as it wasn’t mentioned in the map_demo notebook. I figured it now and it works well.

Thanks again!

1 Like