Hi Peter,
the voxel_layer can use both a laser sensor or a pointcloud sensor as input for obstacle data. We are using it in the tutorial to show an example of voxel_layer with laser data, because in the global costmap we show an example of obstacle_layer (so you have in the same exercise two different ways of doing the same thing)
The point where you indicate to the voxel_laer which type of data to expect to populate the costmap is at the data_type: "LaserScan"
parameter. If you are using a point cloud device you should indicate PointCloud2
.
An example of voxel_layer with two sources of obstacles at the same time, one is a laser and antoher is a pointcloud:
voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True
observation_sources: scan pointcloud
scan:
topic: /scan
data_type: "LaserScan"
pointcloud:
topic: /depth_camera/points
data_type: "PointCloud2"