#!/bin/bash

directory="$1"
files="$directory/TilesMesh-10S-25-10/*"
output_directory="$directory/Tiles-10S-25-10-converted-from-ply"
mkdir $output_directory
for file in $files
do
  filename=$(basename $file)
  extension="${filename##*.}"
  filename="${filename%-color*}"
  localization/localizer6dof/tsdf_tiles/convert_mesh --convert_to_tile_coordinate --tiles_summary_file "$directory/TilesSummary" "$file" "$output_directory/$filename.bin"
done
