avishkarsaha / translating-images-into-maps

Official PyTorch code for 'Translating Images Into Maps' ICRA 2022 (Outstanding Paper Award)
Other
408 stars 49 forks source link

Bug in utils.make_grid2d() #16

Closed nikhilgosala closed 2 years ago

nikhilgosala commented 2 years ago

Hi @avishkarsaha ,

https://github.com/avishkarsaha/translating-images-into-maps/blob/92b9627bef43e9a50f136c13a438a02be9ceebb2/src/utils.py#L1316

I think there is a bug in the above referenced line of the make_grid2d() function that you invoke in the dataloader. For the grid to be consistent with the tensor slicing implemented here, I believe that the order of zz and xx should be reversed. In short, zz, xx = torch.meshgrid(zcoords, xcoords) should be replaced with xx, zz = torch.meshgrid(xcoords, zcoords) to make it consistent.

In your use case, the code runs without errors because the BEV grid is assumed to be symmetric (100x100), but the code fails when the BEV grid is asymmetric.