#!/bin/bash

set -euo pipefail

driving_repo=$1
sim_scenario=$2
cd $driving_repo

# TODO : Source from a shell script SIM-9782
base_log_dir="$HOME/.log"
export ROS_LOG_DIR="$base_log_dir/ros"
export GOOGLE_LOG_DIR="$base_log_dir/glog"
export PYTHON_LOG_DIR="$base_log_dir/python"
export ELECTRON_LOG_DIR="$base_log_dir/electron"

bazel run //ci/zimbeast/ansible/simulation_management:start_sim --config=kraken -- --scenario_file $sim_scenario > /home/zoox/.log/glog/sim_3d_error_log.txt 2>&1
