woven-planet / l5kit

L5Kit - https://woven.toyota
https://woven-planet.github.io/l5kit
858 stars 277 forks source link

How can I transform the vehicle centroid coord to google map coord? prediction dataset #412

Closed wobushigaoying closed 1 year ago

wobushigaoying commented 1 year ago

Is it possible to transform the vehicle centroid coord to google map coord? I found 'ecef_to_geodetic' function in transform.py. Its input arg is a ECEF(x,y,z oriented) while the vehicle centroid coord lacks z-oriented coord.

Help needed......

Thanks very much

stefanopini commented 1 year ago

Hi, you can use the dataset_meta["world_to_ecef"] matrix to convert from vehicle world coordinates to ecef, then use ecef_to_geodetic to obtain latitude and longitude that can be used on google maps. If you still lack the altitude, you can get a good estimate fixing it to 0.