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

Layered costmap problem

asked 2013-09-25 23:42:30 -0500

CarolineQ gravatar image

updated 2013-09-26 02:00:35 -0500

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

edit retag flag offensive close merge delete

Comments

To me that sounds like a namespace problem. Can you post the other yaml files that configure your observation sources?

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-25 23:52:50 -0500 )edit

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.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-25 23:54:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-09-26 02:50:18 -0500

Hendrik Wiese gravatar image

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.

edit flag offensive delete link more

Comments

Thanks for this answer, it's probably the problem, I will try it as soon as possible and come back to you.

CarolineQ gravatar image CarolineQ  ( 2013-09-26 03:27:18 -0500 )edit
1

I concur that it should be mentioned in the tutorial. An oversight on my part. It is a wiki :)

David Lu gravatar image David Lu  ( 2013-09-26 05:02:14 -0500 )edit

I've added some information regarding @CarolineQ's other question to the migration page in the wiki.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-26 06:33:08 -0500 )edit

Thanks! Most helpful.

David Lu gravatar image David Lu  ( 2013-09-26 08:03:10 -0500 )edit
2

You're welcome. When I find some time after this weekend (gonna get married) I'll add some more.

Hendrik Wiese gravatar image Hendrik Wiese  ( 2013-09-26 09:52:13 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2013-09-25 23:42:30 -0500

Seen: 4,176 times

Last updated: Sep 26 '13