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
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# Switch / list Flexiv Studio tools via RDK (reads name from site.yaml).
|
||||
#
|
||||
# bash ~/ros2/scripts/rdk_switch_tool.sh # switch to robot.tool_name
|
||||
# bash ~/ros2/scripts/rdk_switch_tool.sh --list # print Studio tool pool
|
||||
# bash ~/ros2/scripts/rdk_switch_tool.sh --name Flange
|
||||
#
|
||||
# Stop run_real.sh first — RDK allows only one client.
|
||||
|
||||
set -eo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
# shellcheck disable=SC1091
|
||||
source "${ROOT}/scripts/lib/load_site_config.sh"
|
||||
|
||||
RDK_PYTHON="${RDK_PYTHON:-/home/cc/rdk_py310/bin/python}"
|
||||
SN="${ROBOT_SN:-${SITE_ROBOT_SN:-Rizon4-063989}}"
|
||||
NAME="${SITE_ROBOT_TOOL_NAME:-}"
|
||||
IFACE="${SITE_NET_IFACE:-}"
|
||||
|
||||
LIST=false
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--list|-l) LIST=true; shift ;;
|
||||
--name) NAME="$2"; shift 2 ;;
|
||||
--sn) SN="$2"; shift 2 ;;
|
||||
--iface) IFACE="$2"; shift 2 ;;
|
||||
-h|--help) sed -n '2,12p' "$0"; exit 0 ;;
|
||||
*) echo "Unknown: $1" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
ARGS=(--sn "${SN}")
|
||||
if [[ -n "${IFACE}" ]]; then
|
||||
ARGS+=(--iface "${IFACE}")
|
||||
fi
|
||||
if [[ "${LIST}" == true ]]; then
|
||||
ARGS+=(--list)
|
||||
elif [[ -n "${NAME}" ]]; then
|
||||
ARGS+=(--name "${NAME}")
|
||||
fi
|
||||
|
||||
exec "${RDK_PYTHON}" "${ROOT}/scripts/rdk_switch_tool.py" "${ARGS[@]}"
|
||||
Reference in New Issue
Block a user