Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Custom layer not showing on Costmap2D

Hi all,

I configured move_base to include an additional layer produced by a PointCloud2:

Observation Source:

yellow_tape_layer:
  observation_sources: barrier_tape_detection_scan
  barrier_tape_detection_scan:
      #sensor_frame: camera_rgb_optical_frame
      data_type: PointCloud2
      topic: /barrier_tape_detection_scan
      observation_persistence: 100.0
      marking: true
      clearing: false
      min_obstacle_height: -2.0
      max_obstacle_height: 2.0

The point cloud shows correctly in rviz, transformations etc. are fine.

Note that I tried to manually set the sensor_frame as well - every second point cloud is published in another frame, which is why I tried to avoid that option - but neither case works. I even increased the observation_persistence, hoping that it would just ignore observations happening too quickly.

In general, I copied the configuration from out laser scanners producing the obstacle_layer: enabling the layer in global and local costmap:

   plugins:
    - {name: obstacle_layer,      type: "costmap_2d::VoxelLayer"}
    - {name: yellow_tape_layer,          type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,     type: "costmap_2d::InflationLayer"}

...

yellow_tape_layer:
  enabled:              true
  max_obstacle_height:  2.0
  origin_z:             0.0
  z_resolution:         2
  z_voxels:             1
  unknown_threshold:    15
  mark_threshold:       0
  combination_method:   1
  track_unknown_space:  true
  obstacle_range: 2.5
  raytrace_range: 3.0
  publish_voxel_map: true

Which is why I assumed it to work - however, no matter the sensory input, nothing shows in the costmap visualized in rviz. (//edit: I also set combination_method for the laser to 1, of course.)

On startup, move_base happily greets me and says it's going to listen on "barrier_tape_detection_scan" - no leading slash - but it does the same for the lasers, also dropping the slash there. As I said, there are certainly points published and I can visualize them in rviz, yet they never appear in the costmap.

Anything else I can try? Should I post a rosbag/all config files?

ROS Indigo, Ubuntu 14.04 (old, but no time to upgrade...)