#!/bin/bash
set -euo pipefail

if [ $# -ne 1 ]; then
  echo "Usage: `basename $0` output_dir"
  echo "Runs the entire perception metrics suite and stores the reports in"
  echo "[output_dir]."
  exit 1
fi
output_directory=$1

# The name of the package where this script (and its siblings) are located.
pkg_name="lidar/metrics/v2"

# Run the real data metrics #
#############################
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/real_with_vision_radar_v2.pbtxt --report_dir ${output_directory} --command tracking
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/real_with_vision_radar_v2.pbtxt --report_dir ${output_directory} --command timing
rostask/rostask ${pkg_name}/run_metrics_suite_standalone --suite ${pkg_name}/data/real_with_vision_radar_v2.pbtxt --report_dir ${output_directory} --command aggregate
