文件最后提交记录最后更新时间
setup: add extras repo for lttngust Add the openEuler extras repo for python3-lttngust. Replace lttng-ust with python3-lttngust in the tracing fallback install. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 26 天前
inference_service: add Ascend OM backends Move the existing ACT OMModel and ACT wrappers from the LeRobot patch stack into inference_service so issue #48 can be resolved without carrying those patches in the submodule. Keep CPU, CUDA, and NPU loading unchanged. Select the OM adapters only when the explicit ascend_om or ascend_om_3403 backend is requested. Delete the migrated LeRobot patches from the active patch lists and keep tests covering backend selection and patch filtering. Signed-off-by: Shi Xin <shixin21@h-partners.com> 23 天前
patches: add multi-tag INDEX with double-binding for lerobot stack Introduce third_party/patches/lerobot/INDEX.yaml as the single source of truth for which upstream lerobot tag the setup applier targets, and require each per-tag manifest to re-declare the binding so the resolver can fail closed on drift. Per-tag manifest gains two new top-level fields: * lerobot_tag matches INDEX.yaml.active_tag * lerobot_commit_range {min,max} brackets the upstream sha range this patch stack is valid against The previous duplicate upstream.tag / upstream.commit fields are removed; the URL-only upstream.repo entry is preserved. A new helper scripts/setup/lerobot_resolve_active.py parses INDEX.yaml, cross-checks the active tag's manifest, and emits shell-eval'able LEROBOT_* assignments. lerobot_patches.sh consumes these instead of hard-coding the v0.5.1 directory and branch name, and forwards the current libs/lerobot HEAD sha to lerobot_filter_series.py via the new --lerobot-head-commit flag. The filter rejects any HEAD that falls outside lerobot_commit_range, surfacing a hint to either fast-forward the manifest range or add a new tag directory and flip active_tag. The regression harness gains six new fixtures covering head-commit acceptance and rejection, multi-tag selection, archived-tag rejection, and INDEX vs manifest commit mismatch. All 11 fixtures pass. Documentation in scripts/setup/README.md describes the new layout, the resolver invariants, and the upgrade workflow for adding a new lerobot tag side-by-side with the existing stack. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 1 个月前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
patches: add multi-tag INDEX with double-binding for lerobot stack Introduce third_party/patches/lerobot/INDEX.yaml as the single source of truth for which upstream lerobot tag the setup applier targets, and require each per-tag manifest to re-declare the binding so the resolver can fail closed on drift. Per-tag manifest gains two new top-level fields: * lerobot_tag matches INDEX.yaml.active_tag * lerobot_commit_range {min,max} brackets the upstream sha range this patch stack is valid against The previous duplicate upstream.tag / upstream.commit fields are removed; the URL-only upstream.repo entry is preserved. A new helper scripts/setup/lerobot_resolve_active.py parses INDEX.yaml, cross-checks the active tag's manifest, and emits shell-eval'able LEROBOT_* assignments. lerobot_patches.sh consumes these instead of hard-coding the v0.5.1 directory and branch name, and forwards the current libs/lerobot HEAD sha to lerobot_filter_series.py via the new --lerobot-head-commit flag. The filter rejects any HEAD that falls outside lerobot_commit_range, surfacing a hint to either fast-forward the manifest range or add a new tag directory and flip active_tag. The regression harness gains six new fixtures covering head-commit acceptance and rejection, multi-tag selection, archived-tag rejection, and INDEX vs manifest commit mismatch. All 11 fixtures pass. Documentation in scripts/setup/README.md describes the new layout, the resolver invariants, and the upgrade workflow for adding a new lerobot tag side-by-side with the existing stack. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 1 个月前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
setup: harden workspace installer Replace heartbeat progress output with spinner or live command output. Preserve initialized submodules unless a safe update is possible. Add clearer LeRobot patch stack recovery for unmanaged checkouts. Fetch the manifest base on explicit force rebuild and skip LFS smudge. Repair venv-owned rosdepc, colcon, setuptools, and Empy tooling. Run builds through the workspace venv colcon implementation. Use gum choose for the optional phone backend menu when gum is present. Keep numeric prompts as the fallback for non-gum environments. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 1 个月前
voice_asr: defer model download to runtime startup Stop prefetching default ASR bundles during setup so environment bootstrap does not require model downloads before voice ASR is actually used. Move the missing-model notice into runtime resolution so voice_asr_node logs that it is downloading the selected fallback bundle during startup. Keep the runtime auto-download path intact and document the new behavior in the setup and voice ASR READMEs. Add coverage for the runtime download notice. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: liuweihong <liuweihong8@huawei.com> 27 天前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
scripts: refactor setup.sh into modular components Split the monolithic setup.sh into a modular architecture to improve maintainability and testability. Key changes: - Created scripts/setup/ containing discrete modules for submodules, python_venv, rosdep, and environment verification. - Introduced Template Method pattern for platform-specific hooks (platform_ros_setup_path, platform_handle_missing_ros) to eliminate platform if/else branches in the core script. - Separated Python requirements into dedicated files (base, dev-tools, hardware, platform-specific). - Added explicit dependency checking and robust git-lfs handling. Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
setup: restore pygraphviz support on openEuler openEuler can install ros2controlcli without a hard python3-pygraphviz dependency, but that leaves the optional view_controller_chains command without the graph visualization stack that IB_Robot users expect. Install graphviz and graphviz-devel in the dnf setup path and try to install pygraphviz in the workspace venv. This restores the optional visualization flow for openEuler while keeping the core ros2 control commands usable when pygraphviz still needs a manual retry. Link: https://atomgit.com/openeuler/IB_Robot/issues/32 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: XiaoqiangWu <wuxiaoqiang.rtos@huawei.com> 27 天前
README.en.md

scripts/setup/ — workspace bootstrap modules

This directory hosts the modular pieces sourced by scripts/setup.sh:

File Responsibility
detect.sh OS / arch / Python detection; resolves IBR_HOST_* and IBR_LEROBOT_PROFILES.
platforms/<id>.sh Per-platform package managers, ROS source, and platform_lerobot_profiles() defaults.
lerobot_patches.sh Drives git am of the curated lerobot patch stack into libs/lerobot.
lerobot_resolve_active.py Resolves the active lerobot tag from INDEX.yaml; cross-checks the per-tag manifest.yaml.
lerobot_filter_series.py Reads manifest.yaml + host facts, prints the patch series that actually applies.
tests/test_lerobot_filter.sh Regression fixtures pinned to the canonical 3-platform matrix + tag-binding cases.

LeRobot patch dispatch

libs/lerobot ships one patch series per supported upstream tag under third_party/patches/lerobot/<tag>/. The single source of truth that selects which tag is active is third_party/patches/lerobot/INDEX.yaml (see Multi-tag layout below). Within the active tag, not every patch applies to every host. The applier filters the raw series.txt through lerobot_filter_series.py, which gates each patch on independent predicates declared in manifest.yaml:

  • python_min / python_max — bounded interval (>=3.10, <3.11, ...).
  • profiles — set intersection against the active profile set.

The active profile set is resolved with this precedence (highest first):

  1. --lerobot-profiles core,ascend,... CLI flag on setup.sh.
  2. IBR_LEROBOT_PROFILES=core,ascend,... environment variable.
  3. platform_lerobot_profiles callback in the active platform script.
  4. The fallback core,ros,hardware,dev.

Common overrides for hardware bring-up

# Force the Ascend NPU patches on a desktop verifying inference parity:
./scripts/setup.sh --yes --lerobot-profiles core,ros,hardware,ascend

# Bring up an OpenHarmony device as if it were a vanilla core target:
./scripts/setup.sh --yes --lerobot-profiles core

# Explicitly bypass the filter (last-resort escape hatch — applies the raw
# series.txt verbatim, even patches that do not match host facts):
IBR_LEROBOT_FORCE_UNFILTERED=1 ./scripts/setup.sh --yes

Diagnosing the filter

The applier prints a [CTX] python=X.Y profiles=... audit line and a KEEP / SKIP decision for every patch. To preview without touching libs/lerobot:

IBR_HOST_PYTHON_VERSION=3.11 \
IBR_LEROBOT_PROFILES=core,ros,hardware,openeuler \
  python3 scripts/setup/lerobot_filter_series.py \
    --manifest third_party/patches/lerobot/v0.5.1/manifest.yaml \
    --series   third_party/patches/lerobot/v0.5.1/series.txt

When to add a new patch

  1. Add the patch file under the active tag's directory (third_party/patches/lerobot/<active_tag>/; <active_tag> is whatever INDEX.yaml.active_tag currently points at).
  2. Append it to that tag's series.txt.
  3. Register a patches[] entry in the same directory's manifest.yaml declaring explicit python_min / python_max / profiles predicates. Default to the narrowest set that is known to be safe; broaden later once verified on additional platforms.
  4. Add a fixture line to scripts/setup/tests/test_lerobot_filter.sh so the pre-commit hook catches accidental scope changes.

Multi-tag layout

third_party/patches/lerobot/INDEX.yaml is the single source of truth for which upstream lerobot tag the setup script targets. Each tag owns its own directory of patches plus a manifest.yaml that re-declares the binding so the resolver can fail closed on drift:

third_party/patches/lerobot/
├── INDEX.yaml                  # active_tag + supported_tags + archived_tags
├── v0.5.1/                     # one directory per supported tag
│   ├── manifest.yaml           # declares lerobot_tag + lerobot_commit_range
│   ├── series.txt
│   └── 0001-*.patch ...
└── v0.6.0/                     # (example: future tag added side-by-side)
    └── ...

The resolver (lerobot_resolve_active.py) enforces these invariants:

Invariant Failure mode
INDEX.active_tag matches a supported_tags[] entry resolver exits 1 with "active_tag not found"
The active entry's dir exists with manifest.yaml + series.txt resolver exits 1 with "directory does not exist"
INDEX.supported_tags[i].upstream_commit == manifest.lerobot_commit_range.min resolver exits 1 with "INDEX vs manifest mismatch"
INDEX.active_tag is not present in archived_tags[] resolver exits 1 with "archived tag"
libs/lerobot HEAD prior to patch application falls inside manifest.lerobot_commit_range filter exits 1 with "HEAD not in commit_range"

Upgrading to a new lerobot tag

  1. Bump the libs/lerobot submodule to the new upstream tip and record the resulting sha as <NEW_COMMIT>.
  2. Create third_party/patches/lerobot/<NEW_TAG>/ and rebase the patches you need on top of <NEW_COMMIT> (drop / port any that no longer apply). Author a fresh manifest.yaml with:
    lerobot_tag: <NEW_TAG>
    lerobot_commit_range:
      min: <NEW_COMMIT>
      max: <NEW_COMMIT>     # widen later if you accept fast-forward upstreams
    
  3. Append a supported_tags[] entry under INDEX.yaml pointing at the new directory, with matching upstream_commit and a unique branch_name (convention: ibrobot/lerobot-<NEW_TAG>-patched).
  4. Flip INDEX.yaml.active_tag to <NEW_TAG>. Optionally move the previous tag's entry from supported_tags[] into archived_tags[] once it is no longer maintained — archived entries stay in tree for audit but the resolver refuses to use them.
  5. Add fixture coverage for the new tag in scripts/setup/tests/test_lerobot_filter.sh and run the regression harness; both the resolver and the per-platform filter cases must pass before submitting.

Failure modes

Symptom Cause Fix
lerobot_filter_series.py failed with exit 1, "PyYAML required but missing" venv lacks python3-yaml pip install pyyaml in the workspace venv, or set IBR_LEROBOT_FORCE_UNFILTERED=1 to skip filtering.
failed to parse manifest, exit 1 manifest.yaml is malformed Lint the YAML; the applier fails closed by design.
lerobot_resolve_active.py failed, "active_tag not found" INDEX.yaml.active_tag does not match any supported_tags[] entry Add the entry, or fix the active_tag value.
lerobot_resolve_active.py failed, "INDEX vs manifest mismatch" INDEX.supported_tags[i].upstream_commit and manifest.lerobot_commit_range.min disagree Update one to match the other; they MUST be kept in sync.
libs/lerobot HEAD ... is not in the manifest commit_range submodule HEAD diverged from the active tag's declared range Either checkout the expected base, fast-forward the manifest range, or add a new tag directory + flip INDEX.yaml.active_tag.
Worktree dirty, applier aborts local edits in libs/lerobot Stash / commit your edits, or set IBR_LEROBOT_FORCE_REBUILD=1 to discard them and rebuild the patched branch from scratch.