6edb8d39ab
在开始'设备契约层 + 目录重构 + 通止规装配'改造之前,先钉住当前可运行状态, 使后续任何删除/重构都可回退。 本基线包含: - 现有 ROS 2 工作区全部源码(arm_application / arm_control / arm_bringup 等) - 官方 flexiv_ros2 栈(含 flexiv_hardware / flexiv_controllers 等符号链接) - 设备契约层 src/arm_interfaces(新增,46 项单测通过) - devices/ 设备选型与品牌清单(新增) - scripts/gen_site_example.py 与由它生成的 config/site.example.yaml 按 .gitignore 排除:build/ / install/ / log/ / config/site.yaml / 模型权重二进制。
33 lines
1.0 KiB
Bash
Executable File
33 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT"
|
|
|
|
if [[ -f "${HOME}/anaconda3/etc/profile.d/conda.sh" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source "${HOME}/anaconda3/etc/profile.d/conda.sh"
|
|
set +u
|
|
conda activate ros_flexiv 2>/dev/null || true
|
|
set -u 2>/dev/null || true
|
|
fi
|
|
|
|
if [[ -z "${ROS_DISTRO:-}" ]]; then
|
|
if [[ -f /opt/ros/jazzy/setup.bash ]]; then
|
|
# shellcheck disable=SC1091
|
|
source /opt/ros/jazzy/setup.bash
|
|
elif [[ -f /opt/ros/humble/setup.bash ]]; then
|
|
# shellcheck disable=SC1091
|
|
source /opt/ros/humble/setup.bash
|
|
elif [[ -f /opt/ros/iron/setup.bash ]]; then
|
|
# shellcheck disable=SC1091
|
|
source /opt/ros/iron/setup.bash
|
|
else
|
|
echo "未检测到系统 ROS 2;使用 conda ros_flexiv 环境"
|
|
fi
|
|
fi
|
|
|
|
PACKAGES=(flexiv_description arm_msgs arm_description arm_control arm_moveit_config arm_bringup arm_application)
|
|
colcon build --symlink-install --packages-select "${PACKAGES[@]}" "$@"
|
|
echo "构建完成。请执行: source ${ROOT}/install/setup.bash"
|