metadriverse / scenarionet

ScenarioNet: Scalable Traffic Scenario Management System for Autonomous Driving
Apache License 2.0
172 stars 22 forks source link

Lane centre polylines in nuscenes after conversion seem to be uncentred wrt map #66

Open samueleruffino99 opened 7 months ago

samueleruffino99 commented 7 months ago

Hello, I have converted a nuscenes scenario, and when i am printing out the whole map element I get this strange behavior, the lanes' center lines are not centered with the other map elements. Screenshot 2024-02-23 145823 I think it might be an error on how to compute the map_centre of the polylines in converter/nuscenes.utils.py? result[SD.TRACKS], map_center = get_tracks_from_frames(nuscenes, scene_info, frames, num_to_interpolate=5) ....... Normalize place all object to (0,0) map_center = np.array(interpolate_tracks["ego"]["state"]["position"][0]) map_center[-1] = 0 normalized_ret = {} for id, track, in interpolate_tracks.items(): pos = track["state"]["position"] - map_center track["state"]["position"] = np.asarray(pos) normalized_ret[id] = track

QuanyiLi commented 7 months ago

I confirmed this error. It is introduced in a recent PR. I have fixed it now. Please pull the latest code

samueleruffino99 commented 7 months ago

Thank you so much!