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.
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 withxx, 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.