chore: 框架科学优化前的完整基线
在开始'设备契约层 + 目录重构 + 通止规装配'改造之前,先钉住当前可运行状态, 使后续任何删除/重构都可回退。 本基线包含: - 现有 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 / 模型权重二进制。
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Flexiv RDK v1.x into ~/flexiv_install (required for real robot / flexiv_hardware).
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
RDK="${ROOT}/src/flexiv_rdk"
|
||||
PREFIX="${FLEXIV_INSTALL_PREFIX:-$HOME/flexiv_install}"
|
||||
|
||||
if [[ ! -d "$RDK" ]]; then
|
||||
echo "Missing $RDK — run scripts/fetch_flexiv.sh first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building RDK thirdparty deps into $PREFIX ..."
|
||||
# Prefer system /opt/ros if present; else conda env already has compilers
|
||||
if [[ -f /opt/ros/humble/setup.bash ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /opt/ros/humble/setup.bash
|
||||
fi
|
||||
|
||||
cd "$RDK"
|
||||
if [[ -f thirdparty/build_and_install_dependencies_not_in_ros2.sh ]]; then
|
||||
bash thirdparty/build_and_install_dependencies_not_in_ros2.sh "$PREFIX"
|
||||
elif [[ -f thirdparty/build_and_install_dependencies.sh ]]; then
|
||||
bash thirdparty/build_and_install_dependencies.sh "$PREFIX"
|
||||
else
|
||||
echo "No thirdparty build script found; see RDK README"
|
||||
ls thirdparty || true
|
||||
fi
|
||||
|
||||
rm -rf build && mkdir build && cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX="$PREFIX" -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build . --target install -j"$(nproc)"
|
||||
echo "RDK installed to $PREFIX"
|
||||
echo "Then: cd $ROOT && colcon build --symlink-install --cmake-args -DCMAKE_PREFIX_PATH=$PREFIX"
|
||||
Reference in New Issue
Block a user