How to convert between world coordiantes and grid coordinates

Posted by emontero on
URL: http://official-rtab-map-forum.206.s1.nabble.com/How-to-convert-between-world-coordiantes-and-grid-coordinates-tp8570.html

Hello.

I am mapping with RTAB-Map, I save the map in 2D with rosrun map_server map_saver -f my_map_1 map:=/rtabmap/proj_map.

After complete mapping, I perform localization rosrun realsense2_camera opensource_tracking_tk_localization.launch 

Now, I am implementing a path planning algorithm, and I need to get the robot location in (x, y) coordinates within the map. Also, where the origin of the map is into a grid of cells, and the actual width of the map created.

I want to know if I must subscribe to some topic and get the information I need for the path planning, in this case I am using the A* algorithm with inputs like start node and goal node.

This is the .yaml file and the poses.txt file that I have obtained.

Ubuntu 18.04
D435 Realsense camera