How can I convert a PGM map file into a pointcloud format (PCD)?
I'm wondering how I can transform a map file (.pgm) into a point cloud one, such as .pcd. I worked on a simple python script (https://github.com/JackFrost67/pgm2pcd
), but when I publish the resulting .pcd, I find that it is offset on the y-axis about 10 cm. Probably is something related to the casting (like float representation into a int one), but I'm not sure.
Is there any advice I can follow, for example, should I use centroids instead of using the index of the cell as a coordinate for the point?