0
$\begingroup$

Rosanswers logo

Hi.

I am currently using the layered costmap found on the branch "costmap-plugins-renamed-layers" of the navigation stack repository.

I would like to use the layered costmap and add a new layer to it. If I keep the default parameters I can see a costmap with the obstacles but as soon as I put a list of plugins in the yaml file I can't see the obstacles anymore and no error message appears.

Here is my yaml file :

local_costmap:
global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 1.0
  publish_frequency: 1.0
  static_map: false
  rolling_window: true
  width: 10.0
  height: 10.0
  resolution: 0.05
  plugins:
   -
     name: footprint_layer
     type: "costmap_2d::FootprintLayer" 
   - 
     name: obstacle_layer
     type: "costmap_2d::ObstacleLayer" 
   - 
     name: inflation_layer
     type: "costmap_2d::InflationLayer" 
   - 
     name: social_layer
     type: "social_navigation_layers::ProxemicLayer" 
   -
     name: simple_layer
     type: "simple_layers::SimpleLayer"

I tried the simple layer tutorial and this is working; when I add it to the list I can see the result in the costmap, so the problem seems to come from the Obstacle layer.

Did anyone have this problem before ?

EDIT 1 : Other yaml files

costmap_common_params.yaml

obstacle_range: 1.5
raytrace_range: 2.0
footprint: [[0.35, 0.35], [-0.35, 0.35], [-0.35, -0.35], [0.35, -0.35]]
inflation_radius: 0.55

observation_sources: laser

laser: {sensor_frame: base_laser_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 1.0
  static_map: true
  plugins:
       -
         name: footprint_layer
         type: "costmap_2d::FootprintLayer" 
       - 
         name: obstacle_layer
         type: "costmap_2d::ObstacleLayer" 
       - 
         name: inflation_layer
         type: "costmap_2d::InflationLayer" 

Caroline


Originally posted by CarolineQ on ROS Answers with karma: 395 on 2013-09-25

Post score: 1


Original comments

Comment by Hendrik Wiese on 2013-09-25:
To me that sounds like a namespace problem. Can you post the other yaml files that configure your observation sources?

Comment by Hendrik Wiese on 2013-09-25:
Ah and by the way, you have a typo in this config file (don't know if that's just a copy & paste flaw): the second line with global_frame has to be indented as well.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As I assumed, it's a namespace problem. Your observation_sources parameter is defined outside of the corresponding namespace of the layer plugin.

Change this...

observation_sources: laser

to this:

obstacle_layer:
  observation_sources: laser

... assuming that your launch file sets the correct namespace for the load parameter of the move_base node (like in the move_base tutorial).

Generally speaking, imho this should be explicitly mentioned somewhere in the Groovy->Hydro migration tutorial for move_base and costmap_2d since I ran into the very same problem and I guess @CarolineQ and me are not the only ROS noobs who make this experience.


Originally posted by Hendrik Wiese with karma: 1145 on 2013-09-26

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by CarolineQ on 2013-09-26:
Thanks for this answer, it's probably the problem, I will try it as soon as possible and come back to you.

Comment by David Lu on 2013-09-26:
I concur that it should be mentioned in the tutorial. An oversight on my part. It is a wiki :)

Comment by Hendrik Wiese on 2013-09-26:
I've added some information regarding @CarolineQ's other question to the migration page in the wiki.

Comment by David Lu on 2013-09-26:
Thanks! Most helpful.

Comment by Hendrik Wiese on 2013-09-26:
You're welcome. When I find some time after this weekend (gonna get married) I'll add some more.

$\endgroup$

Your Answer

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