origin of navigation stack map and robot localization
Hi, I'm using robotlocalization (two instances plus navsattransform to get MAP -> odom and odom->baselink) and navigation stack. I'm using robotlocalization instead of AMCL for localization. My map is a 512x512 pixel, white png file and configured as 0.1mts resolution, so I have a 51.2 x 51.2 mts map, and don't have any building nor fixed object on it (I'm working in an open field). I configured my local and global planner and local and global costmaps. Everithing is working ok so far. I want to give goals on the map frame, that is UTM GPS coordinate and let the nav_stack navigate avoiding local obstacles. But I would like to know how to relate the 51.2x51.2 mts map with the robot coordinates.
Thanks
Asked by elgarbe on 2022-07-06 15:57:22 UTC
Answers
Your map is likely shown in the map
frame, and it will have an origin. If you look at the config file in which you load the map, it will specify those. So if your robot's position in the map
frame is (10, 20)
, and the map itself has an origin of (5, 5)
and resolution 0.05, then the robot will appear to occupy cell ((10 - 5) / 0.05, (20 - 5) / 0.05) = (100, 300)
. But often, the map origin is (0, 0)
.
As long as navsat_transform_node
is configured to broadcast the utm->map
transform, then you can send goals in the UTM frame.
Asked by Tom Moore on 2022-07-28 09:50:43 UTC
Comments