
# Log 1
#######
# sim3d_log=chum://20190502T223023-kitt_06@1556837486.35-1556837531.35?i=/mnt/nautilus_rw/sgodfrey&v=3dsim123
# destination_store=mnt/flashblade/agis/sim_logs/test

# Log 2
#######
# sim3d_log="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62?i=/mnt/nautilus_rw/tmp/jdolan/pilot&v=pilot/1600661260"
# original_store="/mnt/nautilus_rw/tmp/jdolan/pilot"
# destination_store="/mnt/nautilus_rw/agis/sim_logs/good"
# video_sha=c6466502
# new_uri="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62"?i="${destination_store}"

# Log 3
#######
#sim3d_log="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62?i=/mnt/nautilus_rw/tmp/dliu/lens_distortion/kitt16&v=pilot/1601943281"
#original_store="/mnt/nautilus_rw/tmp/dliu/lens_distortion/kitt16"
#destination_store="/mnt/nautilus_rw/agis/sim_logs/good_intrinsics"
#video_sha=9575af6a
#new_uri="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62"?i="${destination_store}"

# Log 4
#######
sim3d_log="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62?i=/mnt/nautilus_rw/tmp/dliu/lens_distortion/agis0&v=pilot/1603299994"
original_store="/mnt/nautilus_rw/tmp/dliu/lens_distortion/agis0"
destination_store="/mnt/nautilus_rw/agis/sim_logs/all_cameras_work"
video_sha=b84bd056
new_uri="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62"?i="${destination_store}"

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

mkdir -p "${destination_store}"
mkdir -p "${destination_store}/_video"

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

echo "Copying video..."
cp -rf \
  "${original_store}"/_video/"${video_sha}" \
  "${destination_store}"/_video/
echo "Done..."

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


# command:
# bazel run //calibration/pink_dots:visualize_lidar_main -- --meta_id="chum://20200308T205314-kitt_16@1583701125.62-1583701170.62?i=/mnt/nautilus_rw/agis/sim_logs/good" --output_dir=/mnt/nautilus_rw/agis/sim_logs/good_pink_dots/ --colorlogtostderr
