ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

origin of navigation stack map and robot localization

asked 2022-07-06 15:57:22 -0500

elgarbe gravatar image

Hi, I'm using robot_localization (two instances plus navsat_transform to get MAP -> odom and odom->base_link) and navigation stack. I'm using robot_localization 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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-07-28 09:50:43 -0500

Tom Moore gravatar image

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-07-06 15:57:22 -0500

Seen: 116 times

Last updated: Jul 28 '22