换台电脑克隆后启动失败,是因为 site 和启动脚本写死了 /home/cc/ros2。仓库内路径改成相对仓库根,加载时再展开;缺 install 时先说明要编译,而不是 source 一个不存在的文件。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
arm_dev
2026-10-15 10:51:24 +08:00
parent ab73399426
commit 3c86441fb0
25 changed files with 254 additions and 91 deletions
+6 -2
View File
@@ -30,8 +30,12 @@ if [[ -f "${HOME}/anaconda3/etc/profile.d/conda.sh" ]]; then
unset _env_helper
fi
# shellcheck disable=SC1091
source "${ROOT}/install/setup.bash"
if [[ -f "${ROOT}/install/setup.bash" ]]; then
# shellcheck disable=SC1091
source "${ROOT}/install/setup.bash"
else
echo "警告:${ROOT}/install 还没编译。工位窗口可以先开;真机栈要先在仓库根目录 colcon build(不要在中文路径下编)。" >&2
fi
export LD_LIBRARY_PATH="${HOME}/flexiv_install/lib:${LD_LIBRARY_PATH:-}"
# pip 版 TensorRT(tensorrt-cu12)—— 加载 YOLO `.engine` 需要它
_TRT_SITE="${CONDA_PREFIX:-${HOME}/anaconda3/envs/ros_flexiv}/lib/python3.11/site-packages"