Skip to content

fix(package): ship bundled reference poses in the wheel - #14

Merged
Eleanor1018 merged 1 commit into
Roboparty:mainfrom
dundysm:fix-13-wheel-reference-poses
Oct 16, 2026
Merged

Eleanor1018 merged 1 commit into
Roboparty:mainfrom
dundysm:fix-13-wheel-reference-poses

Conversation

@dundysm

@dundysm dundysm commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

root cause: the linux and macos desktop installer installs hhtools from the wheel, but assets/reference_poses/ lives outside the package, so it never ships. in a wheel install bundled_reference_bvh_path() returns None for lafan, soma, mocap and xsens. lafan then silently falls back to the synthetic bind rest in build_scaler_config_from_calibration and to the hardcoded static reference in _build_static_lafan. that's why the deb retargets lafan badly while a source build looks right. the windows runtime copies the folder explicitly, so only linux and mac were affected.

fix: move the zero frame files to hhtools/data/reference_poses/, declare them as package data, and resolve them relative to the package. the lookup table, precedence and fallbacks are unchanged. prepare-runtime.mjs, docstrings and make_reference_pose_bvh.py now use the new path.

test: tests/retarget/test_bundled_reference_poses.py checks that every reference resolves inside the installed package, that the package-data globs cover every file, and that the lafan calibration reference loads from the bundled bvh. 5 of its 6 checks fail on main and all pass with this change.

verification: the built wheel contains all 5 reference files, and a clean venv install of that wheel resolves all four references plus the lafan 17 joint reference.

alternative: if you'd rather keep the assets/ layout, a setuptools build hook could copy the files into the package at build time instead. happy to switch.

Fixes #13

@jaggerShen @Eleanor1018

中文摘要:桌面版通过 wheel 安装时未打包参考姿态文件,导致 LAFAN 校准回退到默认姿态;现将其移入包内并添加回归测试。

The desktop installer on Linux and macOS installs hhtools from the
wheel, and assets/reference_poses lived outside the package, so
bundled_reference_bvh_path() returned None for every format. LAFAN
calibration then silently fell back to the synthetic bind rest and the
hardcoded static reference, which degraded retarget quality compared to
a source checkout.

Move the zero frame reference files into hhtools/data/reference_poses,
declare them as package data, and resolve them relative to the package.
The lookup table and fallbacks are unchanged. Add a regression test that
every reference resolves inside the installed package and is covered by
package data.

Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
@dundysm

dundysm commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@Eleanor1018 @jaggerShen ready for a look when you have a moment.

This is the wheel packaging fix for #13: reference poses now ship inside the package so the desktop deb matches source/web retargeting for lafan (and soma/mocap/xsens). Includes a regression test that each reference resolves from an installed wheel.

Happy to adjust if you'd rather keep the assets/ layout with a build-hook copy instead.

AIResearcherHZ pushed a commit to AIResearcherHZ/human-humanoid-tools that referenced this pull request Oct 16, 2026
…-workbench

Feature/consolidated workbench
@Eleanor1018
Eleanor1018 merged commit e37b623 into Roboparty:main Oct 16, 2026
5 checks passed
@Eleanor1018

Copy link
Copy Markdown
Contributor

@dundysm Pull request have been merged. We will update Linux(deb) and MacOS(dmg) as soon as possible. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question about lafan_bvh motion retarget

2 participants