MOVE_AI_Sentry/vision_start.sh
2025-04-06 12:50:53 +08:00

23 lines
468 B
Bash
Executable File

#!/bin/bash
set -e # 在发生错误时退出脚本
set -x # 打印每个命令
cd /home/robofish/Move_AI
source install/setup.bash
commands=(
"ros2 launch rm_vision_bringup vision_bringup.launch.py"
"ros2 launch rm_serial_driver rm_serial_driver.launch.py"
"ros2 launch armor_tracker tracker.launch.py"
)
for cmd in "${commands[@]}"; do
echo "Running: $cmd"
$cmd
if [ $? -ne 0 ]; then
echo "Command failed: $cmd"
exit 1
fi
sleep 0.5
done