0
$\begingroup$

Rosanswers logo

Hey everyone,

I am currently building a robot with its own global planner plugin. This means that the global planner does not need the global costmap any more, instead it takes a graph (based on a map) provided by a different node.

Now, I want the navigation stack to avoid building the global costmap because that would just waste computation power and time but I still need the map for localization purposes and to be shown in rviz for visualization and setting the start- and goal positions.

When I put this

<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />

in my launch file, it will probably automatically produce my costmap, right? Or does it produce the costmap only when I plan my path on it?

Does this question with the answer of David Lu do what I want? He proposes to put this in the global_costmap.yaml to disable the obstacle avoidance:

plugins:
    - {name: static_layer, type: 'costmap_2d::StaticLayer'}

I don't know if that is the right approach.

Edit:

My global_costmap_params.yaml file:

global_costmap:
  global_frame: /map
  robot_base_link: base_link
  update_frequency: 1.0
  publish_frequency: 0.5
  static_map: true
  rolling_window: false
  map_type: costmap

Originally posted by peterwe on ROS Answers with karma: 36 on 2017-05-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The costmap is not automatically produced by the publication of a map, but rather by the configuration of your global_costmap.

What David Lu suggests in the linked answer is to use only a static layer (coming from the published map) which would create a costmap from the publish map, which is not what you want.

I have never done this before so I do not know how it would behave, but you could try edit your global_costmap.yaml to have a minimal config, without any layer, for example:

global_costmap:
  map_type: costmap
  global_frame    : map
  robot_base_frame: base_footprint

Again, I am not sure what the result will be, mostly because it depends on how your global planner plugin interacts with the global costmap.


Originally posted by Procópio with karma: 4402 on 2017-05-24

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Humpelstilzchen on 2017-05-24:
As of kinetic without a plugin configuration a pre-hydro style costmap is configured.

Comment by peterwe on 2017-05-26:
@Procópio : Thank you for your answer! In fact, I'm already using the minimal config you proposed and @Humpelstilzchen is right: a costmap is created with the minimal config I use (I've added my global_costmap_params.yaml file to my post).

Comment by peterwe on 2017-05-26:
My global planner does not need the global costmap at all. I just need the static map in the beginning to set my start and goal locations in rviz. And of course to make amcl work properly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.