#!/bin/bash
set -e
# shellcheck disable=SC1091
source /opt/ros/jazzy/setup.bash
# Load custom message types (notably clover2_nav_msgs/State) when installed in a workspace.
if [[ -n "${CLOVER_SETUP:-}" ]]; then
  # shellcheck disable=SC1090
  source "$CLOVER_SETUP"
fi
# Join the configured simulator partition.
export GZ_PARTITION="${GZ_PARTITION:-$(hostname):${GAZEBO_USER:-pi}}"
exec /opt/ros/jazzy/lib/fsp_bag_recorder/bag_recorder \
  --ros-args --params-file /etc/fsp-bag-recorder/recorder.yaml
