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

Revision history [back]

Another approach to explore is to define two obstacle layers, one for above ground level and one from below ground level:

  plugins:
    - {name: above_layer, type: "costmap_2d::ObstacleLayer"}
    - {name: cliff_layer, type: "costmap_2d::ObstacleLayer"}

And then set the min and max obstacle heights for these accordingly:

above_layer:
  enabled: true
  observation_sources: pcloud
  combination_method: 1
  footprint_clearing_enabled: true

  pcloud:
    topic: /camera/depth/color/points
    min_obstacle_height: 0.1

cliff_layer:
  enabled: true
  observation_sources: pcloud_cliff
  combination_method: 1
  footprint_clearing_enabled: true

  pcloud_cliff:
    topic: /camera/depth/color/points
    max_obstacle_height: -0.1
    min_obstacle_height: -30.0

That way cliffs will show up as obstacles and your navigator will avoid them if your depth camera can see something inside the cliff (for instance the first step down). Of course, the generated 2d map is fairly useless for mapping+localization.