
sim3d_log="chum://20200903T164007-kitt_18@1599151525.487-1599153398.487?i=/mnt/flashblade/cjwu/sim_3d_chum&v=lidar_bootstrapping_sim"
original_store="/mnt/flashblade/cjwu/sim_3d_chum"
destination_store="/mnt/flashblade/cjwu/sim_3d_chum_flattened"
new_uri="chum://20200903T164007-kitt_18@1599151525.487-1599153398.487"?i="${destination_store}"

echo Source: "${sim3d_log}"
echo Destination: "${destination_store}"

mkdir -p "${destination_store}"

bazel run //data/chum/tools:chunk_cp -- \
  --add_all_topics \
  --uri="${sim3d_log}" \
  --output="${destination_store}"

echo "Creating datasets file"
bazel run //mapping/distributed_mapping/scripts:chum_uri_to_datasets -- \
  --chum_uri="${new_uri}" \
  --datasets_out="${destination_store}""/datasets.pbtxt" \
  --no_chum_defaults

