#!/bin/bash

# This scripts uses the Planner team's obstacle bag visualizer to pull a
# troublesome bag from S3 and play it back through RVIZ.

LOG="s3://zoox-logs/2016/08/27/kitt_01/20160827T023347-kitt_01-5415166a-0000.applanix.bag"
#LOG="s3://zoox-logs/2016/07/14/kitt_01/20160714T202919-kitt_01-7dd1510f-0000.applanix.bag"
#LOG="s3://zoox-logs/2016/08/31/kitt_01/20160831T215005-kitt_01-9bf84b32-0000.applanix.bag"
#LOG="s3://zoox-logs/2016/08/26/kitt_01/20160826T184537-kitt_01-47354ac7-0000.applanix.bag"
NAME="test8"

set -e

source scripts/shell/zooxrc.sh
bazel build -c opt //sim/obstacle_bag/... //fakeros
fakeros
#./bazel-bin/sim/obstacle_bag/obsbag create "${LOG}" "${NAME}"
./bazel-bin/sim/obstacle_bag/obsbag playback "${NAME}"
#./bazel-bin/sim/obstacle_bag/obsbag list
