Ask Your Question
0

Custom layer not showing on Costmap2D

asked 2018-04-18 06:36:41 -0600

ItsFine gravatar image

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...)

edit retag flag offensive close merge delete

Comments

If you disable the other two layers. do you see anything? Does rostopic info /barrier_tape_detection_scan report a subscription from move_base?

David Lu gravatar imageDavid Lu ( 2018-04-18 15:51:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-21 07:12:01 -0600

ItsFine gravatar image

Mea culpa.

It turned out it worked from the beginning, it's just that the costmap is only initialized and viewed when the robot is actually following a move-base planned path, not due to movement by joystick...

Make sense, actually.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-04-18 06:27:46 -0600

Seen: 127 times

Last updated: Apr 18 '18