# what difference does it make in NavStack(move_base) with frame_id as map vs odom

We set global_frame for different nodes of the NavStack. Below are the ones I am eager to know about and how they affect the system.

Costmap params:

/global_costmap/global_frame: map vs odom
/local_costmap/local_frame: map vs odom


planner params:

/DWAPlannerROS/global_frame_id: map vs odom
/GlobalPlanner/global_frame_id: map vs odom

edit retag close merge delete

1

If you are using an external map to naviagte, then it makes sense to set the global_frame paramter in the costmap configuration file to map.

( 2021-01-14 15:03:31 -0600 )edit

Thanks for response @skpro19 . I load the map obtained from gmapping using map_server package.

1. what do you mean by external map? Do you mean using a map different from the map being used by SLAM map?
2. Is it fine to use map as global_frame in the costmap configuration even if I am using ONE single map for amcl in my NavStack?
( 2021-01-14 15:47:31 -0600 )edit
1

By external_map, I mean any map that is being published on the /map topic.

Whenever you are running a program (i.e. node) that publishes on the /map topic, and you want to use that /map topic to build your global_costmap, you would need to set the global_frame parameter to /map.

Sometimes, it could also happen that you don't really care about the map, and just want to operate the bot in the odom frame. In such cases, you would need to set the global_frame (for your global_costmap) to /odom. You would also need to manually set the width and height for the global_costmap.

Does that make sense?

You could also try to visualize the global_costmap on Rviz for more clarity.

( 2021-01-14 16:11:44 -0600 )edit

Hi @skpro19,

It totally makes sense now and even answers my question. So basically if we do not have a external grid_map we use odom frame.

One of the use case example of this would be when we totally rely on GPS for localization and few range sensors for obstacle avoidance via local_costmap and global_costmap.

Thank you so much for the help.

( 2021-01-14 16:23:09 -0600 )edit