message: visualize TSDF grid before and after merging
diff: @@ -94,6 +94,7 @@ class LayerMergeToolTest : public ::testing::Test,
  const double voxel_size_ = 0.005;
  const size_t voxels_per_side_ = 16u;
  const double max_distance_world = 2.0;
  + const double max_sdf_value_to_visualize = 0.015;
  };
  typedef LayerMergeToolTest<TsdfVoxel> TsdfLayerMergeToolTest;
  @@ -107,12 +108,20 @@ TEST_F(TsdfLayerMergeToolTest, MergeTwoTsdfLayers) {
  const std::string kWorldAPlyFile = kFolderPrefix + "world_A.tsdf.ply";
  LOG(INFO) << "Writing world A to : " << kWorldAPlyFile;
  io::outputLayerAsPly(*world_A_, kWorldAPlyFile,
  - io::PlyOutputTypes::kSdfIsosurface);
  + io::PlyOutputTypes::kSdfIsosurfaceConnected);
  + const std::string kWorldASdfPlyFile = kFolderPrefix + "world_A.tsdf_sdf.ply";
  + io::outputLayerAsPly(*world_A_, kWorldASdfPlyFile,
  + io::PlyOutputTypes::kSdfColoredDistanceField,
  + max_sdf_value_to_visualize, max_sdf_value_to_visualize);
  const std::string kWorldBPlyFile = kFolderPrefix + "world_B.tsdf.ply";
  LOG(INFO) << "Writing world B to : " << kWorldBPlyFile;
  io::outputLayerAsPly(*world_B_, kWorldBPlyFile,
  - io::PlyOutputTypes::kSdfIsosurface);
  + io::PlyOutputTypes::kSdfIsosurfaceConnected);
  + const std::string kWorldBSdfPlyFile = kFolderPrefix + "world_B.tsdf_sdf.ply";
  + io::outputLayerAsPly(*world_B_, kWorldBSdfPlyFile,
  + io::PlyOutputTypes::kSdfColoredDistanceField,
  + max_sdf_value_to_visualize, max_sdf_value_to_visualize);
  LOG(INFO) << "Merging world A into world B...";
  constexpr bool kUseNaiveMethod = false;
  @@ -140,7 +149,12 @@ TEST_F(TsdfLayerMergeToolTest, MergeTwoTsdfLayers) {
  kFolderPrefix + "world_A_and_B.tsdf.ply";
  LOG(INFO) << "Writing merged world to : " << kMergedLayerPlyFile;
  io::outputLayerAsPly(*world_B_, kMergedLayerPlyFile,
  - io::PlyOutputTypes::kSdfIsosurface);
  + io::PlyOutputTypes::kSdfIsosurfaceConnected);
  + const std::string kMergedLayerSdfPlyFile =
  + kFolderPrefix + "world_A_and_B.tsdf_sdf.ply";
  + io::outputLayerAsPly(*world_B_, kMergedLayerSdfPlyFile,
  + io::PlyOutputTypes::kSdfColoredDistanceField,
  + max_sdf_value_to_visualize, max_sdf_value_to_visualize);
  LOG(INFO) << "Done.";
  }
  