#!/bin/sh

# record bag with core topics, including maplanes, odometry, GPS and
# coordinate transforms

# run this with: roslaunch art_run sensory_overload.launch

PREFIX=$1
BAGS=${ROS_HOME:-~/.ros}/bags/sensors
mkdir -p $BAGS

rosbag record -o $BAGS/${PREFIX}rviz /visualization_marker /visualization_marker_array &

rosbag record -o $BAGS/${PREFIX}other \
        /odom /imu /gps /tf \
        /brake/cmd /brake/state \
        /ioadr/cmd /ioadr/state \
        /navigator/cmd /navigator/state \
        /observations \
        /roadmap_global /roadmap_local /roadmap_cloud \
        /shifter/cmd /shifter/state \
        /steering/cmd /steering/state \
        /throttle/cmd /throttle/state

# kludgy way to terminate the other records when odometry finishes
killall record
