fix: 修复启动bash路径

This commit is contained in:
Mock
2026-04-10 11:55:03 +08:00
parent 40cd68db3d
commit 251d69c4ff

View File

@@ -2,14 +2,20 @@
set -euo pipefail set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source_with_nounset_off() {
set +u
# shellcheck disable=SC1090
source "$1"
set -u
}
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source "${SCRIPT_DIR}/load-env.sh" source "${SCRIPT_DIR}/load-env.sh"
# shellcheck disable=SC1091 source_with_nounset_off "/opt/ros/${ROS_DISTRO}/setup.bash"
source "/opt/ros/${ROS_DISTRO}/setup.bash"
cd "${ROS_CONTROL_PY_DIR}" cd "${ROS_CONTROL_PY_DIR}"
# shellcheck disable=SC1091 source_with_nounset_off "install/setup.bash"
source "install/setup.bash"
exec ros2 launch udp_teleop_bridge robot_udp_receiver.launch.py \ exec ros2 launch udp_teleop_bridge robot_udp_receiver.launch.py \
"transport:=${ROBOT_RECEIVER_TRANSPORT}" \ "transport:=${ROBOT_RECEIVER_TRANSPORT}" \