message: FINALLY fix the slice doubling issue.
diff: @@ -283,8 +283,7 @@ inline void createSurfacePointcloudFromTsdfLayer(
  pcl::PointCloud<pcl::PointXYZRGB>* pointcloud) {
  CHECK_NOTNULL(pointcloud);
  createColorPointcloudFromLayer<TsdfVoxel>(
  - layer,
  - std::bind(&visualizeNearSurfaceTsdfVoxels, ph::_1, ph::_2,
  + layer, std::bind(&visualizeNearSurfaceTsdfVoxels, ph::_1, ph::_2,
  surface_distance, ph::_3),
  pointcloud);
  }
  @@ -316,8 +315,7 @@ inline void createSurfaceDistancePointcloudFromTsdfLayer(
  pcl::PointCloud<pcl::PointXYZI>* pointcloud) {
  CHECK_NOTNULL(pointcloud);
  createColorPointcloudFromLayer<TsdfVoxel>(
  - layer,
  - std::bind(&visualizeDistanceIntensityTsdfVoxelsNearSurface, ph::_1,
  + layer, std::bind(&visualizeDistanceIntensityTsdfVoxelsNearSurface, ph::_1,
  ph::_2, surface_distance, ph::_3),
  pointcloud);
  }
  @@ -334,6 +332,14 @@ inline void createDistancePointcloudFromTsdfLayerSlice(
  const Layer<TsdfVoxel>& layer, unsigned int free_plane_index,
  FloatingPoint free_plane_val, pcl::PointCloud<pcl::PointXYZI>* pointcloud) {
  CHECK_NOTNULL(pointcloud);
  + // Make sure that the free_plane_val doesn't fall evenly between 2 slices.
  + // Prefer to push it up.
  + // Using std::remainder rather than std::fmod as the latter has huge crippling
  + // issues with floating-point division.
  + if (std::remainder(free_plane_val, layer.voxel_size()) < kFloatEpsilon) {
  + free_plane_val += layer.voxel_size() / 2.0;
  + }
  +
  createColorPointcloudFromLayer<TsdfVoxel>(
  layer,
  std::bind(&visualizeDistanceIntensityTsdfVoxelsSlice, ph::_1, ph::_2,
  @@ -345,6 +351,14 @@ inline void createDistancePointcloudFromEsdfLayerSlice(
  const Layer<EsdfVoxel>& layer, unsigned int free_plane_index,
  FloatingPoint free_plane_val, pcl::PointCloud<pcl::PointXYZI>* pointcloud) {
  CHECK_NOTNULL(pointcloud);
  + // Make sure that the free_plane_val doesn't fall evenly between 2 slices.
  + // Prefer to push it up.
  + // Using std::remainder rather than std::fmod as the latter has huge crippling
  + // issues with floating-point division.
  + if (std::remainder(free_plane_val, layer.voxel_size()) < kFloatEpsilon) {
  + free_plane_val += layer.voxel_size() / 2.0;
  + }
  +
  createColorPointcloudFromLayer<EsdfVoxel>(
  layer,
  std::bind(&visualizeDistanceIntensityEsdfVoxelsSlice, ph::_1, ph::_2,
  