32 lines
1.0 KiB
Bash
Executable File
32 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Load every overlay needed to deserialize the TianGong custom message types
|
|
# before rosbag2 discovers the configured topics.
|
|
set -eo pipefail
|
|
|
|
APP_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
required_setups=(
|
|
/opt/ros/jazzy/setup.bash
|
|
/home/nvidia/xos/setup.bash
|
|
/opt/robot_tele_server/install/setup.bash
|
|
)
|
|
for setup_file in "${required_setups[@]}"; do
|
|
if [[ ! -f "$setup_file" ]]; then
|
|
echo "Required ROS setup is missing: $setup_file" >&2
|
|
exit 1
|
|
fi
|
|
# shellcheck disable=SC1090
|
|
source "$setup_file"
|
|
done
|
|
|
|
# Do not source $APP_DIR/ros2_py here. That deliberately minimal package only
|
|
# supplies the two Python wire types used by tg3_local_teleop.py; placing its
|
|
# partial ros2_bridge_msgs libraries ahead of the vendor's complete C++ package
|
|
# makes rosbag2 fail to load RobotState/ArmCtrl type support. The recorder must
|
|
# use /opt/robot_tele_server/install for the complete vendor message package.
|
|
set -u
|
|
|
|
exec python3 "$APP_DIR/data_recorder_node.py" \
|
|
--config "$APP_DIR/config.toml" \
|
|
"$@"
|