nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.24k stars 617 forks source link

Dimensions and position of local maps #925

Closed AndreSchakkal closed 1 year ago

AndreSchakkal commented 1 year ago

Hello,

I'm currently working on adapting your dataset to the task of pedestrian trajectory prediction and it's working pretty well. However, I have a small question: Is there a way to get the dimensions and position (in meters) of the locally generated bird's eye view map (shown in the figure). I'm asking you this because I need these values to be able to transform the pedestrians' coordinates from meters (in the global frame) to pixels (in the local frame). If retrieving these values is not possible, is there a way to find the coordinates of the pedestrians in the local map's reference?

Thank you for your help. Screenshot 2023-05-25 193902

whyekit-motional commented 1 year ago

@AndreSchakkal there's a method to_pixel_coords which you could check out to get inspiration from

AndreSchakkal commented 1 year ago

Thank you for your answer. I'm now able to get the coordinates (more or less), however I think there's some rotation that's missing in my code. Do you happen to know what's missing? download (2)

whyekit-motional commented 1 year ago

You could check if you have performed a rotation of the map (as part of the transformation to the ego frame), like what is done here: https://github.com/nutonomy/nuscenes-devkit/blob/da3c9a977112fca05413dab4e944d911769385a9/python-sdk/nuscenes/nuscenes.py#L1201-L1203