Robotics StackExchange | Archived questions

no local costmap

I am a little confused with the costmaps and pre hydro paramters, plugins etc...

I am using move base for my navigation and have a prebuild static map included. When launching the navigation there is no local_costmap visible. The global costmap looks like everything is working fine. I did not have this problem a few days ago. I do not remember changing anything... but this makes no sense so I must.

These are my .yaml files:

Costmapcommonparams.yaml

footprint: [[-0.29, -0.26], [-0.29, 0.26], [0.29, 0.26], [0.29, -0.26]]

obstacle_layer:

  enabled:              true

  max_obstacle_height:  0.6

  combination_method:   1

  track_unknown_space:  true

  obstacle_range: 2.5

  raytrace_range: 3.0

  observation_sources:  scan_filtered

  scan_filtered:

    data_type: LaserScan

    topic: /scan_filtered

    marking: true

    clearing: true

    min_obstacle_height: 1

    max_obstacle_height: 5

inflation_layer:

  enabled: true

  cost_scaling_factor:  5.0

  inflation_radius:     0.5 


static_layer:

  enabled: true

Localcostmapparams.yaml

local_costmap:

  global_frame: "odom"

  robot_base_frame: "base_footprint"

  update_frequency: 10.0

  publish_frequency: 10.0

  always_send_full_costmap: true

  transform_tolerance: 0.5

  rolling_window: true

  width: 5

  height: 5

  resolution: 0.05

  origin_x: 0.0

  origin_y: 0.0

  plugins:

     {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}

     {name: inflation_layer, type: "costmap_2d::InflationLayer"}

Globalcostmapparams.yaml

global_costmap:

  global_frame: "map"

  robot_base_frame: "base_footprint"

  update_frequency: 10.0

  publish_frequency: 10.0

  always_send_full_costmap: true

  transform_tolerance: 0.5

  width: 100

  height: 100

  resolution: 0.05

  origin_x: 0.0

  origin_y: 0.0

  plugins:

     {name: static_layer, type: "costmap_2d::StaticLayer"}

     {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}

     {name: inflation_layer, type: "costmap_2d::InflationLayer"}

I thought I did build the yaml. files correctly without using pre-hydro parameters but I use to get the WARNINGS 'Pre Hydro parameter staticmap / maptype unused since plugins is provided... Can anybody tell me why this is?

I hope somebody can help me with this issue. Thank you!

Laura

Asked by lslabon on 2020-12-01 10:30:50 UTC

Comments

You don't appear to have scan_filtered defined properly in your obstacle_layer (common params). Try

...

observation_sources:  scan_filtered

scan_filtered:
  data_type: LaserScan
  topic: /scan_filtered
  marking: true
  clearing: true
  min_obstacle_height: 1
  max_obstacle_height: 5

...

Asked by tryan on 2020-12-01 10:46:39 UTC

Ah thanks yes - I forgot it when I wrote the question.. I just added it (and edited my question) So apparently costmap is still empty.

Asked by lslabon on 2020-12-01 10:55:15 UTC

Do you definitely have incoming data on /scan_filtered? Does rostopic echo /move_base/local_costmap/costmap show an empty costmap?

Asked by tryan on 2020-12-01 11:53:33 UTC

I have incoming data on scan_filtered.. (-> rostopic echo /scan_filtered)

The local_costmap is empty (0 0 0 0 0 ...). Global_costmap (-1 -1 -1 -1 ...)

Asked by lslabon on 2020-12-02 02:51:34 UTC

Answers

Finally got the answer... Found it here https://answers.ros.org/question/193925/local-costmap-is-empty/ I had to change min_obstacle_height to 0... He says it is because map wall in STDR is defined to be lower than my paramter (1) but I could only find STDR for kinetic and I am working with melodic. So I don't know whether (or where) I can change that to fit with my parameters. At least it is working for now :)

Asked by lslabon on 2020-12-02 03:02:43 UTC

Comments

I'm glad you got it working! Simple Two Dimensional Robot Simulator (STDR) is an older simulation environment, so it's not likely something you need to worry about. The main thing is that the z limits on obstacle_layer overlap with the z limits on the sensor, and that the overlap occurs where you expect obstacles. Before, your layer had max_obstacle_height = 0.6, but your sensor had min_obstacle_height = 1 (no overlap). Out of curiosity, did your obstacle layer work in the global map before?

Asked by tryan on 2020-12-02 08:59:16 UTC